logoalt Hacker News

fasterik • yesterday at 9:49 PM • 4 replies • view on HN

It is a matter of skill to a large extent, though. A skilled programmer will write fewer bugs on average than an unskilled one. They'll know the patterns to avoid and have a higher bar for quality. Nobody can write 100% bug-free code, independent of programming language. Also, job title might correlate with skill but it doesn't rule out incompetence at the highest levels.


Replies

tikhonj • today at 1:13 AM

Writing safer C is a matter of skill.

Writing safe C is a matter of either radically different (much, much slower) process or better tooling or both. Skill is not sufficient.

kragen • yesterday at 11:01 PM

Sometimes writing shitty code is a result of competence, not incompetence. I've seen much better programmers than I ever will be writing terrible code because it was the fastest way to get a prototype running and find out whether the problem was worth writing good code for.

ambicapter • yesterday at 10:36 PM

It doesn't really matter, the most skilled programmers are usually working on harder stuff, so the bug rate remains fairly consistent.

Neywiny • yesterday at 10:07 PM

I think it's mostly a testing thing. Valgrind is a friend a lot of people haven't heard of for c/c++. Setting up good regression tests is an art. Maintaining them is even harder.