"be consistent" | |
PerlMonks |
Re: How do you view programmingby Ryszard (Priest) |
on Feb 16, 2003 at 08:13 UTC ( [id://235697]=note: print w/replies, xml ) | Need Help?? |
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:
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 Section
Meditations
|
|