Nick Hodges has made “program to the interface, not the implementation” a mantra for good practice. And I completely agree. My focus continues to be on legacy projects, as most of my work lies in that area. As much as I love Delphi 12 Athens, I spend the majority of my time in Delphi 2007,…
Strategy for Global Variables
Global variables are generally considered to be bad. This is especially the case where state variables are concerned. However, as my focus has been, and continues to be, on legacy projects, global variables are a reality to be managed. Maintaining a project which has many global variables is a challenge. Depending on the names which…
Delphi 12 in Our Future!
This blog post is based on a pre-release version of the RAD Studio software and it has been written with specific permission by Embarcadero. No feature is committed until the product GA release. There are many improvements coming in Delphi 12, as we are seeing in the Yukon beta. String Literals String literals in Delphi…
Why Comments
Discussions about commenting code can be surprisingly heated. Some will say that good code should explain itself, and needs no comments. Others will insist on the need for comments without actually approaching any discussion of how to distinguish good from bad comments. Bad comments are easy enough to recognize. Many simply repeat in plain language…
Keep it Small
Small is good. Small is simple. We should strive to keep things small in our development work. Keep routines short and simple. Use as few local variables as possible. Avoid long parameter lists. Keep scope as narrow as possible. If you find yourself challenged by these things, it suggests the need for practice and thought….
YAGNI: Is it Absolute?
YAGNI – You Ain’t Gonna Need It – is a useful principle in software development and rework. But should it be a hard rule? I will argue that it should be a guide, not a rule. But also, that the context is a major factor in determining which view should apply. The first and obvious…
On Forms…
It seems that relatively few Delphi developers routinely make use of the anchors and constraints on forms. Why this should be is a mystery to me, but I am only commenting on observations. When you create a form and place some controls, the anchors for the controls are, by default, set to top and left….
Book Review: Delphi Memory Management
Many people working on Delphi projects may not have given much thought to memory management. You may think that there is little need to study the subject, and depending on the nature of your projects, that may be true. But it is always good to increase your understanding of what Delphi is doing, and how…
Embarcadero Webinar
Yesterday (27 October 2022) I presented in an Embarcadero webinar on the subject of my book. Attendance was very good, and response was very positive. The presentation content can be downloaded as a PDF here. The webinar is available now on youtube. You can also read a review of the book here: https://dalijap.blogspot.com/2022/06/book-review-delphi-legacy-projects.html. I welcome…
Organization as Strategy
Software design is greatly a matter of good organization. Legacy software projects are often lacking in that very quality. Although the topic is very large, this article will focus on a smaller area. Constants and types are essential to good design. The scope of these declarations is worth more consideration than it is often given….