Thursday, September 2, 2004

100% Defect free vs. Reality.

Is it possible to create 100% bug free software?  Theoretically, I suppose it is possible.  But then again, how would you know if you've actually acheived it?  Design, specs, pre-conditions, post-conditions, unit-testing, test cases, metrics, audits, are all designed to mitigate the introduction of software defects.  Unit-testing is designed to break down a problem into managable pieces with test cases that are tailored to that one little bit of code.  The idea is that if you have well designed test cases that thoroughly cover a particular domain and all those tests pass, when you begin putting all these pieces together, you run less risk of introducing more defects because each “unit” is solid.  This philiosophy is core to XP (Extreme Programming).

I'm not going to try and burst any bubble surrounding XP as I agree with many of its tenets. What I am going to do, however, is try and and least poke at the myth that it is possible to achieve 100% defect free software.  Given enough time and resources, I think you may be able to reach 99.999999...%, but there is no way to really know whether or not you've reached the panacea of 100%.  I'm talking on a macro level here folks.  Systems that are reasonably sized, not some dinky sized program that does nothing but spit out “Hello World” and terminate.  Let's say a normal application has upwards of 1000 “units” (I'm not talking “units” in the Delphi sense, but the minimum testable block of actual code).  Complex applications may be 100 times that size.  As you begin to assemble these “units“ you are multiplying the permutations of both input data and output results.  There are also the unforseen interactions that take place when two pieces are brought together.  Just like some chemicals react violently when mixed, you can have these various “units“ come together and create some pretty wierd and wonderful smells and colors.  Design and architecture is most definately needed in order to mitigate the chances of a meltdown.  But then again, it is those pesky humans who dream up these designs and architecture.  This is also where another recent methodology, patterns, is gaining favor... but that is a topic for another time...

What I think happens when folks tout the 100% defect free mantra, they completely miss the human factor that is involved.  Bottom line is this; Humans are not perfect and will make mistakes.  They also miss the practicality and marketability of such a system.  There is a delicate balancing act. The customer says, “I want the software I use to solve a problem and operate as specified or as I expect.”  Those same folks also want as many features as possible to make they're life easier when using the software.  Where the balancing act comes in is with that one thing all of us have the same amount of; Time.  The software producer wants to minimize the amount of time it takes to get their goods to market in order to gain or maintain a competitive advantage.  The customer also wants a timely release of the software because the sooner they can use it the sooner they themselves can begin to become competitive.  Schedules, Feature lists, deadlines, etc.. all serve to push a product out the door, whereas defects are the opposing forces that serves to push the delivery in the opposite direction.  The difficult part is knowing when to press harder on the accelerator and when to put on the brakes.

This is where experience, intuituin (yes, I said intuition...), and solid metrics all come together to help you make those critical descisions.  One factor in determining what defects to focus on fixing and which ones to let slide come from understanding your customers in a broad sense.  Given a particular defect, we can use the previous tools (experience, intuition, metrics, etc...) to determine a defect's “surface area.”  The “surface area” of a defect is a somewhat subjective combination of the severity of the defect, its location, frequency and a smattering of other metrics thrown in, including a subjective risk metric and the current point in the delivery cycle.  Suppose in your testing phase you encountered a defect that occured each time you open a file?  Suppose opening and processing files is one of the primary functions of this application.  It is very likely that nearly all users of the application will encounter this defect.  Suppose this defect is that it injects random data into the file when it is opened.  The location combined with the severity and the frequency all combine to create a very high “surface area” defect.  On the opposite end of the scale, suppose there is a defect that only occurs when certain rare operaions are performed on a file and ojly if that file contains a sequence that is encountered in a statistically miniscule number of files.  One could easily conclude that this defect, while it may have a very high severity (say, it causes file corruption), in all it has a relatively small “surface area.”  No, we don't actually grab our calculators and begin feeding values into some magic formula, but rather it is a mental excercise that usually takes place whithin a small group, ranging from two-ten people.  Making any change to the code also carries a certain degree of risk.  Changing a commonly used routine can carry a very high risk because of the potential for wide ranging destabilization.  This risk also increases in a somewhat inverse geometric proportion to the remaining time on the schedule.

“OK Bauer!  Where are you going with all this?”  There has been a lot of interesting discussions out on the borland.public.delphi.non-technical newsgroup about the disposition of all the defects reported in Quality Central. They range from “Just fix everything reported in QC” to “Let's vote on the ones that hurt us the most” to “Borland ignores QC”  First of all, we do frequently “mine“ Quality Central for defects.  Many of them are transferred to our internal database (yes, they remain tethered).  All this data is used to help us determine the relative “surface area” of a given defect.  If we notice that it came from QC, that metric is used in these mental calculations.  Believe it or not, we have even been known to factor in data gleened from just lurking through the various Borland newsgroups.  In fact this should be evidenced by the fact that Steve Trefethen, recently made a request for someone to gather together a list of defects from QC.  He even posted a detailed feedback message stating that some of the bugs have now been fixed and will be available in the next Delphi release (shameless BorCon plug here..). 

“You bozo!  That doesn't help me now!”  Sadly, you're right.  But then again, if you'd followed along to this point you'd have seen that there are a lot of factors that go into deciding what we fix and what we don't and why.  Then there is also the fact that we can't fix what we don't know about.  Also, QC is not the only metric we use in determining what features to implement and what defects to fix.  Those are the drawbacks to having a publically available database.  There also tends to be a mob-mentality.  The positive side of a publically available database, especially one that allows commenting and voting, is that it tends to self-regulate.  The community as a whole can help weed out all the random cruft that will inevitably fill the database.

“I don't want excuses, I just want my bug fixed!“  This may all sound like I'm standing on my soapbox and telling you all how rough we have it... OK may be I am a little, but hey, it's my blog after all ;-).  I just see that there seems to be a small vocal subset of people who like to cast stones. Perspective plays a huge role here.  To many folks, it is just this one little bug, it shouldn't take that long, right?  Many times a bug fix takes much more time to research its impact than the time it takes to apply the fix.  We have to evaulate a fix not just in terms of a given test-case, but also figure out if there are other similar cases that this fix can address, or if it will have a negative net effect on the product.

It has also been commented that the QC bugs should take a higher priority that internally reported bugs.  While it seems that would be the best move politcally, many times it would simply steal time away from other more critical, higher “surface area“ defects.  “Then just delay your ship dates.“  Here's a very sticky one...  While there have been releases in the past where ship dates are dictated to the team and we had to make those dates and clean up the bodies later, that hasn't been the case recently.  While we are still given guidelines and target quarters, we for the most part control our own schedule as a team.  Make no mistake, there is still a schedule that is communicated to many other teams.  They must know this information in order to align their groups' work to match our team's schedule as closely as possible.  Groups such as marketing and sales need to know with a high degree of certainty when we'll release the product.  All of these are factors that go into determining the “surface area“ of a defect.  We could argue for days on the relative weight of each factor in the “surface area“ calculation. But the bottom line is that we have a lot of very experienced people that understand and know the product down to the individual lines of code that know how to make these determinations.  Do we make mistakes? You bet we do.

You can take away what you will from the above meandering drivel, but I'd like to think that most developers who uses our products for producing market driven, (internally developed and used software also has a “market”) software has had to make these same determinations regarding a defect's “surface area.”  You've also had to factor in schedules and deadlines when determining this information.

Again, you should really try and attend this year's Borland Conference where you'll hear about the next Delphi release, codenamed, Diamondback.  You'll also begin hear about our [Borland's] roadmap.  You can bet that Delphi is going to be a critical part of Borland's roadmap.

Wednesday, September 1, 2004

.NET 1.1 SP1

We're beginning to hear reports that installing the newly released .NET 1.1 SP1 found here, http://tinyurl.com/679we, is causing some folks problems with C#Builder and Delphi 8.  We're aware of this issue and are currently researching the total scope of the problem.  In several cases so far, reinstalling of the products fixes the problem.  Not an ideal solution at this point I know, but until we have all the facts, we can't begin to suggest actual fixes or what the proper procedures should be.  Please stand by...

Yowzza!

This is very interesting... Apparently this person was fired from Friendster for blogging. http://troutgirl.com/blog/.  Danny wrote a nice little comment about the potential blogging ramifications over here.  Note that neither Danny nor myself actually provided a direct link to Friendster.  I, at least, don't want to drive any traffic to their site.  I suppose you could say that is what we think of that.

Friday, August 27, 2004

Great Hackers - huh?

Nick, http://www.lemanix.com/nick, posted a reference to this peice http://www.paulgraham.com/gh.html and I finally got a chance to read through it.  I'm sorry, Nick, but what a bunch of self serving clap-trap?  From the article...

Great hackers also generally insist on using open source software. Not just because it's better, but because it gives them more control. Good hackers insist on control. This is part of what makes them good hackers: when something's broken, they need to fix it. You want them to feel this way about the software they're writing for you. You shouldn't be surprised when they feel the same way about the operating system.

Huh? Why is this some generally accepted axiom?  I personally know a couple of engineers that one could classify using Paul's terminology of “Great Hacker.”  Chuck Jazdzewski and Anders Hejlsberg. Anyone who's been around the block at least once in the Delphi community has heard these names bantered about more than once.  Anders was the technical wizard behind Turbo Pascal and later the Delphi compiler. With Chuck they were geniuses behind the design and architecture of the Visual Component LIbrary.  I don't think either one of them chose any kind of open source because it gave them “more control“. Besides when Turbo Pascal and Delphi were being designed and architected, Open Source was an underground, backroom movement.

What do hackers want? Like all craftsmen, hackers like good tools. In fact, that's an understatement. Good hackers find it unbearable to use bad tools. They'll simply refuse to work on projects with the wrong infrastructure.

OK, I can agree with this one.  So, Chuck and Anders created their tool of choice.  Can you imagine Delphi being built out of something like Python (zing!)?  So we use the best tool at our disposal with which to build Delphi; we use Delphi.

For example, if your company wants to write some software, it might seem a prudent choice to write it in Java. But when you choose a language, you're also choosing a community. The programmers you'll be able to hire to work on a Java project won't be as smart as the ones you could get to work on a project written in Python.

Again, Huh?  Of course he tries to mitigate and backtrack on this statement a little if you follow the link, but the cat is out of the bag.  I'm sorry, but a “Good Hacker” is good no matter what language they use (OK, except maybe with Perl ;-).

Now of course if all Paul means by “Good Hacker” is a really good programmer, then I'm sorry I even compared Chuck and Anders to this hypothetical “Good Hacker.”  These two, I would place in the “Master Software Craftsman” category... sort of like the difference between a good carpenter framing out a room and a master cabinet/furniture-maker.  I do have to admit that some of Paul's article was interesting an intriquing, but it got muddled up in several sweeping generalities.

Tuesday, August 24, 2004

VCL Component registration.

How many of you have found that when you create a design-time package for Delphi, there are many things you can do in the unit initialization equally as well as using the “sanctioned” technique of providing a single global procedure called “Register”?  You may have discovered that things like the Open Tools API services are available, you can register property/component editors with some success as well.  Well... stop it!  Please make sure you are using the properly sanctioned technique of placing all this code into a “Register” procedure in one or more units in the design-time package. 

There are some new features and services that the next version of Delphi that heavily relies on the registration of wizard, components, property/component editors, and custom modules be done from within a Register procedure.  Let's just say that the next version of Delphi will “demand” that component developers are following the rules.  The good thing about this is that using the Register procedure will work for all versions of Delphi, so you shouldn't be breaking any backward compatibility, nor are you going to be required to introduce yet another IFDEF.  If you take a quick look over your code and make sure that this is the case, then you should be in very good shape and ready when we release the next version of Delphi.

Monday, August 23, 2004

What ALM is not

There seems to be a bit of confusion regarding what ALM (Application Lifecycle Management) is and isn't.  First of all, unless you create single one-off utilities, you need ALM.  Just because, “Management” is in the name, doesn't mean ALM is for managers.  ALM simply recognises that there are phases to development of an application, even informally.  What we are trying to do with ALM, is to simply provide tools whereby you can be just as productive in all phases in the production of software as you are in the development phase.  ALM's goal is also to not get in the way and force a whole shift in your process in order for it to become useful.

Personally, I feel that one's approach to ALM should be gradual while at the same time intentional.  Probably, the most common starting point in any ALM solution rollout would be to implement some form of source code control and archiving.  If you're idea of source code control is to copy your files to another machine or simply spool them off to a backup, then you are in need of a good archiving and configuration management tool.  Even if you are using a tool to provide these services, it may be worth your while to at least investigate StarTeam.  StarTeam is more that just a source code management tool.  It is an entry point into several broader areas of ALM.  Entry level requirements management, defect/change request tracking, tasks lists, which are all parts of the ALM story.

Many of the smaller consultant folks may scoff at the idea of the use of such a seemingly large tool to handle all these tasks.  However, even in these cases, clearly defined requirements are an absolute must.  Tracking defect and change requests in a formal manner is also something that every consultant or consultant shop needs to do as well.  Post-it notes, and text files are hard to track globally and don't scale very well.

At this years BorCon, you'll get to see how well the next version of Delphi, code named “Diamondback,” can help you, the small developer, actually begin to take advantage of these new ALM tools.

 

Saturday, August 21, 2004

A good problem to have.

It is becoming increasingly clear that in my BorCon talk, 1174, I won't have enough time to cover all the new things in DiamondBack (the next version of Delphi).  For many things I will only lightly touch on because they will be covered by other sessions.  I, however, will be focusing on all the new IDE features, but even then there is so much, that in a single hour and 15 minute session I will not be able to cover all aspects of the product.  So, I'll either break it up into a Part I and Part II, or add a session, it they can find a reasonable time-slot.

Holy-moly...

Danny is starting to demostrate his “Chief Scientist” chops.  This post, http://www.lemanix.com/nick/archive/2004/08/08/1084.aspx, from Nick certainly got handily pounded upon by Danny in this, http://homepages.codegear.com/dthorpe/blog/delphi/2004_08_01_archive.php, post.  So, Nick, what's your response?  Just wait till I can pop some popcorn, and get comfortable... Ahhh, OK.. Ready, GO!

Thursday, August 19, 2004

A Delphi case-study

From the annals of the news://forums.borland.com/borland.public.delphi.non-technical newsgroup another great post about the usage of Delphi 7 & 8 to move into .NET:

From: Sinan Karaca


I wanted to provide a "case study" based on my experiences using Delphi 7&8
in tandem.

1) Using Delphi.NET, I was able to start coding for the .NET platform
immediately. Without learning a single new thing about .NET. I used VCL.NET,
of course.
2) As the need arose, I started working with .NET classes and learning
them - the rest was handled by VCL and the other FX that Delphi provides.
This made the learning curve very, very smooth.
3) All my expertise and knowledge on the Win32 API, I leveraged with
P/Invoke. While it is a valid charge that my code won't run on Mono, I
really don't care. I am targeting .NET FX 1.1 on Windows. It will be years
before Mono and/or other .NET implementations come close to the
behavior/stability offered by M$ on the Windows .NET FX. Although M$
presents .NET as a new platform, I tend to see it as a new framework -
nothing more.

4) Maybe this is the best part - I was able to back-port the same
application to Win32 in a week or so. AND I have single source compiles for
Win32/.NET now. True, there are quite a few IFDEFs here and there, but that
is all it cost.

We all know the famous example - open the Delphi 1 fishfacts app, and it
compiles under D8. Now you have a single source app, compiling on Win16,
Win32, and .NET. This definitely says something!

I consider my knowledge of VCL an investment, one that will last well into
the future - Borland gives us reason to believe that even when M$ drops the
Win32 API, we will still be leveraging our VCL knowledge - and natively, at
that. While I have occasionally fallen in to the "oh what if Delphi gets
discontinued" panic, which seemed to be a real threat back in the Del Yocam
days - I think time has proven the choices I made.

What can I say - keep it up guys! We love ya.

Sinan

This is silly...and funny

From the news://forums.borland.com/borland.public.delphi.non-technical newsgroup:


From: Captain Jake

Has anyone else noticed that olympic gymnast Brett McClure looks a lot like
Allen Bauer? Could this be why D9 isn't going to be ready until the end of
the year? Hmmm?

--

Read Jake's Blog at http://blogs.slcdug.org/jjacobson/
Or Get the RSS Feed at http://blogs.slcdug.org/jjacobson/Rss.aspx