Skip to content

Intentional Delphi

Adventures in the act of coding

Menu
  • Blog
  • Books
  • About
Menu

Category: Food for Thought

The Joy of Sets

Posted on March 1, 2025March 1, 2025 by admin

One of the great features of Object Pascal is the inclusion of sets in the language.Other languages have added libraries in support of sets, but Pascal remains unique in having always supported them. Sets are often useful in combination with enumerations. Used together, they provide a very readable approach to handling things such as user…

Read more

The Simple Things…

Posted on May 13, 2024May 13, 2024 by admin

I recently opened up an interesting piece of software from a github repository. I will leave it unnamed, as it serves as the trigger for this article, and demonstrates some poor practices I have often seen in legacy projects. You might think that the assignment of types to variables and parameters would be a simple…

Read more

Programming to an Interface

Posted on April 18, 2024April 18, 2024 by admin

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,…

Read more

Strategy for Global Variables

Posted on February 24, 2024February 24, 2024 by admin

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…

Read more

Why Comments

Posted on August 11, 2023August 11, 2023 by admin

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…

Read more

Keep it Small

Posted on March 7, 2023March 7, 2023 by admin

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….

Read more

YAGNI: Is it Absolute?

Posted on January 31, 2023January 31, 2023 by admin

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…

Read more

On Forms…

Posted on November 15, 2022November 15, 2022 by admin

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….

Read more

Sober Reflection

Posted on July 12, 2022July 14, 2022 by admin

In my book I wrote that we may be the enemy. Delphi is a powerful tool, but is not free from defects. Any non-trivial software has defects. All too often we may find cause to complain of the IDE, and some of those complaints are surely justified, but what role have we played in introducing…

Read more

Those pesky details…

Posted on June 8, 2022June 9, 2022 by admin

The little things in code are easily overlooked, and can be the source of problems which are difficult to diagnose. Consider the conversion of a string to a number: 1 d := StrToFloat(NumericString); What could go wrong? Well, many things, actually. In writing this, you no doubt were thinking of the problem at hand, rather…

Read more
  • 1
  • 2
  • Next
  • Delphi Legacy Projects
  • New! PDF available below
  • Delphi Legacy Projects (PDF)
  • Upgrading and Maintaining Delphi Legacy Projects
MVP Directory

© 2025 Intentional Delphi | Powered by Minimalist Blog WordPress Theme