Pages

Advertisement

Wednesday, July 4, 2007

A Delphi Retrospective: One Programmer’s Perspective

There may be two or three people wondering why Captain Jake has been so scarce lately on the newsgroups and on this blog, so I thought I’d squeeze in a blog this weekend, explaining why this is the case.

I’ve been very busy lately for several reasons. Back in January, I started a contract for a firm in Colorado that sells commercial shrink-wrap software. That’s converting to a permanent position in a few days, and I will move to northern Colorado in a few weeks. The job, the traveling to and fro, the process of finding and buying a house in Colorado, and now the packing, has kept me very busy. I’ve always enjoyed commercial software product more than in-house software development, because the pace is more aggressive, the rewards more immediately palpable, and in general I’ve found the managers in charge of commercial software development to be more competent at trying to manage the process. I get a kick out of working on software that is used by millions of people, where you will be able to walk into any Best Buy or CompUSA and find my handiwork on the shelf. In the past, I’ve worked at two different hedge funds, so I’ve had the experience of engaging in software development of software used to manage hundreds of millions or even billions of dollars in investments. But the number of users in those cases is very, very small. In this case, the number of users is in the millions, but each one has laid out only a few dozen bucks.

While I was packing, I was listening to some tunes from years ago, from the early eighties and nineties and it made me nostalgic. I sat down and ruminated over the changes that had occurred in my life over the years…

I’ve worked in the software development field since I left teaching economics back in the very early nineties. I broke into programming by teaching myself C++ during all the ample spare time I had available as an economics instructor, and leveraging my heavy statistical training. My first programming job was using C++ to work on a DOS-based cross tabulation software package at a 4-person market research firm called Market Advantage. I made $30K a year. This was back in the days of 16-bit programming, with segments and offsets. We were using Borland C++ 3.0, which back in those days came on a whole bunch of 3.5 inch floppies. I liked C++ better than any other language, even though a lot of people were talking about how easy it was to lay out GUI’s in the latest progeny of QuickBasic that had been renamed Visual Basic and had a RAD capability. Back then, RAD was a concept that was basically unknown to most programmers (pun intended). Those of us in the C++ camp laughed at Visual Basic as not being a real language, since it lacked so many of the things that are necessary for true OO programming.

In any event, I lost that job after a year and a half when it became painfully obvious to the owner that a DOS program was not going to sell, when the whole world was using Windows, at least that was what he claimed was the reason. I think the real reason was that as the only atheist in a 4-person company of devout Calvinists that liked to talk about religion during work hours, I did not “fit in”. That was the first time in my life that I had ever been fired outright, and being totally green I let it get to me. I spent the next two months of unemployment depressed and wondering if I had made the right choice to get into programming after all. I alternated between the theory that I should have refused to discuss religion in the workplace and the theory that there really was no place for my position there given that Windows had made my product irrelevant. Now, in retrospect, it was a change that resulted in much greater happiness for me in the long run. I would not have been happy there in the long run, and did not miss being in on the ground floor of something big. I know this because a few years later I discovered that the firm had relocated to the building where I was working at the time. This was six years later, and so I was curious what had happened to the firm. I stopped in and lo and behold, the firm was exactly the same size and had exactly the same personnel as when I had left. In all those years, which seems like an eternity in computer time, they had not changed at all, except their name.

I’m very good at interviewing, as I was to discover over the next few years. Usually if I can get a face-to-face interview with a technical person, I will get an offer. So I was able to get an offer from CDW and I joined their merry band of IT professionals. They were a small firm back then, small in terms of personnel, not money, so we had to wear several hats, so to speak. I got to be quite good at recognizing the soft high-pitched whine of a hard drive about to die, and so did my co-workers.

One day I was in the server room with a coworker we will call “Bill”. I cocked my head to one side to listen, so did Bill. After a split second of listening he placed his ear next to each drive in the RAID array, then said, “Which one do you think it is? I think it is this one.”

I put my ear next to each drive and it sounded to me like the soft whine was coming from the one to which he had just pointed. “I think you are right.” I said.

“You know,” he said smiling, “these drives are supposed to be hot-swappable. Should we try it?”

“I guess so, if they really are supposed to be hot-swappable.” I replied. So Bill unlatched the drive and pulled it out. The green light turned red and then faded out. But the high-pitched whine lasted just long enough for us to realize that the drive we thought was about to die was not the one, and in that split-second of sudden terror before we could pop the drive back in, the drive’s sister drive suddenly clicked to a dead stop. We were mocked by the little red LED of doom, as we realized that we had removed the drive that was the mirror for the now-defunct drive. Of course the RAID now failed and calls quickly started coming it to the IT department complaining of unavailable sales information from the SQL Server database that had now been rendered chaotic.

But it was also at CDW that I made one of my most interesting programming fixes of my career. This was still back in the days of 16-bit Windows, which as you may know, or may not need to know, was single threaded and thus based on a non-pre-emptive model of multi-tasking, meaning that it was up to each program to yield time to other programs. If a program hung, so did the whole system. Well, our sales programs were full of synchronous calls to SQL Server which hung the whole PC while waiting for results to come back from the database. Sometimes the PC’s would be hung for several minutes if a long query was bogging down the server. During this time, the telephone operators could not make new orders in their AS400 sessions, thus costing money. We had a department meeting to discuss this problem. The programmer that had written the software said that this was simply the way that database programs worked and there was no way to speed up the server, as it already had the best hardware that was available at the time, and these synchronous calls to the server were in hundreds of places in the code. It would take days and days to replace them all if we decided to rewrite the code. That did not seem right to me, so I thought intensely about this problem for the first half of the meeting. We used dblib to access the SQL Server. What was it that we could do? Suddenly I had a Eureka! moment…and I blurted out my solution. We could use the C++ preprocessor to redefine the synchronous call to a function name of a new function, which would use the asynchronous call and then run a Windows message pump loop while checking for completion. Instead of calling the synchronous call through out the code it would call our new asynchronous message pump. With a few lines of code we could solve the problem!

The programmer that had written the code looked at me like I had albino snakes crawling out of my head, but the rest of the department looked genuinely impressed. When we went to implement my solution, it took only a few minutes to write and it worked like a charm.

Perhaps the most fateful thing that happened to me while I was at CDW was that on February 14th, 1995, a couple of us were able to requisition a copy of Delphi from the warehouse to try out and see if it would be useful for our programming. We had been using Borland C++ 4.5 for our programming and thought we were hot-stuff, but even though we had no knowledge of Object Pascal, we were able to be more productive in Delphi that first day than we were in C++. The rest, as they say, is history. I’ve used every version of Delphi since then, except Delphi 8, which I bought but never really used. Even when I was doing only C++ (or VB for six months) at work, I would do Delphi at home. I started writing a newsreader in Delphi at home that I ended up redesigning several times over, but never released.

There really was nothing else like Delphi when it came out. Oh sure, it looked very much like Visual Basic, having copied the Property-Method-Event model that VB had pioneered and the undocked IDE that so many Delphi die-hards now try to emulate in the new D200x IDE’s. But under the hood this was no VW Beetle. It was truly OOP! If only it had been in C++ instead of Pascal, it would have absolutely perfect. (There WAS a C++ RAD tool back in those days called Optima++, but it never gained traction. I heard that it was very buggy.) Those were heady days. It seemed like there was electricity in the air and rock stars at the helm.

There are times in human history where genius seems to reach a critical mass and great and wonderful things come out of the resulting chain reaction. Vienna in the late eighteenth and nineteenth centuries was like that for music, Paris was like that for art for a while, and ancient Athens was like that for politics and philosophy back in classical Greece. There are plenty of other examples throughout history. I think the same type of thing happens for products and industrial innovation as well. Bell Labs for example. Borland in the years when Delphi was released seemed one little such microcosm of genius too. When you look at the innovation that Delphi and the VCL represented, it was something that was still revolutionary. Drag and drop combined with a fully OO language was a dream that many had dreamed, but only Delphi made it come true.

Critical mass can be easily lost, indeed it seems inevitable given the churning of personnel that is an inviolable part of human existence. People move on, disperse or die and the heady mix that fueled the fires of genius is left as a dozen glowing embers spread across the landscape. Some disappear into the night. Others flare for a bit and then are heard from no more. A very select few will bright for many years. The most memorable names from Delphi’s creation dispersed soon after it appeared, in what could be called the Delphi Diaspora. The flamboyant captain of the ship, Philippe Khan, was sent away by a mutinous board of directors very soon. The project manager for Delphi, Zack Urlocker, left a few years later. The chief architect of Delphi, Anders Helsjberg left for Microsoft soon after Delphi’s release. Eventually, several years later, Chuck Jaszdewski and Danny Thorpe were to follow.

I attended my first Borland Conference in 1997, a mere two years after Delphi was released into the wild. I remember it the way most people remember their high school graduation, for it was the first developer’s conference I had ever attended and I was still new enough to programming as a profession to be enjoying that new car smell. BorCon in 1997 was held in the Opryland Hotel in Tennessee, one of the largest hotels in the world. We all lined up outside the auditorium for the opening ceremonies like kids waiting to get into a rock concert. When the doors opened, we streamed in to grab the choice seats, hyped up on loud music such as the theme for James Bond 007 booming through the auditorium sound system. We were soon greeted by indoor fireworks, videos (including a great Star Wars spoof with a Bill Gates look-alike as Darth Vader) and glimpses of some of the stars that made Delphi a reality. The roars of the crowd punctuated the proceedings like the inexorable ebb and flow of the ocean.

But the Delphi Diaspora had already begun. The ship was not helmed by Philippe anymore but by Pizzaman, who introduced Chuck Jasdzewski (or was it Danny Thorpe? I can’t remember) with the by-line that he “doesn’t accept rides from strangers in black limousines”, a snide reference to Anders Helsjberg’s recent departure to MSFT. The Borland brand name was soon to be wasted in the Inprise renaming fiasco, the financial numbers were to continue to slide inexorably downward, and the Delphi Diaspora was to continue unabated despite a lawsuit. A disastrous Delphi 4 was to mar the landscape further. The Delphi bonanza had become bogged down in the bungling bureaucracy of Borland.

Now it is ten years after the BorCon at Opryland and Delphi is no longer the only way to do RAD in an Object Oriented language. I had attended three other BorCons since 1997 but none of them had the same level of excitement for me. Jobs in Delphi are now “niche” jobs that are nearly impossible to fill without offering higher than average salaries. Most programmers with high levels of experience in Delphi have moved on to other languages and tools, though not always voluntarily. The Delphi Diaspora has decimated the ranks of the Delphi faithful, though many still buy the latest versions of Delphi for their own personal use, and often to support it, hoping that the tide will turn and they can go back to the halcyon Days of Delphi. But twelve years of uncertainty is a dismal track record that greatly increases the risk premium attached to the Delphi language in the executive mindset. No matter what CodeGear does, they are working with this millstone around their neck. Truth be told, it is a tough row to hoe.

I think CodeGear is doing some good things to deal with this, by offering products that bring the Delphi RAD paradigm to other languages. I think the legacy of Delphi, as rich as it was, is not a good roadmap for the future, and CodeGear is wise to follow this new path of bringing RAD to the masses again where it was lacking. Executives will not balk at using a tool that does not lock them in. The dangerous uncertainty associated with Delphi is dependent on the proprietary nature of the Delphi language. Take the Delphi concept and apply it in non-proprietary ways to non-proprietary languages, and you have a recipe for success. If they could do the same for C++, that would be a winner too (in other words, if they could offer a Delphi-like tool for creating and using ANSI C++, not proprietary extensions of C++ like upon what C++ Builder is dependent, they would clean up). If CodeGear disappears, code written in non-proprietary languages can still be used in other tools, so the risk is much less.

My personal programming is still in Delphi and will continue in Delphi for quite some time. I don’t foresee that changing any time soon. I still perfect and fiddle with my newsreader and porting that to any other language is too big a task for me to contemplate these days. My career programming in Delphi continues for now as well, but that is probably slated for change over the next few years. I am buying a house in northern Colorado and if I can help it, I will live in this new house for the rest of my life. If my employer moves to another language, then so does my career. I simply think there is no place for religion in programming.

So there you have it. This has been my own personal perspective on the history of Delphi, as it has fit in with my personal experiences. Every Delphi programmer has his own unique context in which Delphi exists, and I hope you have enjoyed, and will continue to enjoy, reading about mine.

1 comment:

  1. VW is a great car. The 5 cylinder has plenty of power and the handling is better than similar cars. The design of the new VW Bettle parts is a classic, very unique; cuts into the rear headroom a little, but whatever. My only slight problem with the car is that I wish it handled better. Maybe upgrading the suspension on this concept would be great... I know VW has had some reliability problems in the past, but I honestly think that these redesigns will be Volkswagen's savior.

    ReplyDelete