▲ | forrestthewoods 5 days ago | |||||||||||||
> Leave us be. We know what we’re doing. No. You’re wrong. I’ll give you an example a plain vanilla ass bug that I dealt with today. Teammate was trying to use portaudio with ALDA on one of cloud Linux machines for CI tests. Portaudio was failing to initialize with an error that it failed to find the host api. Why did it fail? Where did it look? What actual operation failed? Who the fuck knows! With a debugger this would take approximately 30 seconds to understand exactly why it failed. Without a debugger you need to spend a whole bunch of time figuring out how a random third party library works to figure out where the fuck to even put a printf. Printf debugging is great if it’s within systems you already know inside and out. If you deal with code that isn’t yours then debugger is more then an order of magnitude faster and more efficient. It’s super weird how proud people are to not use tools that would save them hundreds of hours per year. Really really weird. | ||||||||||||||
▲ | spc476 4 days ago | parent | next [-] | |||||||||||||
The hardest bug I had to track down took over a month, and a debugger wouldn't have helped one bit. On the development system, the program would only crash, under a heavy load, on the order of hours (like over 12 hours, sometimes over 24 hours). On the production system, on the order of minutes (usually less than a hour). But never immediately. The program itself was a single process, no threads what-so-ever. Core dumps were useless as they were inconsistent (the crash was never in the same place twice). I do think that valgrind (had I known about it at the time) would have found it ... maybe. It might have caught the memory corruption, but not the actual root cause of the memory corruption. The root cause was a signal handler (so my "non-threaded code" was technically, "threaded code") calling non-async-safe functions, such as malloc() (not directly, but in code called by the signal handler). Tough lesson I haven't forgotten. | ||||||||||||||
| ||||||||||||||
▲ | jennyholzer 5 days ago | parent | prev [-] | |||||||||||||
> It’s super weird how proud people are to not use tools that would save them hundreds of hours per year. Really really weird. | ||||||||||||||
|