Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Commonly accepted style guide?

by bluto (Curate)
on Sep 29, 2005 at 15:25 UTC ( [id://496143]=note: print w/replies, xml ) Need Help??


in reply to Commonly accepted style guide?

Do you feel you can rate the experience level of the author by how the code looks, both in Perl and programming in general?

For some reason this question comes up from time to time, as if there is some fascination with it, but the answer is still "No". Experience and writing maintainable code don't always overlap.

I've seen lots of code, some from some very smart people, that looks hideous but runs well. In general it continues to run well as long as they are the ones to maintain it (or they hire someone very smart). Is this good? No, especially not in the long run, but it doesn't say a thing about their experience level. One guy I know does the work of several programmers, with few bugs in his code, but he writes very "old school" C that would make most people cringe.

In order to determine the experience level, you need to go beyond how it "looks". Just because someone uses...

for($i = 0; $i < 10; $i++)

... in perl doesn't mean they are inexperienced. They may be doing this since they are old C programmers new to perl, or so that other C programmers that work with them could pick up the code easily.

The real way is to determine experience is to answer the question: How many actual bugs does this code currently (or initially) have? Examining the code sometimes turns these up, but testing and QA bean counting are probably better for this.

Replies are listed 'Best First'.
Re^2: Commonly accepted style guide?
by dragonchild (Archbishop) on Sep 29, 2005 at 16:54 UTC
    One guy I know does the work of several programmers, with few bugs in his code, but he writes very "old school" C that would make most people cringe.

    So, this guy's code would pass criterion #1, but not criterion #2? To me, well-written code passes both criteria, and (imho) style is an important part of that.


    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      Don't you also need to qualify the experience level of "someone else". Some people are baffled by high minded notions like recursion and others can crank out a lisp compiler on a lunch break. Maybe a disclaimer?
      Can a professional of average compentence come in, make a change, and be reasonably certain no bugs were introduced?
        Don't you also need to qualify the experience level of "someone else". ... Can a professional of average compentence ...

        A professional is a professional. A thousand years ago, under the guild system, if someone claimed to be of a specific rank in a guild, you could be reasonably certain that this person could do X, Y, and Z. You (usually) didn't get awarded a given rank without having performed a certain amount of work to demonstrate your skill.

        I'm not advocating that Perl go the route of certifications or other such items. But, when I write code to be maintained by other Perl professionals, I expect a strong understanding of certain concepts. Things like recursion, references, safe I/O interaction, and the like. I expect a passing familiarity with others, such as the symbol table.

        No, I don't expect that only wizards will maintain my code, but I also don't expect that monkeys will, either. Now, if my employer chooses to employ a monkey to maintain my code after asking me to write Hal (of "I can't let you do that, Dave" fame), that's my employer's problem, not mine.


        My criteria for good software:
        1. Does it work?
        2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      I agree with you. I'm not saying this guy is doing anyone any favors by being extra "productive". I'm just addressing a single point that seems to keep comming up. I'm only saying that you can't determine experience by just taking a quick look at the code.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (None)
    As of 2024-04-25 01:43 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found