News for hackers. Stuff that matters.
Re:Notes on debugging Clojure code by mitsoz on Tuesday May 30, 2017 @07:37AM (#14444521)

  When it comes to debugging, I'm firmly in the printf camp; I rarely prefer debuggers over printf-based debugging
I'm struggling to understand this. Why would you ever prefer printf debugging in your local dev environment over using a debugger?
Re:Notes on debugging Clojure code by xemdetia on Tuesday May 30, 2017 @10:37AM (#14445662)
There is rarely a situation where you can't slip a printf or log message into a piece of code and observe how it's working in production. Depending on the complexity of the problem the debugger can also hide a lot of problems- is there a timing issue? is it intermittent? What happened the last 200k times? An interactive debugger technique doesn't help you at all if all you have is a coredump of an issue that happens once a month.

It is definitely a personal preference, but I just find myself in too many situations where the constraints to make a debugger in a dev environment work well end up adding a lot of complexity to the problem space. I know printf/write to a file works every time, everywhere.

Re:Notes on debugging Clojure code by AlexCoventry on Tuesday May 30, 2017 @01:22PM (#14446865)
I use both. They are useful in different situations. printf is lightweight, and can let you dump a lot of information very fast. It's a good approach when you're reasonably confident about what you need to know. A debugger gives you more flexibility about the questions you can ask on any particular run.
Re:Notes on debugging Clojure code by jhbadger on Tuesday May 30, 2017 @08:40AM (#14444839)
Language and environment independent. It just works. It's like IDEs -- so many people spend so much time writing and learning IDEs specific to a language rather than just picking a standard text editor that can be used for any language on any platform.
Re:Notes on debugging Clojure code by zdkl on Tuesday May 30, 2017 @09:36AM (#14445223)
Yeah this. Does this thing colour parenthesis and stdlib builtins? We're good to go.