Posted by on in Blogs
A Happy Accident and a Silly Accident By now you’re all aware that we’re getting ready to move to a new building here in Scotts Valley. This process is giving us a chance to clean out our offices and during all these archeological expeditions, some lost artifacts are being (re)discovered. Note the following: These are some bookends that my father made for me within the first year after moving my family to California to work on the Turbo Pascal team. He made these at least two years before Delphi was released, and at a few 6 mont...

Posted by on in Blogs
What. The. Heck. Is. This? I simply cannot explain this. At. All. This was on a bulletin/white-board in the break area. I’d never noticed it because it was covered with photos from various sign-off (final authorization to release the product) celebrations. Lots of photos of both past and present co-workers, many thinner and with more hair ;-). Since we’re in the process of cleaning up in the preparation for moving to our new digs, it is interesting what you find… I presume this image has been on this whiteboar...

Posted by on in Blogs
A case when FreeAndNil is your enemy It seems that my previous post about FreeAndNil sparked a little controversy. Some of you jumped right on board and flat agreed with my assertion. Others took a very defensive approach. Still others, kept an “arms-length” view. Actually, the whole discussion in the comments was very enjoyable to read. There were some very excellent cases on both sides. Whether or not you agreed with my assertion, it was very clear that an example of why I felt the need to make that post was in order. I ...

Posted by on in Blogs
Oh, the things you find… When you’re cleaning out your office....

Posted by on in Blogs
A case against FreeAndNil I really like the whole idea behind Stackoverflow. I regularly read and contribute where I can. However, I’ve seen a somewhat disturbing trend among a lot of the answers for Delphi related questions. Many questions ask (to the effect) “why does this destructor crash when I call it?” Invariably, someone would post an answer with the seemingly magical incantation of “You should use FreeAndNil to destroy all your embedded objects.” Then the one asking the question chooses that answer as the accepte...

Posted by on in Blogs
There may be a silver lining after all After having to deal with all the stack alignment issues surrounding our move to target the Mac OS, I’d started to fear that I would get more and more jaded cynical about the idiosyncrasies of  this new (to many of us) OS. I was pleased to hear from Eli that he’d found something that, at least to a compiler/RTL/system level software type person, renews my faith that someone at Apple on the OS team seems to be “on the ball.” Apparently, the Mac OS handles dynamic libraries in a very sane an...

Posted by on in Blogs
Requiem for the {$STRINGCHECKS xx} directive… It’s time. It’s time to say goodbye to the extra behind-the-scenes codegen and overhead that was brought to us during the Ansi->Unicode transition. We’ve shipped two versions with this directive on by default. The Ansi world is now behind us. It’s only real purpose in life was to assist C++Builder customers to more easily transition to C++Builder 2009 and 2010. There are some rare cases where an event handler that was declared in a C++ form/datamodule with an AnsiString parameter *could* be c...

Posted by on in Blogs
Divided and Confused Odd discovery of the day. Execute the following on a system running a 32-bit version of Windows (NOT a Win64 system!): program Project1; {$APPTYPE CONSOLE} uses SysUtils; begin try MSecsToTimeStamp(-1); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. It should print out the following: EIntOverflow: Integer overflow Now run the exact same (32bit) binary on a Win64 system, this is what you’ll get: EDivByZero: Division by zero Give it a try. We...

Posted by on in Blogs
Mac OS Stack alignment – What you may need to know While I let my little tirade continue to simmer, I figured many folks’ next question will be “Ok, so there may be something here that affects me. What do I need to do?” Let’s first qualify who this will affect. If you fall into the following categories, then read on: I like to use the built-in assembler to produce some wicked-fast optimized functions (propeller beanie worn at all times…) I have to maintain a library of functions that contain bits of assembler I like to take apart my brand new...
It’s my stack frame, I don’t care about your stack frame! I’m going to start off the new year with a rant, or to put it better, a tirade. When targeting a new platform, OS, or architecture, there will always be gotchas and unforeseen idiosyncrasies about that platform that you now have to account for. Sometimes they are minor little nits that don’t really matter. Other times they can be of the “Holy crap! You have got to be kidding me!” Then there are are the “Huh!? What were they thinking!?” kind. For the Mac OS running on 32bit x86 hardware, which is...

Check out more tips and tricks in this development video: