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 excuses!

  • I know some organizations that ship production code with thousands of Hints and Warnings…
  • Some developers even disable Hints and Warnings in the IDE…
  • You may think it’s reasonable to deal with Warnings (up to drastic enforcement by turning them into Errors so it won’t even compile when there’s a Warning) and not bother with Hints…

The other day at work, when working on our components migration from pre-Unicode to XE, I had a very example of a seemingly benign Hint that was in fact a bug in waitingContinue reading

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

Adding Useful SendTo Targets for Delphi and more…

With a new job comes very often the tedious work of installing/configuring a new workstation. There is one thing I find very useful and like to install almost at the beginning: a way to quickly open any file in a generic editor from a right-click menu in Windows Explorer.
I often want to quickly look at a Delphi project file (*.dpr) for instance without loading it in Delphi, or at a command file (*.cmd) with something better than regular Notepad, or at any file in an Hex editor… Continue reading

Posted in Configuration, Windows | Tagged , , , , , | 11 Comments

Don’t Do Evil to Users

vs “Your work will self-destruct in five seconds…”

With Delphi (or C#) it’s so easy to put a Timer to implement some Auto-DoStuff feature that you’ll find one in almost any application. No doubt it can be very handy; it might even be very kind for the user.

Now, please read again the previous sentence… I shouldn’t have to use “might even”; it should always be beneficial to the user, 100%, no exception, period! It is unfortunately not true. I even have an example of the opposite; it happened to me and I got pissed off upset real bad. Continue reading

Posted in Quality, User Interface | Tagged , , , , | 4 Comments

A New Job

Friday was my last day at WideOrbit. I’m leaving a bunch of good people whom I’ve got to know and appreciate over the last 5+ years. So, I’m a little bit sad but at the same time very excited to start a new adventure. I’m joining a green startup, Adura Technologies, also based in downtown San Francisco. And, yes, I’ll do a lot of Delphi (XE).

Besides the personal announcement above, what can interest the Delphi community is that this job was never advertised. Continue reading

Posted in Delphi, Jobs, Personal | Tagged , , | 7 Comments

Programmers are only as good as what their users can get

What matters for your users is that your software helps them get their job done efficiently, correctly and reliably. They do not care what language you used, how elegant your code is, that your new super-sort algorithm is faster than quick-sort by 1s in some corner case they may never encounter.

That is especially blatant if you use some lookups or reference data to produce their results and you got them incomplete or wrong, thus delivering incomplete or wrong results.
It’s wrong, you’re bad.
Continue reading

Posted in General | Tagged , | 2 Comments

CodeCamp 2010 = Awesome!

I spent the day on the Foothill College campus in Los Altos for the 2010 edition of the Silicon Valley Code Camp.
And I plan to return tomorrow!

We had a wonderful weather, lots of food-for-thought and abundance of pizzas.
And best of all, it’s all free thanks to the sponsors and an army of volunteers!
Continue reading

Posted in Conference, Delphi, General | Tagged , , , | 1 Comment

Implicit vs Explicit Call to inherited

When overriding a method, you have the choice to call the ancestor method implicitly with the inherited keyword alone or with also the method name and its parameters if any.

Does it make a difference? Why choose one or the other?

procedure TForm2.AfterConstruction;
  MessageBox(0, 'Hello!', 'Test', MB_ICONINFORMATION or MB_OK);


procedure TForm2.AfterConstruction;
  inherited AfterConstruction;
  MessageBox(0, 'Hello!', 'Test', MB_ICONINFORMATION or MB_OK);

Continue reading

Posted in Coding standard, Delphi | Tagged , , | 13 Comments

Using Richedit 4.1 with D2010


Starting with Windows Vista, the OS offers a lot of features and improvements to the embedded Speech capabilities that are directly available for free to the Delphi developer, as I have shown in my CodeRage and DelphiLive sessions. But to take full advantage of the Text Services Framework implementation of many Speech Recognition functionalities, it is necessary to use a more advanced version of the RichEdit control than the version 2.0 shipped with Delphi (2010 and even XE).

Another reason for using RichEdit 4.1 is the proper handling of fancy Table layouts from the recent Word versions like:

Continue reading

Posted in Delphi, VCL | Tagged , , , , | 5 Comments

Hello! Again…

Almost 10 years ago, fgaillard.com, was where I used to publish some code, utilities and occasional articles. It was not pretty, it was not a blog, it was manually edited HTML for the most part. It needed serious work…

But then I moved with my family to the US, and my online presence became almost inexistent. The site redesign was put on the (far, far) back burner; it actually went into deep hibernation with a
construction “Forever Under Construction…”.construction

But the itch went back and I started to poke my head in the forums, on StackOverflow and at the Delphi conferences, CodeRage, Codeway, DelphiLive…

So, I have decided to launch this blog. It will be mainly about Delphi programming, Programming at large but also whatever I think useful to share…

I’ll probably also provide the old content, as an online archive, much like it was, in French and in English. But for anything new, I’ll avoid the trouble of having both languages. There still might be some new content in French when relevant, like slides or video recordings done for the French Delphi conferences, but the vast majority should be in English.

Hopefully, I’ll be able to publish regularly…

Special thanks to Jim McKeeth for encouraging me to start this blog and for hosting it along with his Delphi.org

Posted in General | 3 Comments