Friday, April 30, 2004

Unit testing redux...

Thank's to all of you who responded to my post about Unit testing. While largely informal and very unscientific, you folks have basically confirmed my suspicions about the general attitude toward using a testing framework. Internally, we've been using DUnit and NUnit while we work on future releases of Delphi, so we are very well aware of how these particular frameworks operate.

Thursday, April 29, 2004

Hard Drive woes

Been down for a few days while I rebuild my system from a hard-drive failure. Those S.M.A.R.T. enabled drives are really great... only if the OS would report that information to the user! Todays hard drives are great at detecting and in many cases silently correcting errors without you even noticing. They'll even remap a sector or a track if there is an unrecoverable error detected. Again, all without the user ever knowing that it is happening. Nowadays, when a hard drive actually begins reporting errors back to the OS, your drive is most certainly in a world of hurt. This isn't a nice warning that things are beginning to fail so you can take action, no, these errors are just letting you know that the Grim Reaper is hovering over your shoulder and has come to claim your hard drive and all its data.

Luckily there are some very nice data recovery tools that can reconstruct a virtual image of the drive that allows you to copy as much data off the drive as possible before the Reaper finally sucks the soul from the drive. Looks like I only lost about a days worth of actual work... but the several days worth of re-installing, rebuilding and reactivating everything that I had is worse.

The only good thing about all this, is that it is an opportunity for me to clean up all the various unused cruft that has crept onto the drive over the past year or so.

Thursday, April 22, 2004

Borland posts a first quarter profit

http://www.borland.com/news/press_releases/2004/04_22_04_q104_earning_release.html
There it is, in black and white. $.01/share GAAP or $.06/share non-GAAP. Go here to listen in on the conference call to the analysts...

Wednesday, April 21, 2004

Blush...

This time for sure... Comments should now be working... Sorry for the busted comments, folks.

Unit testing...

Here's a baited question he..he... How important is unit-testing to your day-to-day work? What if your tool of choice had some sort of integrated support for writing and running unit tests? What would you expect from such an integration?

Things that come to my mind are:


  • Create new test module or application

  • Scan through the classes in your project and create a testing skeleton for the selected classes

  • Inspect the methods and their signatures, then create specific rudimentary boundary condition tests

  • Integrated test management console

  • Run and debug specific tests



Also, what are your favorite unit-testing frameworks? DUnit, NUnit, etc... Should Borland create their own framework or simply leverage one of the existing frameworks?

Different broken rant

Ok, this really isn't a rant, per se... It is also a history lesson. Julian Bucknall posted this rant about Delphi's "poor" support of namespaces. First of all I agree with Julian on principal, however I'd like to also remind our esteemed viewers of the lineage and heritage that is Delphi, and more specifcally Turbo Pascal. When Turbo Pascal 4 was introduced over a decade and a half ago, it turned the Turbo Pascal world on its ear. It introduced the concept of a "unit." Well, guess what people, a "unit" is a namespace. The unit allowed one to break up their project into mutiple logical modules that could then be re-used in several projects and also isolate type names under a common umbrella. This way you could have a type called TFoo in unit A and have a completely different type called TFoo in Unit B. You could now use both unit A and unit B without a conflict. If you wanted to make sure you were accessing TFoo from Unit A, you simply wrote A.TFoo. Hmmm... this is suspiciously looking like a namespace to me. One of the fantastic features of the "unit" arrangement was the built-in compiler make logic. Since a unit identifier matched a filename, you didn't have to tell the compiler about every single little source file in your project. All you had to do was to tell the compiler in what directories to search and it figured out the rest. You passed one filename to the compiler and away it went and out popped your .EXE.

Now fast forward to today. Now that we've gone down the path of "enlightenment," and we're all a little "smarter," it seems to be a vogue thing these days to look at the new shiny objects as being all good and everything before it is now all bad. What we fail to seemingly acknowledge is that there are very few giants out there these days... there are just a lot of people very good at standing on shoulders.

Now suppose were were to "fix" this namespace "problem" so that things worked and looked like, say C#, VB.NET, or even Managed C++. Would you, as a Delphi/Pascal programmer, accept the fact that the one feature you take for granted (and I know you do), the integrated build/make logic of the compiler suddenly disappeared? What if you had to specify every single file you want compiled or linked into your application, even Borland.Vcl.Classes? Before you answer that, consider this... the uses clause. When you "use" something, is that a unit or a namespace? In Delphi for .NET it is both. Suppose you have Unit A; that you want to appear as namespace Foo. Do you type uses A; or uses Foo;? What's that? Foo you say? OK. Now the compiler "sees" Foo... whoops, uh where does it find the .dcuil or more importantly, the .pas file? There is no Foo.pas because you called it A.pas because it is unit A;

Now before you stop by the gas station and fuel up your flame-thrower and start lobbing napalm at me, I am only posting this to highlight both the history behind why things are they way they are now and some of the design hurdles we must jump in order to "fix" this issue. This is a lot more complicated than simply adding some directive that modifies how a unit appears to others. We must make sure we don't totally break the integrated build/make logic of the compiler since that is one of the foundational pillars of the compiler. I can assure you that we are intensely looking into providing a solution that will satisfy all these requirements. There has been a lot of skeet shooting taking place as Danny and I lob ideas out into the firing range. So far we've been able to hit everyone of those "clay pigeons" and blast them to bits. I'm confident that there is a steel pigeon in the box that will be impervious to our shelling.

Finally, I do certainly take offense at broad sweeping statements that Delphi's use of namespaces is totally broken. It is simply that it is different. At no point does Delphi's treatment of "unit"="namespace" violate any CLI or CLS rules. It there is some violation, then please point it out to myself and Danny and a good dose of crow will be ordered.

Different <> broken.

Local event

While Danny is winding his way around the globe at various conferences, I'll be doing some speaking in a more local venue. If you live in the San Jose/Northern California area, I'll be speaking tonight, April 21st, at the newly formed Falafel .NET Usersgroup. The meeting is from 7:00pm to 9:00pm. The location is:

Techmart Building
5201 Great America Parkway
Suite 254
Santa Clara, CA 95054

I'll be giving an overview of many of the new Open Tools API interfaces available in Delphi 8. No, I won't be talking about Delphi 9... ehem... much...

If you have the time, come on by. It'd be a chance for me to meet some of you.

Tuesday, April 20, 2004

Back from vacation

Well... I'm back. Had a wonderful time down in Disneyland and California Adventure. Got to visit with some of the Disney folks down there. Many thanks to Don B., a Disney employee and member of the Borland Conference Advisory board for Delphi. Thanks for putting up with my family and me for several days.. Spent three days in the parks from opening to nearly close. We're all a little sore from the walking and a little cooked from the sun. Got to get back to work to get some rest.

Looks like Danny has been a little busy with blogging lately. This post was most excellent. Read it, if you haven't already.

Friday, April 9, 2004

Vacation..

I'll be on vacation for the next week (Apr 12-18), so I don't think there will be much activity here until I return. Taking the family down to Disneyland and Disney's California Adventure. Sure, it's spring break and the parks are going to be horrendously crowded, but we are planning on spending a few days down in Anaheim. It's been about 5 years since my children have been to DL and they've never been to DCA.

Wednesday, April 7, 2004

Planning..planning..planning...

This is the most tedious and unrewarding part of any software project. The planning, scoping, and scheduling phase... While we have been doing a lot of development on the next Delphi release, we still have to nail down exactly what we are doing, how long it will take, and who will be doing what. This information then needs to be communicated to all the other teams and upper management in order for them to begin they're planning. This is the first major release where we're using CaliberRM for the complete scoping phase. No only are we learning the tool and how it can benefit the team, but we are just getting used to the general shift in methodologies related to using these new tools. Ugh...