Live data from Hacker News

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

news.ycombinator.com

11–20 of 532 posts

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

#11
Contrarian opinion, but often doing things manually rather than automated will save you time. Writing/debugging a script is fun, but more often than not it would have been faster to do things the dumb way. If a task is risky or repetitive daily, then sure, but often developers confuse "writing a script because too lazy to manually do the work" vs "get the task done as fast as possible".

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

#12
I usually comment with the same thing on these tip threads. And that is learn to rebind your keyboard. Make each key programmable modifier. Open apps, run scripts/macros instantly. My Karabiner config:

https://github.com/nikitavoloboev/dotfiles/blob/master/karab...

I go as far as binding keys to instantly type `console.log()` or `fmt.Println()` or the other language equivalent with my dot modifier key. Plus typing things like `Thank you` with dot+spacebar press.

https://github.com/nikitavoloboev/dotfiles/blob/master/karab...

The other tip that paid off in time is starting a wiki. And building an interface to access contents of the wiki instantly.

Wiki: https://github.com/nikitavoloboev/knowledge

Interface: https://github.com/nikitavoloboev/alfred-my-mind

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

#14
Invest in your bash shortcuts! I have shortcuts for almost everything. To give you an example, I work in Rails + RSpec, each class has its own rspec shortcut:

`rspecs alexa_api` translates to `rspec spec/services/alexa_api_service_spec.rb`

`rspecm startup` translates to `rspec spec/models/startup_spec.rb`

I also have a bunch of other shortcuts for repeating tasks like expiring Redis, dumping a test database for local testing, etc.

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

#15
Save all bash history into a separate file. Even with a high limit, the default bash history functionality has bugs that will destroy your history now and then. With the following .bashrc settings I have commandline history going back a decade:

export HISTTIMEFORMAT='%F-%T'

PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo \ bash$SHELLNO $PWD "$(history 1)" >> ~/.bash_eternal_history'

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

#16
I use a 4k TV as a monitor - I can easily see full size my code editor, terminal output, a page of documentation and the web app/site I'm working on all at once. It cuts down tremendously on the back and forth switching and reloading of things that don't feel like they take up much time but do materially eat into things.

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

#17
post #11

Contrarian opinion, but often doing things manually rather than automated will save you time. Writing/debugging a script is fun, but more often than not it would have been faster to do things the dumb way. If a task is risky or repetitive daily, then sure, but often developers confuse "writing a script because too lazy to manually do the work" vs "get the task done as fast as possible".

Another contrarian opinion, but as much as configuring and tweaking conf files are fun, it's still faster in the long run to be highly efficient on a new system as fast as possible. It's also convenient to use standard tools to be effective on someone's else computer. For instance, it's much better if you can be productive by changing 2-3 keys in macOS settings instead of being forced to use a fancy keyboard layout and customize shortcuts for everything.

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

#18

C-r for interactive history search

Not just that.

Add this to you inputrc:

"\e[A": history-search-backward

"\e[B": history-search-forward

Now up and down arrows will search your history with whatever you already have typed at the prompt. Re-running a command often? Probably just have to type its first letter and hit up arrow once or twice.

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

#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

Post reply on HN