Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
On Fri, 3 Jun 2005, McIntosh Jason wrote:
> Had to drop an email and ask about this.
>
> If you, as a programmer, see something like the following - is it bad, good,
> "spaghetti", ignore it, or what?
>
>
> ----------
>
> if (mydate.save())
> {
> }else {
> }
> -----------
Looks like you do something and either
1. ignore the return values.
2. expect it to never return.
In either case, I think doing the above is in poor taste. Of course,
it's not nearly as obfuscated as they come. I'd try to find out what
we're doing and the right way to handle the unexpected situation. If
there's one thing that I've learned from mucking about in various UNIX
kernels, it's that if you figure something will never fail, it will and
it will fail at about 2AM the night before a customer's acceptance test
is supposed to finish.
Do it right the first time.
> if (testcase == 1) {
>
> or
>
> if (testcase == 1)
> {
I like the first better, but I think it's a style thing. I think it's
probably more important to be consistent.
--dlloyd
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members