How do you view your code building process? How do you view your data structures, design role, program flow, etc.
I follow a couple of design rules:
  1. seperation
  2. single function per routine/method

Where appropriate i seperate the business logic from the implementation specific detail from the presentation detail. Most of the perl i'm doing these days is around the web so this works really well with HTML::Template. At the end of the day we end up our own set of reusable modules/templates.

In the guts of the apps I write, as a general rule each method will perform a single task, and the second i think "cut and paste" i start refactoring my design. (if i had thought about design more, i'd not need to do this, right?).

We use quite a formal structure and set of design guidelines (eg for email you must use "this" module, and to interact with the database you must use "that" module, libraries must go "there" and templates must go "there"). While it may not be too everyones taste, my experience has shown to date, as our as our structure matures, the TTL for new apps is quite rapid, which makes the business happy.. :-)

In terms of code specific detail, i dont use the deep magic of special vars and the like very often. I do however like to find new ways of doing things, so the balance between readible (junior level) code and "fun code" is sometimes hard to find in my professional life.

In my personal life i'm left with quite often not enuff time to pursue the more complex options, so usually go for the easiest option to implement. Fortunately for me, the "easiest option" is a moving line.


In reply to Re: How do you view programming by Ryszard
in thread How do you view programming by l2kashe

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.