Hacker News new | ask | show | jobs
by jrookie 5589 days ago
Thanks for your words.

Most of the stuff I've been doing for the last year or so is bug fixing as I have found that I'm better at finding and fixing bugs and even adding stuff to code that is already written and I really get excited when I get something working, It just takes a very long time for me to develop something from scratch mostly because I'm never comfortable with my code and I end up re writing everything and thus never getting anywhere.

4 comments

> I'm never comfortable with my code

I've been doing this professionally for around 12 years (and for the record, no CS degree -- my degree was technical communication with a CS emphasis) and to be honest, I'm still not very comfortable with a lot of my code either.

I generally think that if you don't look at code you wrote six months ago and think "Dear god, what is this crap?" it's a sign you're not learning enough as a programmer, so I wouldn't say that being uncomfortable with your code is a bad thing by any means. The key thing in my mind is if you're always looking to improve.

I'm never happy with my code either. I seem to write parts of it over and over because it just doesn't look or feel right.

I believe that's extremely common and from my experience, most of the really good programmers that I've known do it.

My personal take is that it means you have some semblance of taste, which I think is essential. Otherwise you end up like the people who think "temp1", "temp2", and "temp3" are perfectly fine variable names and who don't think whitespace is an important concern when programming.

There's a video of Ira Glass floating around that I was sending to all of my friends a few years ago, on the nature of creativity and self-criticism.

One of the great points he made was that if you ever finish a project of any kind and think it's really great -- just perfect, and just what you wanted to achieve -- it's time to hang up your hat and go home, because you're done. You aren't going to improve from there, and you won't learn anything new (though there's always more to learn, in any field).

The harsh self-critique just means that your skills still don't measure up to your taste, and if you find yourself doing great without much trouble, that just means you have really poor taste.

Thanks for your words.

Your welcome. Posts like yours often help other people as well, so thank you too.

I'm never comfortable with my code

Neither am I. I don't think that feeling ever goes away. Whenever I look at something I wrote last year, I think 2 things: "I can't believe I wrote this," and "I hope no one else ever sees it with my name on it."

It just takes a very long time for me to develop something from scratch

Then don't write anything from scratch. I have about 2 dozen "base programs". Whenever I need to develop something new, I grab the closest one, "save as" something else and get to work. I'm always tweaking, improving, and adding to those base programs, kinda like automating my own continuous improvement. I'm too busy focusing on my user's dilemma and the task at hand to waste valuable brain space memorizing syntax. Every little boost helps. We all do it.

I have about 2 dozen "base programs". Whenever I need to develop something new, I grab the closest one, "save as" something else and get to work.

That's an interesting method. Could you give an example of those 'base programs'—what are they, how long, how much do they do, etc.

   1. basic form
   2. form with multi-valued lines
   3. form with data set (multi-valued parent/children)
   4. form with grid
   5. tabbed form
   6. form with skins
   7. batch (loop thru something)
   8. batch update selected records in a table
   9. batch dump table records --> .txt or .xml file
  10. batch .txt or .xml file --> update table records
  11. batch file --> create & populate database table
  12. cut an email
  13. traverse internal tree function
  14. traverse file index(es)
  15. build html from parameters
  16. build javascript from parameters
  17. build .pdf from parameters
  18. build hp esc sequences from parameters
  19. benchmark a process
  20. how does that syntax work?
  21. which way is faster?
  22. batch string parser
  23. batch source code search
  24. batch source code changer
I have more, but I don't have time to find them right now. OK, I think I'll add:

  25. batch parse source code, identify routine for reuse
a lot of these sound like they should be libraries.
I found this presentation helpful, you might, too: http://rubyconf2008.confreaks.com/fear-of-programming.html