The Artima Developer Community
Sponsored Link

Weblogs Forum
Can You Write Quality Software Quickly?

59 replies on 4 pages. Most recent reply: Feb 13, 2006 5:27 AM by Vincent O'Sullivan

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 59 replies on 4 pages [ « | 1 2 3 4 ]
Michael

Posts: 12
Nickname: target
Registered: Jan, 2005

Re: Can You Write Quality Software Quickly? Posted: Feb 7, 2005 3:40 AM
Reply to this message Reply
Advertisement
> Since I started writing automated unit tests, though, I
> don't step through with the debugger anymore. Now I'm
> wondering why not.

Your experience is a mirror of mine. I use debugger sometimes even with unit tests. It really helps to inderstand code flow.


Michael
http://www.targetprocess.com

Todd Blanchard

Posts: 316
Nickname: tblanchard
Registered: May, 2003

Re: Can You Write Quality Software Quickly? Posted: Feb 7, 2005 3:15 PM
Reply to this message Reply
"In most cases tests do not contain any conditional logic."

You misunderstand. Its not the test case that has conditional logic. Rather, its the accretion of conditional logic in the actual code to handle the different cases. You end up with something like

if(inputmatchestest1) stuff
else if(inputmatchestest2) stuff
else if(inputmatchestest3) stuff...

Which ultimately results in fragile ladder logic. OTOH, if he had simply written the code he intended, then wrote the test cases to see if it worked, the code itself would probably be more compact and straighforward.

Eric Armstrong

Posts: 207
Nickname: cooltools
Registered: Apr, 2003

Re: Can You Write Quality Software Quickly? Posted: Feb 7, 2005 6:09 PM
Reply to this message Reply
> Its not the test case that has conditional logic.
> Rather, its the accretion of conditional logic in
> the actual code to handle the different cases.
>
Egad. That's an argument for object encapsulation,
and a case-study in how not to do unit testing.

Curt Sampson

Posts: 21
Nickname: cjs
Registered: Mar, 2004

Re: Can You Write Quality Software Quickly? Posted: Feb 7, 2005 6:59 PM
Reply to this message Reply
> You misunderstand. Its not the test case that has
> conditional logic. Rather, its the accretion of
> conditional logic in the actual code to handle the
> different cases.
> ...if he had simply written the code he intended, then wrote
> the test cases to see if it worked, the code itself would
> probably be more compact and straighforward.

I'm curious: when you had a bunch of test cases and some tested code you saw problems with, why did you not just sit down then and there and refactor it? It sounds like you could have done so quite easily.

Another alternative is just to crank out a pile of test cases first, and then write that one piece of code you know is the right way to do it. That's still test first.

There's actually nothing wrong with moving in bigger jumps like that, if you know what you're doing. That tends to be the sign of a skilled programmer, in fact. And if you don't really know that area of code as well as you thought you did, you'll find out quickly enough, and you can revert back to smaller steps.

Robert C. Martin

Posts: 111
Nickname: unclebob
Registered: Apr, 2003

Re: Can You Write Quality Software Quickly? Posted: Feb 8, 2005 1:34 AM
Reply to this message Reply
The only way to go really fast is to write the best code you can possibly write, with the best design you can possibly give it. Any other technique will slow you down.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Can You Write Quality Software Quickly? Posted: Feb 8, 2005 5:23 AM
Reply to this message Reply
> The only way to go really fast is to write the best code
> you can possibly write, with the best design you can
> possibly give it. Any other technique will slow you down.

Mr Martin, I'm surprised at you! That stuff above is just meaningless, feel-good slush you copied from the inside of a Hallmark "quote-a-day" diary, isn't it. Go on, admit it. :)

Vince.

Robert C. Martin

Posts: 111
Nickname: unclebob
Registered: Apr, 2003

Re: Can You Write Quality Software Quickly? Posted: Feb 9, 2005 11:16 AM
Reply to this message Reply
> > The only way to go really fast is to write the best
> code
> > you can possibly write, with the best design you can
> > possibly give it. Any other technique will slow you
> down.
>
> Mr Martin, I'm surprised at you! That stuff above is just
> meaningless, feel-good slush you copied from the inside of
> a Hallmark "quote-a-day" diary, isn't it. Go on, admit
> it. :)

I note the smiley, but still wish to respond seriously. The above may read like pap, but in my estimation the belief that quality is an expiditer rather than an impediment is what seperates professionals from amateurs.

Curt Sampson

Posts: 21
Nickname: cjs
Registered: Mar, 2004

Re: Can You Write Quality Software Quickly? Posted: Feb 9, 2005 8:30 PM
Reply to this message Reply
Quality is not always an expediter. Some quality is an expediter in some conditions, but too much quality is always a waste of time and money.

It's the job of a professional to make sure that he does the job at a good cost, in turn meaning that the right amount of quality goes in, which often means not writing the best code you can write.

Sathya

Posts: 1
Nickname: nerdseed
Registered: Feb, 2005

Re: Can You Write Quality Software Quickly? Posted: Feb 11, 2005 9:51 AM
Reply to this message Reply
cjs, I totally agree with your comments about time and budget. Too much restrictions and very quality procedures in a software design requires adequate amount of time and budget. I believe that quality is based on time and budget.

Dan Perl

Posts: 28
Nickname: nanov
Registered: Sep, 2004

Re: Can You Write Quality Software Quickly? Posted: Feb 11, 2005 10:39 AM
Reply to this message Reply
> ... In my estimation the
> e belief that quality is an expiditer rather than an
> impediment is what seperates professionals from amateurs.

Yes and no. Quality is an expediter in the long term but an impediment in the short term.

Most but not all professional development has a long term need, whereas amateurish development has only a short term need. Having said that, it is a mistake for many professional developers to be stuck on the long term need and to forget the short term need. The long term need comes from the natural fear of "I don't want to deal with bad code later" and the above view of professionalism is deeply ingrained in us. But the short term need normally comes from a business view and is easily overlooked by many professional developers.

If you are someone like Bill Venners (president and developer) you get to see both the development view and the business view. And in a situation like his it is only normal to give in to the short term need sometimes.

Mike O'Keefe

Posts: 16
Nickname: kupci2
Registered: Mar, 2005

Re: Rewriting versus Refactoring Posted: Feb 9, 2006 8:18 PM
Reply to this message Reply
> > As far as rewriting applications, a few years ago Joel
> > Spolsky wrote an article about why he thinks it's a
> really
> > bad idea:
> >
> >
> http://www.joelonsoftware.com/articles/fog0000000069.html
>
>
Oops, bad example. What the poster leaves out is he's talking about Netscape. In hindsight, everybody thought that was a bad move, now Mozilla and other components are eating Microsoft's lunch, as MSFT now struggles to get IE7 out, many have switched to Mozilla. Also, it's quite clear when a behemoth like Microsoft marks you for a dead man, not much you can do. So they probably did the best thing in the situation.

Spolsky also wrote this in 2000, just as ideas like Refactoring started kicking in, in the idea of a software "lifecycle". Software doesn't rust? Another misconception gone to the wastebin. Spolsky reminds me of one of the scientists writing about the workings of Volcanoes, just before other scientists have figured out continental drift, tectonic evolution, and other ideas (yes, I've just finished reading Winchester's Krakatoa).

To paraphrase Woody Allen, from Sleeper, "Everything we used to think was bad for you, we now know is good for you, and everything we thought was bad, is in reality good."

Besides, it's always funny how everybody *says* don't rewrite software. Kind of like, I can do it, but you can't. I think we'll probably see some good ideas brought back into JUnit from TestNG, just as NUnit has influenced the latest version.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Can You Write Quality Software Quickly? Posted: Feb 10, 2006 3:56 AM
Reply to this message Reply
> You
> may have to come back to a piece of code several times
> over the course of months, but if you persist and use your
> intelligence, you'll get it cleaned up eventually.

Of course, this assumes:
a) You have no deadlines, and
b) You've not completed your contract, been reassigned or generally have nothing else to get on with in the next few months.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Can You Write Quality Software Quickly? Posted: Feb 10, 2006 4:06 AM
Reply to this message Reply
> One of the problems in the software
> industry in general was that software thought to be
> short-term often ended up being used for decades... and in
> the focus to deliver quickly, long-term quality practices
> are often ignored even today.

Was? I currently work in a tiny department in a big company that specialises in quick-fix 'interim' solutions while the big boys develop their 'real' solutions with all their associated paperwork and processes. You'd be surprised (or maybe not) and the number of 'real' solutions that get canned six months after we're done our stuff and before they've delivered anything.

Richard Jonas

Posts: 147
Nickname: rjonas
Registered: Nov, 2005

Re: Can You Write Quality Software Quickly? Posted: Feb 12, 2006 2:12 PM
Reply to this message Reply
I think you should ask "Is this application likely to be needing significant updates in 3 years time". If your business is to write a word processor, and it's currently on verion 4, you might be releasing version 6 in 3 years time, with much of the same code base but some additional features. If it is, then it's worth working more slowly.

If not, e.g. if your business is to write an internal appliaction for a company to satisfy a business requirement that is unlikely to change, then you should move faster.

===
Richard Jonas
blog: http://www.richardjonas.com/blog

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Can You Write Quality Software Quickly? Posted: Feb 13, 2006 5:27 AM
Reply to this message Reply
> I think you should ask "Is this application likely to be
> needing significant updates in 3 years time".

With the best will in the world, the answer will always be: "We don't know." i.e. We must assume that it might rather than it won't.

Flat View: This topic has 59 replies on 4 pages [ « | 1  2  3  4 ]
Topic: Attempting to Define Interface Oriented Programming Languages Previous Topic   Next Topic Topic: Collection overused as an argument in Java Libraries?


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us