Skip to main content
Thoughts from David Cornelius

Software development tools and techniques explored--mostly Delphi

For Historical Purposes

Category

Early in my career, I was studying the code of an application written for the Apple II in preparation for developing something similar on the PC and would often ask questions of the original programmer. Most of the time, I'd get valuable information about the purpose of a routine or why something was done a particular way. But every once in a while, when pressed for an explanation, the programmer would think for a minute, then simply utter, "For Historical Purposes" and walk away chuckling.

Thankful for Delphi

Category

This time of year in the United States is marked by a major holiday, Thanksgiving, the last Thursday of November. It is during this time that ad campaigns, religious organizations, and families everywhere tend to step up their recognition of everything they're thankful for. As a software developer, I'd like to hook into this theme and highlight features of programming tools I use that make my life better--most notably, Delphi--and create my own "thankfulness" list.

Multiple Installs of Firebird

Category

As a Delphi developer, you might be working with the popular and free Firebird database engine. There are several versions and if you have multiple clients or applications, including some legacy ones that are in maintenance mode, there might be a need to have multiple instances of the Firebird servers installed side-by-side. If you're like me, you might forget which versions are listening on which ports and so use a utility like CurrPorts to remind you. But if you don't use a particular database service very often, it might not be started--or not even installed on the machine on which you're working. If you also have InterBase running, there might be conflicting or generic service names like "gdb" which doesn't tell you which engine it's for nor which version. This confusion can be reduced if you make a few configuration file changes and install the Firebird services yourself. Here's how.

Using the Vault API

Category

Nearly two years ago, Idera acquired apilayer, a collection of various cloud-based APIs. Idera being Embarcadero's parent company (and Embarcadero being the publisher of my favorite development tool, Delphi), I was interested to see what this was all about and looked at the handful of APIs available. One caught my eye and I made a note to come back and check it out more when the time was right.

Delphi Debates: Assigned

Category

As a Delphi MVP, I was surveyed on my stance of the use of FreeAndNil. In that questionnaire was included a question about the use of Assigned(). Really? Is that debated as well? I couldn't find anything on the internet debating this except for an old discussion on StackOverflow. I use this function frequently and as I looked more deeply at what it does, I'm even more confident of its use.

Delphi Debates: FreeAndNil

Category

When freeing an object in Delphi, simply calling its Free method calls the object's destructor and releases the memory allocated to the instance of the object. But it doesn't change the address of the referencing variable which, therefore, still points to the place in memory where the object existed. The released memory can be quickly reused by other objects or resources and if you try to access the object again without re-creating it, you could get an Access Violation or some other error or worse yet, unpredictable behavior.

Delphi's Find in Files Trick

Category

You've probably used Delphi's Find in Files feature to search for an identifier or library function through multiple folders of source code. If you have backups of your source or multiple projects with copied or similar sets of routines and check the "Include subdirectories" checkbox, the search results could contain a lot of duplicates taking extra time to wade through them all. Wouldn't it be nice if there was a way to fine-tune the folders being searched?

There is!

Switching From UniDAC to FireDAC

Category

Since upgrading my Delphi subscription from Professional to Enterprise, I've been slowly replacing third-party database components with FireDAC since the Enterprise edition comes with many more databases supported. One of the ones I've used a lot is Devart's UniDAC. UniDAC is a great database component suite. I've used them for many years, they have an excellent support forum, and frequent updates. I just don't want to pay for duplicate functionality--well, mostly duplicate; there are some advantages to using UniDAC but they're not deal-breakers for me.

Application Usage Reporting with Delphi and PHP

I do a lot of contract programming in a niche market that requires small, custom-written, import/export programs. Some of these can are copied with few modifications for similar customers. Once in a while, there's a common need where the application can be used by several customers. In those instances, I need to implement some form of licensing and accountability but I didn't want anything too elaborate nor do I want to incur ongoing charges for an online API for the one-time pricing structure of the projects I work on.

My History with Delphi--and Why I still Use It

Category

Today marks the 27th anniversary of the first release of Delphi. My personal experience with the product starts several years before 1995 and ends with the conclusion that Delphi is still just as relevant and critical to my business as ever. Let me tell you the story about how I came to use it--and why I still find it the best development tool for what I do today.

Delphi Productivity Tips: Keyboard and Mouse Basics

Category

There's an old story about a question that was posed during a family meal asking what was the best modern convenience in the home. The younger generation were saying things like ice makers in refrigerators and microwave ovens. The grandmother of the family listened for awhile then gave her input: indoor plumbing! It's too easy to take some of the basic conveniences of life--or features of an IDE--for granted, and assume they will always be present. This article continues a set of Delphi Productivity Tips but goes back to some of the basics of the Delphi IDE that I realized are probably more import--but I don't always think about because I figured every development environment should have.

TRESTResponseDataSetAdapter and Hidden Gems of the REST Debugger

Category

Writing REST applications in Delphi is pretty simple with the advanced components we have available these days. The functionality encapsulated allows us to spend time on the business and user interface aspects of development rather than the nuances of connecting to an API and parsing JSON results. When starting a new REST app, I usually use the REST Debugger that comes in RAD Studio to test out an API before building the app itself. There are other REST API tools but this one has a great feature that saves me time building my Delphi app that no other tool has.

I Wrote a Book!

Early last year, I was contacted by Packt Publishing with a request to write a book about Delphi. I was surprised, honored, and a little scared! I know the Delphi community is world-wide but does not have as large a following as other languages so was unsure how much of an audience there would be. Was I up to the task?

Delphi Productivity Tips: Navigation Toolbar

Category

At the top of Delphi's code editor, is a Navigation Toolbar with several "jump lists" as I like to call them. They help you find and jump to places in your code quickly by selecting them from lists built by the parsing engine in Delphi. There are also shortcut keys that allow you to use them without taking your hands off the keyboard to use the mouse.

GetIt Dependencies Work!

Category

When GetIt Package Project Dependencies first came out in Delphi 10.1 Berlin, they didn't work right, or at least not for me in the way I expected them. I had problems with them in Delphi 10.2 and 10.3 as well. I don't remember if I tried them or not in Delphi 10.4. However, with the new Delphi 11 Alexandria that was released last week, they DO work!

RAD Studio 11 Alexandria - First Look

Category

RAD Studio 11 Alexandria was released Thursday. There were webinars, blog posts, and tweets about the many wonderful things in the latest major release of Delphi and C++Builder from Embarcadero. These include High-DPI support in the IDE, design-time style viewing in VCL applications, support for Windows 11, ARM-64 compilation on Apple's new M1 chip, and many other features and enhancements. I installed the update and did a little bit of coding to get a feel for how well it behaves and am quite pleased. I'll be using it more over the next several days and weeks as I shift my development, install plugins and components, and tweak the settings to tune my new work environment. Here are just a few things I noticed right away.

 

Desktop UX - How I Escaped Cluttered TabControls

Category

This week's Desktop First UX Summit, hosted by Embarcadero, is a great collection of presentations by leading software development and design professionals sharing the theory and practice of creating great desktop experiences. I really appreciate the focus on desktop app design--not everything is mobile or web. One of my favorite speakers every year is Ray Konopka and he gave another great talk, this year on How Tab Controls Can Ruin Desktop UX.

Delphi Productivity Tips: Live Templates

Category

A long time ago when Delphi 5 was king and conferences were in person, I was able to attend BorCon and saw a session presented by Mark Miller. I don't remember the topic but I do remember noticing that he was typing code really fast. He wasn't just typing fast, though, he was coding fast! As he was typing, characters were being turned into words and sometimes even full expressions. At some point, he explained how he was doing it: he was using a Delphi IDE plugin called CodeRush.

Loading a File into Advantage Database

Category

I switch back and forth between doing cool new stuff with the latest version of Delphi on web and mobile platforms and supporting legacy apps that have been running for a long time but the original programmer has long since left. The project I'm working on today falls into the latter category and the current challenge is storing a letter template file in an old Advantage Database. My update to the software has be put into an installer script and sent out to non-technical customers to update their existing installed databases.

Subscribe to Programming