Bozo explosions and what to do about them

Guy Kawasaki has an interesting blog entry about how to know if you are in a bozo explosion.  Reading that put an experience I went through in perspective.  I worked for one of the dotBomb companies around the turn of the millennium.  We were a *little* different in that we actually had a shipping product that had delievered 4 major releases that were in production to many companies, and generally were starting to make money.  Then we IPO’d.  We did *everything* on Guy’s list.  Word of warning… When a company is know for it’s cafeteria, it is time to get out!  Unfortunately, me being naive, I rode that ship until it sank.

Crystal Reports Tip #2: Formulas in Group Headers…

This is a continuation of dumb things that happen in Crystal Reports… I would like to blame Crystal for this one, but this came from my ‘not paying strict attention’ to Crystal’s logic.
 
Back to the running totals from my previous blog entry.  Once I figured out the problem with the running totals and nulls, my report seemed to be working fine.  I was going along, making changes, cleaning up the report, and making sure the headers printed on every page.  All of a sudden, my totals were back to zero again!  ARRRGGGGHHHHHHHH!!!!!!  (One side note of advice… Never, ever, ever, ever try to debug Crystal Reports when you are not feeling well, tired, irritated, sick, etc…  Just trust me on this!)  After spending over 2 hours agonizing over *why* the numbers were resetting, I happened to notice something…  I had my formula that initialized the variables in my grouping report band, which is where they are SUPPOSED to be.  Wait a second, this prints at the top of every page…  Yep, you guessed it, the formula field was being calculated for EVERY page!  Doh!
 
Lesson learned:  When initializing variables in a group header, make sure the ‘Print Group Header at the top of every page’ option is turned off.  Then create a second group of the exact same function to print that nice header out…

Lies, Damn Lies, and Benchmarks…

Gaurev Seth just posted this article on a comparision between x86 and x64.  As much as I like the results, they are severly skewed.  I am guessing that from the article Gaurev used an Intel P4 2.0 ghz machine for x86 and a P4 2.8 ghz machine for the x64 test.  An Itanic (Itanium) had to be used for the IA-64 tests.
 
The interesting thing is that the less than 1 Ghz Itanic processes more than raw numbers than a the 2 Ghz P4, and manages to keep up with a 2.8 Ghz P4.  I’d love to see what an AMD64 processor would score with his ‘test’.
 
I *want* x64 to be great, as I’ve been running Windows x64 since the Release Candidate last year.  It’s been VERY stable, but driver support has been slow.  The drivers that were created during the initial testing phase Windows x64 seem to be the only ones adding/maintaining momentum.  Heck, most shops don’t even realize that Windows x64 is for sale.  (One company, *cough* Line 6 *cough* told me that they don’t support beta products.  When I pushed and said it was not in beta, they seemed *surprised*.  Star Date was November 2005.  x64 was released in April…)

Crystal Reports Tip #1: Running totals in formulas…

Crystal Reports.  Love it or hate it, at some point, as a developer, you *will* use it.  And it’s got more gotchas than a George W. Bush proposal.  I’m going to add all the one’s that *I* run across in my blog, just so that I don’t forget what they are!

 

Here’s the first one that bit me *REALLY* hard this week.

 

I was working on a report that has subreports with columns that were totaled and the total sent back to the main report.  Easy, right?  Well, for some reason, I was getting a zero (0) back when I was expecting a number.  Examining the running total in the subreport indicated that the number was being calculated, it just was not being sent to the main report.  Grrrr….  After a LOT of digging, I discovered something… I was using one formula to send four subreport running totals to the main report.  Some of the subreport variables WERE making it to the main report… WTF!?!  It turns out that one of the subreport running totals had a null value in it for certain subreports.  When doing an assign of the variable to be passed up the the main report, the code would assign the running total to the variable.  Unfortunately, if the running total had a NULL, the assignment line AND THE REST OF THE FORMULA WOULD FAIL WITH NO FIGGING ERROR MESSAGE THROWN!  (Note:  There were a lot of swear words said when this was discovered…)

 

Which leads us to Crystal Tip #1:

If a running total value is used in a formula, ALWAYS, ALWAYS, ALWAYS wrap it up in a null check.  Here is the code:

 

if not IsNull({#SomeRunningTotalValue} then

   DoWorkWithTheRunningTotal

else

  DoSomeWorkWithoutTheRunningTotal

 

Maybe this will save someone else from losing a day or two…

The end of an era…

Today, Borland announced it was looking for a buyer for it’s software development languages.  That means Delphi is being sold off.  To me, this is like losing one of my best friends.  I started working with Delphi in 1995, when it was just released.  It was an incredibily easy language with an awesome form designer, and great database support.  I wrote a *LOT* of code with Delphi 2, 3, 4, 5, and 6. 
 
There were a lot of great decisions during that time frame, but there also were some colassally stupid ones as well.  Borland went from Borland to Inprise and then back to Borland.  Several company presidents were gone through.  Interbase was open sourced, then close sourced.  Lots of developer goodwill was lost.
 
Delphi 7 was the last of the pure Win32 Delphi IDEs. 
 
Delphi 8 spelled the beginning of the end… Delphi 8 was the worst thing to happen to Borland.  NO ONE, and I mean NO ONE shipped a product with Delphi 8.  I was looking for a new job at the time Delphi 8 came out, and absolutely no company was interested in switching to 8.
 
Delphi 2005 started to look better.  Win32 integration was back, but the IDE was still a work in progress.  More people were using 2005, but a LOT had been burned trying to use 8.  There were SEVERAL updates to fix the stability issues and speed is still an issue.
 
Enter Delphi 2006.  From what I understand, Delphi 2006 has been a major improvement.  In fact, it’s almost back to the Delphi 6 stability and speed.  There was a fairly quick update, that solved some of the ‘shakedown’ bugs.  Things seemed to be going better.  Then finally, Borland sells it’s entire tool line…
 
I haven’t worked with Delphi since version 7, so a lot of this is based upon newsgroup messages.  I think Borland was on the right track, but their logic for this latest move escapes me.
 
Funny story… Around the time Delphi 6 was in beta, I interviewed with Borland to go and be a tester/developer with a fast track to developer.  I was a cocky, full of piss-and-vineagar programmer who shot his mouth off a little bit <grin>.  One of the questions asked was, ‘Where do you see yourself with this company?’  My reply was ‘I want to the be main architect for Delphi 10’.  They offered me the tester job, but I turned it down.  What was scary was how much that statement could have come true.  With the mass exodus of the top level developers to Microsoft and Google, I could have been stuck with the Delphi disasters… *shudder*
 
The other thing is, all the public developers as saying what a wonderful thing this is…  Funny, but that was the same line that was said when Borland became Inprise.  When I interviewed out there, they had just dropped the name Inprise… It was *AMAZING* to hear how many of the employees *HATED, DETESTED, and LOATHED* the name Inprise, and were glad to be back to being ‘Borland’.  I have a feeling that the current ‘it’s a good thing’ is the party line, and the people have been told to toe it, or else.
 
Good luck Borland and/or Delphi…  All i can say is that I’m glad I switched to C# two years ago…