Live data from Hacker News

Ask HN: What are your favorite developer-efficiency tips?

news.ycombinator.com

521–530 of 532 posts

Re: Ask HN: What are your favorite developer-efficiency tips?

#521

KEEP NOTES. Write everything down. Write down what you were thinking about, how you felt about decisions, things you tried for bug fixes. you never know when this stuff will be useful to you again. I keep really basic markdown notes in a git repo, roughly one file per day with an ISO date name, but some things I give a separate file name (still with the iso date, but with some descriptive words) for things that might…

I have read somewhere: Code comments are like love letters to your future self :-)

Re: Ask HN: What are your favorite developer-efficiency tips?

#522

Loved reading all of the comments here. The biggest efficiency tip I've found it blocking all distracting websites via /etc/hosts when my computer wakes. Website blockers never worked perfectly for me because of edge cases. Ex: YouTube is distracting, but sometimes I want to watch a YT video, so I would disable the blocker and then forget to enable it again. The /etc/hosts based approach with a wake script to re-add…

There's this extension called Intention which, I think, handles these edges cases pretty well.

It doesn't really block websites, it just pops up in the middle of the screen warning you about how much time you've spent on that particular distracting page today. But you can mark a checkbox telling it that you will be using the site productively (watching a lecture at YouTube, for instance) and assign a period of time for it.

I've tried a lot of websites blockers that didn't stick but I'm really digging the approach of this one.

Re: Ask HN: What are your favorite developer-efficiency tips?

#524

KEEP NOTES. Write everything down. Write down what you were thinking about, how you felt about decisions, things you tried for bug fixes. you never know when this stuff will be useful to you again. I keep really basic markdown notes in a git repo, roughly one file per day with an ISO date name, but some things I give a separate file name (still with the iso date, but with some descriptive words) for things that might…

The first thing I do for every project is set up a development blog. Hugo + a nice free theme + Gitlab Pages + Netlify CMS. Everything is contained in Gitlab and I can keep the Pages site private and only accessible by members of the repo. It is less of a daily log and more exploring "issues" - basically anything I took time to research and figure out. I'm very adamant about recording details like dates, version numb…

I've been doing this for years, and even though basically no one reads my blog, it's nice to have a place where I put "polished" thoughts about my projects.

Re: Ask HN: What are your favorite developer-efficiency tips?

#525
post #507

Earlier quoted context omitted.

Not in the source code itself, it will be in separate files according to Matt. If you want it in the source code you can use Sorbet today.

Sorbet syntax is like a hack bolted on... I'm not really a fan of it.

Yeah, it's limited by being a library instead of being part of the language itself.

Re: Ask HN: What are your favorite developer-efficiency tips?

#527
post #269

Test driven development for my embedded systems work. I’ll never go back.

I got some code going on using pytest and pyserial exactly for this. Tell us more!

Hmm, sounds like you might be automating tests on the target, scripted from the PC. There's a place for this, but I'd call that automated integration/system testing, not unit testing.

Unit testing was traditionally considered impractical for embedded systems, because the code is so closely tied to the hardware. However, with proper architecture and unit test frameworks that simplify your life, it's quite feasible, and indeed enjoyable.

You write unit tests that exercise your embedded code, compiled for the PC, not the target. This ensures your code is portable.

I use the Unity/CMock/Ceedling framework when I'm writing in C, and CppUTest when I'm writing in C++.

I HIGHLY recommend the video courses taught by the guys at ThrowTheSwitch.org (the authors of Unity/CMock/Ceedling). See https://www.throwtheswitch.org/dr-surlys-school

I read and enjoyed James Grenning's book, Test Driven Development for Embedded C, but it didn't really click for me until I took the video courses mentioned above. In the second course, you code an entire simple but realistic embedded project in TDD fashion.

Re: Ask HN: What are your favorite developer-efficiency tips?

#528

I can't say enough good things about a multiple clipboard manager. Not only is it useful to copy/paste multiple items in sequence, but it's a game changer to be able to quickly retrieve a code snippet, or URL, or CLI command you used recently; and/or, to trivially stash one just in case you'll want it later. (Primary downside: using a computer without multiple clipboards feels broken. What do you mean it "forgot" the…

I used to have Glipper installed in Gnome, but it looks like that's been a dead project for the better part of a decade now. Does anyone know a modern equivalent? I did enjoy having a clipboard manager I guess one potential downside is that I use `pass` to manage passwords and I don't terribly want my passwords all stuck in my clipboard history...

I use Clipman. Simple, but does job.

Re: Ask HN: What are your favorite developer-efficiency tips?

#529
Using https://github.com/github/hub has allowed me to fire off small pull requests at a high rate. It _almost_ makes pull request creation as lightweight as commits. This leads to smaller pull requests that are easier to review and likely easier to get a quick review on for because of that. Additionally, the reviewer is IMO likelier to approve the PR, leading to me being a much more productive engineer shipping things at a higher rate.

Re: Ask HN: What are your favorite developer-efficiency tips?

#530
post #117

Write meaningful git commit messages, always. Even in stupid side projects that don't matter. Because then when you're at work, it will be second nature to write good messages, and your colleagues will absolutely appreciate it. I've been following the keywords here: https://github.com/joelparkerhenderson/git_commit_message

Nice! I totally agree with this! I've used https://www.conventionalcommits.org (initially from Angular, I think) and it has _really_ made me a better programmer. Worth pointing out that it also simplified code review a lot to make PRs less of a frictionpoint.
Post reply on HN