Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I'm the type that tends to what-if things to death. What if this oddball condition happens and I don't handle it in a clever enough way. What if someone wants to use this function in a curious way. What if someone else might know a better way to do this... what if what if what if... And of course the worst one... What if someone looks at my code...

For me at least, this becomes a death spiral of utter lack of productivity. It's a conscious effort for me to strangle that voice in my head and just write some code to get the job done, even if I know it's crap. But I'll litter my code here and there with some TODO comments so I remember where my weakspots are and maybe an idea of how I wanted to fix it at some point.

The other thing that I do fairly religiously is keep my code tidy at all times. It's just easier for me while I'm coding and I find myself having to rethink an approach to a problem or something, I don't have to mentally parse my own code. Consequently, in vim I type vip= a LOT. (I have equalprg set to run perltidy for me.) And at the same time, I find that I also code faster this way. I'll code a block without worrying a lick about style, then just vip= and it's immediately pretty.

As far as handling and maintaining multiple projects, I just try to divide my time up appropriately, giving myself a fixed amount of time to work on one, then move to the next. When getting close to my time limits, I'll start doing things like writing empty subs with just pseudo code comments and writing as much as I can while my mind is on that particular project. When I'm thinking several steps ahead and I have time to code two of those steps, I'll try to leave myself so that I'll know what the rest of my thought process was. This makes it easier for me to get my mind back on the track of that particular project when it's time for more coding on it without having to recreate the whole thing in my head every time.


Therapy is expensive. Popping bubble wrap is cheap. You choose.

In reply to Re: How do you code? by naChoZ
in thread How do you code? by bastard

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 or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2021-11-28 02:44 GMT
Find Nodes?
    Voting Booth?

    No recent polls found