Category Archives: delphi

Next in the series of plaintive Delphi cries, one to (some of) the *users* of Delphi

To many of the Delphi developers I have encountered:

Please memorise the following: Format
Message := 'There are ' + IntToStr(numBunnies) + ' bunnies in the forest.' + #13 + 'That comes to ' + FloatToStrF(bunnyDensity, ffFixed, 4, 2) + 'bunnies per acre.';

Message := Format('There are %d bunnies in the forest.%cThat comes to %2.2f bunnies per acre.',[numBunnies, #13, bunnyDensity]);
See how much prettier that is? Please start using it. I beg of you.

Also, consider:
function FunctionNamedFoo: Boolean;
a function which returns a value. You can either place the return value of the function into the keyword variable Result or into the locally-scoped variable FunctionNamedFoo. As you write more and more functions, please decide on the style you prefer and stick to it. Please.

I personally prefer the FunctionNamedFoo approach, since it makes searching the source code much easier. My despair on this issue is however so great that I no longer care which you choose, as long as you choose but one.

Delphi developers I have encountered: Thank you for listening.
Everyone else: My apologies. I do feel better now though.


Filed under delphi, Uncategorized

A plaintive cry to the developers of Delphi 7

To the developers of Delphi 7:

What is wrong with you!?! Why did you choose to ignore the behaviour of roughly a gazillion Windows apps which provide an encapsulating frame to keep all the little bits of your application together and nicely bundled? Why did you instead choose to provide 6 floating boxes and expose whatever it is my screen was previously displaying on the bits those boxes aren’t occupying?

Do you have any idea how frustratingly annoying this is? Why do you hate your poor users so? Is it not bad enough that they have to write in Delphi, that you feel the need to punish them further?

After all, I’ve been using Delphi for two days and I already hate it for its tedious and overwhelmingly pointless verbosity – and this from a guy that writes C for a living! Why do you seek to make the pain so much worse?


Filed under delphi, rants, Uncategorized