4 ms·
When writing Python these dates I almost always use iPython notebooks for prototyping, before throwing things into modules. When I switched off to Java and go a
by sdenton4 10y ago
When writing Python these dates I almost always use iPython notebooks for prototyping, before throwing things into modules. When I switched off to Java and go a while back, the increased overtime for compiling was pretty noticeable.
But even more noticeable was the loads of the ability to play around with each little block of code, with data in-memory, until I was completely happy with it. It's a bit like interactive debugging, but with a great deal more freedom. As a result, I get a huge reduction in mental load when writing Python in a notebook; my attention is extremely focused on the little bit of code in working up in that moment. This is a real win for productivity, beyond what you get from the zero compile time.
(Also, Java compile times are not zero. Even waiting a minute for a large compile is enough to create a break in concentration.)
- PaulHoule 10y agoThat's why Java IDE's usually have a visual debugger that actually works.
- reitanqild 10y agoI am sometimes (i.e. I think this happens a lot) bit puzzled by looking at very intelligent people who doesn't know about the debugger or knows about it and doesn't use it anyway. If you program Java then please feel free to use the excellent tooling that is available.
- jjoonathan 10y agoIt's just habit. Code in a language with bad tooling and you too would develop habits to work around the lack of tools. It just takes time (and sometimes a bit of convincing) to adjust. And to adjust back, of course. "Type A" coders are especially vulnerable to this kind of habituation on account of often being interested in esoteric languages, systems programming, or other "extreme" environments with tooling restrictions.
- TeMPOraL 10y agoIt helps also to not make the type of bugs that need to be solved with the heavy and laggy Java debugger. I've been doing quite a lot of Java over the years, especially in the last year, working on medium and large projects. I've compared my workflow to that of my cow-orkers, and I sometimes look at the way they debug things. For most cases, I can find and fix the bug with occasional logging / print statements faster than my cow-orker can pause the program on breakpoint and then click through stuff to find the right element in the right container in the right variable that's maybe causing the problem. The trick usually is to test often and don't write something if you don't understand how it works - that also includes interacting with parts of your application that you didn't write - and to not proceed if you feel you don't understand how the code you wrote works. 99% of the time when I have a bug in my Java code I realize where the bug is before my window manager switches over from the program to the IDE. That comes simply from understanding what one wrote (+ a bit of experience). That said, debugging multithreaded programs is a pain in the arse, and I take any help I can get there. Though I haven't seen many debuggers that would be helpful in those cases. Interactive debugging is fun in Lisp, where you basically code interactively all the time and code/debug phases are pretty much blended together (just like compile/load/runtime is).
- douche 10y agoDefine actually works? And where is this mystical beast?
- rmetzler 10y agoDebuggers help me when I'm stuck with some kind of bugs, like when I need to find out where a certain variable is set. But some tasks are easier to debug with print statements. And often I wish debuggers could go back to the previous statement and so I wouldn't need to add another breakpoint in front and run the program again.
- ecopoesis 10y agoYou're just used to using poor tools. Visual Studio has reverse step since 2010, GDB since 2009. I can't think of a single task that's easier with print statements vs a basic breakpoint debugger. And if you include fancier debugger features like reverse step, code injection and moving the instruction pointer, debuggers win by an order of magnitude. People generally ascribe the rise of Web 2.0 to AJAX, and while that's part of it, what really made Web 2.0 possible was Firebug delivering a useable debugger for Javascript, so complex AJAX apps could actually be created.
- ecopoesis 10y agoSomehow I lost my original point in the comment above, which was that I believe debuggers are so important, it's literally the first feature I got working in my toy programming language. Being able to see how terribly I've screwed things up in CLion makes fixing my idiocy much easier.
- twblalock 10y ago> (Also, Java compile times are not zero. Even waiting a minute for a large compile is enough to create a break in concentration.) I don't know how you define "large," but I work on Java projects that have several thousand classes and compile in less than a minute. Maybe you have a slow computer.