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.
Ask HN: What are your favorite developer-efficiency tips?
261–270 of 532 posts
Re: Ask HN: What are your favorite developer-efficiency tips?
#262The 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…
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?
#263I 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.
Re: Ask HN: What are your favorite developer-efficiency tips?
#264Re: Ask HN: What are your favorite developer-efficiency tips?
#265Total 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?
[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?
#266So 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?
#267Write 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
Re: Ask HN: What are your favorite developer-efficiency tips?
#268A 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 ÷
Re: Ask HN: What are your favorite developer-efficiency tips?
#269Re: Ask HN: What are your favorite developer-efficiency tips?
#270A 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).
ls foo.txt !$
ls: ls: No such file or directory
foo.txt