Tuesday, May 25, 2010

Halloween XII: The Reckoning

I've been working at Google for almost three months now, and enjoying myself immensely. I'm excited about the Android platform and think it has a very bright future. It's also a fun platform to write code for. This post isn't about Android, though.

The title of this post is a reference to the Halloween Documents, the first of which was an internal Microsoft memo leaked by an employee to Eric S. Raymond, who posted it to his website in 1998 (on Halloween), where it was picked up by Slashdot and other sites. The topic of the memo was the growing threat of Linux and the open-source movement, and the ways in which Microsoft could attempt to neutralize the threat to their closed-source locked-in monopoly OS, office suite, and related products. The other Halloween documents are a combination of other leaked memos and commentary on the topic of Microsoft, and specifically their heavy-handed PR (and other) tactics to try to discredit Linux and open source.

I recently reread the Halloween documents, as well as a number of other articles about Microsoft and their dastardly ways, many of them culled from TechRights.org, a site that tirelessly catalogs all of the wrongdoings of Microsoft and related companies. The list is quite lengthy. In a little over five months, it will be the 12th anniversary of the leaking of the first Halloween memo.

My own personal experiences with Microsoft in the past have been mixed. Sometimes their stuff works well, other times it's somewhat buggy, and far too often it's completely broken in one way or another. By and large, I've tried to stay away from their products as much as possible. In July 2005, I was hired as a software engineer at Danger, Inc., a small startup company that had made a splash in certain communities as the designer of the Hiptop messaging phone, better known as the T-Mobile Sidekick.

During my time at Danger, I implemented a number of features and fixed quite a few bugs in the telephony layer of the stack, and I'm quite proud of the work that I did on the six phones that we shipped during my time there: hiptop/Sidekick 3, iD, LX, Slide, 2008, and LX 2009. I would have happily stayed there, except for the unfortunate situation that we were acquired by Microsoft in 2008.

As I described in a previous post, I did not have a very fun time at Microsoft, in any way, shape, or form. It was an incredibly stressful situation, compounded by the fact that I'm a UNIX guy at heart and found the Windows environment we were working in to be woefully primitive and clunky, and this is coming from a guy who actually likes OpenVMS, for God's sake!

I became more and more depressed until I burned out completely and had to quit last summer. I left a few months before Microsoft lost all the T-Mobile Sidekick users' data: I think I would have lost it completely if I'd been around when that happened. I would have probably thrown a chair at Roz and gotten fired or something.

Perhaps you've guessed by now that I was one of the earliest assigned to work on the Kin project (well, it was "Pink" at the time). I have nothing good to say about that phone. There is literally no reason for anyone to purchase one, unless of course you're a Microsoft employee, and you've been brainwashed into "supporting the team".

The sickest thing to me about the Microsoft experience was how incredibly cult-like the company is. Now I know that Apple has been accused of having something of a cult mentality (no non-iPhones allowed, etc.), but if they're the cult of Steve, at least their cult leader has very good taste.

For the record, Google feels very much like a university or research campus, and freedom of thought and opinion is expected, and rewarded. Engineers are an ornery bunch, and we don't have to censor ourselves if we think something isn't right. It's all about making cool stuff that people will enjoy using, and not about "killing" or "dominating" or "cutting off the air supply" of the competition, as Microsoft once liked to talk about. Of course they're not able to do that so much anymore.

One thing that Microsoft seems to do a lot of is "AstroTurfing", particularly commenting on news stories about Microsoft with fawning comments that don't seem like they came from a real person. The big tip-off signs of a comment that obviously came from a MSFT employee are that they refer to the company as MSFT and not MS or M$ or any other abbreviation, they tote the party line, cheerlead for some product or other, and never say anything negative. There is an independent Windows "enthusiast" contingent that likes to pimp Microsoft, especially if they can put down Apple or Google at the same time, but those guys tend to not sound so much like they're from the People's Republic of MSFT. Seriously, if you work at the company, write that in a disclaimer or something... oh wait, you can't do that because your comment would sound even more pathetic. Maybe you shouldn't comment at all then, if you find yourself in that position.

There's a famous quote by John Gilmore of the EFF: "The Net interprets censorship as damage and routes around it." I'd like to think that over the past 10 years, the entire tech community has decided to interpret Microsoft as damage and has quite successfully routed around them in a variety of ways, starting with Firefox, OpenOffice, and the increasing popularity of Linux distributions such as Ubuntu, and more recently with some of the stuff Google has been doing, such as Android, and Chrome. [edit: and of course all the awesome stuff that Apple has been doing since the return of Steve Jobs. Apple has been the huge tech success story of the past decade (well, Apple and Google), and I can't believe I left them off the list.]

Gmail and Google Docs aren't open source, but in terms of "routing around (the brain damage of) MS Office/Exchange/SharePoint", I can say that I'm enjoying the Google Apps experience far more than I did the equivalent Microsoft version. The Google Docs word processor and spreadsheet are still somewhat primitive, but my needs are generally pretty simple, and if I need more power, I can always use OpenOffice. I wouldn't have thought that I could be so happy switching back to Ubuntu, Gmail, vim and IntelliJ, from using the "latest and greatest" Windows, Office, SharePoint, Visual Studio, etc. at Microsoft. Did I mention how much I hated working on Windows Mobile? That stuff is just broken beyond belief.

And it's in the mobile space where Microsoft has most completely fallen down. One thing I learned about myself from the whole Kin ordeal was that I truly have a great deal of identification with the stuff that I'm working on. If I don't think there's a purpose and a meaning behind the code I'm writing, then I become very upset. Now a company like Google would tend to think that being passionate about making the best possible product is probably a good trait to have in a software engineer, but it's a genuine disadvantage at a company like Microsoft, where all is politics, and the middle management is utterly adrift.

Let me just say that I think that Steve Ballmer is a clown and a buffoon, and he has no idea just how utterly pointless the whole "Windows Phone 7" exercise is. Good luck with that, dude, but I don't see it having any more of a chance than Kin did (i.e. slim to none). The rest of the mobile industry has already routed around your flavor of brain damage, and I hate to break it to you, but I'm pretty sure that your remaining handset and carrier partners are pretty much just humoring you at this point.

In the end, I'd say that Paul Graham called it, when he blogged in 2007 that Microsoft has been dead since about 2005. They've been dead in the sense that the other innovators in the market no longer fear that they'll step all over them and screw things up. Well, they could (and did) do that to Danger by acquiring us, and they stepped all over Yahoo by threatening to buy them, so they still have some power to interfere with progress. They can still bully companies who ship Linux products into coughing up royalties for their alleged Linux patents, but that's not really something to be proud of now, is it?

I am so glad I don't work at Microsoft anymore. Actually, I'm extra glad that I landed a job at Google to work on Android. Google is pretty much the anti-Microsoft, and Android is something like the anti-Windows, and since I was so miserable over there, it's no surprise that I would be pretty happy working over here. Plus, the free food in the cafes is pretty tasty.

Wednesday, March 24, 2010

Achievement Unlocked

Working at Google is a lot of fun. The Nexus One is a very impressive phone and Android is a very cool platform to work with. Since I've been a big fan of Gmail, Google search, Blogger, YouTube, and many other Google products for years, it's really amazing to be working at the company that created all of that cool stuff, and to get to play with new features and new products before they are released to the public. The first week I really felt like I had unlocked an achievement in a videogame. It's very cool, and the free food is very tasty as well!

One fairly new Google service that not many people have heard of is Google Public DNS, which is a free public high-performance and secure DNS resolution service that you can use instead of the DNS resolver provided by your Internet provider. If you're not familiar with DNS, it's the service that translates the hostname that you type into your browser, for example "example.com", into a numeric IP address, such as 192.0.32.10 for example.com.

(BTW, Wikipedia's entry for DNS also uses example.com for its example hostname, but I hadn't read it when I wrote the previous sentence. I knew that "example.com" is officially reserved for the purpose of using as an example, and apparently so did the author of the Wikipedia entry!)

The IP address is what's used for the actual routing of data to the server, but hostnames are almost always used in URLs instead of IP addresses so that the URL will continue to point to the correct site no matter where the physical server is located. For a large site such as google.com, there are many thousands of web servers distributed across a number of data centers around the world with different IP addresses that all serve the same content. One of the features of DNS resolution is that the DNS server for a given domain can be configured to return different IP addresses depending on where the requesting server is physically located, so that requests to the actual web site will hopefully be routed to the nearest and least heavily loaded web servers.

Normally your computer will never perform the task of recursive DNS lookup directly (there are a few dozen root servers which in turn point to the DNS servers that are authoritative for a particular domain, and then you must query those servers to get the IP address of the full hostname), but will use a caching DNS server provided by your Internet provider, which will be typically be automatically configured for you by DHCP when you connect your computer to your router. The advantage of using a caching DNS server is that it saves a lot of time compared to querying the actual DNS servers, especially if it's a popular site and the answer is already in the cache.

The disadvantage of using your ISP's DNS server, as I discovered a few months ago, is that they can mess around with the DNS server to redirect you to a search page of their choosing if you look up a hostname that doesn't exist (rather than telling the browser that the hostname doesn't exist). Comcast turned that on a while back and I was really annoyed by that behavior. I tried running my own DNS server for a while, but that ended up slower than Comcast's DNS server, which I didn't like. I remembered hearing something about Google starting a DNS service, and sure enough, they had. I configured my Wi-Fi router to use 8.8.8.8 and 8.8.4.4 for DNS and now the websites I visit load more quickly with very little time spent in "Resolving host", and no redirect to some lame page I didn't want to go to if I mistype a URL with a hostname that doesn't exist.

One final point that I think is pretty neat: Google set up something called anycast routing for those two IP addresses (8.8.8.8 and 8.8.4.4) so that they will take you to the nearest Google public DNS server to your location anywhere in the world. Not only does that make DNS lookup even faster, but it's compatible with the geographic load-balancing I mentioned earlier, so when you look up google.com or some other site, the DNS server for that site will return the IP address nearest to the Google DNS server, which will hopefully also be near to you as well. You can read more about the performance and security improvements at the Google Public DNS site.

Next time I might talk about Google Web Toolkit, another cool product from Google that I have been meaning to play around with for some time now, since I'm intrigued by the concept, and since I'd much rather write an AJAX site in Java than JavaScript. I'll also continue with my series on OpenVMS, as well as any interesting Android adventures that I'm allowed to talk about.

Friday, February 26, 2010

Joining the Google Android Team!

I'm pleased to announce that I have accepted a position on the Android team at Google, starting March 8, where I will be applying my expertise in smartphone platform development towards improving an already quite exciting and impressive platform.

Going to work at Google feels like a dream come true, especially after the frustration and pain I experienced trying to fit in at Microsoft and salvage something of value out of their horrible, rotting Windows Mobile codebase, all the while dealing with a truly abusive work environment. I'd rather not say any more about that experience on a public forum, as it would detract from the positive stuff that I'd prefer to focus on in this blog.

I was quite fortunate to have my choice of great companies to work for in the Bay Area. There aren't very many developers in the U.S. with industry experience building great mobile device platforms, and it's a bit of a tight-knit community, rather like the voiceover artists for movie trailers. Many of the original Android developers came from Danger, and a number of them came from Be, Inc. before that. I was an intern at Be in 1997, and a regular contributor to the bedevtalk mailing list around that time period, and so I found out about Danger through a contact from Be when I came up to the Bay Area in 2005 looking for exciting work. So there is a creative lineage from Be to Danger and from there to Apple, Helio, Palm, Google, and others.

If you ever wondered how Apple and Palm were able to build such compelling devices on top of their own software stacks in such a short time with relatively few resources, a lot of it has to do with their hiring of engineers with experience building earlier devices for other companies, including for Danger. In my own time there, I contributed significant new code and many bug fixes to six different hiptop/Sidekick phones, starting with the Sidekick 3 (where I designed and implemented the UI and telephony layer for Danger's Bluetooth HFP implementation among other things) and continuing to the Sidekick LX 2009 (the 3G model). So I was quite flattered, but not particularly surprised, to have been actively recruited by the Google Android folks once they found out that I had left the company. I still had to pass the arduous interview process just like everyone else.

I also want to say a few nice things about Apple, since they were my second choice behind Google, and I'm sure that they would also have been an excellent company for me to work for. I'm a huge fan of Apple's computers, phones, and OS, and I think they are making some of the best products on the market in all of the categories in which they choose to compete. However, I see Apple as something like the BMW or Mercedes-Benz of the computer world: makers of fine luxury products that inspire the rest of the industry, but which aren't necessarily affordable to the masses. Also, since Apple's OS platform is only available to Apple, and their phone is only available through certain mobile operators, that leaves a big opening for Android and other open-source platforms that are available to anyone who wants to use them. That's really cool.

I'm a big fan of open source as a general principle, so I think that my own philosophy more closely meshes with Google than with Apple or any of the other players, and certainly as compared to Microsoft.  In the months since leaving their employ, I've read a great deal about Microsoft's pattern of abuse of their monopoly powers, much of which I knew already, but some of which was new, particularly their ongoing attempts to sabotage OpenDocument in favor of their inferior and defective OOXML "standard" (in quotes because even Microsoft Office doesn't conform to their own proposal!). I think that from a pragmatic engineering standpoint (as opposed to a legal/philosophical one), the biggest problem with Microsoft is that their software is just so bad: badly written, poorly documented, carelessly maintained.

One of my hobbies is my collection of various vintage computers. It's funny to me that my Commodore 64 is still in perfect working order and as useful (at least for playing games) as it ever was. On my desk is a genuine DEC VT320 terminal assembled on October 23, 1990, which had been sitting in my parents' garage for a number of years. I recently took it home and connected it to my small Alpha OpenVMS cluster (big thank you to Weird Stuff for having the proprietary DECconnect serial cables and adapters that I needed in their warehouse, since the VT320 lacks a standard RS-232 port). To my great joy there is no burn-in whatsoever on the CRT (likely due in part to the built-in screen saver feature that blanks the screen after 20 minutes of inactivity), and although it is a bit slow (max 19200 bps and no hardware flow control so it has to send ^S/^Q when it can't keep up with even that relatively slow speed), the LK201 keyboard has a satisfying clunkiness and the onscreen font is quite sharp. It's also a white phosphor tube as opposed to green or amber, which is nice. I opened it up to adjust an internal knob to make it a bit brighter (following the instructions in the pocket service guide) and other than some carbonization of the insulation around the flyback transformer (which I'd expected and predicted as the likely cause of the reduced brightness), it's in almost pristine condition.

I'll have more to write about my VMS adventures in future posts. I do intend to open up the cluster for semi-public consumption as a BBS, but I need to finish a few more sysadmin tasks first. Just a few days ago I reconfigured the OS, uninstalling DECnet-Plus in favor of the older DECnet Phase IV package, which is much leaner and more well-suited to my small network. I took advantage of the volume shadowing feature (basically a form of RAID-0 that you can boot from) to modify the OS on one of the two mirrored SCSI hard drives, bring everything back up, and then once I was satisfied with the new configuration, I restarted volume shadowing and mirrored the new configuration to the other drive. If anything had gone wrong, I could have easily recovered by booting the saved image on the first drive and mirroring it back to the second. In addition, I first made a full backup to DLT VS 160 tape, because one can never be too careful when working on a "mission critical" server environment even if it's just for fun and practice (more to the point, I didn't want to lose all of the time I'd put into configuration and setup so far). More on that in a future post.

My point in telling those stories in this post is that I think Microsoft as a company has done a lot more harm than good in terms of "training" people to have low expectations for the long-term usability of their investment in computer equipment. How is that so much 10-20 year old non-Microsoft stuff is perfectly usable today, while the typical Windows PC of half that age ends up encrusted with malware or bloated after too many app installs, too slow to run the latest Windows version, and yet is still perfectly capable of running, for example, Linux? I think it's because Windows just isn't very good, and Microsoft used a lot of dirty tactics in the 1990's to cut off consumers from pursuing other avenues, including BeOS. On the server side, I will have more to say about this in future VMS posts (the topic of UNIX vs. NT has already been beaten to death, but I think that there is still some benefit to comparing NT with other proprietary server OS's of that era, especially since NT is VMS reimplemented, poorly).

One informative book that I discovered recently, thanks to a comment at Mini-Microsoft, is Barbarians Led by Bill Gates, co-authored by a former early Microsoft engineer and by the daughter of Pam Edstrom, founder of Waggoner Edstrom, Microsoft's primary PR firm. Thanks in no small part to Mr. Eller and Ms. Edstrom's insider experience, as well as the interviews they conducted with other early employees and insiders, the book paints a vivid picture of just how thoroughly Microsoft is a product of pure public relations and not of any sort of software engineering expertise.

I like to tell people that Bill Gates and company made an excellent 8K ROM BASIC back in the day, but their engineering expertise, such as it was, clearly did not lead them to develop particularly high quality software of any greater complexity. One final story and then I'll wrap up this post. First, a passage from Barbarians:

Slightly disgusted that he had just joined a company [Microsoft] that was shipping defective software, Eller decided to take matters into his own hands. After researching graphics journals and spending nearly two weeks on this complicated problem, Eller finally hacked out a solution and wrote the new flood-fill algorithm. Though it was painfully slow and crawled across the screen, it did enable BASIC to correctly flood-fill.

Eller called his boss into his office once again. Whitten was less than thrilled. He had authorized the work, but Eller had spent two weeks on the flood-fill, ignoring the translator he was supposed to be writing. Undaunted, Eller set out to let others in on the flaw he had discovered and how he had fixed it. He pulled in any random developer he could find. He even pulled in Chairman Gates, whose office was just down the hall.

“Bill, check this out,” Eller said, pointing to his computer screen. “I mean . . . who was the jerk who wrote this brain-dead piece of shit?”

Gates stared at the screen.

“See, now that’s what I call a design flaw,” Eller said. “Now check out my new version. Pretty cool, eh?”

Gates nodded, pushing his glasses up the bridge of his nose.

“Does it work with really complicated things?” Gates asked.

“Sure,” Eller told him. He proceeded to draw a complicated object and flood-fill it.

“See? It works perfectly.”

“Can you prove that this works all the time?”

“Uhh, well umm, kind of,” Eller said. “I mean, I know it always works, but I’m a mathematician. The word ‘prove’ conjures up really ugly ideas.”

Gates told Eller his program was nice, then turned and walked back to his office.

After Gates left, Whitten walked into Eller’s office. He had heard the entire conversation.

“Do you know who wrote the original flood-fill algorithm?” he said, shaking his head.

“Ahhh, nope,” Eller replied. “I don’t believe I do.” Whitten paused, rubbed his finger on his left temple, and shook his head again.

“Bill wrote it,” he said. “Bill was the jerk who wrote this brain-dead piece of shit.”

Of course Bill was also "the jerk" who is famous for berating and insulting the intelligence of just about everyone he has ever disagreed with, so to read about him getting his comeuppance was quite amusing.

Even funnier: one of the first questions I was asked during my Google interview was to write an implementation on the white board to perform ... flood-fill! Fortunately, I had half-way thought through the solution while reading that excerpt, so I was able to cobble together a correct approach without too much trouble. I must not have embarrassed myself because I got the job. :)

Saturday, December 26, 2009

My New Retro BBS Project

One of the projects that I've been working on since leaving Microsoft is the completion of a goal that I've been working towards in my spare time, on and off, for over 10 years! Ever since I bought my first modem for my Commodore 64, I've thought that it would be really cool to run my own BBS, but I never found the time or resources to do so. In high school I built my first PC with the intention of using it to run a BBS, but I ended up using it for games and for learning about Windows, OS/2, Linux, FreeBSD, and other OS's.

Now that it has been possible for some time to run an Internet-only BBS (accessible through SSH instead of analog modem), I've thought that there is a great opportunity for me to create my own old-school BBS community as an alternative to the overly commercialized world of Twitter and Facebook. This post is the story of the path that I took to create a BBS of my own design, one that I hope will be enjoyed by many people in the years to come.

Let's start with the basic definition of a BBS, courtesy of Wikipedia:

A Bulletin Board System, or BBS, is a computer system running software that allows users to connect and log in to the system using a terminal program. Once logged in, a user can perform functions such as uploading and downloading software and data, reading news and bulletins, and exchanging messages with other users, either through electronic mail or in public message boards. Many BBSes also offer on-line games, in which users can compete with each other, and BBSes with multiple phone lines often provide chat rooms, allowing users to interact with each other.

So those are the basic services that I want to provide, but I have taken a somewhat unusual path to get there, at least by 2009 standards. There are many off-the-shelf BBS packages for a wide variety of OS's, but I decided to start with an OS that provides a foundation for security and reliability that is unmatched by anything outside of the IBM mainframe world, and IBM mainframes and their menagerie of OS's are so expensive and weird that they go on my short list of technologies that are too weird and broken for me to even consider using for any purpose (along with Windows CE, MUMPS, and programming the x86 in 16-bit mode).

This OS has been in production since 1977, has influenced countless other OS's in large and small ways, and is currently used in so many different truly mission critical applications that it's unfortunate that it is not more widely known and doesn't get the respect that it deserves. That OS is VMS, aka OpenVMS. A weird OS, but one that is in my opinion, neither "too weird" nor "too broken" to use, and in fact is close to ideal for the purpose of running a BBS with support for hundreds of simultaneous users and 24/7 uptime, if you're willing to take the time to acquire the necessary hardware from eBay and elsewhere, and to learn how to properly sysadmin it, both of which I've done.

My first exposure to VMS was in college. At Cal Poly Pomona, all students were issued accounts on the Academic VAX Cluster, or ACVAX for short, a cluster of two refrigerator-sized VAXen (the plural of VAX) and associated peripherals, tucked away in a server room that none of us were privileged to visit (I heard from a professor that the machines were extremely loud). There were several large labs filled with VT220 terminals for students to log in to the ACVAX, or you could dial in with a modem and later connect over Telnet. As a Computer Science student, I also had access to a cluster of 8 or so VAX workstations in the main CS computer lab, the CSVAX cluster.

The VAX was an extremely popular minicomputer manufactured by DEC (Digital Equipment Corporation), a company that was acquired by Compaq in 1998, which in turn merged with HP in 2002. VMS is the OS that DEC designed to run on the VAX, although many institutions purchasing VAXen in the 1980's did so to run UNIX on them instead of VMS.

When DEC introduced the Alpha CPU in 1992, an extremely powerful 64-bit RISC CPU to replace the 32-bit CISC design of the VAX, they also ported VMS over to it, renaming it OpenVMS to emphasize that it was no longer constrained to the VAX architecture, but primarily for marketing reasons (to emphasize its compatibility with the emerging "open systems" world of TCP/IP, POSIX, and other networking and programming standards not tied to a particular vendor). In the case of VMS, that was stretching the definition of "open systems" quite a bit since it normally referred to a UNIX or UNIX-like system, and while VMS's UNIX compatibility has improved over the years, it is still quite a different beast. At any rate, I'm glad for the name change to OpenVMS if only because it makes Google searches for technical info on VMS a lot easier, as there is no ambiguity or confusion with discussions of "VMs" (virtual machines) and other completely unrelated topics also using the acronym "VMS".

As a student, I found VMS a bit quirky and strange, but it impressed me that two VAX CPU's, extremely pokey by today's standards, could serve several hundred simultaneous users with relative ease and only a little lag. It also impressed me that the sysadmin for the CSVAX cluster was always cool and collected, in control of everything, and seemed to have a very stress-free existence in comparison to the stress, chaos, and confusion of the typical UNIX sysadmin, which included myself at the time, since I was managing a small network of Sun workstations as a part-time employee at JPL, and got to experience the mess that was the SunOS -> Solaris transition firsthand.

It's hard to believe now, but Solaris was Sun's "Windows Vista" and the transition from the previous SunOS 4.x series was handled about as poorly as Microsoft's transition from Windows XP to Vista. In both cases, the corporate message was, "this is the new OS, we've stopped working on the old one so you don't have a choice, get on board the Solaris/Vista train or get left behind." Unfortunately for both Sun and Microsoft, users and sysadmins didn't particularly want to deal with the performance hit, the numerous source and binary compatibility problems with software written for the previous OS, and the completely rearranged UI.

In the case of Solaris, this included gratuitous renaming of config files and changing of their formats, completely different command-line options for common commands like "ps", and other commands renamed or missing altogether. There was also NIS+, a naming service (a way to enable a network of machines to share the same account information so that a user could use a single password to log in to any of them) that was intended to replace Sun's previous NIS naming service, but which was so unusable that I was forced to revert back to the original NIS configuration after only a day or two of trying to make NIS+ work for our small network of a handful of users and workstations. Other Solaris subsystems such as printing were similarly broken and slow back in those days.

For a funny and irreverent critique of the Wild West days of commercial UNIX during the days of the UNIX wars, I recommend The UNIX-HATERS Handbook, which I owned in print form and is now available as a free PDF download. If you haven't read it in a while, it's worth rereading to see how much better things have gotten in certain aspects, and yet how little has changed in others.

I certainly don't hate UNIX. In fact, I strongly prefer it to Microsoft Windows for most applications, and am very grateful that Apple has included such strong UNIX compatibility in Mac OS X. It's interesting that the Mac and Linux running on PC's have now taken the place of much more expensive UNIX workstations from Sun, SGI, IBM, and others, and even Microsoft Windows is much better today than it was back then, and therefore also an acceptable choice for many high-end applications.

So, why VMS? Well, the first reason is that it's so good at time-sharing, or multitasking that provides acceptable performance to many simultaneous users, which is not a requirement for a single-user BBS, but since I have ambitions to scale up to hundreds of simultaneous users, I want people to have a great experience, and I know that VMS, with proper tuning, can provide this on the Alpha hardware I've purchased for the project, even under conditions of extreme load.

VMS is also an extremely secure system, with many layers of security not present on any other OS. It's essentially "unhackable" for all practical purposes (Kevin Mitnick was only able to hack into VMS systems by stealing usernames and passwords through social engineering), and I plan to offer a significant monetary reward or other prize to anyone who manages to hack the test user account that I will set up for the purposes of the contest, and read the contents of a file that I will place in the test user home directory. I'm willing to bet at least $2000 that no-one will succeed, but cash is a boring prize, so if anyone can think of a more appropriate prize in terms of geek bragging rights, please let me know so that I can offer something cool in addition to the $2000. As I said, I don't expect anyone to win the prize because I have so much confidence in the robust security of a properly configured VMS system, so I don't expect to ever have to pay out!

The most important thing, though, at least from a CS perspective, is that VMS is pretty unique and so it is quite educational to compare it with the better-known OS's of today in order to understand more deeply the design decisions that we take for granted as the only way to do something. Just because Windows and UNIX do things a certain way doesn't mean that's the only way to do it, or even the best way. Learning more than one OS is like learning more than one language: if you only speak English (or your native language), you won't understand its strengths and weaknesses as a language as well as someone who learns a second or third language.

On the other hand, there are certain areas where VMS is clearly inferior and the other OS's are clearly superior. For example, on UNIX, Mac OS X, and Windows, if you run multiple copies of a program, the OS will automatically share a single copy of the read-only program code among all the copies, mapping the same physical memory pages into the virtual address spaces of each process. The same thing applies to shared libraries (DLL's). On VMS, however, only the executables and shared libraries which the sysadmin has "installed" into shared memory will be shared among multiple users, which puts the burden on the sysadmin to decide which programs and libraries are likely to be used by more than one user at a time, or are small enough to be worth permanently locking that code into RAM.

In general, VMS is a difficult OS to learn how to sysadmin, with many settings to tweak and tune, and yet it's extremely easy to admin once everything has been set up properly. That's why it took me 10 years to get to the point where I finally feel confident enough, and have collected all of the necessary hardware, software, and skills to set up my own highly reliable server configuration for running this BBS, which I've named (and registered) as Alpha1BBS.org.

Fortunately, while VMS is normally a fairly expensive OS to license, DEC/HP has been running a hobbyist program since 1998 so I can legally run the latest version of the OS and all of the layered products (compilers and other useful add-on features) for free, for noncommercial purposes. The only catch is that I have to renew the license keys every year, but it's a simple automated web form and DEC/HP has been running the hobbyist program for so long now that it's almost inconceivable that they would decide to shut down the program and lose all of the goodwill that they have gained over the years from the VMS hobbyist hacker community. Of course if they did, I could always roll back the system clock, or otherwise try to hack the license manager, but I don't think it will come to that.

In addition to being a BBS, I also want to encourage people to use the system to hack on VMS stuff, should anyone be so inclined, so I have installed all of the DEC layered programming languages: Ada, BASIC, BLISS, C, C++, COBOL, FORTRAN, MACRO, MACRO64, PASCAL, as well as the DECset tools (the LSE text editor and other stuff), both Vim and Emacs 21.2 editors (I was quite fortunate to find a VMS port of a recent vintage Emacs that is reliable and appears to support all of the functionality that hard-core Emacs users have come to expect, including the ability to open a DCL command-line as a subprocess for shell-mode, TCP/IP support, and other stuff that is hard to port over from UNIX to VMS), and other tools including the GNV environment of ported GNU/UNIX software that includes the bash shell, GNU make, etc.

So not only does this do all the regular BBS stuff (more on the menu system and other features I'm adding to turn it into a proper BBS in a future post), but it's also a way for interested folks to log in and play around with an influential high-end server OS that is a slice of living history that also happens to be quite difficult to configure properly and also doesn't run on PC hardware. For those of you who missed out on the VMS experience, you might find it as interesting as I did when I first used it at Cal Poly for my Ada programming assignments, email, etc. And for those of you who saved the source code from your student projects, or anyone who has any old VAX or VMS code lying around that you think would be fun to resurrect, now you'll be able to do just that.

All of the VMS documentation that used to take up an entire bookshelf in printed form is now available for free in HTML and PDF formats on the HP OpenVMS web site. In addition, the online help is very good, and I am working on a quick getting started guide to bring interested users quickly up to speed on the quirks and differences as well as the similarities between VMS and other OS's with which users are likely to be familiar.

I have a lot more to say about the project, starting with a description of the high-end Alpha hardware that I have painstakingly accumulated over the years to provide the ultimate in performance and reliability for this task, as well as details about the games, chat, forums, and other features that I will be offering on the system, but I'll write about it tomorrow since this post is long enough already.

In the meantime, if you are interested in getting one of the first accounts and helping me to beta-test the BBS stuff, just email me (firstname.lastname@gmail.com) with the username you would like (up to 12 characters, all uppercase) and the contact email address you'd like me to use in case you ever need to have your password reset or something like that.

BTW, I won't be forcing users to change their password every 90 days, which is the default configuration for VMS. IMHO, forcing users to change their passwords regularly doesn't add anything to security, and it just makes it that much more likely that you'll forget the new password you chose when you were forced to change it. After all, this is a hobbyist project, and I won't be offended if you log in a few times and then don't come back for a year or longer. I want everyone's account to be there and for the BBS to be in operation for at least the next 10 years with no loss of any user data, and I have planned accordingly (more on that tomorrow).

I will be making new user accounts all next week, though it will take another week or two to get all of the functionality up and running. I would have had it ready as a Christmas present for all of you, but I delayed things by a week in order to set up the system as a cluster of two machines instead of a single server. I had been under the impression that you really needed three machines for a cluster to be worthwhile, since you can't have a cluster of two independent machines without jumping through some hoops to set up a shared "quorum disk" to decide which of the two will be the owner of the cluster if they lose communication with each other. However, what you can do is make one machine a voting member of the cluster and the other a satellite node which can enter or leave the cluster at any time, but which can't operate as a cluster on its own (more info here).

Since I've connected the (high-end 15K RPM SCSI) hard drives to the larger of the two Alphas, I'm now running the second Alpha entirely diskless, sharing the system disk of the big Alpha with only a few megabytes of disk space required for the node-specific configuration files, along with an extra gigabyte or so for the new node's pagefile and swapfile (the swapfile is for swapping out entire processes, while the pagefile is for swapping individual pages in and out; other OS's use a single file or raw partition for both functions). The best part is that, although it took me a bit of effort and added complexity to go from 1 to 2 machines, and from a standalone to a cluster configuration, it's now trivial for me to extend the cluster from 2 nodes up to the maximum of 96 nodes.

I'll finish up my comments on clusters, OpenVMS, Alpha hardware, and related topics, tomorrow, as well as to announce a spin-off open-source programming project based around MINIX that I came up with while thinking about this stuff that has applications to many OS's and CPU's. I had to put it on hold in order to finish up the BBS project, and then I expect to spend most of my hacking time on the MINIX project rather than the VMS-specific hacking that I've been doing.

P.S. I forgot to mention in my original post that VMS also supports, and I have installed, or will shortly, Java 1.5.x, Perl, Python, PHP, Ruby, and other popular languages. It also runs Apache, Samba, MySQL, and various other open-source projects that you wouldn't think would run on VMS, including an old version of Mozilla and even a port of Firefox that currently only runs on Itanium but could theoretically be recompiled for Alpha with a little effort.

I'll also be running Process Software's MultiNet, a superior TCP/IP stack to DEC's offering, based on the latest 4.4BSD TCP/IP, OpenSSH, and related Internet client and server code, and another piece of normally expensive commercial software that is fortunately available to me for free under the same hobbyist terms as VMS itself.

A Few Thoughts on Microsoft

Hi everyone. I apologize for dropping off the face of the planet these past few months. I had to take a break from everything in order to recover my mental health after the extraordinarily stressful experience of working for Microsoft in the year after they acquired Danger, my former employer. I've been working on a couple of pretty interesting projects, including the imminent completion of a hobby project that I've been working on for the past 10 years, which I will write about as soon as I finish this post. But first, I want to post a few thoughts about my experiences and lessons learned from my unexpected and unplanned year of working for the Borg.

I can sum up the experience of working for Microsoft in 2009 in one word: embarrassment. For such a large company, with so much money and so many smart people working there, the lack of any high-level organization, coherent technological vision, or any semblance of "best practices" in software engineering was quite disturbing, and I was unprepared for the chaos that beset Danger almost immediately after we were acquired, hoping that the Microsoft corporate brain damage would not infect our organization as completely and as rapidly as it did.

The disorganization, the frequent delays due to broken tools and broken servers (for SharePoint, email, source code control, etc.), and the extreme and constant pressure from management to try to force the team into meeting completely unrealistic schedules (particularly considering the poor quality of the Microsoft tools we were forced to use), were the cause of a great deal of misery suffered by our team, but the primary reason for my resignation was the completely miserable and unproductive experience of being forced to develop for Windows CE, the OS foundation for Windows Mobile.

In my professional opinion, Windows CE is easily the worst embedded OS that I know of. I used to think that Symbian OS was weird and clunky (I did some Series 60 development for a startup before coming to Danger), but now I would happily write code for Symbian or any other mobile OS, knowing just how much worse the Microsoft alternative is.

I would therefore not recommend for anyone to buy a "Windows phone". After working extensively with Windows CE and the Windows Mobile telephony stack, I don't trust the quality of the code for anything as mission critical as a mobile phone must be, and therefore I can not in good faith recommend Windows Mobile to anyone, especially when there are so many other great choices these days.

All of the code that I worked with gave me the impression that it was written entirely by 23 year olds who came to MSFT straight out of college. After all, many MS employees did go there straight from college and have no other work experience to compare it to, which I believe has stunted their growth as engineers and prevented the majority of them from picking up the seasoning and design experience normally picked up by junior engineers through working with more experienced senior engineers. I think that also explains why so many are willing to put up with the psychological stress of working there, because if more of them had the experience of working at a "normal" software company to compare Microsoft to, more of them would certainly quit!

Because Microsoft has not built up a corporate culture for software engineering, they seem to be perpetually stuck in the "hacker" mindset of throwing stuff together and then having to deal with the aftermath of their poorly thought through designs. It's a real shame, especially considering that The Mythical Man-Month was written back in 1975, and yet our team routinely had to deal with gross violations of the very sensible recommendations made in that book and others.

At any rate, it took me a few months to recover, but fortunately I seem to have made it through the experience with no permanent psychological damage, and without all the bitterness and hard feelings that I would otherwise have had if I hadn't taken the time out to think through the experience in order to put it all behind me. The previous link is to a blog written by an anonymous Microsoft manager which is noteworthy not for its posts but for the thousands of comments posted by other anonymous Microsoft employees about their misery, frustration, and anger. Just click the comments link on the most recent post and start reading (the comments tend to have no relation to the posts anyway) and you'll get a better idea of just how messed up things are throughout the entire organization than I could hope to convey based only on my own experience.

I did not want to become one of those angry, bitter, ex-Microsofties, so I quit while there was still time for me to avoid that fate!

Monday, July 6, 2009

Leaving Microsoft

[UPDATE: I was convinced to stay on the project so I won't be resigning Microsoft after all. I'm still very frustrated by a lot of aspects of the company, but so are a lot of people who work here, so I'm not alone. More posts to come soon about unrelated tech stuff.]

Friday, June 12, 2009

Rebooting the blog

If I have some time this weekend, I might post something. I've been extremely busy with work lately.