Live data from Hacker News

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

news.ycombinator.com

21–30 of 532 posts

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

#21
Don't push a commit with a new feature without tests and documentation. Even for your personal projects.

I started doing this a couple of years ago and it's hard to overstate the positive impact this has had on my macro productivity. I can come back to a project I haven't touched in six months and instantly start productively making improvements.

Tests and documentation really are for future you.

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

#23
Automate repetitive tasks that can be automated. A task may take ten minutes. Automating it may take hours, and thus seems too expensive.

If this task is going to be done many times, then the automation WILL pay off. Running the automated task might take less time than the manual steps. And you can be doing something else.

The more of these kinds of tasks that you can automate, the bigger of a lever it becomes.

One of the oldest examples would be 'make'.

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

#24
post #19

RTFM (as in Read The Fine Manual). To me, the key for being productivity is understand throughly the "tools" we use: IDE, languages, libraries, framework cli, os, shell,... Read the implementation, the docs, the issue tracker, even the git history if you have time. When I started to learn vim, I tried many popular distribution without understand each of the plugins they included. And I almost gave up learning vim. It…

> RTFM (as in Read The Fine Manual). Some developers use alternate F-words for RTFM. F-words like: Fabulous or Fantastic or Friendly

Those developers should read the manual:

https://en.wikipedia.org/wiki/RTFM

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

#25
post #23

Automate repetitive tasks that can be automated. A task may take ten minutes. Automating it may take hours, and thus seems too expensive. If this task is going to be done many times, then the automation WILL pay off. Running the automated task might take less time than the manual steps. And you can be doing something else. The more of these kinds of tasks that you can automate, the bigger of a lever it becomes. One o…

Relevant xkcd: https://xkcd.com/1205/

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

#27
A couple others have mentioned shell tricks. One of my favorites is using Alt-. (in Bash and Zsh) to insert the last argument of the previous command. Press it multiple times and it will cycle through the last argument of all previous commands. It's great for when you want to, say, `ls thing` and then `vim thing`.

Yesterday I went looking for a similar key that would insert a copy of the last argument on the current line, like for when you want to copy or rename a file to a similar name in the same directory, as in `cp some/long/path/to/foo.txt some/long/path/to/foo2.txt`.

I couldn't find a command for this, so I made my own Zsh "widget" and bound it to Alt-/ so now I can type `cp some/long/path/to/foo.txt` and hit Alt-/ to prefill the second arg. I put the code for it up here: https://gist.github.com/dceddia/0a45a88dd61cbdf1be023d0a8f15...

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

#30
There's many tools I've picked up over the years (sometimes on as needed basis, sometimes just for fun). The latter has been way more rewarding though in retrospect :) Instead of enumerating all of them, I think this course page does a great job of collating them by topic: https://missing.csail.mit.edu/
Post reply on HN