Live data from Hacker News

Ask HN: What tool/trick has most improved your programming productivity?

news.ycombinator.com

11–17 of 17 posts

Re: Ask HN: What tool/trick has most improved your programming productivity?

#11
Test driven development. Making your tests first, or at least early, helps you mentally nail down what you want your software to do. It also helps you think defensively early-on about corner cases and race conditions.

But that isn't really where the biggest benefits lie.

When you come back to that code a year later and have to make changes to it, but have forgotten how it works, having all the tests pass with good coverage provides a significant (but not absolute) level of confidence that you didn't break anything.

Given that so much development time is spent editing/updating code, rather than writing it from scratch, this can be a huge speedup in productivity.

Re: Ask HN: What tool/trick has most improved your programming productivity?

#12

Interactive debugging. "Most bugs are a result of the execution state not being exactly what you think it is" (Carmack) and it's astonishing how many people just refuses to effectively debug using an interactive debugger, which allows for easy inspection of anything, at any moment, with a REPL for a given state of your program, including call stack inspection/jumping and what not. Some say that "printing" and/or "log…

I can’t stand watching people do the add print statement —> compile —> run loop over and over. You can save so much time just stepping through and printing things in the REPL. It’s like you’re gonna be in this industry a long time, learn the damn tools.

Sometimes if I’m writing a complicated piece of logic I’ll even jump straight to the debugger on first run just to look at all the values and make sure the assumptions were correct.

Re: Ask HN: What tool/trick has most improved your programming productivity?

#13

Interactive debugging. "Most bugs are a result of the execution state not being exactly what you think it is" (Carmack) and it's astonishing how many people just refuses to effectively debug using an interactive debugger, which allows for easy inspection of anything, at any moment, with a REPL for a given state of your program, including call stack inspection/jumping and what not. Some say that "printing" and/or "log…

I can’t stand watching people do the add print statement —> compile —> run loop over and over. You can save so much time just stepping through and printing things in the REPL. It’s like you’re gonna be in this industry a long time, learn the damn tools. Sometimes if I’m writing a complicated piece of logic I’ll even jump straight to the debugger on first run just to look at all the values and make sure the assumption…

Both have their place, printing is good when you need to get some quantity reads.

Re: Ask HN: What tool/trick has most improved your programming productivity?

#14

I like the Pomodoro method. Basically, focus on a task for 25 minutes, then take a 5 minute break. Every 4 blocks, take a 15 minute break instead. I work at home, so I do housework in some of those 5 minute breaks. It's different enough that it helps clear my mind enough to focus again after the break. I'm still trying to find a good way to plan these work chunks, but so far I think emacs org-mode will work pretty we…

I find it difficult to break after 25 minutes when I am too much into the stuff specially in between complex debugging. Then I feel like I am not doing Pomodoro right. Do have a similar experience?

Re: Ask HN: What tool/trick has most improved your programming productivity?

#16
Meditation. Not the type that keeps you calm, but the type that acts as internal debugging.

All my issues with procrastination come from some deep internal issues, for example, an aversion to working hard, sleeping early, or wanting to spend a lot of time on games as some sort of status symbol.

A lot of these come from mental scars in our past, or even the wrong cultural conditioning. Basically just think what we would do if we were in complete control of ourselves, and why we're not doing that. And then dig really deep to find out where. You'll definitely know when you strike the nerve - it can trigger a sudden rage or tears. But hitting that nerve reduces the control it has over you.

Re: Ask HN: What tool/trick has most improved your programming productivity?

#17
post #3
post #2

Jetbrains IDEs and learning using flashcards.

+1 on Jetbrains, I've just installed PHPStorm and have skipped a ton of env setup BS already by having PHPStorm run my stuff from inside a docker container managed in the IDE itself. What do you learn using flashcards, out of interest?

I use Ankidroid and make my own cards.

It works on all platforms and is free. Usually just language syntax, and keywords.

But there are great free flash cards like this one on Kotlin: https://ankiweb.net/shared/info/1229687199

I got inspired by Derek Banas video: https://youtu.be/5urUZUWoTLo

Post reply on HN