Article View: rec.games.programmer
Article #2148Re: Young programmers read me.
From: Gene Wirchenko
Date: Thu, 18 Apr 1996 05:57
Date: Thu, 18 Apr 1996 05:57
85 lines
3904 bytes
3904 bytes
davej@apertus.com wrote:
>In article <4l0c8p$rvp@fountain.mindlink.net>, <genew@mindlink.bc.ca> writes:
>> hennebry@plains.nodak.edu (Michael J. Hennebry) wrote:
>> >In article <4kmfqn$e0f@airdmhor.gen.nz>,
>> >Simon Hosie <gumboot@airdmhor.gen.nz> wrote:
>> >> if(something_happened)
>> >> do_something_else();
>>
>> >AAAaaarrrggg! This is an accident waiting to happen.
>Agreed.
>
>> Why? If you don't know the language, why program in it?
>That's not much of an answer!
>> I always indent my code properly (meaning consistently) and if I
>> saw that the then clause needed to be "blockized", I'd do it automatically.
>You may "always indent your code properly" but what about when you are
>working on a large project with 6 or 20 other engineers? Have you
>ever worked on a project where you share development code with others?
>What if the company you work for has standards that don't allow your
>method?
Yes, I have waded through others' code. The big problem is that
it is someone else's and not yours i.e. things are not done as you
expect. Extraneous brackets and such get me wondering if I might have
missed something and thus waste time.
If the company has different standards? Well, then I can't use
my standard there, can I? If it's too much trouble, I'd leave. Let
me reverse the question. Suppose the company insists that you do
things my way. What do you do?
>IMO, if you're relying on indentation to indicate program flow, you're
>just asking for trouble, and lots of it.
Why? Since I rarely use gotos, the indentation does a fine job
of showing the flow. Did you mean something else?
>> >Lotsa luck.
>> I don't need luck. I have a method.
>What about when you leave the company? Then every bit of code you
>had ever written or were maintaining would be riddled with accidents
>waiting to happen. Think ahead, it's not always what we want to do
>as programmers, but code MUST be written in a fashion that it will be
>easily maintainable by junior level programmers. I don't really like
>that either, being forced to "code down" but it's a fact that code
>will have bugs and must be maintained. Often it's not the sr engineers
>doing that sort of work.
I follow my standard very strictly. It is not a complicated one
and it is usable on multiple languages.
Anything can be screwed up. (Fools are so ingenious.) I refuse
to take responsibility for someone else mucking up my code later. I
do not write obfuscated code and if the maintainer can not read clear
code, he shouldn't be modifying it. I particularly refuse to take
responsibility for a future supporter so bad that he can't balance
braces. That's the least of his worries in a real program.
>> >or this:
>> > if(something_happened)
>> > { do_something_else(); }
>>
>> Extraneous braces cause pause.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>???
It takes time, a bit, but still time, to realize that the braces
are extraneous. I would hate to have to maintain garbage like the
above and would change it as soon as I could to save myself time and
trouble.
>Dave Johnson
Sincerely,
Gene Wirchenko
C Pronunciation Guide:
y=x++; "wye equals ex plus plus semicolon"
x=x++; "ex equals ex doublecross semicolon"
Technical Details
Message-ID:
<4l4ls7$coh@fountain.mindlink.net>Path:
arc1-ca.pugleaf.net!news.mindlink.net!newsReferences:
<4l0c8p$rvp@fountain.mindlink.net> <4l1n31$636@newsserver.trl.OZ.AU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.mindlink.net!news From: genew@mindlink.bc.ca (Gene Wirchenko) Newsgroups: rec.games.programmer,comp.programming,comp.lang.c++,alt.msdos.programmer Subject: Re: Young programmers read me. Date: Thu, 18 Apr 1996 05:57:47 GMT Organization: MIND LINK! - British Columbia, Canada Message-ID: <4l4ls7$coh@fountain.mindlink.net> References: <4l0c8p$rvp@fountain.mindlink.net> <4l1n31$636@newsserver.trl.OZ.AU> NNTP-Posting-Host: line292.nwm.mindlink.net X-Newsreader: Forte Free Agent 1.0.82