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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |