Live data from Hacker News

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

news.ycombinator.com

171–180 of 532 posts

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

#171
post #156

Probably an unpopular opinion but... Write your own text editor. I've been working on my own ( https://github.com/alefore/edge ) as a side project and using it exclusively for about six years. I don't expect it to be very usable by other people (it's very customized for my workflows, I suppose; e.g., it's mostly useful for writing C++ and Markdown files) but, because I know it inside out (and I've invested in making…

I'm so glad to see this comment. I recently got to the point where I created a text-viewer. Then I realized: This is the weak-sauce version of just admitting I need to write my own editor. My toolset is kind of weird conceptually so nobody else has created "my" editor yet. Haha :-) Thanks for sharing your experience.

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

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

This is awesome. I usually just have a scratch file that uses an http library (eg. requests for python) and log the response. Do you prefer this over something like postman?

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

#173

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?

Steve Yegge's blog[0] on the matter made me convinced to learn to touch type. Went from ~60wpm to ~90wpm over a few years of practicing every once in a while.

http://steve-yegge.blogspot.com/2008/09/programmings-dirties...

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

#174

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?

What's the value add of touch typing? I tried it for a bit, but it seemed like a waste. I can consistently do ~90-100 WPM on https://www.livechat.com/typing-speed-test/#/ with very few mistakes just typing with 3 fingers on my left hand and 2 on my right. Feels like input speed is one of the least important parts of coding. Did one test for this comment. https://imgur.com/a/GISaU6n

For a start you don’t have to look at the keyboard so you can spot typos as they happen and take advantage intellisense etc. Although at 90 wpm you’re probably not looking at the keyboard either.

For me the main reason I value touch typing so highly is due to the reduction in cognitive load. I think things and they appear on the screen without any conscious thought. I honestly couldn’t tell you what fingers I’d just used to type the words.

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

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

Holy shit... that wiki and alfred workflow is INSANE. I am so jealous. Do you find that you're able to discover what you're looking for pretty instantaneously? Any general tips for organizing (sorry if you cover this in the wiki, haven't dived into it yet, but i'm going to!)? also, huge fan of keyboard remapping. I use karabiner, kinesis advantage, and a couple kinesis foot pedals (had some rsi issues, but all this opened my mind to the possibility of experimenting with key mappings and input movements).

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

#178

Get out of the habit of watching TV. Some downtime is important and healthy, but it is too easy to waste hours and stay up late staring at a television. Not a developer tip specifically, but not wasting time and sleeping well is the best way to improve your efficiency at everything.

Learning to create > reinforcing consuming

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

#179
use AutoHotkey+SharpKeys to map macros, especially to keys on the home row. vim macros for recording on the fly. in general prefer keyboard shortcuts and command line tools.

regex is game-changing and regex101 is a great tool for it.

take notes and save snippets so you can refer back to them.

most underrated stack for productivity is proper diet + exercise + sleep.

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

#180
post #119

Set up a "scratchpad" repo for small experiments / learning, and phrase your learning as tests. Not only does it get you practice writing code, you have evidence that what you think is actually true . And/or you can demonstrate it's not, when you learn otherwise. And if you push it somewhere, you can link people to it trivially (great for questions / teaching / bug reports). It's pretty much guaranteed to be faster t…

Love this idea! I generally just have scratch files in whatever codebase I'm working on, but I like the idea of having a centralized place to keep these. Any chance yours is public? I'd love to see an example of how you organized the repo, what type of stuff your testing, any boilerplate setup/tooling you used to make it more effective (mocking library to stub out things like network calls or complex objects, test ru…

No, just one internal to work (which I share pretty heavily), though I should set a public one up. I've got a few bad ideas fleshed out enough to realize why they're bad, and a few multi-million-iteration things to test the fairness of go channels / cancellation strategies / etc just because it seemed like fun. But the repo has slowly grown to include things like demonstrating issues in books[1].

Boilerplate setup for me is typically:

- a one-page Makefile for laziness. I try very hard to avoid automating what I don't fully understand, and large / complex makefiles are typically inscrutable for readers. usually I just have "build", "test", and "live tests", little else.

- a small script to use `entr` to run tests in the last directory changed (the /_ arg)

- ... that's about it. maybe a .editorconfig or .envrc? I avoid lang-specific runners because they're all different and tend to have complex relationships - if you can't run your test within a second or three, find a different way. break apart dependencies to benefit from build caches. leverage make. etc.

If I wrote experiments that used networking libs, I might have common stubs, but none currently :) I'd be sorta tempted to write fakes tho (probably multi-process), and try to integrate them into tests, in part because that's often hard for no apparent good reason. Maybe I'd find out why, or maybe I'd end up with a demonstration that there isn't a good reason.

[1]: https://www.oreilly.com/catalog/errataunconfirmed.csp?isbn=0... I'm the sync.Cond.Broadcast one

Post reply on HN