[Estimated Reading Time: 2 minutes] What can possibly go wrong in the simple act of modifying the message of an exception to add some additional diagnostic information and then re-raising it? Quite a lot actually, and all from one simple mistake.
[Estimated Reading Time: < 1 minute] I’ve been thinking for some time about the direction that the Delphi variant of Pascal is heading, and have had this poll in my back pocket for a couple of weeks. Just recently the topic has become rather prominent in the NGs, and I myself just logged a language change suggestion. So I thought now might be a good time to “Pop The Question”, hence this weeks poll: How should new language features be introduced to Delphi? You only get to choose one response this week. Choose wisely. 🙂
[Estimated Reading Time: 4 minutes] Or: “Environmentally Friendly Coding – Recycle Your Keywords” Yesterday I logged a Quality Central report proposing the addition of support for “automatic variables” to the Delphi language. Not only is it an excellent idea (in my humble and utterly objective opinion :)), but there is already a keyword in the language that could be co-opted for this purpose, a keyword that has been at something of a loose-end since it was deprecated (rendered obsolete even) a long, long time ago…
[Estimated Reading Time: 3 minutes] As promised last time, I present here a very simple implementation of an automatically cancelling hourglass exploiting the same life-time management used previously to automatically dispose of temporary objects.
[Estimated Reading Time: 4 minutes] Barry Kelly recently posted an example of “smart” pointers (specifically the auto-pointer variant of a smart pointer) using generics in Delphi 2009. It was an interesting use of generics but the end result was something that has – in part at least – been possible for some time in Delphi even without generics – reliable cleanup of objects. This was something that a colleague of mine, Geza Sabo, pointed out, based on some code I’d previously shared with him to robustly manage the hourglass cursor in a GUI application.
[Estimated Reading Time: < 1 minute] I’ve worked with a number of version/source control solutions over the years, and looked at or even evaluated even more. None has really been perfect, and very few even come close, each with their own strengths and weaknesses. But what do you use with Delphi? Recognising that people perhaps use one system at home and another in their “day job” (or even on different projects within the same organization), you can choose up to three responses for this poll.
[Estimated Reading Time: 3 minutes] It looks like I may have jumped the gun with my conclusions from the previous exercise to benchmark string performance in Delphi 2009. Following a useful exchange in the comments with Kryvich I corrected a small discrepancy in the tests and made some changes to the performance testing subsystem within the SmokeTest framework. I then re-ran my string performance benchmarks with some significant – and more encouraging – differences in the results.
[Estimated Reading Time: < 1 minute] Just a short post this one. Somebody else may already have mentioned this, but I only just figured it out for myself – the CompilerVersion for the Delphi 2009 compiler is not what you might expect (and is not what the documentation says it is!). Both CompilerVersion and RTLVersion have the value 20 in Delphi 2009. In Delphi 2007 these were 18.5 and 18.0 respectively. Confusingly the documentation is correct for RTLVersion but incorrectly gives 18.0 as the value for CompilerVersion. Is anyone else wondering what happened to 19? Did Delphi 2008 happen after all and I just missed it?
[Estimated Reading Time: 6 minutes] NOTE: Downloads are now fixed! Andreas Hausladen generously took the time to make some detailed comments on my previous post, one of which prompted me to throw together some further performance test cases for String types specifically. The results were something of a mixed bag and contained some surprises.
[Estimated Reading Time: 8 minutes] Prompted by a conversation with some colleagues where-in we collectively speculated about the implementation details of a generic class and what impact – if any – this might have on performance vs a “traditional” polymorphic equivalent, I threw together a quick performance test case in my Smoketest framework, and as a result discovered a couple of significant changes in Delphi 2009 that created some unexpected problems.