Tag Archives: Best practices

FieldByName, FindField: too convenient to be honest

I don’t know about you, but I can’t count anymore the number of times I’ve seen this code pattern (in code snippets online as well as in production code): while not ADataSet.Eof do begin [...] ADataSet.FieldByName(‘MyFieldName1′).SomePropertyOrMethod; ADataSet.FieldByName(‘MyFieldName2′).SomePropertyOrMethod; [...] ADataSet.Next; end; … Continue reading

Posted in Coding standard, Delphi, Quality | Tagged , , , , , | 34 Comments

Hints and Warnings begone!

This previous post has stirred some interesting comments and reactions (thank you!). I would like to come back on the “no Hint, no Warning policy” and why I like it, but without the need to be zealot. Why desirable? The … Continue reading

Posted in Coding standard, Delphi, Quality | Tagged , , , , , | 4 Comments

Won’t Heed Hints? Get Errors!

One of my pet peeves, as you may already know, is leaving memory leaks in “final” code. Another one is leaving compiler Hints and Warnings. When doing a fresh build, there should be no Hints and no Warnings. Period. No … Continue reading

Posted in Delphi, Quality | Tagged , , , , , | 13 Comments