Knowing how to do effective, interactive debugging in any language is a major step in productivity: it helps in so many ways: learning, diagnose, getting things done...
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.
Other fun productivity tricks include drawing a simple diagram when you can't focus or don't know what to work on next. I also try to have tasks that take all different levels of focus and cognitive energy in the backlog so that I can choose a task based on my mood.
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.
Keep them buried for some period (maybe a month or so), then review back your code and see what's the good, bad & ugly you used to have (e.g algorithm usage, memory allocation, code style, correctness). I love this kind of "writer's retrospection" to see how much we've grown.
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 well.
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.
However, the biggest win was having a custom React boilerplate better suited to my needs than anything else that's out there.
What do you learn using flashcards, out of interest?
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