Mauro 的个人资料Taming the Jungle照片日志列表 工具 帮助

日志


3月31日

The Cloud Manifesto and it’s dark origin

There’s some buzz going on over the Web about the so called “Could Manifesto” (http://opencloudmanifesto.org/). It’s supposedly a technical manifesto asking for companies providing “could” hosting to be open, interoperable, nice and good-smelling. Their motto is “dedicated to the belief that the cloud should be open”.
 
At first one would think this is just the usual naïve, hippie, Richard Stallmanesque wishful thinking.
 
Yeaa, right. We have at least three companies (Microsoft, Google, Amazon) spending billions of dollars to set up cloud infrastructure, both hardware and software. Cloud hosting is a challenging environment, one for which the current software and hardware infrastructure is unable to meet for several technical reasons. That’s why those companies are investing on it.
 
Or, according to the Manifesto these companies are supposed to do one of the following:
 
  • Not leverage their hard-earned Intellectual Property and donate it to Mankind so other companies that didn’t spend anything developing cloud services can profit from it;
  • Use old infrastructure, the same one that put us in the situation of needing could services, that is, infrastructure that would not work in the cloud.

Both are business suicides.

Now it seems that IBM – a company notable for its lack of cloud offers – is behind the manifesto: http://news.cnet.com/8301-13505_3-10206927-16.html. Shame on you, IBM.
3月25日

The Wonderfull World of Scorecards

Suppose you are managed under a scorecard system: you have a numeric objective (i.e. numeric) criteria and you follow it, even knowing that might leave “something to be desired” or “it might not be the absolute best for the company”.
 
Let me give you an example: suppose you are an executive in the financial arm of a major insurance company. Your scorecard tells you that you get big cash bonuses if you sell “XYZ” financial instrument, say insurance against default on a AAA-rated package of crappy loans, a product you might have some mixed feelings about. Anyway you sell it left and right and cash in your bonuses. What else can you do? You are just a peon on the check board. Someone high up in the hierarchy must know better and have reasons to act this way. They do, BTW – and their reasons are similar to yours: High in the Sky there’s this Godly thing called “Wall Street” that scorecards the top executives of all public company every three months and commands their bonuses, jobs and lives.
 
Despite all the recent turmoil in the financial industry, the Gods are doing fine and didn’t lose their ways. Treasury Secretary Tim Geithner recently said: “AIG highlights broad failures of our financial system…Compensation practices encouraged risk-taking and rewarded short-term profits.”
 
Alan Greespan, of all people, didn’t know that the Gods were evil – or even existed. He found “a flaw in the model I perceived was the critical function in the structure that defines how the world works”… “I made a mistake in presuming that the self-interests of organizations, specifically banks and others, were such as that that they were best capable of protecting their own shareholders and their equity in the firms.”
 
Besides the “short term issue”, scorecards are an attempt to transform essentially subjective things in objective ones, but many times they end up like trying to fit a circle in a square hole. One can hope that even if the score cards were not precise, there would at least be a correlation between the points and what is best for the business.
 
Unfortunately that’s the way for an individual to survive in this environment. In March 2006 I wrote about this: http://maurosjungle.spaces.live.com/blog/cns!F3CEB0849B03B6CC!130.entry.
 
Obviously a good alternative is a system where the selfish interests of the executives are aligned with the selfish interest of the owners. Currently the owners of public US companies, such as a retirement fund, see a 20+ years horizon. The executives see a three months to one year horizon. One wonders why they sink the ship for a quick buck.
 
In places where you have a more “oligarchical” capitalism, where companies are owned by families or small groups you don’t see them doing this sort of blunders (well you see other blunders, but that’s another story).
 
Recently The Economist Magazine ran an article on how the Brazilian banks were spared from the recent financial massacre (http://www.economist.com/world/americas/displaystory.cfm?story_id=13331179). They attributed it to the high interest rates in Brazil, which made the banks “neglect” other “sources of profit”, as if they were fools. Ha ha ha. This is my explanation: all the major banks are tightly controlled and don’t give too much credit to what Wall Street says, so they didn’t join the “subprime gold rush”. They are no fools at all.
3月10日

The Scourge of Multi-Threading and its mitigation

Multi-threading was promoted by IBM in the days of OS/2 2.0 as a way to differentiate it from the far more successful  Windows 3.11. OS/2 had it; Windows only got it with Windows 95. Multi-threading was promoted as a way to never let the user looking at an hourglass cursor again.
 
Never mind that:
  1. The programming effort required to successfully develop a stable multi-threading program was far from trivial;
  2. In most cases there were much more stable and easy ways to code alternatives that relied on co-operative multitasking. One of them was to call Windows message loop (PeekMessage API) inside your own loops. Another would have been to introduce something called “coroutines” at the language level (check Wikipedia if you want to know more about it).
I do believe Mankind would have been better served had we took the coroutine path back then. But IBM marketing folks decided it was not to be. In fact the whole industry fell in love with this multi-threading thing.
 
Hopefully, very few programs *really* needed multi-threading. Things like web browsers, web servers, database servers and application servers did need (and used) it. Your average “Joe programmer” didn’t need to bother – and the few who did bother are to this day trying to figure out what hit them. So the damage was limited.
 
Forward to 2008. We now have CPUs  with two, four and more cores and counting. If they are in a server, the cores are already being heavily used by the highly multi-threaded server software. However, if they sit in a workstation, chances are that the multiple cores are not really being used much. The reason is that most of the time workstations do nothing but wait for user input. When they do run some heavy load, like printing a large report, chances are this program was not developed with multiple cores in mind and run no faster that they would have run in a single core CPU. In order to take advantage of the multiple cores, some clever multi-threading programming is in order. Much clever than the average Joe programmer is capable of, unfortunately.
 
In order to address this problem, Microsoft is coming up with some new clever “parallel extensions” for .NET Framework 4.0. Those extensions include several ways to extract parallelism from the average program with minimum additional complexity. They also include better debugger support, parallel LINQ query and much more.
 
You can check this links to know more about parallel extensions in .NET 4.0: http://msdn.microsoft.com/en-us/magazine/cc817396.aspx, http://msdn.microsoft.com/en-us/magazine/cc163340.aspx.
 
Note that we are not talking about “multi-threading”, but “running parallel”. Although similar, the two things are not quite the same.