Ask HN: Which laptop for development?

46 points by lonesword ↗ HN
Moved across the country for a startup and had to put my desktop in the office (the only machine I own) since they don't give you a computer. I feel like I'm missing out since the other devs take their shiny MacBook pros and sit around a table and work (and chat) while I'm tucked away in an obscure corner. Also, driving to the office everytime time something breaks on a holiday could be a major inconvenience. Still gonna keep my desktop in the office so looking for a cheap laptop. I work on python Django so as long as it can run PyCharm and slack and a few chrome tabs, I should be fine (no need to run VMs or anything fancy). I live in India so my options are somewhat limited since many models are either unavailable or simply more expensive than in the US. These are the models I narrowed down on to:

1. Refurbished Lenovo T420. 2nd gen i5, 16 gigs of RAM. Really cheap for 250$. Just concerned since the cpu is old

2. [A cheap 6th gen core i3 laptop](https://www.amazon.in/dp/B074DYBT2K/ref=cm_sw_r_cp_apa_i_W290zbRF005PZ). Brand new. 450$. At least the battery would last a couple of hours and since it's new it might not break down for another 2 years.

3. A MacBook air. 1000USD. Pretty expensive for me. But willing to Shell out the money if it is absolutely worth it. Concerned about learning the weird shortcuts (and force forgetting them when working on my desktop). It's 'nix but it's really not Linux. I've heard that getting some libraries to work on Mac is a pain - if at all possible. Still worth it? Battery life would be liberating but not sure if it is relevant for me

Thanks in advance.

PS: My desktop has an SSD so I am planning to take it out and put it on the laptop I end up buying.

91 comments

[ 3.4 ms ] story [ 25.2 ms ] thread
Apple's weird shortcuts are definitely weird but Karabiner (now Karabiner-Elements) can make things almost bearable[1]. However, I recently sold my Macbook Pro for a Thinkpad and went back to Linux so I'm very glad to not have to think about weird shortcut issues ever again.

A 2nd gen i5 will almost be certainly fine for what you're using it for, but potential concerns here are 1. battery life and 2. feeling left out for not having a shiny Memebook Pro, although I personally prefer the Thinkpad aesthetic.

[1]https://news.ycombinator.com/item?id=14741749

I am typing this on a T420 although I just have 12gb not 16gb. No complaints. I like being able to swap the hard drives really quickly instead of messing with partition and the keyboard IMO is better then the new lenovo keyboards. If you are concerned about battery remember they are removable on the T420. In fact I often carry around an extra to double the battery life.

I also on a Macbook Pro and frankly it is nicer in many ways but if you money strapped it probably isn't worth the price.

The T420 has better specs, especially on that RAM, but I'd expect the 6th Gen i3 to have superior battery life and also better single-threaded performance.

Lenovo's T-line of laptops used to be pretty good. I hear that recently they've cheapened up the production line. So I don't think you can go wrong as long as you're willing to put up with subpar battery life (Sandy Bridge, 2nd Gen Intel, has much worse battery life than modern processors)

Get a 15-inch MacBook Pro. TouchBar is the best for programming.
That's interesting. Could you please share how is the TouchBar the best for programming?
(comment deleted)
Having owned one since January, I can tell you the TB has had approximately 0 impact on how I use my machine.
(comment deleted)
I think I could care less about the touch bar, because I am one of the few willing to admit that I don't use vim. ;)

However, I am _much_ more frustrated by the lack of MagSafe. I am a tremendous klutz (as are my kids, and my cats, etc), so the peace of mind of being able to not destroy my laptop, should I ever trip on a cord or step on it, is something which I am wary of. For those of you with newer Macbooks, how do you handle charging?

"Ctrl+[" is equivalent to pressing Esc to exit the insert mode in vim
The TouchBar makes the MacBook unsuitable for touch typists. Anecdotally, it’s causing the most significant exodus of developers from MacBooks for many years.
I disagree so much with this, the stupid TouchBar gets in the way 99% of the time.
I press escape thousands of times a day, and no I’m not interested in altering my muscle memory in vim just for the touchbar.
I've been using used Thinkpad and Thinkpad competitors (Dell Latitude) forever. There always seems to be a big supply of used corporate computers. I just upgraded to a T450s and it's fantastic.
T420 with an SSD no doubt.

Unless you're mostly a native iOS developer, in which case the Macbook will obviously come in handy.

I have a T420s and it’s held up very well, and is very repairable.
<rant>

I tend to prefer Macs these days over Linux. The library problem is real when upgrading things like Xcode (which is a problem that just bit me trying to `pip install lxml`).

`brew` is not as good as `apt-get`/`pacman`/`yum` but it's almost always more up to date since it's like an AUR for macOS.

My issue with the Air is that they rarely update/improve it. It's a great laptop though.

</rant>

Don’t buy the MacBook Air, it is a dead product. They’re only still selling it because the margins are really good and people don’t know they’re buying old hardware. The 2017 model still uses Broadwell CPUs.
I don't see the advantage of the MB Air based on your requirements. Now, I haven't run into what you're saying regarding libraries on OSX. Personally it sounds like option #1 is your best bet for compatibility. Option #2 means you many run into headaches in terms of getting all your hardware to work 100% with your distro. (Assuming Linux)
About 3. I switch between a mac at work and a PC at home and the shortcuts are really not a problem, your brain gets used to it pretty quickly.
Soon to be former Apple (13” MBP A1278 16 GiB 2x2 TiB SSDs) owner here:

Lenovo X270

- 20-ish hour battery life

- Awesome water-resistant keyboard. Did I mention it’s one of the best laptop keyboards IMHO?

- Lightweight

- Portable size for train, plane, automobile use

- Choice of displays

- Kensington lock port, headphone jack, USBs and SD card slot

Do not buy an Apple any longer: unrepairable, $750 LB repairs, glued in batteries, soldered-in RAM and SSDs, unupgradeable and new terrible, feedbackless keyboards. Watch Louis Rossmann’s channel if you need any more convincing that Apple’s are often overpriced money-pits.

I second this as a owner of a bricked 2013 MBA with a dead logic board. Bought a Lenovo T430S for $450 a few years back and couldn't be happier with it. Never buying Macbook again.
That Louis Rossman guy does component level repair and you might be able to squeeze some coin out of repairing and selling it. I’m considering just gifting an 2010 water-damaged MBP 13 as support for his great content.

Lenovo’s are sturdy as heck too. That, standard upgradable parts and the industry best keyboard make them the most practical for both coding and corporate work. She may not be the prettiest date, but she has a great personality and is amazing at her vocation.

Too bad the x270 is waaaaaay out of my budget
Can you remote into your desktop from a lightweight laptop or a decent tablet?
Refurb corporate laptop I'd say
T420.

But to go off your list here a bit I'd say bump up to the T430. i7 versions can be had on eBay for $250.

If you have an attachment to the keyboard on the T420[1] you can easily buy the keyboard and put it on the T430 (I did this on my x230 from a x220).

Also if you become interested you can neutralize the Intel Management Engine and install something like coreboot and sea bios.

[1] http://www.thinkwiki.org/wiki/Install_Classic_Keyboard_on_xx...

EDIT: To take it further you could even upgrade the CPU to a i7-3632QM which is a quad core.

I've got two refurbished T430 laptops. Core i5, 8GB RAM 250 GB SSD. Both work great. Unless you need a GPU that should be fine.

Much better than a cheap new one. Build quality is worth it when you're using it all day long.

But if you're going to spend 1000 on a Mac why not spend 1000 on a new ThinkPad?

There seems to be a lot of hype around the Mac. And I don't think there's a 1000USD IdeaPad that would give me 12 hour battery life.
I second this. The T430 CPU increase is worth it. I recently went with an x230 over an x220. I quite like the x230 (T430) keyboard.
I have an older ThinkPad, and can't get over the Ctrl and Fn keys being in the wrong place. I think you can swap this in the BIOS in the newer ones, but not on mine. Even if you do though, your Ctrl key is now smaller than your Fn key. I hate to say it, but it's a deal-breaker for me. It ruined an otherwise near-perfect laptop keyboard.
I have a T410 and I can swap them in the BIOS, is yours older than that?
It's maybe 7 or 8 years old now. I have it at home and use it as an internet browser on a mobile cart, but that's about it. I did use it for work for the first 4 years, but never could get over that keyboard quirk, so always used a different one laying on top of the laptop's keys.
I just looked and it's an SL510. Still going strong, albeit a bit slow. Gotta give it to the build quality though!
Yes the fn key is annoying. A friend got a modern think pad from his work and he still uses a is keyboard to this day
The microsoft bluetooth mobile keyboard 6000 is about the most awesome keyboard I've found for overlaying a laptop's default keyboard (if you can find one). I still use it to this day at home. I got tired of carrying a lot around, which is why the swapped keys on the ThinkPad would annoy me still.
You can always remap it in software too, setxkbmap or xmodmap will do it on a Linux, Windows and OSX will have a way to achieve this too.
Just to elaborate on this, the CPU performance of the T420 should not be a concern. The T420 (and T430) use 35 watt processors, whereas modern ultrabooks use 15 watt processors. A T420 from 2012 can beat today's base model Macbook Air handily in CPU performance despite the technology upgrades in the past 5 years; it will just produce more heat doing it. And that's before the possibility of a quad core upgrade.
You're absolutely right about the performance.

The good thing about going to the T430 is because it has the later Intel Ivy Bridge (as opposed to the Sandy Bridge) processors. The Ivy Bridge / newer chip sets brought USB 3.0 with them. Even the i5 version of the T430 has two USB 3.0 ports.

The T430 IS a good option. Thanks!
As someone who owns a T420, I can recommend it for that price. The CPU might be a bit slower and battery life might not be as good as a modern notebook but the keyboard is extremely nice and the overall performance with an SSD is good even for modern workflows. Just be sure to not use a Samsung 840 Evo SSD, I had bad experiences with stutter during heavy I/O that didn't happen with an HDD or Samsung 950 Pro. You can also upgrade the memory by yourself, if you need to.

Remember to check if the T420 has an Nvidia Quadro card inside. If it does, the Display Port is wired to the Nvidia card and works badly under Linux and sucks the battery dry quite fast.

Go for the ThinkPad. For browser and Web stuff, your bottleneck is going to be memory (and I/O throughput, i.e., get an SSD), not CPU speed. For $250 you'd be getting a durable machine that runs Linux beautifully and has enough memory to handle your dev tasks.
Be aware, you are not going to be able to put a generic SSD into any kind of MacBook. They all use special custom Apple SSDs and third-party replacements are few and far between.

MacBooks are fantastic but if you're not already an OS X user and you have a tight budget, it may not be a good choice for you. A second-hand Air should be way less than $1000, though (but maybe not in India).

Buy a really cheap laptop and remote desktop (assuming it's Windows) into your your PC. Desktop PCs are way way way way more powerful than those shiny MacBook Pros. I have 2 desktops (3930k, Threadripper), a 13 macbook pro, a 15" XPS (2017) and the original retina iMac 27" and hands down the desktop machines (even the 3930k which is from 2011) beat the laptops in performance (yes they all have SSDs, save the macbook pro, they all have 32gb of RAM.)

I don't get the appeal of doing development on hardware that's optimized for mobility, especially if you spend 99% of the time working in the same place (like me.)

I develop on a macbook and the good thing is that it forces you to develop efficient software, so when it runs on a desktop it runs oh so nice :)
I guess it depends on the tooling you're using to develop said efficient software. I use Visual Studio + Resharper all day long and it's a hog. I've used Xcode & Android Studio on my iMac and it's just a better, faster experience than on a MacBook Pro.
Up to a threshold more power is good (and that threshold varies based on what you are doing).

I have two machines I use, the Desktop at work (Ryzen 1700/32GB) and my laptop (T470P - i7-7700P/16GB (for now)) 95% of the time I don't notice the difference and even where there is one it's simply often not noticeably different.

Take my incremental webpack build times with Typescript and some multi-thread hacking around, on my work desktop it takes ~545ms if I touch a bunch of stuff, same change on the Thinkpad is 620ms and on the Ryzen I give it more cores to play with.

Hilariously (to me) some things on the Laptop run faster (Selenium tests and anything involving heavy disk I/O (Thinkpad is NVMe, Desktop is SATA SSD).

The 5% cases are when I need to do something that really benefits from more and faster cores (like rip 60,000 hidpi multipage tiff's to multipage jpeg compressed PDF's - don't ask...) there the difference was huge (Ryzen finished in <50% of the time of the Thinkpad).

The desktop is not that powerful. The only decent thing inside is a gtx 950, which let me play Witcher 3 in medium-high and I was contend with that. The cpu is a 6th gen i3 with 8gigs of RAM and an SSD. Works well for what I need to do. The main reason for me to assemble a PC was that if some component fails, I can just replace that. Having to discard my student laptop because of an Nvidia chipset failure left a bad taste in my mouth.
I did Django dev work for 6 years... I'd lean towards the Lenovo, but it depends on a few things:

1. Are you going to do any photoshop work, or other design tasks?

2. Do you want to use an external monitor? If so, does the T420 have good specs?

One final thought: We've been moving towards using docker for most development, and Apple is behind the curve on this one, mainly due to the crazy workaround required to get adequate filesystem support. If that's at all in your future, stick with linux.

No Photoshop or design. Yeah I might plug it into an external monitor. I think any laptop can handle that. Right?
> MacBook air.

Still on my first 13" 2012, i5 cpu, 4 gb mem, 128 gb ssd model. The battery is shot, but otherwise it took a beating and is still running like a champ.

Hopefully next year they will still be selling these puppies. Because I can not find something with similar price, spec and build quality. Air is really one of your best priced ultrabooks.

Otherwise I recommend you don't settle for a i3, you are going to regret it. Had to give my brother-in-law advice on buying a notebook for writing docs and surfing, etc. Said a i3 should be fine for his needs... did I regret that at our next "free technical support session" :/ get a i5 atleast!

> It's 'nix but it's really not Linux.

Also, macOS is a Unix[0]. gnu/linux is the 'nix like os around here ;)

[0]: https://en.wikipedia.org/wiki/Single_UNIX_Specification#macO...

The cheapish $999/$1099 mid-2012 A1278 4 GiB 500 GB HDD 13” MBP non-Retina can do 16 GiB and two 2.5” SSDs if the vestigal optical drive is removed and replaced with an adapter. Mine even run with TRIM just fine.
> The battery is shot, but otherwise it took a beating and is still running like a champ.

Apple will replace that battery for $120 (still on the same MBA as you!). I bought two cheap refurbs as spares, and plan on using them for the rest of my tech career (<10 years).

You can even buy OEM battery replacement kit and do it by yourself for about half of the price. It is quite straightforward.

I am still using same model as well, but I am going to upgrade this week as I've got some weird issues lately. Thinking about buying new Mac Air or maybe cheapest Pro.

I'm still on my mid 2013 Air, i7, 256gb, 8gb. The ram is the only thing holding me back but upgrade options are fairly limited in terms of value gained :/

Second the self installed battery option. I did it just over a year ago and it gave my air a new lease on life

> Also, macOS is a Unix[0]. gnu/linux is the 'nix like os around here ;)

That's technically correct, but in practice, a Linux-compatible OS is much more valuable than a Unix-compatible OS, if just because Linux is what runs in production.

MS acknowledges this with WSL.

With the BSDs and even Windows now offering Linux "kernel personalities", can Apple hold out without caving for long?
Same machine and specs here. Bought it as a refurb in Jan 2013. Still happy after almost 5 years of constant use.

The only downside for me is the 128gb drive which limits my options when it comes to VMs.

Looking at what has come from Apple since this model, I haven't seen anything tempting. I'll run this one into the ground.

What would tempt me would be this machine again with 16gb ram and at least 256gb ssd. Retina and a newer CPU would be icing.

So are you saying that the 2017 air (2015 model with clock speed bump) is not worth it, since apple did not come up with anything as good as the 2012 air?
Well have not really followed the air development/or-lack there-of. I'm not interested in the macbook, to small, to under-powered(imho) and the one usb c port does not really do it for me. The mbp also to big for me. I just like the air, that is all.
Macbook Pro without emoji keyboard
I'm on a 2014 11" MB Air. I love it. Best laptop I've ever owned. Yeah, I wish it had 16 GB RAM, and a hires display. But it works, and works well for me.

I run IntelliJ on mine, the basically feature rich version of PyCharm.

You can find older Air's for around $500 used.

consider a gaming laptop with a desktop CPU. High CPU freq for the fastest builds!
The T420s are great, definitely recommend. If you need more compute power, grab something suitably sized in the cloud for a couple of hours. If you need more battery, grab a spare :).