I've been watching a weekly webinar by Embarcadero, usually hosted by Jim McKeeth, called TCoffeeAndCode and today's topic was "Managing Large Projects and IDE Performance Enhancements". This one was packed full of tips and tricks for speeding up your development with IDE plugins, better use of the keyboard, managing projects, analyzing code, and so forth. Near the end, Jim called out to programmers everywhere to blog about their favorite productivity tips and share with others what works for them to speed up software development.
So I'm taking on this challenge for myself and am starting a mini series highlighting ways I use Delphi, the short-cuts I've found useful, my favorite plugins, and other tidbits I've picked up along the way. Perhaps you will find something useful. In this first blog on the topic, I'll talk about the built-in keyboard shortcuts Delphi provides in the editor and how I use them every day.
One of the legacy projects I support was written in Delphi 7 and uses ACE Reporter. I have only used ACE Reporter once before and very little even then so don't know much about it but it seemed to work fine for what it was doing. I was tasked with adding a column to a report where the data on the report came from a temporary table that gets filled every time it prints. Adding a column to the report implied adding a column to the table. A previous experience updating tables with this app proved to take an inordinate amount of time so I wanted to avoid that if possible.
I've been using a couple of small InterBase databases for testing and learning purposes while doing some mobile and web development. I have a Windows 2016 Server in my office with InterBase XE7 and 2017 installed using different ports. Since I work from multiple virtual machines and sometimes a laptop, I just put the databases on the Windows server to access them all from whichever development environment I happen to be using. Both InterBase instances on the server were using the Developer license that comes with Delphi--requiring a restart once a day.
A few days ago, I wrote about signing your commits so they'll show up on GitHub as verified. After that process is in place, every commit requires the passphrase associated with the signing key to be re-entered. This gets old quickly if you're committing frequently (which you should). Fortunately, there's a way to cache the passphrase to make this much less burdensome. Unfortunately, the cache only lasts 10 minutes.
Coming from a long history of Windows VCL development with Delphi, I have often used data-aware controls to quickly hook up data sets to controls and grids. As I've been doing more mobile development, I've taken a look at LiveBindings and like its extensibility. So, I decided to try my hand at extending it!
First off, I shamelessly admit the title is just a little misleading but it was so catchy, I couldn't resist! However, setting up a quick Drupal website did turn out to be the easiest way I could think of to get around some limitations in the environment from which I was trying to transfer a Delphi project.
I'm writing a book about cross-platform development with Delphi and in one of the chapters that covers accessing phone features, such as the camera and location services, the demo app I present stores a list of parks with a name, picture, and coordinates for each. I put the list of parks on the first tab and a picture along with an edit box for the park name on second tab.
I somehow managed to interrupt the slide transition two-thirds the way through, leaving a funny display on the screen.
Installing and upgrading Delphi is a pretty big task. With support for eight platforms, a dozen different databases, multiple web services and servers, a rich run-time library, and an ever increasing array of programming tools and IDE productivity aids, I'm in awe that for the most part, the process is fairly smooth. I'm sure there are those still on Windows 8.1 or older or have machines with limited memory and slow hard drives that bemoan the time it takes or incompatibilities they encounter.
I didn't write here much about the release of Delphi 10.4 Sydney but I've been using it almost exclusively for the last several months and have upgraded all projects I could to the latest and greatest version. It really is an amazing environment and continues to get better.
I do almost all of my development from virtual machines. I use VMWare Workstation Pro for this and it has served me well for many years. I like the snapshot and cloning aspects plus being able to move a machine to a different drive, back it up, and even put it on my in-office Windows server and free up local memory and hard drive space.
As I've done this a number of times, there are some steps that I replicate on every machine for consistency and convenience. Everyone will have their own way of doing things and favorite tools--these are mine.
Delphi 10.3 Rio has been out for awhile now, in fact, I recently installed the second update, so this post is a little late to the party but I thought I shared my thoughts anyway.
I needed to reinstall Delphi 10.2 recently and when I did, I finally decided to check the box that asks if you want to hook up a source code repository. I've always managed source in repositories outside of the IDE, but decided to see if and how much productivity improvement could be had it was built in with the project manager. I use Git so selected the installed
git-cmd.exe file when prompted.
Way back in 2000, InterBase 6.0 was made open source. Soon a fork was made in the code and Firebird SQL was born. I started using this new powerful database engine and as InterBase went back to being a closed-source product, stuck with the free version or used other database engines. Many tools and Delphi component sets still support both IB and FB as they are still quite similar.
I work on a variety of projects in several different versions of both Delphi and Visual Studio. A lot of these projects also include database access. To support all these different projects, a lot of different tools need to be installed and with each comes a set of paths that are setup for the applications to find libraries, support tools, and so forth. Since most software tools can also generate both 32-bit and 64-bit code these days, there are often two sets of paths for each type of compilation.
Delphi has come a long ways since it was first released in 1995. It now compiles 32-bit or 64-bit, still creates console or Windows applications but now also can create Android and iOS apps if you have the FireMonkey library and cross-platform tools, you can create Android and iOS apps.
As an independent software developer, I make my living writing scripts and applications for others. In order to maximize my opportunities, I need to be a master of many environments. Since much of my career has involved Windows applications, I am spending quite a bit of effort in other areas.
Having worked in Delphi for many years, I've seen the development tool and it's RTL evolve significantly, yet remain resilient in backwards compatibility. Early on, to prevent your application from running multiple times, there were generally two different approaches:
- Search for the name of your app's main form by name, or
- Search for a "mutex" created by your app.
Why is it that when companies have a good thing, they have to go mess it up by changing its design? I've seen this in many different industries but since change happens so much more quickly in software, I seem to be annoyed much more often with changes in user interface.
A friend of mine runs a business selling a Windows application for a niche market. Of course he has a web site with lots of information and a way to download a trial of his software and then pay and register it. Since he's a technical person, likes writing code, likes to keep overhead low, and his needs are fairly simple, he wrote the registration program himself. He's most fluent in Delphi so it was natural to write the registration program in Delphi--an old, but very functional Delphi 2007.
Some of my blog entries are just to remind myself how to do things later--and on several occasions they've been useful in that regard. I hope they are also useful to others that may encounter similar struggles. This is another one of those articles which I will likely refer back to at some point.
I'm a long time Delphi user and have taken advantage of the Object Repository quite a bit. It's really handy to take a unit or project that might be useful somewhere else but in a slightly different form and add it to the repository. Later, when you need to use that bit of code, you can select it from the repository right from within Delphi and it will make a copy of that code in your new project.