Pages

Advertisement

Showing posts with label Delphi. Show all posts
Showing posts with label Delphi. Show all posts

Saturday, July 7, 2007

Code Snippet plugin for Windows Live Writer

One of WLW features of interest to the geek in me is its support for plugins via its SDK. As you may already know, a plugin allows developers to extend an application with additional features.

A good part of my posts contain source code snippets to illustrate and/or compliment the content. Instead of using plain text to represent the code snippets I have been using CSS-based syntax highlighting thanks to the online code formatter written by Jean-Claude Manoli.

When I started using WLW I looked for plugins to see what useful features others have created. The Writer Windows Live Gallery has a growing list of plugins. I had found the Insert Formatted Clipboard, Paste from Visual Studio and Insert Code for Windows Live Writer, all for formatting and/or applying syntax highlighting to sample source code. But while using them I found that there were things I wanted to do that these plugins did not offer. So, I wrote the Code Snippet plugin based on the syntax-highlighting code that Jean-Claude made public.

The following image shows the main Code Snippet window that you can use to interactively review the sample code before inserting into your post.

Code Snippet dialog - Full Mode (click for full image)

Some of the features in the Code Snippet plugin are:

Run Silent - use latest settings to automatically process current clipboard contents for quick pasting without displaying the Code Snippet dialog. Press and hold the Ctrl key while activating the plugin to return to previous mode (Full or Compact).
Rich Text Editor - lets you perform final changes to the source code before pasting it into your blog post. I work with a lot of source-controlled code that I don't want to necessarily touch in that environment prior to posting. So, I wanted to have the ability to increase/decrease indents or make changes to namespaces or class names without pasting to other text editors as an intermediary step.
Expandable/Splitable Code Panes - able to view the code to process or the formatted code using the entire dialog space, in addition to viewing both contents in split mode.
Persistent Options - any changes to the options are automatically stored in an external configuration file and reloaded on next execution.
View HTML - you can view the HTML markup before inserting the code snippet.

Update (02/27/07): New features in version 1.0.1.

Compact Mode - in addition to the Full Mode, you can now also work with a compact version of the dialog that allows you to quickly select the formatting options without a preview. Switching between Full and Compact Modes is quick and painless by pressing the F12 key. The following figure shows the Compact Mode dialog for the plugin.

Code Snippet dialog - Compact Mode

Window Placement Persistence - in addition to automatically storing formatting and other options, now the window location, size, and other characteristics are also remembered.
Copy CSS Style to Clipboard - to make it easier to extract the stylesheet for inclusion in your blog's template, you can now easily copy the contents to the clipboard.

Update (03/26/07): New features in version 1.0.2.

Support for CSS snippets - Added support for syntax highlighting Cascading Style Sheets (CSS) snippets.
Embedded Styles Now Inline - Changed implementation used for embedding styles from using the class attribute to using the style attribute. The former assumed embedding the stylesheet classes as part of the generated HTML for the code snippet. The latter uses inline definitions, which proves to be friendlier to RSS feeds and e-mail delivery where the embedded CSS is not recognized.

Plus more features that should be evident once you start playing with it.

Download Code Snippet plugin for Windows Live Writer Setup

Visual Studio 'Orcas' previews Javascript debugging and intellisense

Developers learn by doing, that is way a good IDE is crucial for learning any language or programming model. Tools for javascript development have definitely lagged the demand after AJAX and interactive sites gained popularity.

Visual Studio 'Orcas' (which should be released late '07 or early '08) will feature both a javascript debugger and intellisense. Check out these intro's from Microsoft's web development team:

JavaScript Intellisense in Orcas

JavaScript Debugging in Orcas

What is Ajax ??

AJAX stands for Asynchronous JavaScript And XML.

AJAX is a type of programming made popular in 2005 by Google (with Google Suggest).

AJAX is not a new programming language, but a new way to use existing standards.

With AJAX you can create better, faster, and more user-friendly web applications.

AJAX is based on JavaScript and HTTP requests.

Friday, July 6, 2007

What is a Computer ?

A computer is a machine for manipulating data according to a list of instructions.

Computers take numerous physical forms. Early electronic computers were the size of a large room, absorbing as much power as several hundred modern computers. [1] Today, computers can be made small enough to fit into a wrist watch and be powered from a watch battery. Society has come to recognize personal computers and their portable equivalent, the laptop computer, as icons of the information age; they are what most people think of as "a computer". However, the most common form of computer in use today is by far the embedded computer. Embedded computers are small, simple devices that are often used to control other devices—for example, they may be found in machines ranging from fighter aircraft to industrial robots, digital cameras, and even children's toys.

A computer in a wristwatch.
A computer in a wristwatch.

The ability to store and execute programs makes computers extremely versatile and distinguishes them from calculators. The Church–Turing thesis is a mathematical statement of this versatility: Any computer with a certain minimum capability is, in principle, capable of performing the same tasks that any other computer can perform. Therefore, computers with capability and complexity ranging from that of a personal digital assistant to a supercomputer are all able to perform the same computational tasks as long as time and storage capacity are not considerations.

Purpose of Programming

A prominent purpose of programming languages is to provide instructions to a computer. As such, programming languages differ from most other forms of human expression in that they require a greater degree of precision and completeness. When using a natural language to communicate with other people, human authors and speakers can be ambiguous and make small errors, and still expect their intent to be understood. However, computers do exactly what they are told to do, and cannot understand the code the programmer "intended" to write. The combination of the language definition, the program, and the program's inputs must fully specify the external behavior that occurs when the program is executed.

Many languages have been designed from scratch, altered to meet new needs, combined with other languages, and eventually fallen into disuse. Although there have been attempts to design one "universal" computer language that serves all purposes, all of them have failed to be accepted in this role.[7] The need for diverse computer languages arises from the diversity of contexts in which languages are used:

  • Programs range from tiny scripts written by individual hobbyists to huge systems written by hundreds of programmers.
  • Programmers range in expertise from novices who need simplicity above all else, to experts who may be comfortable with considerable complexity.
  • Programs must balance speed, size, and simplicity on systems ranging from microcontrollers to supercomputers.
  • Programs may be written once and not change for generations, or they may undergo nearly constant modification.
  • Finally, programmers may simply differ in their tastes: they may be accustomed to discussing problems and expressing them in a particular language.

One common trend in the development of programming languages has been to add more ability to solve problems using a higher level of abstraction. The earliest programming languages were tied very closely to the underlying hardware of the computer. As new programming languages have developed, features have been added that let programmers express ideas that are more removed from simple translation into underlying hardware instructions. Because programmers are less tied to the needs of the computer, their programs can do more computing with less effort from the programmer. This lets them write more programs in the same amount of time.[8]

Natural language processors have been proposed as a way to eliminate the need for a specialized language for programming. However, this goal remains distant and its benefits are open to debate. Edsger Dijkstra took the position that the use of a formal language is essential to prevent the introduction of meaningless constructs, and dismissed natural language programming as "foolish."[9] Alan Perlis was similarly dismissive of the idea.[10]

What is Programming ?


A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like human languages, are defined through the use of syntactic and semantic rules, to determine structure and meaning respectively.Programming languages are used to facilitate communication about the task of organizing and manipulating information, and to express algorithms precisely. Some authors restrict the term "programming language" to those languages that can express all possible algorithms;[1] sometimes the term "computer language" is used for more limited artificial languages.

History of programming

History of programming

Wired plug board for an IBM 402 Accounting Machine.
Wired plug board for an IBM 402 Accounting Machine.

The earliest programmable machine (that is a machine whose behavior can be controlled by changes to a "program") was Al-Jazari's programmable humanoid robot in 1206. Al-Jazari's robot was originally a boat with four automatic musicians that floated on a lake to entertain guests at royal drinking parties. His mechanism had a a programmable drum machine with pegs (cams) that bump into little levers that operate the percussion. The drummer could be made to play different rhythms and different drum patterns by moving the pegs to different locations.[2]

The Jacquard Loom, developed in 1801, is often quoted as a source of prior art. The machine used a series of pasteboard cards with holes punched in them. The hole pattern represented the pattern that the loom had to follow in weaving cloth. The loom could produce entirely different weaves using different sets of cards. The use of punched cards was also adopted by Charles Babbage around 1830, to control his Analytical Engine.

This innovation was later refined by Herman Hollerith who, in 1896 founded the Tabulating Machine Company (which became IBM). He invented the Hollerith punched card, the card reader, and the key punch machine. These inventions were the foundation of the modern information processing industry. The addition of a plug-board to his 1906 Type I Tabulator allowed it to do different jobs without having to be rebuilt (the first step toward programming). By the late 1940s there were a variety of plug-board programmable machines, called unit record equipment, to perform data processing tasks (card reading). The early computers were also programmed using plug-boards.

A box of punch cards with several program decks.
A box of punch cards with several program decks.

The invention of the Von Neumann architecture allowed programs to be stored in computer memory. Early programs had to be painstakingly crafted using the instructions of the particular machine, often in binary notation. Every model of computer would be likely to need different instructions to do the same task. Later assembly languages were developed that let the programmer specify each instruction in a text format, entering abbreviations for each operation code instead of a number and specifying addresses in symbolic form (e.g. ADD X, TOTAL). In 1954 Fortran, the first higher level programming language, was invented. This allowed programmers to specify calculations by entering a formula directly (e.g. Y = X*2 + 5*X + 9). The program text, or source, was converted into machine instructions using a special program called a compiler. Many other languages were developed, including ones for commercial programming, such as COBOL. Programs were mostly still entered using punch cards or paper tape. (See computer programming in the punch card era). By the late-60s, data storage devices and computer terminals became inexpensive enough so programs could be created by typing directly into the computers. Text editors were developed that allowed changes and corrections to be made much more easily than with punch cards.

As time has progressed computers have made giant leaps in the area of processing power. This has brought about newer programming languages that are more abstracted from the underlying hardware. Although these more abstracted languages require additional overhead, in most cases the huge increase in speed of modern computers has brought about little performance decrease compared to earlier counterparts. The benefits of these more abstracted languages is that they allow both an easier learning curve for people less familiar with the older lower-level programming languages, and they also allow a more experienced programmer to develop simple applications quickly. Despite these benefits, large complicated programs, and programs that are more dependent on speed still require the faster and relatively lower-level languages with todays hardware. (The same concerns were raised about the original Fortran language.)

Throughout the second half of the twentieth century, programming was an attractive career in most developed countries. Some forms of programming have been increasingly subject to offshore outsourcing (importing software and services from other countries, usually at a lower wage), making programming career decisions in developed countries more complicated, while increasing economic opportunities in less developed areas. It is unclear how far this trend will continue and how deeply it will impact programmer wages and opportunities. Despite the "outsourcing trend" it can be argued that some of the richest persons on the globe are programmers by profession. Examples: Bill Gates (Microsoft), Larry Ellison (Oracle), Larry Page (Google), Hasso Plattner (SAP) and so on. Programming is clearly a leading-edge craftsmanship that continues to reward its practitioners both in countries such as India and developed countries like the USA or Germany.

Debugging

Debugging is a very important task for every programmer, because an erroneous program is often useless. Languages like C++ and Assembler are very challenging even to expert programmers because of failure modes like buffer overruns, bad pointers or uninitialized memory. A buffer overrun can damage adjacent memory regions and cause a failure in a totally different program line. Because of those memory issues tools like Valgrind, Purify or Boundschecker are virtually a necessity for modern software development in the C++ language. Languages such as Java, PHP and Python protect the programmer from most of these runtime failure modes, but this may come at the price of a dramatically lower execution speed of the resulting program. This is acceptable for applications where execution speed is determined by other considerations such as database access or file I/O. The exact cost will depend upon specific implementation details. Modern Java virtual machines, for example, use a variety of sophisticated optimizations, including runtime conversion of interpreted instructions to native machine code (see HotSpot).

Wednesday, July 4, 2007

Delphi 2006 Pro: A Review

Delphi 2006 is now shipping and several of the Delphi faithful, including your humble narrator, have installed and used Delphi 2006, aka BDS 4.0. The Borland Development Studio, as Delphi is now called, supports Delphi, C#, C++, Visual Basic and markup languages in varying degrees of completeness. The Delphi language has the widest support, covering Win32, .NET and Web Services. Visual Basic is afforded the least support, as there is no Win32 or designer support for the Visual Basic Language. This release marks a milestone for Delphi, a release that definitively and unambiguously says that “Borland is Back!”, to quote an ill-fated advertising campaign of a few years back.

Sometimes I think Borland should change its name to Pheonix, because of its remarkable ability to repeatedly rise again from the ashes of its own funeral pyre. As it was losing revenues and market share in the C++ Windows market, Delphi came along to fill in the gap. When Delphi sales were slagging to near fatal levels, JBuilder stepped into the arena to save the day. Now that the Java IDE market has been utterly Eclipsed, it falls to the Borland Development Studio and ALM to now save the day. Is this latest release up to the challenge?

Probably, but only time will tell. Despite the foolish conceits of fortune tellers and hedge fund managers, the future is a dark opaque mist totally concealing the fate of men. What I can tell you is what I’ve concluded as I use Delphi 2006 Pro for development on a Win32 desktop application I’ve been working on as a hobby in my spare time. This means this review is very slanted, as it only considers those things of interest to someone using D2006 Pro to write a Win32 application in the Delphi language. There is no ECO or other high level architect features reviewed in this blog.

My verdict on Delphi 2006 Pro? I think this is the best release of Delphi I have ever seen. Here are some of the reasons for this conclusion, which together collectively support my claim, I think:

1) Code compiled with D2006 is more robust and up to 40% faster than code compiled with Delphi 7. Thanks to the incorporation of several improvements authored by the guys from the FastCode project, the memory manager and several of the RTL routines are much faster than in prior versions of Delphi. This is especially true for multi-threaded applications, where the stock Delphi memory manager had been rather weak. By replacing their previous memory manager with FastMM, the guys at Borland were able to speed up the IDE, and by compiling the FastMM memory manager into compiled applications the savings are also passed on to you. Apps written with this new memory manager are faster, they scale and multi-thread much better, load more quickly, and suffer far less memory fragmentation over time. In short, applications compiled with D2006 will be faster and more robust than if compiled with Delphi 7, without needing anything other than a recompile. (eg. http://groups.google.com/group/borland.public.delphi.thirdpartytools.general/msg/cee80e04980a75f4 ) In addition, Delphi 2006, like Delphi 2005, allows you to speed up your Delphi code by inlining functions, like you can do in C++.

2) The IDE is robust. Lately, Delphi releases were rushed and perpetually unfinished. Delphi 8 was both incomplete and fragile, and Delphi 2005 took a couple of updates to really become usable as a development tool. Delphi 2006 has proven to be quite stable right out of the gate. Dissenters on the newsgroups are usually either blaming the IDE for bugs in their own code, or bugs in third-party code, or bugs in hardware drivers ( eg. http://groups.google.com/group/borland.public.delphi.non-technical/msg/761289bfe87080bc which was eventually followed by this mea culpa: http://groups.google.com/group/borland.public.delphi.non-technical/msg/929db2e509432df1 ), or they have found some of few genuine bugs, which so far seem to almost always have a workaround.

3) The integrated debugger is improved. One of the benefits of switching to the FastMM memory manager is that FastMM keeps track of and reports on memory overwrites and similar errors ( for example, I recently got this message logged to my event log: Debug Output: HEAP: Free Heap block 1b7110 modified at 1bae6c after it was freed Process JSN.exe (2248) ). In addition, the debugger now shows you your data structures in tree form at breakpoints, and lets you see all the local variables at each level of the stack trace. Debug browsing hints are fast and responsive. You can now detach from processes, not just attach to them. In addition, you can “Set Next Statement”, which allows you to move the instruction pointer forward or backward to any active line, during integrated debugging. This can be quite useful if you want to stop, change a variable and then run a section of code again with the different value.

4) The IDE now has live code templates. Code templates are scriptable macros, and Delphi 2006 comes with a few dozen right out of the box. They are saved in XML format for easy editing and copying. Apparently someone at Borland has spent a great deal of time designing and fleshing out this feature, which greatly surpasses all the third-party macro tools you could find before. There is apparently a lot of power built into the scripting available for these templates, as exemplified by the template that completes a case statement by enumerating all the values of an enumeration variable as case values. As news of this feature gets around, we should expect a nice third-party virtual bazaar to materialize where people share their templates. Those of you that still yearn for tools like CodeRush to return to the Delphi realm should take note of this feature. Properly used, this feature could greatly improve programmer productivity, once you get used to it.

5) Delphi 2006 has extensive Refactoring and extended Find functionality. Though these both were introduced in D2005, they are both much more robust and complete in D2006, though not perfect. The ability to find and possibly change all instances of a particular symbol or method is invaluable, especially when it spans all units in a project. (While tools like Grep let you search for strings, they do nothing to keep from matching same-named symbols and methods in other classes.) The number of refactorings available in D2006 is surprisingly high and complete, though a few of the more elaborate ones depend on the integrated Together functionality, which is still a bit slow on all but the very fastest machines. The refactoring in D2006 almost rivals that provided by add-ins like CodeExplorer, though I still find myself using CodeExplorer on a continual basis.

6) Error Insight is one of my favorite features. It is like the grammar checking in Word, except for code. Once I figured out how to keep it from erroneously marking correct code (see http://groups.google.com/group/borland.public.delphi.ide.general/msg/ca0f361e9f8c2b64 ), I found this to be very useful. It is one of those things that becomes such an integral part of your coding that you only realize it when you have to descend to a lower version of Delphi for a client.

Well, that is my list for now. There are a lot of other features and nice things about Delphi 2006 that I did not touch on, but these are the six things that I like the best about Delphi 2006. Personally, I think there is no reason for a Delphi enthusiast not to embrace this release. Borland has achieved something that has eluded them for several years, a Delphi release that is solid and useful, all at the same time.

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.