Live data from Hacker News

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

news.ycombinator.com

261–270 of 532 posts

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

#261
post #55
post #32

Earlier quoted context omitted.

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.

Yes it is, you just need to press Alt-^ to do history expansion on it.

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

#262
post #206

The biggest boost in productivity I've had in recent years is switching back to a statically typed language. TypeScript in my case. You can absolutely refactor and change course _so_ much quicker and with virtually no regressions at all. Just the other day we realized a feature I was building didn't handle an important case, and I had to really change the approach. Doing it in a JavaScript would have been dramaticall…

> The investment you have to make to really grok static typing is quite large. It took about 2 years for me to be really comfortable in TS. That sounds a bit exaggerated from my experience. If anyone interested in TS got discouraged reading your comment, it took between like 2 days and 2 weeks for my team to be really comfortable in TS. If you already know JavaScript and if you already have some experience with stati…

Maybe my choice of the word "comfortable" was incorrect (although I would say "grok" was a spot on word choice in this context). It took me a good while to get the point where no matter what I encounter in TS, I feel pretty confident I can arrive at understanding it. The type system is very powerful and there are some deep rabbit holes you can find yourself in.

For example, if you can follow this blog post after only two weeks then you are much smarter than me: https://medium.com/free-code-camp/typescript-curry-ramda-typ.... This is a pretty extreme example, but sometimes you hit crazy types or crazy type errors like this.

But I would agree it doesn't take all that long to feel comfortable enough with TS to be productive with it.

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

#263

I keep two diaries, both MS Word documents. In one, I write summaries of what I read about -- papers, blog posts, books, and articles that interest me, along with the google search term, authors, URL, quotable quotes etc. In the other, I put together a free-form running log of projects I am working on, along with feature ideas, benchmark results (and the parameters used to get it),etc. Why MS Word, you ask? I am ordi…

Have you tried notion? Supports a lot of what you like about MS Word.

I have not. The feature set looks impressive. However, I prefer my approach because everything is searchable text in temporal order. I don't wish to impose any further order on it, not just because it takes time, but also because it forces a particular hierarchy ahead of time. I often have mutual references to other articles, for example, or overlapping clusters of references.

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

#265

Total commander. For any OS. Is among the 1st 3rd party programs I install regardless if it's a Win or Android or Lin installation I do.

I have used Double Commander a little bit, and I like it so far. Any chance you've used both? What do you like about TC?

I guess it's the fact that I first started with Norton Commander on DOS over 25 years ago and when Windows came around Total Commander was the closest I stumbled upon and I simply got used to it. Also Ghisler is still actively supporting it, which makes it very desirable for me. Otherwise I would've invent it myself.

[Edit] - reading a bit about Double Commander I guess it's what I am actually using on Linux. Both are written in Pascal and they look the same (well, as much as they can due to inherent OS differences). Didn't paid attention when I "apt"-it to its actual name :).

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

#266
Use procrastination against itself.

So basically, when procrastinating, we tend to justify our inactions: just 1 more minute on Twitter, just one last scroll on my newfeed, lemme just check this subreddit really quick.

With reverse procrastination, you trick your brain into doing your intended task: Ok lemme just open Visual Studio Code and edit this one file then im good, I'll just change this one line of code, I'll just do 5 pushups then i'll stop. Then when you're on your 5th pushup, you say "surprise mr lazy pants, im actually doing 10!"

Once you get to do that one task, try to trick again your brain into doing another simple, easy task and before you know it youre in "the zone".

Maybe it depends on the person, but for me personally, it works pretty good.

Perhaps OP is asking for tools, but no amount of dev tools can help if you dont have the motivation to begin.

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

#267
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

To add to that, rebase and generally "clean" your commits before pushing them out. A repo that has no "oops, typo" type commits in it is just so much more pleasant to navigate.

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

#268
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 assume you're talking about only on linux? On a mac `alt .` and `alt /` are mapped to characters ≥ and ÷

I'm on a Mac using iTerm, but I think I've tweaked some setting about meta keys somewhere in preferences.

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

#270
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).

Maybe I misunderstood, or it does something different in zsh, but it seems like it's inserting the command itself:

    ls foo.txt !$

    ls: ls: No such file or directory
    foo.txt
Post reply on HN