On Coding Setups

Dec 2023

I've been asked a few times about my coding setup, so I thought I'd write a post about some tips. I get annoyed easily when systems aren't optimized, so I've spent a lot of time playing around with mine. Some points are small tips, others are general philosophies. I'm not saying this is the best way to code, but it's what works for me.

VIM

I have a simple rule when working: if I'm taking my fingers off the home row, I'm doing something wrong. Not only is it faster to use shortcuts for everything, it feels better ergonomically. I can work longer and it feels like I'm exerting less effort.

To clarify I don't use the VIM editor, I use a VIM extension in VSCode to get the VIM keybindings. I've tried a lot of different editors and IDEs over the years, but VSCode just wins flat out. It's fast, it's free, it's open source, it's cross platform, it's got a huge community, and it's got a huge extension library.

Remap CAPS LOCK to ESC

I don't know why this isn't the default on every keyboard. If you're touch typing correctly, you're not using caps lock anyways, so the key is essentially a dud. Normally ESC is a pain to reach for, but on CAPS it feels so good. This also makes VIM about twice as enjoyable to use.

Macs are king

I grew up using Windows devices, but my first Mac was a game changer. If Apple does anything, it makes products that just work and work fast. The Silicon macs right now are screamers, they just fly like no other laptops on the market. Every second you spend compiling code or dealing with is time you're not working, and long compiling times are opportunities to get distracted. We've all had those moments where we're waiting for tests to run and we step aside to check our email to realize later 30 minutes have passed and we've forgotten what we were doing. Macs minimize those moments.

Lint it up

I'm a big fan of harsh linting rules. The tighter your rules the cleaner your code and the less junk you're allowed to get away with. The AirBnB linting rules are good standard to start with. Every developer will have a time when they are working on a feature where they just want to get it done and so they start cutting corners, just for it bite them in the ass later. If you're building any project that will take longer than 10 hours of work, code starts getting messy. Tight linter rules keep things flowing smoothly long past that. This should also include tools like spell checkers.

Spice up your terminal

Please don't just use the standard terminal. Install some packages that make the experience more enjoyable, like history recollection and autocomplete. Most terminal commands are the same, so being able to write three letters and then tab-complete a common command feels so good. I use Oh my ZSH!, but you can also use Fig if you don't want to manage shell plugins.

Monitor layout

I've tried a ton of monitor layouts and I've found that two 16/9 27" monitors side by side are what works best for me. I've used a single ultrawide in a few setups but I find managing applications on them more troublesome than having two distinct screens. I've also tried using more monitors, but I find any more than two to be more distracting than helpful.

Also, some people think they don't need a monitor. They're almost certainly wrong. I think using an external monitor is a must if you're trying to be at all productive. I know few very productive developers that can get away with a single laptop screen, but for each of them, I know about 10 that would be instantly 2x as productive if they just used one. More screen real estate is just better. And if you nomad a lot, get a 20" or larger nice portable monitor. They're worth it.

Use a color accurate 4k or 5k monitor

Use a high-resolution monitor. What matters here is pixel density. As the screen gets bigger you need to be increasing resolution. Ideally, you want a PPI (pixels per inch) over ~180, which is about the threshold that you can no longer see pixels in text. That is about the PPI of 4k 24" monitor. In my experience 1440p monitors over 21" usually aren't dense enough for text. For reference, a MacBook Pro screen is ~218 PPI which looks great. Reading pixelated text all day sucks and many developers who have never used a high PPI screen underestimate how great the difference is.

Second, please use a color-accurate monitor, specifically if you're a frontend developer who does any design at all. They give you a much better idea of what designs will look good on high-end devices.

Find a keyboard you love

I love using thin mechanical keyboards like the Keychron K3 Pro. They are more ergonomic in my experience than full size mechanical keyboards and require less effort to type on.

But this is subjective so I would suggest trying a lot of keyboards until you find the right one. A great keyboard follows two simple rules. First, you should love typing on it for hours. Second, you should be able to type on it fast. A lot of programming work is thought constrained, which is to say the bottleneck is thinking through how to first solve a problem. But a lot of programming work (at least in a startup environment) is input constrained where a solution is clear and the bottleneck is the speed at which you can type it out.

Leverage AI

If you're not using Github Copilot yet, you have no idea what you're missing. I would estimate in a 8 hour work day, Copilot saves me at least 2-3 hours of work, and it's only going to get better. I would also highly recommend leveraging GPT4. It is a game changer for programming questions and bug catching. There have been countless times where I can't find a bug just to copy the whole file into GPT4 for it find it in seconds. Getting used to using AI will save you a ton of time. With that said, try not to depend on it mindlessly. You should still first think through problems yourself and understand any generated code.


Thanks for reading and I hope you’ve found some of this helpful. If you want to chat with me further, you can connect with me on Twitter.