503 votes

Leaving intentional bugs in code for testers to find

This sounds absolutely ridiculous. It is expending a great deal of effort for very questionable benefit, and the practice seems based on some faulty premises: That QA won't work hard unless they know ...
  • 7,613
348 votes
Accepted

I changed one method signature and now have over 25,000 errors. What now?

25000 errors basically means "don't touch that". Change it back. Create a new class that has the desired interface and slowly move the consumers of the class to the new one. Depending on the ...
  • 8,670
225 votes

Leaving intentional bugs in code for testers to find

Well, based on what I've learned: It's not a school nor job interview; The testers are not children; It's not a game; It wastes company's money. The QA are not there only to find bugs but also to ...
  • 2,017
107 votes

Leaving intentional bugs in code for testers to find

Bad idea. From the tester's point of view: "So they will test hard, because they know there are bugs present and not finding them might be considered as their incompetence." Basically the devs are ...
79 votes

I changed one method signature and now have over 25,000 errors. What now?

Divide and conquer with refactorings Often, breaking up the change that you need to do into smaller steps can help because you can then perform most of the smaller steps in a way that doesn't break ...
  • 888
76 votes
Accepted

How do you debug a binary format?

For ad-hoc checks, just use a standard hexdump and learn to eyeball it. If you want to tool up for a proper investigation, I usually write a separate decoder in something like Python - ideally this ...
  • 12.1k
64 votes

Leaving intentional bugs in code for testers to find

I agree totally with the answers above as to why this is bad for motivation and just generally awful people management. However, there are probably sound technical reasons for not doing this as well: ...
  • 2,499
51 votes

Leaving intentional bugs in code for testers to find

Edit I want to be clear that this answer is only talking about the concept of testing your QA process, and I'm not defending the specific methodology portrayed in the question. End Edit There is a ...
47 votes

What's the best way to avoid catastrophe caused by negligence?

Is there some kind of cultivatable behaviour [...] that can help me at least reduce such kind of mistake Absolutely, it is called four-eyes-principle. If you had you shown your crontab entry to a ...
  • 188k
46 votes
Accepted

Split the calculation of return value and the return statement in one-line methods?

Introducing explaining variables is a well-known refactoring which can sometimes help to make complicated expressions better readable. However, in the shown case, the additional variable does not "...
  • 188k
46 votes
Accepted

I am spending more time installing software than coding. Why?

What am I doing wrong? You're trying to develop in an environment where you're also the sysadmin, devops and the local technical product owner for every pip package you use - and you're assuming that ...
  • 12.1k
38 votes

Split the calculation of return value and the return statement in one-line methods?

Given the facts that: a) There is no impact on the final code as the compiler optimises the variable away. b) Having it separate enhances debugging capability. I've personally come to the ...
  • 570
36 votes

I changed one method signature and now have over 25,000 errors. What now?

Clarify your task with your boss to help him to understand the problem and your needs as a professional software developer. If you are part of a team, look for the lead developer and ask him for ...
  • 469
36 votes
Accepted

Can abstractions and good code practice in embedded C++ eliminate the need for the debugger?

I think you are misrepresenting the message of the "Modern C++ in Embedded Systems" video. The point is that there are people in the embedded world that write code and then test it by running the code ...
  • 454
35 votes

Can abstractions and good code practice in embedded C++ eliminate the need for the debugger?

No, not at all ! Abstractions and good practices can of course reduce the risks of errors. For example: language abstractions let the compiler generate code, that you would have to write yourself ...
  • 69.8k
33 votes

Leaving intentional bugs in code for testers to find

Honestly, I'd call this behavior blatantly unethical and impractical. The PM is in need of some serious retraining, if not termination. It demonstrates a fundamental lack of understanding of the ...
30 votes
Accepted

How to affect priorities to bugs to developers and treat them accordingly?

Generally you have two axes for bugs: gravity and frequency. So obviously something grave and frequent is of the highest priority. However, something that's serious but happens rarely should be ...
  • 22.4k
29 votes

Leaving intentional bugs in code for testers to find

Personally, I feel uncomfortable with this approach. The main thing that concerns me is the practicality of inserting intentional bugs. This seems to me to be difficult to do in any way that is ...
28 votes

I changed one method signature and now have over 25,000 errors. What now?

Don't touch it. Don't commit anything. Instead, sit down on your chair and shout "Heeeeelp!!!!!" as loud as you can. Well, not exactly like that, but ask any of your senior colleagues for advice. ...
  • 38.6k
24 votes

How does GDB pause an execution

It varies slightly with the architecture, but the important points apply nearly universally: Interrupt servicing causes the CPU state (including registers) to be saved to memory before running the ...
  • 3,178
23 votes

Leaving intentional bugs in code for testers to find

It's a bad idea for all the reasons already given, but bug seeding is a useful tool for a different purpose. You can use it to get a rough metric of how effective the QA process is. In its simplest ...
  • 802
23 votes

How to affect priorities to bugs to developers and treat them accordingly?

This really boils down to what you consider to be more important. The P2 bug or the new feature? Usually an agile project management system will include some sort of prioritisation meeting where ...
  • 65.5k
22 votes

I changed one method signature and now have over 25,000 errors. What now?

Entrenched APIs can't simply be changed. If you really need to change them, anootate and/or document them as deprecated (by whatever means the language allows) and document which API should be used ...
22 votes

Can abstractions and good code practice in embedded C++ eliminate the need for the debugger?

This question basically boils down to "can you write bug free code the first time every time?” The answer is always going to be no. Yes, there are practices that can help, you can isolate modules. ...
  • 27.3k
21 votes

Debugging memory corruption

It's a challenging problem but I suspect there are a lot more clues to be found in the crashes you've already seen. Are you keeping careful records of crashes, to look for patterns? Are the few ...
  • 8,075
19 votes
Accepted

When should you start unit testing? (during which development stage?)

You should write your unit tests very near to when you write your code. "Timely" is one of the five core tenets of unit testing per Clean Code. There's even an approach that advocates writing your ...
  • 108k
19 votes

Leaving intentional bugs in code for testers to find

Bad idea. This is the sort of logical, binary approach that developers often bring, but it is demotivating for the QEs. It simply demonstrates a lack of trust. QEs often get placed in these ...
18 votes

How can I encourage people to read error messages?

Do not help right away. Make the junior colleague wait for at least 15 minutes, after one or two of this 15 minutes cycles, he/she will start to look at the issue on his own. Just don't say directly "...
  • 1,128
18 votes

Leaving intentional bugs in code for testers to find

I'd say bad idea. One: Programmers are going to spend time putting deliberate bugs in the code, and some effort to save the good version. While the testers should presumably be testing everything, ...
  • 2,647

Only top scored, non community-wiki answers of a minimum length are eligible