Ask HN: What tools and practices have helped you work better as a developer?
As title says. Comment below with any stories or observations on how productivity (or the lack of it) shaped your work!
PS: I'm working on a thesis on productivity in software development. If you have a few minutes, please share your experiences & what works (and what doesn't) in my survey: https://forms.gle/4B9GAtXD1nahwvn48
56 comments
[ 5.9 ms ] story [ 122 ms ] threadFor example, using print statements may encourage you to create a better model of the code: formulate hypothesis, test it. While debugging encourages more local reactive (not proactive) view of the runtime.
Also it can help to figure out the order in which pieces of code accross the codebase are executed. It is my experience that in such case you would very easily loose track when using a debugger.
SVN was a step forward, but GIT is the bees knees. I've used it to keep a workstation without networking up to date and synced with GitHub. The whole ecosystem is amazing.
Definitely feels a little weird to be the one saying 'back in my day, we had to walk 2 miles up hill, both ways, to commit our code. and lord help you if you needed to submit a patch.'
Guess what you CAN'T do efficiently with Git :)
So a lot of industrial Git users have to do these contortions involving S3 buckets, etc., or else reinvent their own bespoke versions of Git (like Microsoft GitVFS) in order to stand up a working tree on a fresh machine. Plus those external dependencies need to be kept track of, updated, and the updates kept track of.
We used to have an industrial-strength VCS that could handle source code, binary data, and huge repositories of both very efficiently: Perforce. Which is kind of on private-equity life support now.
Binary assets themselves don't belong under traditional source control because they are not suitable to be diffed. That is why git LFS stores them seperately and only versions their hashes.
Aside from that, I think the thing that's helped me the most is simply over-commenting, everywhere and all the time. I leave a quick note for other devs (and myself) for every helper func, even if it looks trivial to me. And for anything complex, I try to leave detailed line-by-line comments that any junior dev can pick up. This not only helps others pick it up, it helps me myself a few weeks from now, and it also helps prevent runtime issues through what is basically as-you-go "rubber ducky" debugging, forcing me to verbalize my rationale for writing something a certain way.
And of course ChatGPT has been a moderately big help. It's not quite a replacement for another experienced dev, but it's certainly taken over 90% of my Stackoverflow and Google usage – if only for its much better natural language parsing abilities.
With these tools in place, the code mostly just writes itself if you can give me time to focus and not force me to join pointless meetings and scrum planning sessions. I can only be productive if I can sit down and focus without pointless rituals where my input isn't even needed or asked for.
Edit: Oh, but it's also great for parsing non-programming languages with good support for HTML, XML, Markdown, various SQLs, GraphQL, JSON, YAML, misc config file formats, container or CI/CD definitions, etc.
I love code editors for scripts and light projects... but I can't imagine trying to work on larger ones without an IDE.
https://youtrack.jetbrains.com/issue/WEB-31686/Autocomplete-...
The bug you linked to seems rather esoteric (someone didn't want to manually type "import {blah} from package"...?). If you start to type that import, it'll autocomplete the rest for you. And once it's imported, it's very very good at traversing library files and types and bringing you to the definitions (VScode can do this too).
Does it have bugs? I'm sure. And it has its own absurd annoyances (like https://youtrack.jetbrains.com/issue/IJPL-60969/Show-path-in...) that might never get fixed. But in general it works great.
If it's important to you, I guess this is not the right IDE for ya!
Anyway, sorry, I hope they figure it out, but it's not something I've ever had trouble with. If it's an issue for you too, you might wanna write their support or just don't use the IDE.
Studying topics from first principles instead of corporate documentation
Learning the history of programming and computing
Moving beyond competency and becoming highly proficient at the command line
Understanding git backwards and forwards
Being able to explain every concept in computing from the lens of the broader field of engineering
Being able to write regular expressions without consulting too many resources
Effectively composing Unix programs to get a larger task done
Reducing every task to the absolute basics, to demonstrate a “proof-of-concept”
* I’m not claiming to have mastered any or all of these, but they do serve as my “North Star” guidances when figuring out which direction to advance in this career
On the side, I'm trying to enhance my knowledge on embedded systems as well, and picked up the book "Making Embedded System" by Elecia White. I have learned so much in just the first few chapters, even though I worked on an embedded software project for a full year recently. This has served me well, because previously my understanding of embedded systems was more of at the level of an Arduino, rather than an embedded developer. Arduino is fantastic for getting your feet wet, but it does hide away a lot of slightly complicated details (that are not actually that hard to learn with a little effort).
I would basically say, always prefer lengthy and somewhat dry textbooks over superficial and meme-heavy blog posts (or worse, YouTube videos). Learn the subject as if you only have one shot in your career to learn it, and have to learn a permanent representation of the subject that can last decades. Entertaining corporate docs, blog posts and videos are like a sugar-heavy diet for the mind, you'll feel energized at first, but eventually become sick from lack of deep understanding of anything
In a twist of irony, here is a blog post that explains this idea reasonably well - https://archive.ph/XSPRr
Here's a canonical blog post (again, the irony) on why understanding subjects deeply is important - https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-a...
TCP can fail, but so can my own totally deterministic code I only think I understand. Or more likely, I trip and fall and break the Ethernet cable and the whole thing fails.
My job is to make the final result reliable anyway, even knowing the thoughts in my own head are not trustworthy. Even if I knew anything about proof theory I could still make a mistake with a mathematical proof, and simplicity can't stop it. Left and right are fairly simple concepts and I've mixed them up so many times.
A lot of devs think in terms of trust and quality, and are so quick to assume entire subsystems are perfectly fine, whether it's because it's a high quality thing from a trusted vendor, or because it's simple and they did it themselves and feel they understand it.
It's just like in real life, how people seem totally sure they won't trip and fall or drop what they're holding. I'm used to understanding my own hands as unpredictable, so I guess that's why I like tech.
It's less about avoiding mistakes and more about predicting and planning for mistakes.
Totally agreed
You can also learn HTTP networking and curl, as they are the underlying principles of Postman, and learn Git graphs instead of using a Git GUI tool.
Next time you're confronted with a problem, instead of starting with "let's solve this with library X or framework Y," begin by asking "what are we trying to solve?" and then explore multiple options to solve that problem.
A technique I often employ is to first ask what the complexity of the problem is, then evaluate the complexity of each potential solution. For instance, the goal might be implementing automatic deployments, but the solution became way more complex than the original stated goal.
The technique often stil lead you to popular solutions, but it could also point you toward simpler, less conventional alternatives. Sometimes even eliminating problems by side stepping them completely.
A pencil will always be simpler than all of Keep's infrastructure, but it requires vastly more skill and attention than a cloud notes app, to the point where it's primary benefit seems to be as a form of mental exercise.
For the record, my day job is in fact more of an “integrator” than a computer scientist, but I still find value in every learning principle I laid out.
But there's still a lot of skill and possibility to take your career seriously with hacking together Legos, if you want to make your Lego thing reliable and maintainable, and I don't think they're exactly the same skills as someone like a compiler writer or suckless dev needs.
I'm not dealing directly with data regularly, I don't need to awk things, but I do need to know about the oddities of high level frameworks. Knowing awk might help somewhere, but it's not as essential as knowing CSS browser compatibility issues.
A lot of the time I don't even make decisions based on technical factors, they're made for me by social factors and I can either make it work or fail.
I've been at places where git branches were out of the question,the uphill battle to convince everyone to learn them was probably not happening.
It’s an easy thing to do, but IMO helps software quality tremendously. 60% of times I just read my changes and commit them as they are. In 25% of commits I spot something minor like typos in comments, and fix. Most importantly, for the remaining 15% of them I notice some important issues which need to be fixed.
Reading git log later, or delegating to other people, doesn’t work because timing. I commit my changes immediately after making these changes. This means I still remember what the code in question does, and why I changed what I did.
Indeed, just before each commit I often find extra newlines, debug prints or incorrect comments or try-out commented code, easy enough to repair with a decent diff tool.
Relatedly, learning to use Emacs with power and precision has been a boon to me, though the Emacs skill ceiling is absurdly, absurdly high and there's so much I've yet to learn. Programming the editor to do repetitive work for me, not just using packages and customizations, is key.
Literate programming has been a tool in my toolkit for documenting my thoughts as I solve an interesting problem. These days I use org-mode, but noweb has been useful in the past.