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.
You are currently browsing the monthly archive for September 2008.
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.
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.
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.
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?
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.
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.
I imagine the news has spread like wildfire – the Delphi 2009 Trial Edition is now available for download! I got me one, and these are my initial impressions.
Caution: The contents of this post may cause dizziness or nausea. Take only as prescribed and if symptoms persist seek professional advice.
Recently I found myself needing to do something I had never done before – create an instance of an arbitrary class derived from some base class and destroy it, and do so without invoking any constructor or destructor code that the derived class(es) may have introduced. This is the difficult bit.
Impossible? Don’t be silly, this is Delphi we’re talking about….
Last weeks poll was interesting – I was surprised to see such a high proportion of those polled indicating that they don’t do unit testing – slightly more than 50% in fact. It wasn’t a huge sample size, but even so it surprised me.
So that got me thinking about the use to which visitors to my blog are actually putting Delphi – unit testing isn’t relevant to everyone of course – and so I thought it might be useful to ask that question this week.
This is another multi-response poll. You may choose all the answers that apply to you.