Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Re: Coding while drunk

by gregor-e (Beadle)
on Sep 12, 2002 at 21:18 UTC ( #197356=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Coding while drunk
in thread Coding while drunk

Programming languages are meant to communicate a solution to another human through a conversation that a computer is barely smart enough to understand. If you can't even understand your own code, then it doesn't communicate a solution. It may as well have been a bunch of raw hex digits, which would at least be convenient for the computer. I agree with the earlier poster - toss and rewrite. But this time imagine that a sociopathic homicidal maniac who knows where you live will be the next one to have to understand your code.


Comment on Re: Re: Re: Coding while drunk
Re4: Coding while drunk
by sauoq (Abbot) on Sep 12, 2002 at 22:48 UTC
    Programming languages are meant to communicate a solution to another human through a conversation that a computer is barely smart enough to understand.

    I repectfully disagree. Programming languages are abstractions that allow humans to write complex instructions for a computer while remaining isolated from the lower level requirements of the implementation. By the way, no computer is even "barely smart enough to understand" those instructions. Computers just follow them.

    I wasn't really disagreeing with dws in principle. In fact, I agreed that the original poster should regain his understanding of the code. I also suggested that he comment it (for the future) and test it.

    I only disagreed that the code should be discarded out-of-hand simply because the poster was drunk when he wrote it. Of course, if he is unable to regain his understanding, then it should probably be rewritten. That, however, has its own hazards and might come with its own bugs. That brings us back to testing...

    -sauoq
    "My two cents aren't worth a dime.";
    
Re: Re: Re: Re: Coding while drunk
by greenFox (Vicar) on Sep 13, 2002 at 02:17 UTC

    I did a a few comp-sci classes at Uni as aprt of a degree that I never finished, any-way one of the lecturer's said (quoting someone else) something that has greatly influenced the way I write code-

    "a program is a letter from one programmer to another that just happens to be understandable by the computer as well"

    I always try and keep that in mind when I program. I don't necessarily agree that Gordy needs to throw away what was written but it certainly needs to be understood, "I get the result I expected" (for all the test conditions I thought of) is far short of good enough.

    --
    Until you've lost your reputation, you never realize what a burden it was or what freedom really is. -Margaret Mitchell

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://197356]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-09-19 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls