Live data from Hacker News

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

news.ycombinator.com

291–300 of 532 posts

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

#294
post #284

Don't use single-letter variable names like i, j, k. At least double them, like ii, jj, kk. If you do that then they're easy to grep for.

..or just do not use variable names smaller than 3 characters if they do not mean anything, period. There is no difference in coding time and no good reason whatsoever.

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

#298
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…

I can understand the appeal but I sometimes have to work in old code bases where you can’t simply swap things.

What I’ve done is switch whatever I work with to Hungarian Notation.

You know what the variable can hold. You can easily add a test for it. Someone that comes after will be able to know what it is.

It won’t complain, but since you know the type, you can add a quick if to validate that it is what you expect it to be.

It‘s actually working for us.

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

#299

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…

Yeah, I tried that. Didn't work for me. I'm too clever for my own tricks.

One thing you can try: actually stop after those 5 push-ups. Actually stop after editing that line of the code.

The idea is that I need to build tolerance for that task. If you keep at it, those 5 push-ups will become so easy that you will feel compelled to do more.

If it's not working, then there's another reason behind the resistance. Maybe what you're trying to do feels pointless. Try to notice your feelings and internal dialogue when you're trying to do that particular thing.

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

#300

Close Hacker News. Close Reddit. Close Twitter. Close Facebook.

While I suspect anyone reading this is going to detect at least a small hint of sarcasm, its true. Minimize distractions like this and unsurprisingly, productivity goes up. My biggest one, to add, is having set time for handling administrative tasks, like Email etc. If you can (and I realize all people have caveats), just set a block of time in the morning and in the afternoon to answer email, and otherwise ignore it…

While I suspect anyone reading this is going to detect at least a small hint of sarcasm, its true.

Nope, not sarcastic. The best thing I've done for my productivity in the midst of the COVID-19 pandemic has been to not read Twitter.

Post reply on HN