5 ms·
It seems you've mastered some dark art unknown to an entire industry, you should totally write a book Meanwhile I'll rely on the smelly old debugger to dig me
by _wmd 8y ago
It seems you've mastered some dark art unknown to an entire industry, you should totally write a book
Meanwhile I'll rely on the smelly old debugger to dig me out of threading weirdness, memory corruption, resource leakages, other people's bugs, and to provide a window into a combinatorially massive input-dependent state my feeble mind simply can't fathom while writing tests for a tiny corner of a typical system that in aggregate amounts to millions of LOC.
- jjoonathan 8y agoNah, gradparent is not a wizard, just someone who has spent a lot of time in a single relatively simple environment that is mostly under their control. It's a beautiful thing when it happens. Most aren't so lucky.
- tropo 8y agoHe is taking after Linus Torvalds, who resisted adding a kernel debugger for many years. Linus used console spew, PC speaker beeps, and storing a hash of file/line into the PC's time/date.
- hackcasual 8y agoThat's less not needing a debugger by design, more how challenging it is to debug an operating system.
- tropo 8y agoThose last two (speaker and clock) yes, but otherwise no. Linus Torvalds really doesn't like using a debugger and he'd rather you didn't use one either. His words: https://yarchive.net/comp/linux/debuggers.html https://yarchive.net/comp/linux/debuggers.html
- pmarreck 8y agoHe's not wrong. I still maintain that debuggers are a design smell.
- Too 8y agoWow. Lets add some sleep in the compiler also so people will think harder about their code before compiling?
- tropo 8y agoI think that is excessive, but it isn't entirely wrong. I worked at a place with builds that took over 8 hours. We sure would think hard about our code.
- jjoonathan 8y ago... who resisted adding a kernel debugger for the explicit purpose of keeping casuals out of his zen garden, per your link below. For people who don't have a hoard of elite developers banging down their gates to contribute code for free, I suspect the economics of being such a Prima Donna are not as attractive.
- thedirt0115 8y ago+1 to the above, it's just a different environment. I haven't used a debugger at my current (mostly Python) job at all, whereas at a previous job in C++, I was using gdb practically every day.
- pmarreck 8y ago> threading weirdness, memory corruption, resource leakages, other people's bugs Just as an FYI, most of these are theoretically eliminated or at least drastically mitigated by a switch from mutable state to immutable, purely-functional data structures. The cost of course being somewhat increased memory consumption and a bit more slowness (or a lot, depending on the algorithm). If you ever get a chance to work with the BEAM VM, it's pretty tight.