in reply to Re^5: Neither system testing nor user acceptance testing is the repeat of unit testing (OT)
in thread Neither system testing nor user acceptance testing is the repeat of unit testing (OT)
I think that having corner/special cases is a CodeSmell.
That depends upon what those corner cases are. Sometimes it is impossible to avoid them because the real world does not behave the way we want it to. A common example would be leap years. You have to have corner cases there. In fact, there are a lot of corner cases in date handling due to how tricky it can be.
Also, hourly employees generally get time and a half if they work more than a set number of hours per week, but for some states/countries, they can also get time and a half if they work more than a set number hours per day. Those are exceptions to the rule and, as such, may get special treatment in the code.
Or how about removing data from a database? Many systems merely mark the data as "deleted" buy don't actually delete it so that it can be recovered. However, there may be legal reasons why the data must be deleted (for example, contractual agreements). This may come up as a "special case."
Many issues which may be a corner case can be developed in such a way that they're not a corner case (deleting database records, for example), but whether or not it's practical to do so depends upon the needs of a given application.
Cheers,
Ovid
New address of my CGI Course.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: Corner cases are not always "code smell"
by Roy Johnson (Monsignor) on Oct 24, 2005 at 18:06 UTC | |
Re^7: Corner cases are not always "code smell"
by dragonchild (Archbishop) on Oct 24, 2005 at 18:13 UTC | |
by tilly (Archbishop) on Oct 24, 2005 at 21:31 UTC | |
by dragonchild (Archbishop) on Oct 25, 2005 at 13:49 UTC | |
by tilly (Archbishop) on Oct 25, 2005 at 17:30 UTC | |
by dragonchild (Archbishop) on Oct 25, 2005 at 17:57 UTC | |
| |
by Anonymous Monk on Oct 25, 2005 at 03:07 UTC |