News for hackers. Stuff that matters.
Re:Move Fast without Breaking Things by sbov on Monday March 28, 2016 @01:42PM (#11375835)
This seems like a really uncommon case.

The vast majority of bugs I've ran across is an incorrect mental model of how something works: your system, some library, or an external system you're interfacing with.

Aside from building a more understandable system (whatever that really means/entails), from my experience, the best way to counteract this is to, while writing code, always ask: "What if my understanding is wrong? What if someone else's understanding is wrong? What can I do to make the system fail in the loudest way possible if someone's understanding is wrong?"

Re:Move Fast without Breaking Things by ArkyBeagle on Monday March 28, 2016 @01:53PM (#11375941)
Generally, have the interface to the module under utilization be as simple as heck.

As an example, I have a system for which almost all state is represented as XML/JSON/CSV text when it is outside the system. Inside the system it's tables of tuples with a master table of names cross references.

Each "object" has an instantiator, a "process" callback and ... that's it. It's all done in a timer-based polling cycle ( after a select()/epoll() loop ). Each "object" owns a timer of its own that specifies the minimum poll time. There basically are no parameters after object creation, so you can't get parameters wrong. You have to send XML/JSON/CSV to it to change state. XML/JSON/CSV for initial configuration is controlled and shipped with the executable. For all settable state in the tables, there is a formal validation method and a controlled script to test them.

The the client-writers, I provide correct scripts for each use case that they can then steal or modify.

This way, I just don't have problems.

Re:Move Fast without Breaking Things by ktRolster on Monday March 28, 2016 @07:54PM (#11378476)
That goes with what Glenford Meyers said, that all bugs are transcription bugs, either from the requirements to the programmer, or from the programmers head to his fingers, or.....