Live data from Hacker News

I am a puts debuggerer

tenderlovemaking.com

11–20 of 60 posts

Re: I am a puts debuggerer

#11

I don't even understand the 'have to learn a debugger' statement. Is he referring to things like pry? I rather enjoy the debugger in Rubymine, and part of the reason for this is that it more or less works like every other debugger I have ever used (eclipse, vs, chrome debugger, etc.) There is not much to learn if you have used any debugger in the past.

That which is not learnt is innate.

GDB is not innate.

Therefore GDB has to be learnt.

---

I don't understand your lack of understanding :)

EDIT:

Addendum: Symbolic debuggers like GDB are non-trivial to pick up, is that what you're arguing against?

Re: I am a puts debuggerer

#13

I don't even understand the 'have to learn a debugger' statement. Is he referring to things like pry? I rather enjoy the debugger in Rubymine, and part of the reason for this is that it more or less works like every other debugger I have ever used (eclipse, vs, chrome debugger, etc.) There is not much to learn if you have used any debugger in the past.

I agree, the concepts of debuggers are all the same but there is a definite friction to using a debugger if it's not already setup with a familiar interface. Sometimes the pain of setting up a debugger isn't worth it when you can solve the problem in a few minutes with echo debugging. And there can be plenty of pain in getting debugging working when it's not as simple as just clicking "Debug" in your already setup IDE.

Re: I am a puts debuggerer

#14
In the embedded world, sometimes you can't even be a puts/printf debuggerer. There have been some situations, typically early in development, where I've had to be a "turn the LED on or turn it off" debuggerer. Amazingly, that binary output is usually enough to fix whatever problem is happening and bootstrap into printf debugging or full ICE interactive debugging.

Re: I am a puts debuggerer

#15
post #14

In the embedded world, sometimes you can't even be a puts/printf debuggerer. There have been some situations, typically early in development, where I've had to be a "turn the LED on or turn it off" debuggerer. Amazingly, that binary output is usually enough to fix whatever problem is happening and bootstrap into printf debugging or full ICE interactive debugging.

A Bus Pirate can sometimes save your bacon or at least make your life easier in these situations!

Re: I am a puts debuggerer

#16
printf()-based debugging is okay when these statements are temporary, or when they are only present in development branches.

At $previousjob we had a guy who literally spent a year adding printf() statements everywhere to production code in order to help himself understand the existing code base he had to work on.

"It's not printf()-debugging, I'm doing extensive permanent instrumentation".

He even developed a whole framework for printf()-based debugging, to print messages in an artistic way.

The actual code became very hard to read due to the omnipresence of debugging cruft.

He also made the whole test suite dependent on the output of the debugging printf() debugging statements, making any kind of refactoring impossible.

I showed him how to use gdb and bought him a hard copy of the dtrace book, but it didn't help.

Re: I am a puts debuggerer

#17
This appears to be a post by a novice developer, discouraging the use of time tested, invaluable debugging tools? Encouraging slower, worse debugging...for what?

And "tender lovemaking" for the title of a tech blog? That's childish and short sighted.

Rails has vibrant problems in its ecosystem (everything is global, tracing behavior is hard, everything is magic, many Rails developers have no idea how what they're using works), and this is both a product and a cause of that.

Re: I am a puts debuggerer

#18

I've noticed that the more stateful my code, the more use I get from a debugger. Being able to poke and prod and see the various values in memory can be extremely helpful when I'm writing in an OO language, that just spitting to console doesn't really do (because I don't know up front what I'm going to care about; what influences what, what values are in the stack, in a containing object, etc). Conversely, the less s…

Yes, this exactly! With OO-based PHP 7 codebases I work on, XDebug with the amazing Codebug client is brilliant. Breakpoint, then poke around the actual data structures within a running request, and see what happens!

When I'm working on functional codebases (our JavaScript is done in a very functional style, and I personally write Clojurescript and Wisp for my personal projects), I find printing the result of function calls completely sufficient, though I suppose one can consider a REPL not that conceptually different from an interactive debugger: in fact, Codebug and I think Komodo's XDebug client actually give you a REPL to play with, set to the context of the given breakpoint

Re: I am a puts debuggerer

#19
It's nice to see I'm not alone! I haven't really used a 'legit' debugging tool since my days as a C# developer. And that was because how easy debugging was in Visual Studio. I have yet to find something that just works, as easily. (I imagine XCode works perfect too, never programmed in Obj-C though).

Re: I am a puts debuggerer

#20

This appears to be a post by a novice developer, discouraging the use of time tested, invaluable debugging tools? Encouraging slower, worse debugging...for what? And "tender lovemaking" for the title of a tech blog? That's childish and short sighted. Rails has vibrant problems in its ecosystem (everything is global, tracing behavior is hard, everything is magic, many Rails developers have no idea how what they're usi…

Just wanted to point out that you may disagree with him here but @tenderlove is far from a novice https://github.com/tenderlove?tab=activity
Post reply on HN