Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

IMHO - Fundamentally Design Patterns are a Good Thing.

That being said - you need to understand the underlying philosophy that drove the creation of them in the first place.

There's not one person who's ever taken up programming that hasn't created a BALL OF MUD. The idea of design and software architecture in general is to make our lives easier.

That paper is a classic that's been quoted time & time again here. It explains the tribulations of attempting to use the design pattern philosophy in the real World.

My answer to you - if you want to call it that - is that you need to stop thinking of Design Patterns as a thing and absorb rather the essence of the underlying widom.

As you grow and learn as a software developer something interesting happens. You might in some ways say that you become less productive - in that you meditate over your code more before rendering it, and therefore write less code. But on the other hand, the code you write should be easier to maintain in the future. Futhermore, it should be less likely to be in need of being rewritten. It should incorporate all that you have learned from your experience & mistakes about how to save yourself a lot of work later by planning slightly more up front. It should reflect lofty goals like code reuse and component-ization.

But very much like Architecture in construction - the lay of the land dictates a lot.

I have embraced the concept of Open Standards wholeheartedly & as such became both a perl and a Java programmer. What I have noticed is that the languages themselves tend to drive you to think in certain ways. perl is a lot easier to hack in. If you want to you can usually create some THROWAWAY CODE in very few lines to get something working.

Java, in many ways, lends itself more to Architecture since it's not so easy to just create that "one-off proggy". It requires more effort, and as such, it sort of forces you to think before you code.

The upshot of this is that here at my job, I do my rapid prototyping in perl. But perl code for production use is frowned upon in this company due to maintainability issues. (We're not very replete with perl coders.)

So - to follow the process outlined in the article - I prototype for FUNCTION. Then I step back, look at what I've learned about the problem domain from the prototype, incorporate it into the design and then THROW THE CODE AWAY.

The next iteration produces a Java based project, along with corresponding UML and documentation.

Now I've noted that since we have a language boundary - it forces code to be discarded. That's a rather unique scenario however. Most companies don't operate this way. Also - I am a Maverick in that I insist on doing things the "right" way and openly and repeatedly attack my managers for attempting to make costly mistakes by 'cutting corners.' The simple fact that I take the time to write a prototype in perl at all goes directly against the grain of the culture here.

But then, as I've been quoted of saying in the past: Never Under Estimate the Power of What Works.

Note however, that taking that quote too literally can also lead to BIG BALLS OF MUD. As in when it is misinterpreted as "If it ain't broke, don't fix it."

Caveat Emptor!



Wait! This isn't a Parachute, this is a Backpack!

20060928 Update: Replaces heretical usage of 'PERL' with 'perl'.


In reply to Re: Are design patterns worth it? by gregor42
in thread Are design patterns worth it? by FoxtrotUniform

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 chanting in the Monastery: (5)
As of 2024-04-16 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found