Jeff Duntemann's Contrapositive Diary Rotating Header Image

delphi

Delphi Turns 25

Today (or maybe tomorrow, depending on who you talk to) is the 25th anniversary of Borland’s introduction of the Delphi RAD environment for Object Pascal. Delphi changed my life as a programmer forever. It also changed my life as a book publisher for awhile. The Delphi Programming Explorer, a contrarian tutorial book I wrote with Jim Mischel and Don Taylor and published with Coriolis, was the company’s biggest seller in 1995. We did a number of other Delphi books, including a second edition of the Explorer for 32-bit Windows, Ray Konopka’s seminal Developing Custom Delphi 3 Components, and others, including Delphi 2 Multimedia Adventure Set, High Performance Delphi Programming, and the ill-fated and much-mocked Kick-Ass Delphi. We made money on those books. A lot of money, in fact, which helped us expand our book publishing program in the crucial years 1995-1998.

It took OOP to make Windows programming something other than miserable. I was interested in Windows programming from the outset, but didn’t even attempt it while it was a C monopoly that involved gigantic switch statements and horrendous resource files. With OOP, you don’t have to build that stuff. You inherit it, and build on it.

There is an asterisk to the above: Visual Basic had no OOP features in its early releases, and I did quite a bit of Windows BASIC work in it. Microsoft flew a team out to demo it at the PC Techniques offices in late 1990 or early 1991. A lot of Windows foolishness was exiled to its runtime P-code interpreter, and while a lot of people hate P-code, I was used to it from UCSD Pascal and its descendents. What actually threw me back in my chair during the Thunder demo (Thunder being VB’s codename) was the GUI builder. That was unlike anything I’d seen before. Microsoft bought the GUI builder from Tripod’s Alan Cooper, and it was a beautiful and almost entirely new thing. It was Visual Basic’s GUI builder that hammered home my conviction that visual software development was the future. Delphi based its GUI builder on OOP, to the extent that Delphi components were objects written within the VCL framework. I enjoyed VB, but it took Object Pascal within Delphi to make drag-and-drop Windows development object-oriented from top to bottom.

People who came to OOP for the first time with Delphi often think that Delphi was the first Borland compiler to support OOP. Not so: Turbo Pascal 5.5 introduced OOP for Pascal in 1989. Although I wasn’t working for Borland at the time, I was still in Scotts Valley writing documentation for them freelance. I wrote about two thirds of the Turbo Pascal OOP Guide, a slender book that introduced OOP ideas and Object Pascal specifics to Turbo Pascal 5.5 users. A little later I wrote a mortgage calculator product using BP7’s OOP features, especially a confounding but useful text-mode OOP framework called Turbo Vision. I licensed Mortgage Vision to a kioskware vendor, and in doing so anticipated today’s app market, where apps are low-cost but sold in large numbers. I cleared $17,000 on it, and heard from users as late as the mid-oughts. (Most were asking me when I was going to start selling a Windows version. I apologized but indicated I had gone on to other challenges.)

I mention all this history because, after 25 years, a lot of it has simply been forgotten. Granted, Delphi changed the shape of Windows development radically. It did not, however, come out of nowhere.

One of the wondrous things about Delphi development in the late 90s and early oughts (and to this day, as best I know) was the robust third-party market for Delphi VCL components. I used to wander around Torry’s Delphi Pages, marveling at what you could buy or simply download and plug into Delphi’s component palette. I have all of TurboPower’s Delphi VCL products and have made heavy use of them down the years. (They’re free now, in case you hadn’t heard. Some but not all have been ported to the Lazarus LCL framework.) I’ve also used Elevate’s DBISAM for simple database apps, and Raize Software’s DropMaster for drag-and-drop data transfers across the Windows desktop. Those are simply the ones I remember the best. There were many others.

I don’t use Delphi much anymore. I still have Delphi 7, and still use it now and then. The newer versions, no. It’s not because I don’t like the newer versions. It’s because what I do these days is teach “intro to programming” via books and seminars, and I can’t do that with a $1,000 product. Well, what about the Delphi Community Edition? I tried to install that in 2018. The binary installed fine. But the registration process is insanely complex, and failed for me three times for reasons I never understood. Sorry, but that kind of nonsense gets three strikes and it’s out. On the other hand, if I were actively developing software beyond teaching demos, I’d probably buy the current version of Delphi and go back to it. I’m willing to deal with a certain amount of registration kafeuthering, but I won’t put my students through it, especially when Lazarus and FreePascal can teach the essentials of programming just as well.

Nonetheless, Delphi kept me programming when I might otherwise have given it up for lack of time. It allowed me to focus on the heart of what I was doing, not on writing code for user interface elements and other mundane things that are mostly the same in all applications. Back when Delphi was still a beta product, Project Manager Gary Whizin called Delphi OOP programming “inheriting the wheel”. That’s where the magic is, and Delphi is strong magic indeed.

Daywander

Drilling U-Channel - 500 Wide.jpg

There’s been an unexpected irruption of normalcy here, while we sail upon the whine-dark seas of modern American life. (I’ve been wanting to use the word “irruption” here, correctly, for some time.) What this means is that I’ve been able to do some of what I want to do, and not merely what my do-it list tells me I have to do. It won’t last, but while it does I’m going to make the most of it.

A number of people have suggested that I write a few short novels to get the size of my list up a little. I wrote Drumlin Circus (53,000 words) in only six weeks, after all. But as I recall, those were very full weeks. So a month or so ago I got an idea for a new short novel, and I’m glad to say I now have 6,300 words down on it; figure 12% or so. It’s whimsical, and whether or not it’s fantasy depends heavily on whether you believe that the collective unconscious is real or not. I’d like to bring it in at between 50,000 and 60,000 words, so don’t expect all-new built-from-scratch universes a la The Cunning Blood. However, I do promise a trademark Jeff Duntemann mayhem-filled action climax.

And a dream repairman. I mean that: A guy who drops into your nightmares and hands you your pants while he gives you directions to calculus class. People who have nightmares love him. The nightmares, well, not so much.

My old writer friend Jim Strickland and I are going to attempt something interesting to keep our productivity up: a chapter challenge. Starting February 1, we’re going to dare each other to get a certain amount of story down in a week, and then exchange that’s week’s worth of story for some quick critique. He’s working on the sequel to Brass & Steel: Inferno and needs a gentle noodge. I need one too, though sometimes what I really need is a two-boot noodge right in the glutes. Neither of us has ever done anything quite like this before. I’ll post reports here as things happen.

Even the do-it list has yielded some things that are actually fun, including a bit of metalwork to make an aluminum grating for my particle board shelves to rest on out in the pool shed (against the several times a year when a hard rain gets under the door and soaks the floor) and mounting some Elfa hardware on the opposite shed wall.

Drilling three 8′ pieces of U-channel for the grate took a little finesse in my slightly cramped workshop. The drill press is where it is (close to the center of the space) for a reason. (See the photo at the top of this entry.) The next major project (as time allows) is getting a solid ground for my station and antennas. I have an 8′ ground rod. I need some bentonite, and a post hole digger. After that, le RF deluge…

Dipping Back Into Delphi with List & Label 22

I haven’t done a lot of programming for the last couple of years, and I miss it. Interstate moves and oxygen starvation will do that to you. I’ve converted some of my old Delphi apps to Lazarus, which in truth wasn’t hard and probably can’t be called programming with a straight face. And I have a project that I need to get back to, even if it has to be written in Delphi 7, which is the most recent version that I have. (Turbo Delphi doesn’t count.) I no longer had a publishing company after Delphi 7 appeared, so post-2002 I dropped off their reviewers list. And $1,400 is a little steep for hobby programming–much less $4700 on the high end.

For some years I’ve been poking at the concept of a personal medical database. I’m old now (how did that happen??!?) and I take pills and get bloodwork and monitor various things to make sure none of my component parts are rusting out. I have Word documents full of notes, and scribbles on paper calendars, all of which really need to be pulled together into one searchable and reportable database. Some doctors won’t believe that my blood pressure does not respond to sodium. I have proof. I’ll bet, furthermore, that it will be a lot more convincing if it’s placed in their hands as a professional-looking report.

All of what I’ve done so far has been in Lazarus, and most of that has been small proof-of-concept lashups, none of them newer than 2012. However, a marvelous report generator product has crossed my desk, and I want to give it a shot with my medbase app. The product is List & Label 22, from Combit, a small firm in southern Germany. It has God’s own kitchen sink of features, many of them related to Web programming, which I simply don’t do. However, it has all conventional reporting options I’ve ever heard of well-covered, and it supports all versions of Delphi back to D6. (It supports Visual Studio and many other dev platforms as well.)

It doesn’t support Lazarus, alas. So I’ll be trying it out in D7.

The big win (for me at least) is that L&L 22 provides a report designer in VCL component format that drops on a form and becomes part of your application. This allows end users to design their own reports. Given that my end user is me, I don’t have to worry about end users doing gonzo things. I’ve always liked my software to exist as One Big Chunk (DLL hell, and all that) so this is right up my alley.

I don’t yet know precisely what reports I’ll want, and it may be the case that I won’t know until I actually need one for a specific purpose, like laying out my data indicating that salt is irrelevant to my blood pressure. Having a report designer right there in the app means that I can design the report that I need when I need it, and not try to anticipate every damn thing I’ll ever want while I’m building the program itself.

I should make it very clear here that I don’t dislike modern Delphi. I still love it, but it’s gotten enormously expensive, and the Starter Edition does not include database programming features. My other reason for using Lazarus is that I still intend to write intro-to-programming books using Pascal as the teaching language. Expecting students to pay even $250 for the Delphi Starter Edition is asking a lot, and worse, I intend to teach database work as well as conventional programming.

I’ll have more to say about List & Label as I learn it. Ditto the medical database itself, which is now a set of tables full of test data and a couple of conceptual UIs. Stay tuned.

FreePascal (And Lazarus) From Square One

About two years ago I started piecing together a book on FreePascal based on my 1992 Bantam book, Borland Pascal 7 From Square One. I set the project aside in part because I needed to get my assembly book updated and back into print–something that took most of a year and all of the personal energy I could summon. But there was another problem: The text-mode IDE included with FreePascal is erratic in the extreme, and crashed constantly on me, especially under Windows. I had hoped that there was an easy fix, but apparently not. I installed the new 2.4.0 release of FreePascal yesterday, and the IDE hasn’t changed a bit. Try to set the text display resolution to anything at all (25 X 80, 43 X 80, whatever) and it crashes. One wonders why the damned thing is still there.

I’ve been following the Lazarus project since it had been the Megido project, back in 1998. The idea was to create an open-source alternative to Delphi, by writing a GUI front end for FreePascal. It’s possible to create ordinary console apps in FreePascal using Lazarus as the IDE, but I hesitated to use Lazarus as the example IDE in the book because it’s only available for Windows, Linux, and FreeBSD. (There’s a Mac port, but I’ve heard it’s less complete and much less robust than the others.)

Pascal and VDM readers, feel the irony: Jeff Duntemann hanging back from a RAD environment because he’d hoped to have a more broadbly applicable (read here: portable) book. Wow.

Heh. I changed my mind. I’ll have to go back to the beginning and pull out all the references and screenshots involving the text-mode IDE, but Lazarus is a much better IDE, even if you’re not actually doing any RAD work….yet.

“Yet” is key. If this first book works out, I hope to adapt some of my material from The Delphi 2 Programming Explorer into an intro book for Lazarus as a RAD tool. So getting readers familiar with the editing and project management machinery built into Lazarus is a good thing, even if the bulk of the app goes to waste while people learn the fundamentals of Pascal.

I’m going to try something new with this book. I’m going to pull a Cory Doctorow and give away the complete PDF version for free, and sell the printed version on Lulu. The book will be yet another descendant of Complete Turbo Pascal (in fact, it will in essence be the 25th Anniversary Edition!) and I’ve been paid for the work many times over. So I won’t be losing much by giving it away, and I’m very curious to see how many paid print sales I’ll make based on a free ebook.

Most of the work lies in the early chapters, where I introduce people to the Lazarus RAD environment. After that, well, it’s all basic Pascal, and while Delphi has extended Pascal fantastically in the last fifteen years, CASE statements are still CASE statements.

Unlike my earlier books, I intend to post regular PDFs of the work in progress, so you can follow the project as it happens. (There’s a 2008-era PDF out there now, and you can get it from my FTP area using HTTP.) I’ll post an updated PDF as soon as I untangle all the existing references to the text-mode IDE. Watch this space for more details.