in reply to My code and your stupidity don't mix!
in thread Would you use 'goto' here?

Here's my take on this:

I'm currently filling the role of quasi-lead for a Perl-powered web application. Due to the nature of our customers this web application is frequently in heavy development and we often find ourselves developing faster than we would like.

It is my _preference_ that our team be explicit and as clear as possible about the way they are accomplishing tasks. This practice extends beyond the way we solve problems in our Perl-codebase. I typically encourage the guys to solve as they see fit but I am constantly reminding them to "keep it simple."

$_, map and grep are among some of the cool features of Perl. They have their place and are often useful in reducing the number of lines of code required to complete a particular task (among other things). The problem with them is that they are _not_, in my experience, easy to understand. There are often much more simple ways of expressing concepts and those that are clearer are less likely to cause confusion.

And productivity, in my current job (and frankly, in most of my previous jobs), is closely linked with effective communication. When I code I am more concerned with readability from the perspective of others than I am about how quickly I can express myself or how Perlish I can be. I have managed to learn that viewing a problem from the perspective of another person can often grant me a better understanding of the problem domain and solution.



  • Comment on Re: My code and your stupidity don't mix!

Replies are listed 'Best First'.
Re^2: My code and your stupidity don't mix!
by dragonchild (Archbishop) on Dec 06, 2005 at 12:59 UTC
    Which one would you prefer to read in your documentation?
    • the ways that I can let you know what I am thinking that will help you know what I am thinking better
    • effective communication

    The first phrase doesn't use a word over 8 letters, and only three words are six letters or more. Every word is one that a second-grader would know what it means. It's also 22 words long.

    The second phrase, however, is only two words long - 9 letters and 13 letters respectively. Both are words that I wouldn't expect a child in fourth grade to know. Oh, and the second phrase still contains a more precise meaning than the first phrase.

    That's what map and grep and $_ do for you. Succinct communication is often more effective communication.

    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?