Live data from Hacker News

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

news.ycombinator.com

31–40 of 532 posts

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

#31
post #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 th…

One thing I worry about with these extremely customized keyboard configs and such is that once you get used to them, you will have a hard time using any other computer when you suddenly need to. Maybe this isn't such a big problem with physical keyboards, but can be with e.g. text editor configs, which you can't take along if you need to SSH into many servers during a workday and work with whatever is installed there.

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

#32
post #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…

I think !$ will do similar, at least in bash.

(I'm on a phone and normally rely on muscle memory so it might be the wrong symbols).

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

#33
post #31
post #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 th…

One thing I worry about with these extremely customized keyboard configs and such is that once you get used to them, you will have a hard time using any other computer when you suddenly need to. Maybe this isn't such a big problem with physical keyboards, but can be with e.g. text editor configs, which you can't take along if you need to SSH into many servers during a workday and work with whatever is installed there…

I have a bind to turn off all my binds if anyone else wants to use my computer.

And I can still use other people's computers although with some pain.

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

#34

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.

Would you mind sharing the model? I tried using my Hisense but it wouldn't work. And I've read that TVs won't always work properly as monitors, but then obviously there's a much wider and cheaper choice of TV panels than dedicated monitors.

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

#35
post #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.

+1, good tests are by far the biggest long-term productivity win, in my experience worth much more than any other tooling or process improvement.

Unfortunately I've gone in the opposite direction as you. I recently moved from a company that had a good automated test culture, to one that has a culture of manually testing things, often in production. Everyone, even the senior engineers who've been around for a long time, regularly lands changes that cause prod incidents.

There's actually quite a good canary/rollback system in place to deal with this, so a lot of people think everything's fine. But they don't quite realize how much more efficient things are if you can just make a change and run a test suite, and quickly have confidence that you didn't break things.

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

#37
Learn to touch-type properly. I'm not a shit hot typist or anything, but it does make hours on a keyboard more pleasant. And (hate me) I do judge other devs on it. If someone can't be bothered to invest a few tens of hours on such a key productivity enhancement then what does that say?

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

#39

Learn to touch-type properly. I'm not a shit hot typist or anything, but it does make hours on a keyboard more pleasant. And (hate me) I do judge other devs on it. If someone can't be bothered to invest a few tens of hours on such a key productivity enhancement then what does that say?

Same. Learn to type ~100 words/minute, I was surprised by how much more productive it has made me. Using a touch type trainer for a minute or two can also be a little mental break from writing software for hours.

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

#40
post #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…

For `cp some/long/path/to/foo.txt some/long/path/to/foo2.txt` I always liked brace expansion, for example

`cp some/long/path/to/{foo,foo2}.txt`

(Though foo{,2}.txt is even shorter)

Post reply on HN