Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
While a lot of our discussions in this monastery revolves around such ever-lasting subjects as CGI Programming and the use of the File::Find module (as per recent statistics displayed here), only a handful touch bases on broader academic subjects ranging from coding styles to design patterns. For an instance, I have a keen interest in specific topics such as Design by Contract. However, the only place in the monastery where I saw a mentioning of this was in the An example of programming by contract post by princepawn, and briefly in Larry vs. Joel vs. Ovid by Ovid.

Yet, I sincerely believe that we should concentrate our meditations on common programming methodologies and approaches in order to curb the still prevailing dominance of sloppy code and poor architecture in numerous scripts/applications crafted by fellow Perl practitioners. In my web consulting business (aside from my full-time job as a programmer), I encounter enough poor scripts that make me shriek in pure agony. Every time I see such code, I recall a quote from the infamous article on Big Ball of Mud:

Indeed, one of the reasons that architecture is neglected is that much of it is "under the hood", where nobody can see it. If the system works, and it can be shipped, who cares what it looks like on the inside?

And…

One reason that software architectures are so often mediocre is that architecture frequently takes a back seat to more mundane concerns such as cost, time-to-market, and programmer skill.

So, aside from a few obvious driving forces behind ‘muddy’ code such as the cost and ‘time-to-market’ factor, programmer skill plays a role as well. Therefore, one of the ways in which we can improve our code quality is to improve our programming skill. But the only way we may hope to improve this skill is through persistent meditation. To this point, I have learnt a lot from PerlMonks. Since the first day I downed my monk robe, I have seen constant improvement in my ability to reduce proportion of ‘muddy’ code in my applications and by this achieve greatly reliable systems. There are other monks who share similar experiences. Take for example coreolyn’s On the Road to Perl Enlightenment, My 100th Post, and New Year's Resolutions post.

Unfortunately, even despite of wealth of information contained within the walls of this holy monastery, there are still a lot of areas left uncovered. To make up for this loss, I often find myself scavenging the vast dumps of the Web for bits and pieces of occasional wisdom. Further, many discussions on the web bring up examples of code written in languages other than Perl, thereby greatly reducing (ease of) applicability of certain methodologies in my programs built entirely in Perl. That’s why I greatly appreciate the work of stephen, for example. He’s done a good job on picking up the subject of Refactoring and describing it to his fellow monks in the language they understand the best – Perl! ;-)

_____________________
$"=q;grep;;$,=q"grep";for(`find . -name ".saves*~"`){s;$/;;;/(.*-(\d+) +-.*)$/;$_=&#91"ps -e -o pid | "," $2 | "," -v "," "]`@$_`?{print" ++ $1"}:{print"- $1"}&&`rm $1`;print"\n";}

In reply to Phantom Menace: Driving forces behind sloppy code/architecture. by vladb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-25 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found