Live data from Hacker News

Ask HN: Do you spend more time coding or debugging?

news.ycombinator.com

51–60 of 77 posts

Re: Ask HN: Do you spend more time coding or debugging?

#51
post #4

I used to spend the vast amount of my time debugging. Fast forward a few years - Experience, good programming habits, and the gratuitous use of assertions. Now I spend a negligible amount of time debugging, and it never ceases to amaze me how frequently things just work the first time. Edit: I guess I want to say that there is one, and only one, bottom line: the relentless, ruthless pursuit of quality . It takes time…

Agreed, but with the addition of some periodic, many hour, something-completely-unanticipated-happened-and-I-am-so-perplexed debugging sessions.

Re: Ask HN: Do you spend more time coding or debugging?

#52
post #4

I used to spend the vast amount of my time debugging. Fast forward a few years - Experience, good programming habits, and the gratuitous use of assertions. Now I spend a negligible amount of time debugging, and it never ceases to amaze me how frequently things just work the first time. Edit: I guess I want to say that there is one, and only one, bottom line: the relentless, ruthless pursuit of quality . It takes time…

"Quality? But how does that affect our bottom line?" :)

Re: Ask HN: Do you spend more time coding or debugging?

#53
I spent more time in the planning stages, followed by debugging, followed by writing code.

I work in an environment where tests are unheard of. Most of the Javascript written is erring towards the "simple" side with many edge cases as it is all written for front-end web development. Things like calculating the size of the header, adding/removing classes based on certain user actions, managing Google Maps or having logic for complex forms.

Most things are several small (The most complex thing I've built is a pre-qualification form. Thank god for moment.js, because I never thought it would be so difficult to calculate if someone is between the ages of 40 and 82 (or will be 40 by October 15th of next year).

Re: Ask HN: Do you spend more time coding or debugging?

#57
A bunch of time planning the change and reading through the current version of the code, so that I can add things without breaking everything else (and/or understand the current behavior and the desired behavior, so I can repair the bug). About half as long actually writing new code, and then debugging iterations until the tests work again. Some time writing new tests for the feature. Some time fixing integration issues (occasionally). A fair amount of time dealing with customer escalations (usually tiny edge cases really messing stuff up at a customer's site).

So, they're all bugs, and in a sense, all coding is debugging. New-feature, regression, existing (from previous release), and escalation bugs. They're all basically the same thing: Identify the deficit, write a fix (includes what you might have meant by "debugging"), write tests to cover the changed behavior, check it in, deploy/release.

Re: Ask HN: Do you spend more time coding or debugging?

#58
Preface: I work with C/C++ the majority of my time. C#, F#, and PowerShell are the bulk of my remaining professional time. Go & OCaml/F# at home.

When I started, the bulk of my time was debugging my own code. I am gifted with the ability to write vast swathes of code in a short amount of time and when I was younger, it was vast swathes of shit code.

A little later into my career years 3.5-5, I spent more time coding and less time debugging. I designed my code better, used better patterns, and generally was just an all around better engineer.

I've come into the third stage of my career now where I spend a good portion of my time debugging junior engineers' code in a complex system I work on. In particular, my focus is usually in reliability and performance. I don't tend to debug the junior engineer one-off issues but rather the subtle regressions introduced by seemingly harmless changes.

In this third stage, I still write a lot of code, but much more of it is investigative and refinement over existing ideas with occasional injection of something wholly new.

Re: Ask HN: Do you spend more time coding or debugging?

#59
post #52
post #4

I used to spend the vast amount of my time debugging. Fast forward a few years - Experience, good programming habits, and the gratuitous use of assertions. Now I spend a negligible amount of time debugging, and it never ceases to amaze me how frequently things just work the first time. Edit: I guess I want to say that there is one, and only one, bottom line: the relentless, ruthless pursuit of quality . It takes time…

"Quality? But how does that affect our bottom line?" :)

I know you're joking... But it really does affect the bottom line! I've learned the hard way that taking twice as long to do something the right way will be more economical in the long run than doing it quickly, and cleaning up the bugs that manifest themselves over the following months.

Re: Ask HN: Do you spend more time coding or debugging?

#60
post #50
post #30

Neither. I spend most of my time procrastinating and/or day dreaming.

Same here. I often spend time wondering if it's simply that this field isn't for me, 40hrs a week kills my drive, or if it's a bigger issue like depression. Only thing I enjoy now are exercise and music.

Have you ever coded for a project you were excited about? Where you could feel really good about delivering a quality, useful product? If possible, try and find that at your current job. If not, a new job may be the best route. Management and bureaucracy are great at squashing good vibes here.

Also, see if you can find some satisfaction in expanding your programming skills through reading and learning. Not sure your experience level here, but I would recommend that to anyone -- it has made a huge difference to me personally.

Post reply on HN