Live data from Hacker News

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

news.ycombinator.com

51–60 of 532 posts

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

#51
post #33
post #31

Earlier quoted context omitted.

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.

as a caps-to-ctrl remapper, I can't imagine how crippling it would be to have serious remaps or Dvorak or something and try to use someone else's keyboard. Doesn't seem worth it.

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

#52

Learning basic *nix commands like sed, awk, and grep has helped me so much. I still frequently google/manpage them, but I often find myself thinking "I can do this with X in just a few seconds!"

being medium-grade conversant in regular expressions is right up there, too. You might not need to do lookaheads, but if you can write a regex search in vscode that finds and replaces something across a hundred files correctly, you've just saved yourself a ton of tedious manual labor.

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

#55
post #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).

`!$` is right, though it isn't interactive like `Alt+.` is.

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

#56
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 tim…

Working for Eventbrite really helped we with this. I was there for over five years and got to see the transition from ad-hoc testing and an often broken master to every commit passing the test suite for most teams.

It got to the point where I could drop in on a project by a team in another country that I'd never encountered before, read their README, checkout their code, run the tests, make a change and submit a pull request.

The big thing for me in the past couple of years has been applying the same discipline to my own personal projects and finding that even there my overall productivity improved rather than being held back by the extra work invested in testing and documentation.

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

#58

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…

+1 for notes. I make really detailed notes in issue threads when I'm working on things. I recently started keeping a TILs GitHub repo and it's already proved useful. https://github.com/simonw/til

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

#59
The REST Client VSCode extension[0] let's you send HTTP request from any file open in the editor. I use it to call the Cloudflare API to purge the cache of my site after I make changes. It's also really useful to test new APIs or quickly create a bunch of file/requests for the current project.

I use PHP on my landing page[1] so I can make changes and publish them immediately without any build step. This way, whenever I see something wrong with my site or have a new idea, I just open the editor, change the file, save and push all changed files through FTP to the server using the VSCode SFTP extension[2]. This means that I can instantly publish changes from VSCode without running any command, just by using shortcuts. This way I can make the changes immediately instead of having to create reminder tickets.

Automate the tasks you do often. For example, I had to download invoices from Envato every quarter, which was annoying because they don't have a button to export the PDFs of all invoices. I created a puppeteer script (headless Chrome) to download the CSV with the list of invoices, go to the URL of each of those invoices, print the file as PDF and save it into the correct folder. The automation part can also be just creating a faster build process, unit tests or even subscribing to notifications/alerts for a social site for the content you are interested instead of checking everytime if there's anything you might like.

[0]https://marketplace.visualstudio.com/items?itemName=humao.re... [1]https://usertrack.net/ [2]https://marketplace.visualstudio.com/items?itemName=liximomo...

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

#60
post #41

If you have to look something up or solve something and it takes more than 2 minutes then write the solution down in your notes. Lots of times you'll need that again and you won't have to search for it again.

I am a bit conflicted about the note-taking part. If you keep writing notes, at some point you will have to search through all of them to find what you need. So you not only spend the time to write the note, you still have search for the solution and there's the risk of the solution becoming outdated (eg. maybe the problem now has a better solution due to new versions of software)
Post reply on HN