Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: Why programming is so much more than writing code

by Rhandom (Curate)
on May 08, 2007 at 20:39 UTC ( [id://614245]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Why programming is so much more than writing code
in thread Why programming is so much more than writing code

That is a nicely contrived example.

The user would have to be familiar with the refuse_to_cooperate sub to know that it exits or dies. If they weren't familiar - they'd have to go and read the code for refuse_to_cooperate.

A simple comment of  # dies placed after the refuse_to_cooperate line, or a comment of  # throw error placed before help to explain that you don't intend for any further action in this current section of code and that you'll be returning up the call stack.

As much as I've observed "self-documenting" code, as it is called, is usually only self documenting to the person who wrote it. And - most code isn't contrived and easy to make self documenting.

my @a=qw(random brilliant braindead); print $a[rand(@a)];

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-19 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found