Live data from Hacker News

You should write "without bugs"

korshakov.com

21–30 of 91 posts

Re: You should write "without bugs"

#21
post #17

I clicked on this because of the crazy title but its actually a really inisghtful article, e.g. "Conversely, there are people with commitment issues; they want to experiment non-stop and thus have no faith in robustness." ... like there's this belief that bugs will just happen anyway so why worry about them. But the authors point is that a little bit of extra thought and work can make a lot of difference to quality.

> the authors point is that a little bit of extra thought and work can make a lot of difference to quality Care to bring home the thesis on how that’s actually really insightful?

The author makes the insightful observation that they write non-buggy code by being careful, in contrast to the vast majority of developers who write code full of bugs. Being careful is left to the reader, but it should be easy. /s

Re: You should write "without bugs"

#22

I'm not sure I understand the argument or value of this post? It feels close to just saying, make your code better and you will see less bugs. I don't disagree but the product environment has a lot to do with how features get deployed and how closely a developer can match the real life deployment to their development setup. World class experts make mistakes all the time, I think learning how to address bugs is probab…

Yeah I was expecting real, concrete tricks, something involving the right/perfect(?) combination of language, tool, pattern, etc. This is just “think correctly, and often, then, no more bugs”. Not helpful?

> something involving the right/perfect(?) combination of language, tool, pattern

It's fun to spend a few lifetimes on the quest for the perfect tool.

Re: You should write "without bugs"

#23

I'm not sure I understand the argument or value of this post? It feels close to just saying, make your code better and you will see less bugs. I don't disagree but the product environment has a lot to do with how features get deployed and how closely a developer can match the real life deployment to their development setup. World class experts make mistakes all the time, I think learning how to address bugs is probab…

Yeah I was expecting real, concrete tricks, something involving the right/perfect(?) combination of language, tool, pattern, etc. This is just “think correctly, and often, then, no more bugs”. Not helpful?

Think correctly even if it may seem inconvenient, and thinking correctly becomes an ingrained habit. And then, a lot fewer bugs.

That's the analogy to the author's story about their exam.

(I'm pretty sure the "no bugs" part is just hyperbole to make a point.)

Re: You should write "without bugs"

#24
It feels like this is aimed more at intermediary programmers (and seniors with careless attitudes).

A lot of them have this bizarre idea that since bugs will happen anyway, there's nothing we can do to avoid them. Then they come up with some bad architecture, or poorly-thought-out convention, or use a problematic library, which makes it easier for logic bugs to happen later, when someone else changes a convention elsewhere that interacted with it.

There often is a way (usually multiple ways) to architect software to avoid bugs. What Rust does to memory bugs and Haskell does to state bugs, can often be done manually in other languages, for whole categories of logic bugs, by being careful with your conventions and making sure they are easy to follow correctly.

I.e. software can be designed to avoid bugs. That requires some thought many people don't care to put in.

Re: You should write "without bugs"

#27
post #22

Earlier quoted context omitted.

Yeah I was expecting real, concrete tricks, something involving the right/perfect(?) combination of language, tool, pattern, etc. This is just “think correctly, and often, then, no more bugs”. Not helpful?

> something involving the right/perfect(?) combination of language, tool, pattern It's fun to spend a few lifetimes on the quest for the perfect tool.

Exactly what I’m getting at hah, its neat to see what other people come up with, to see if I want to change my own little set of perfect tools :p We all know it’s nonsense, but we’re going to do it anyway!

Re: You should write "without bugs"

#28

I clicked on this because of the crazy title but its actually a really inisghtful article, e.g. "Conversely, there are people with commitment issues; they want to experiment non-stop and thus have no faith in robustness." ... like there's this belief that bugs will just happen anyway so why worry about them. But the authors point is that a little bit of extra thought and work can make a lot of difference to quality.

I think there's always argument that you don't know what you don't know. How much thought do you put on writing code with out bugs. Bug could be caused by the business logic, the language internals, the runtime environment internal and variation. I think what people often ignore writing piece of software is an iterative process, you build, deploy and learn from the operation and you fix and repeat.

If you keep thinking of all possible issues that can happen that becomes a blackhole and you dont deliver anything.

Re: You should write "without bugs"

#29
post #20
post #9

I don't think anyone says you should just casually ship bugs. Quite the contrary, most are ok with the idea that, if you see a bug, fix the bug. But, there can be no doubt that there is diminishing returns on chasing down every potential bug. This reads to me like the idea that a rich person walking down the road wouldn't pick up a $20 they happen to see at their feet. Of course they will. Why not? What they don't do…

> What they don't do, is waste time walking around looking for spare money that has been dropped. Because that would almost certainly be a waste of time. Why is it usually a waste of time? Because people rarely lose multiple bills of money, and if they do, our vision system is well equipped to spot the other bills quickly. The opposite is often true with software in my experience. When there is a bug, it's often beca…

Again, if you see a bug, fix it. If you are already in a section of code, read through all of it. And heck, if you are not running late on anything, feel free to start trying to re-architect parts that you think are off.

If I'm just caught by a strawman at the start of the essay, apologies on that. I legit don't know anyone that casually encourages bugs as long as you have features. Tolerances are a thing, but so is negligence.

Re: You should write "without bugs"

#30
If you actually want to write software without bugs:

Assume that your code will have bugs no matter how good you are. Correct for that by making careful architecture decisions and extensively test the product yourself.

There’s no silver bullet. If you put in enough time and make some good decisions, you can earn a reputation for writing relatively few bugs.

Post reply on HN