Coffeehouse Thread

25 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Code you write, are you proud?

Back to Forum: Coffeehouse
  • User profile image
    ScanIAm

    Dr Herbie said:

    Most of the code I write, I'm not proud of; it gets the job done and it's (relatively) defect free, but the system I work with is close to being a big ball of mud.  It's very hard to write elegant code when most of what you do is making changes to a BBoM under time pressure.

     

    That said, I have started to spend a bit more time implementing the "Boy Scout Principle" to make minor improvements to any code I touch.

     

    My main frustration at the moment is wanting to re-architect code for which there is no real business case to re-architect.

     

    Herbie

     

    I used to try and do that, but the development environment we work in actively encourages writing it correctly the first time and not 'refactoring' it later.  I've been the evil-doer in a few situations where I've refactored and ended up causing problems. 

     

    Why?

     

    Because the original code was wrong and the code that depended on it enjoyed the excentric fruits of that bad code.

     

    Now, I do my damndest to write good code from the start, and I code-review the hell out of every bit of code I have a chance to, but once the code is 'released', I have to suck it up and accept that it is what it is.

     

    I equate it to being OCD and being unable to wash my hands Smiley

  • User profile image
    lensman

    ScanIAm said:
    Dr Herbie said:
    *snip*

    I used to try and do that, but the development environment we work in actively encourages writing it correctly the first time and not 'refactoring' it later.  I've been the evil-doer in a few situations where I've refactored and ended up causing problems. 

     

    Why?

     

    Because the original code was wrong and the code that depended on it enjoyed the excentric fruits of that bad code.

     

    Now, I do my damndest to write good code from the start, and I code-review the hell out of every bit of code I have a chance to, but once the code is 'released', I have to suck it up and accept that it is what it is.

     

    I equate it to being OCD and being unable to wash my hands Smiley

    I live by a simple code.  If you cannot be proud of what you do, why do you do it? Letting your standards slip because someone is pressuring you is an excuse not a solution.

  • User profile image
    figuerres

    lensman said:
    ScanIAm said:
    *snip*

    I live by a simple code.  If you cannot be proud of what you do, why do you do it? Letting your standards slip because someone is pressuring you is an excuse not a solution.

    lensman: very much true.  the only thing i would add is that at times it is difficult to convery the reason for the need to take time.

    sometimes you may need to give the person (boss etc...) some choices, make them take an active role in selecting the result.

    make it clear to them that some paths may have issues like the program not working right.

     

    then you shift the focus and with any luck get clear of the issue of your standards. if the buyer has been told of the probable results and wants to go that way ... you warned them.

    some times that's all you can do.

  • User profile image
    Dr Herbie

    lensman said:
    ScanIAm said:
    *snip*

    I live by a simple code.  If you cannot be proud of what you do, why do you do it? Letting your standards slip because someone is pressuring you is an excuse not a solution.

    I do what I do because I need to pay the mortgage and feed my family.  If I didn't need to worry about money, I would only write code I was proud of.

     

    Herbie

     

  • User profile image
    Pace

    Dr Herbie said:
    lensman said:
    *snip*

    I do what I do because I need to pay the mortgage and feed my family.  If I didn't need to worry about money, I would only write code I was proud of.

     

    Herbie

     

    +1 Needs must when the devil rides.

  • User profile image
    exoteric

    Dr Herbie said:
    lensman said:
    *snip*

    I do what I do because I need to pay the mortgage and feed my family.  If I didn't need to worry about money, I would only write code I was proud of.

     

    Herbie

     

    If you are proud of all your code then either you are an exceptional programmer or your standards are not very high.

  • User profile image
    davewill

    NO!  The need to output always conflicts with the need to take time to do it right.  Then there are all those cases where there are 14 different "rights" to do something and picking which of the 14 is influenced by the combination of other areas to be done "right" in their 14 different ways.  There just isn't enough time.  Kmart, definitely Kmart, Kmart, definitely Kmart, definitely definitely Kmart.  Smiley

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.