I personally tend to divide code I'm working on into either 'Productivity' or 'Experimental'.

When writing productivity I'll be doing my level best to employ code reuse to the hilt, I'll be avoiding the things I don't know too well and sticking as much as possible to a nice and easily-maintainable subset of my skillset. This is the bread-and-butter, pays-the-bills code. When doing this code I tend to concentrate on best practises, and improving my own processes. I use my knowledge of principles and the language, obviously, but I in no way attempt to keep them up to date or active at this stage.

Experimental is the other side of the coin, and is an entirely different proposition altogether. Attacking new technologies, or just trying to push back my boundaries by coding things I do know at a low level. Normally coding practises go out the window here, I still do the -w and use strict generally but I rarely document as the scripts probably won't get run again after today and anything worth having in them should be obvious. Limits are pushed now, I've done horrendous things here like coding my own Data::Dumper, my own CGI.pm, versions of most low-level data structures in entirely inappropriate ways, and other such perversions. This is where I learn, this is my playground

The good side of this approach is my productivity on bread-and-butter code is getting far better than it was, giving me the time to look into my own Data::Dumper, a quick knock-up distributed application, or horrific ways to spindle, fold, and mutilate closures. When I learn something worthwhile I make sure I know it well, and it's limitations better, and feel ready to use it in production.

The time you save by building foo for production code and so avoiding the development and testing of it means you can spent the time writing a quick'n'nasty foo for non-production code.. looser rules, and you still keep your skills up as here it is the principles that count.

A new way I'm beginning to look into the experimental phase is to get the tests for a standard module, and expand upon them with some of my own, and then code a module using the 'It must pass these tests' as my specification. Looks a promising approach to learning, and I may even spot areas where I may be able to eventually improve on the original.


In reply to Re: Code re-use: productivity gains vs. skill deprecation by Molt
in thread Code re-use: productivity gains vs. skill deprecation by Phemur

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.