Archive for May, 2008

Programming is Fun (Again)

Saturday, May 31st, 2008

I’ve been programming since 1975 and, boy, are my arms tired :)

Throughout these times, I’ve seen numerous developments that have made programming easier or harder. Consider this:

I first started programming when I was 15 years old. This was on a Univac 1108 running an interactive BASIC interpreter. As this was my first development environment, I thought it was great. I wrote a cool football game. Call the score +1.

The following year, I took a Fortran class where we had to punch card decks and wait several days for our output to be returned. Life without a “backspace” key is very painful. Running score: -5.

My first “microcomputer” was a Scelbi 8H (Intel 8008) computer. I had to enter machine language programs (hand assembled) using front panel switches in a very, very, primitive way (even more so than on the Altair or PDP 8 or other front panel computers). Running score: -20.

The arrival of the Altair 8800 greatly improved things. I used Microsoft BASIC and was able to store programs on big 8″ floppy disks instead of unreliable cassette tape. Running score: +10.

In college, it was back to punched cards on an IBM 360. At least we got to prepare our “virtual card decks” on a 370 running VM/CMS and we got back our results in an hour or two. Life is much better with a backspace key. Running score: +5. 

Worked on an Apple II running UCSD Pascal. Color graphics, a cool IDE and the first incarnation of “DLLs” (Pascal packages). Running score: +20.

Went to work at HP. First used HP3000 to cross-compile Pascal to x86, but then started using IBM PCs and Lattice C compiler. Used Microsoft “debug” program at first and then Microsoft CodeView. Great stuff. Running score: +50.

Got a job at Microsoft. Started writing C++ code using cfront based compiler. Lots of multiple inheritance, virtual inheritance, templated classes. A one-line C++ constructor call turns into a 75 line C statement with about 120 comma operators. Program takes 7 hours to build. Writing Windows applications requires message loops and wndprocs not to mention dealing with near, medium and far pointers. Running score: +25.

We (I was in the Developer Tools group) deliver QuickC for Windows and Visual C++ 2.0 for Windows NT. We say goodbye to 16-bit applications. We deliver MFC and we facilitate “visual programming” in order to make Windows programming easier. Running score: +40.

Everything goes OLE/COM. The ATL library is released to help with COM. Running score: +25.

I leave Microsoft. Microsoft releases C# and .NET. Writing Windows applications is really, really, easy now. The .NET interop stuff makes COM a little easier, too. Not having to worry about memory overwrites and leaks: priceless. Running score: +40.

I start Likewise Software (Centeris, back then). Microsoft releases .NET 2.0 and MMC 3.0. It becomes ridiculously easy to write complicated applications that combine Winforms applications, web services, database access, LDAP access and just about anything else that you can think of. Running score: +100.

At the risk of sounding like a crusty old programmer, today’s programmers don’t know how good they have it. It’s rare for me to find a developer who can code an insert-into-a-sorted-singly-linked-list function without screwing up a corner condition or two. This isn’t surprising - who cares about data structures and standard algorithms anymore when you can declare a List<string> and then call the List.Sort() function? Who cares whether the sort is amortized on the insert or performed repeatedly every time you call Sort()! CPU cycles are cheap and plentiful.

There has been no better time to be a software developer. It is possible to develop insanely complicated applications by building on top of existing components. Todays compilers, editors, debuggers and run-time libraries are a joy to use compared to their predecessors.

By the way, unless you worked at Borland or in the Developer Tools group of Microsoft you probably don’t know that a lot of praise is due to one particular person who’s made a lot of this goodness happen. In the 1980s, Anders Hejlsberg developed Turbo Pascal. Turbo Pascal took everything that UCSD Pascal had done earlier and did it much better. It provided an IDE that integrated an editor and an extremely fast compiler. Beyond this, however, Turbo Pascal provided a run-time library that was the work of genius. Instead of having to call into the operating system or manipulate the hardware directly, 9 times out of 10, the library had exactly the functionality you were looking for.

At the time, I was working in the Developer Tools group at Microsoft and Borland was our arch enemy. Borland released Turbo C - a great product on its own - but we were lucky that Anders never turned his attentions to C. While Microsoft eventually won the C++ battle (mostly, through the introduction of Visual C++ and MFC), Anders turned his attentions to Delphi. Delphi did some extremely clever things to make forms-oriented Windows programming easier.

Microsoft ultimately hired just about everyone from Borland: Brad Silverberg, Paul Gross and Sin Lew, for example. A couple of years later, at considerable cost, Microsoft finally hired Anders. Anders became the architect of C# and a key contributor to the .NET initiative. If the ACM would bother to look beyond academia, Anders would be a prime candidate for a Turing.

What Linux Needs To Learn From Windows

Friday, May 30th, 2008

My company (Likewise Software) develops software for UNIX, Linux and Mac OS X. Our code is system-level, infrastructure, software. It interacts with the authentication components in the OS in order to allow users to login to these non-Windows systems using their Microsoft Active Directory credentials. By supporting single username/password and single sign-on and by supporting Windows-style “group policy” on non-Windows systems we can greatly facilitate account management, greatly improve security and greatly improve the odds that companies who use our product will comply with SOX, PCI and other regulations and standards. 

Writing this software in order to support 110+ software platforms is a bitch and the bitch’s name is “Linux”. Her sisters “UNIX” and “Mac OS X” aren’t gals you’d take home to meet mother, either. Here’s why.

(Note: my apologies for the misogynistic literary device. No offense intended.)

All flavors of Linux start with a common base: Linus’ kernel, currently version 2.6.XXXX.  Of course, there’s still plenty of Linux in use that is based on an older kernel, 2.4.XXXX. The kernels are a little different. The run-time libraries associated with them might differ; the threading might be a little different but if that was all I was complaining about, you’d be right to accuse me of whining.

Although Linux distributors start with this common base, they all go on to add their own special sauce to distinguish their product from others’. In the US, we have Red Hat, Novell (SuSE) and Ubuntu (a Debian variant). We also have Oracle Enterprise Linux and Centos (Red Hat variants) and VMWare ESX (Red Hat 3 variant) to consider. In Europe, you add Madriva to the mix while in Asia, you have to take Asianux and its derivatives (Red Wall, etc.) into account.

Each distributor typically writes their own installer and, rightfully so, competes on the basis of how easy they can make the installation process. Alas, installation involves choosing (directly or indirectly) which additional packages need to be installed. At this point, things begin to get messy because some systems use rpm packaging and others use deb packaging. Although all distributors include a similar set of packages in their pools (including things like Apache, Samba, MySQL, etc.) they sometimes choose to include different versions of these packages with their distributions. Sometimes, out of pure spite, some packages (e.g. Mono) are excluded by one vendor because they were developed by another whom they don’t want to support.

Even at this point, the situation is not too bad. You’d still date the gal - she’s good looking and she has a nice personality, even if she tends to dress in stripes and polka dots.

Where things begin to get complicated is when you’re writing software that’s anything but trivial. You say you want to write a graphical application? Are you going to write it for KDE or Gnome (the two most common desktop managers in use in Linux)? Maybe you should write it using GTK+? Maybe you should use Mono so that you can use Visual Studio for both Windows and Linux development.

You say you want to write some system software (like we do)? Be prepared for differences in:

  • System initialization sequence 
  • Daemon scripts (/etc/init.d)
  • Networking mechanisms
  • “Hardened Linux” mechanisms (SELinux, App Armor)
  • Network firewall management
  • System management infrastructure

Inside every Linux application lives a big, complicated, “if” statement that has to deal with special cases for each distribution and release of Linux. I’ve written the same statement for Windows 95/Windows NT/Vista - trust me, it’s not as complicated.

Now that you’ve noticed that Ms. Linux has a bad case of acne, you might as well consider her sisters. Forget UNIX. The differences between Linuxes is nothing compared to the differences between HPUX, AIX and Solaris. Consider Mac OS X. She’s clearly adopted.

Mac OS X is based on FreeBSD, not Linux. Everything listed above is different on the Mac, too. We do a lot of work with PAM and NSSWITCH. At least, all the UNIXes and Linuxes have PAM and NSSWITCH (okay, AIX 4.x has LAM, but close enough). The Mac doesn’t have these components - it’s replaced with the the Mac Open Directory API. A pretty cool API, but nothing like its siblings.

It’s tempting to position Linux and Mac OS X as Microsoft killers. Microsoft has its shares of problems which Vista has done nothing but accentuate.  We’ve seen increased numbers of Linux desktop projects and Mac OS X machines showing up in “the enterprise.” This is just one of the factors that is driving an incredible amount of business in our direction. Nevertheless, I think that the operating system business is still Microsoft’s to lose. The competition is, at best, a hodgepodge of uncoordinated attempts to define an alternative to Windows.

Is there any hope that a single other OS will displace Windows? If this is to happen, I think it must be preceded by several things:

  1. IBM and HP need to continue to promote Linux and phase out AIX and HPUX.
  2. Sun needs to give up on Solaris/Open Solaris and get behind Linux.
  3. The Linux foundation or some other more effective organization needs to drive more forcefully towards a widely accepted standard Linux. The “standard” needs to go beyond the kernel. We need blessed “stacks” of components and we need agreement on all the areas of difference that I mentioned earlier. Most significantly, we need a standard GUI stack, window manager, desktop, and system management API (By the way,  Linux and UNIX, for the most part, don’t even have a system management API. There are things like Yast, WBEM, ZenWorks and WS-Management floating around but none of them has any wide acceptance. For the most part, management applications just muck directly with system configuration files.)

This, at least, would result in making Linux a more credible alternative to Windows. Mac OS X, would still remain an outlier. There’s very little likelihood of Apple releasing Carbon into the public domain. This is a tragedy as Mac OS X is much, much, better positioned to challenge Windows on the desktop.  Although Mac OS X Server is a fine operating system, it doesn’t help sell any IBM, HP or Sun hardware. Apple’s iPod/iPhone cachet does not buy it anything in the server business.

The answer to my question then is “no, there is no hope that a single other OS will displace Windows.” At least, not unless Apple decides to go totally open source and to port Mac OS X to Linux and make all of its API available under GPL or similar license.

The Decline and Fall of Microsoft? Conclusion.

Thursday, May 29th, 2008

What can Microsoft do to reverse the trends that I’ve talked about in the last 4 posts? First, let me admit that it’s possible that Microsoft accomplish this by doing what it’s always done: grinding it out. Keep investing in Windows Mobile; keep pouring money into MSN; invest some serious money in the Zune business. Sheer grit and determination can overcome many missteps. If Microsoft can persevere, they can wait for a competitor to make a major mistake and then step in and take up the slack. The Sony PS3’s strategy for online gaming is an excellent example of this. Sony made a bad decision and the XBox business was able to profit from it.

If I sat on the Microsoft board, however, I would be very nervous counting on the “grit” strategy. I would be looking for bolder ways to transform the company while it is still healthy and dominant. As I suggested in the first installment of this series, I think Microsoft has to start by asking itself the ultimate TQC question: what is it doing wrong that is causing it to generate bad processes? “Processes” here can refer to many things. Product design and software development processes are obvious places to consider but I think even more important are strategic planning and basic financial processes.

Here are some of my answers to these questions based on 10-year old knowledge and interpolation with what I hear from friends who are still at the company:

1. Project planning is resulting in poor products because the company has too many people involved in the design process. Microsoft Vista had dozens of program managers working on it. Microsoft Excel 1.0 had 1 program manager on it. Is the difference between Windows XP and Vista 50 times more complex to manage than Excel 1.0? If so, that’s probably a sign that you’re doing something wrong.

Update 6/19/2008 - I’m told by Microsoft folk that my numbers are way off here, that it was more like 10,000 developers and 1,000 program managers. I just can’t fathom these numbers so I’m going to pretend that there were 1,000 devs and no more than 100 PMs that mattered.

2. Complex products require huge development teams. There’s simply no efficient way to integrate the work of 1,000 developers. If you can’t do daily builds and if developers have to wait weeks for their checkins to appear in public builds, you’re doing something wrong.

3. Thousands of developers and testers coupled with dozens of program managers require large product units and even larger business units. If your business units are large, few people in the unit will truly feel “P&L responsibility”. If a unit fails to meet its goals, the BUM may feel the pain but the 2,000 people who work for him/her are not going to get fired and probably won’t even see smaller bonus checks. On the other hand, if you have too many business units, you’ll inevitably end up with overlap and turf wars between them.

4. When a company is as large as Microsoft, central planning is impossible. You can set broad goals but there’s no way that the Chairman and CEO can know enough about all their businesses to be able to contribute much to their strategies.

There’s a common thread that runs through all of my observations: Microsoft is simply too big. Its size results in poor planning, bad financial management and excessively complex products/projects that are impossible to manage.

Just like the Roman Empire, I think it’s time for Microsoft to split itself up - even more so than Rome/Constantinople. Windows, Windows Mobile, XBox, MSN, Windows Live, Applications, Hardware: each of these should become a completely separate entity. Each of them should have its own CEO and its own stock. More importantly, each of these should be its own financial entity. They can start out with a good “stake” from the parent company, but each would have to demonstrate its own profitability or go out of business. Can you imagine the MSN Company trying to fund a leveraged buyout of Yahoo for $40B+ if it only had $4B in the bank? A smaller company would never contemplate such a boneheaded move.

Ideally, each Baby Bill would start out with 1,500-2,000 people.  I suspect that over time, several of them would shrink in order to maintain their profitability. The “parent” company could, perhaps, keep the Windows business and Microsoft Research and could provide services to the others in order to avoid needless duplicating infrastructure.

The companies would still have the problems I’ve been describing. The Microsoft brand would still be less cool than Apple’s; Microsoft would still need to improve its management culture; Microsoft would still need to learn how to succeed in areas other than technical prowess. The Baby Bills, however, would allow managers more freedom to experiment and would provide more incentives for success and more penalties for failure. Removing the $20B+ safety net would make Microsoft a more dangerous place to work and, I think, Microsoft would benefit greatly from it.

The Decline and Fall of Microsoft? Part 4.

Wednesday, May 28th, 2008

Contrary to what many believe, innovation has been central to the success of Microsoft. The reason why some people fail to see the innovative side of the company is because they are looking in the wrong places. Although there has been some innovation in the visible side of software, the innovation at the API level has been much more significant.

Before leaving HP in 1986, I’d spent my last year there working on something called “New Wave.” This project was trying to figure out a software architecture that would support many useful concepts: embedding of documents inside other documents, providing “links” between documents. allowing “drag & drop” between documents. If these features sound familiar, they should. They were enabled by Microsoft’s “OLE” (Object Linking and Embedding) in the late 80s/early 90s. The concept wasn’t invented by Microsoft (nor HP for that matter) but the software mechanism to make the features available and to work in an efficient process was. OLE later morphed into “COM” - a technology that did much to enable software “building blocks”.

Does anyone remember CORBA? Can anyone name 3 major applications that supported it? Probably not. While Microsoft was developing OLE and COM, the Object Management Group (composed of HP, IBM, Sun, Apple and others) was trying to do the same in an multi-vendor, cooperative, fashion. While Microsoft solved the problem exclusively for Windows on Intel architectures and only when using C++ or Visual BASIC, The OMG was trying to solve the problem in an OS-idependent, architecture-independent, and language-independent fashion.

We used to say at Microsoft, “if one person can do a job in a year, two people can do the job in two years.” Imagine the efficiency of 11 companies trying to design CORBA by committee.

OLE/COM is but one example of Microsoft innovations at the API level. The Windows GDI API unified display and printing code (in a way Postscript/News once sought to do). The DirectX API allowed game developers to efficiently access hardware while exploiting graphics and sound accelerators provided via Windows drivers. ODBC, ODB and ADO (and now LinQ) have provided progressively easier ways of accessing data in relational databases.

As a long-time software developer (pre Altair!), I can say that C# and .NET, coupled with Visual Studio, have made programming incredibly productive and even “fun” again.

Beyond these are things like the Microsoft Office API (including the functionality available to built-in macros), the various specialized APIs (driver layer, speech, NLP, etc.) and now Silverlight 2.0 which promises to finally make writing Web 2.0 applications a less-than wretched experience.

Alas, these API innovations are no longer enough to guarantee Microsoft’s success.

Windows has 90%+ of the desktop computer market and 65% or so of the server market. Microsoft office has 90%+ of the office software suite. 

Improving the Windows or Office APIs does not help Microsoft make any more money. Operating systems and productivity applications pretty much do what people need them to do. Purchase decisions are beginning to be made based on criteria other than technical prowess.

To continue to succeed, Microsoft needs to grow into new markets. Here are a few businesses that Microsoft is trying to develop:

  • Mobile-phone and PDA software (Windows Mobile)
  • Web-based search (advertising)
  • Game consoles (XBox) 
  • Media players (Zune)
  • Enterprise line-of-business applications (ERP, CRM, etc.)

In which of these markets has Microsoft achieved at least 50% market share? None! 30%? None! The XBox is most successful at just under 30% market share (sales, not units). Windows mobile is at about 6% (below the iPhone!). MSN? 10%. Zune? Even my Microsoft friends laugh when I tell them I bought a Zune.

That the XBox is the most successful business is consistent with my focus on APIs; game developers are still very much interested in platform features, tools and functionality.

Microsoft started as a developer tools company (Microsoft BASIC). Some prodding by IBM got it into the OS and, thus, the API business. As it grew its Applications business, it never lost its core focus. I heard Bill Gates once comment on how “all great applications have been programmable” and I think he was stating, not only a truism, but also Microsoft’s subconcious mantra.

As long as tools and APIs were driving product functionality and purchasing decisions, Microsoft would see tremendous success. Now that this is no longer the case, Microsoft will begin to suffer.

The Decline and Fall of Microsoft? Part 3.

Tuesday, May 27th, 2008

For various reasons, I find myself flying much more frequently now than I ever have. Being a frequent flyer, I’m occasionally upgraded to first class where I get to sit with…other frequent flyers. These fellow FF’ers are often fellow businesspeople, too. Although I mostly like to keep quiet and read some airport fiction, I sometimes end up striking a conversation with a neighbor.

On a flight not too long ago, I sat next to a man who had started a business that makes high-tech coatings for glass. These are not the sticky films they sell on late night TV; they’re chemically deposited coatings used by premium glass manufacturers. I wasn’t surprised that the company is starting to focus on “green” coatings that reduce energy use or actually generate electricity while remaining transparent. What surprised me, however, was the reason the executive had decided to focus on green products. It wasn’t because the economic math was starting to make sense. Quite the opposite, the company had decided to develop green products because “it (was) no longer a purely economic argument”. He explained that ”cultural elements had taken hold” that convinced them the trend would be long lasting. He was convinced that the world’s interest in reducing energy use and carbon emissions had reached a level of acceptance that it would be, for all intents and purposes, “permanent.” At first, this sounded completely backward to me. I could imagine them ignoring purely cultural trends if the economic terms were not favorable but I could not imagine them doing the opposite — ignoring economic conditions because the cultural trends were lacking.

I’ve discussed this anecdote with several people and the more I think and talk about it, the more I accept the argument. Cultural movements can be much more effective and long-lasting than economic parameters. Although it can be argued that we’ve yet to achieve the goals of the civil rights or the equal rights movements - it can not be argued that each of these hasn’t permanently affected the way that we consider race and gender. Campaigns against littering and smoking have also seen great success once they’ve achieved at setting the “norm.” If you see someone throw out empty food wrappers from his/her car you probably have a strong visceral reaction (”what a pig!”). My smoker friends tell me they definitely feel similar contempt rays emanating from non-smokers.

I believe we are beginning to see cultural trends that bode badly for Microsoft. Microsoft is simply not cool anymore. (Arguably, Microsoft was never “cool” but is now, perhaps, explicitly “uncool”).

There’s some clear evidence of this. Consider how Microsoft and Apple have fared on the Forbes “Most Admired Companies” list during the last few years:

Apple Microsoft
2006 11 10
2007 7 12
2008 1 16

In 2008, both Target and P&G were listed higher on the Forbes “most admired companies” list. Now, I’m not sure I agree 100% with Forbes’ methodology but any methodology that ends up with a low-cost retailer and a toothpaste company ahead of Microsoft tells me that Microsoft is, indeed, losing its mojo.

Another clear evidence point can be seen by visiting your neighborhood Starbucks and counting Mac vs. Windows laptops. While the numbers are higher in Bellevue and Redmond, they’re dismal in San Franciso, Boston and New York. My own family, Windows users for many years, are checking out the “cute” Mac laptops and Mac Minis. My son, perhaps the most loyal to Microsoft (he’s a gamer), has been Beta testing the one-laptop-per-child OS in his high-school and is asking about how one installs Linux.

I won’t go into why Apple is succeeding where Microsoft is not. Anyone who has looked at iPods and Zunes or iPhones and Windows Mobile phones knows the answer to this question.

Beyond Apple’s success is Microsoft’s failure. Windows Vista is not cool. Sure, it has pretty graphics, but we were already seeing those graphics on the Mac and I can also see them on my $400 Ubuntu Eee PC machine that doesn’t require 2Gb of memory to run well. Microsoft Office 2007 is also not cool. Sure it has a couple of neat features here and there but why does it force me to re-learn a UI that I’ve known for years? Why does it default to the new file format? Why is it so incredibly slow on my cool Mac laptop?

MSN is the new AOL. The only people I know who have their home page on MSN are those who haven’t figured out how to change it to Google. Microsoft buying Yahoo search is tantamount to Ford buying Yugo for its engineering prowess.

There are still a few cool things at Microsoft. The XBox 360 is cool. Sure, the PS3 folk scoff, but XBox live rocks and there’s still very few games that take advantage of the PS3. If you want a great multi-player gaming experience there’s no better alternative.

There’s stuff at Microsoft Research that’s incredibly cool. Check out “Group Shot” or  “Photo Synth”.

As a whole, however, the public perception of Microsoft has changed. There was a time when everyone was using Windows XP and Microsoft Office at work and could not imagine anything that worked better. Macs were around but occasionally blew up with “sad Mac error #6″ or whatever. Those days are gone. There are kids in college now who’ve remember only Windows computers. For them, Microsoft represents “their father’s operating system.”  Apple is the cool “new” company. Google is the best place to work.

Macs may be more expensive than PCs. There are strong economic arguments for buying Microsoft products. Personally, though, I’d keep my eye on the cultural arguments for not buying them.