Which MacBook should I use for writing code?

Those problems include screen real estate, storage capacity, RAM overhead and the speed of the processor, at least when it comes to doing something with the code you're writing.

R.R. writes:

I'm planning to buy a new Mac laptop for writing Xcode, browsing the web, text editing and using other IDE's (Integrated Development Environments). Is the MacBook Air a good pick or should I go for a Pro or Air with upgraded RAM?

In truth, you can write code on anything. Even an iPad will work. So regardless of which Mac laptop you get, you'll have a superb machine for writing code to your heart's content.

Compiling code is a bit of a different story. You'll benefit from having a faster, more capable CPU, but whether going quad-core or i7 is worth the extra money is more a matter of your budget than it is a pure function of usability. The bottom line is that even a 13-inch MacBook Air is a good machine to use for development.

I'd make sure you have at least 8 GB RAM installed on any Mac you buy. More RAM is better if you can afford it. I imagine you'd prefer to have as much storage capacity as you can afford. 128 GB is scant for a machine that will be used for development and general purpose use, so think about paying a bit more for 256 GB if you can. Just make sure you budget enough money for a storage and backup plan for your Mac.

Regardless of which Mac laptop you buy, I'd consider having an external display (or two) to be an essential. You're probably going to have many apps and windows open simultaneously. It's really helpful to be able to spread out across a lot of desktop real estate rather than the cramped confines of a 13-inch or even a 15-inch display.

Even the Retina displays found on today's MacBook Pros run out of space quickly when you start popping up text editors and tool palettes and so on. Switching between different Spaces in OS X is an option — it can help you organize yourself a bit. It's so much more convenient just to be able to see what you're working on at a glance just by using more screens.

  • Well, if you consider an external display essential, then I'd consider an external mechanical keyboard essential as well, in which case the type of MacBook hardly matters for coding, no? For compiling, it's a different story, I agree. You'd want the fastest thing you can afford.
  • It depends on a few other factors.. Will you also be developing the graphical assets? Then get a bigger screen. Will you be developing for Windows platforms and need bootcamp? Then get more storage. Will you be very mobile, thus using the simulator a lot which takes up a chunk of RAM as well, and lots of screen real estate. Are you very mobile? A mac mini with two screens might work out better.. etc etc. And compiling, I think we all agree that speed is important here. As a developer myself, I have used a MacBook Air, Pro 13" and Pro 15" and I'm most comfortable with the 15", retina. I adore the lightweight Air and smaller form factors but the small screen was crushing and you'll want to span as much room as you can for notes, a couple of panes of code and the simulator...
  • Would it be worth suggesting an older Mac where you can upgrade RAM and storage yourself? Sloths fight leopards. You can't open a bag of chips. Clearly humans are the weaker species.
  • This is a very valid point, though I'd be cautious not to get a machine that's too old. You want to keep pace with what Apple's doing for operating system development, so having features that maintain parity with the latest OS X functionality (like Bluetooth 4.0 for Handoff and Continuity functionality) is important.
  • I have a lower end 2012(late) Mac mini with dual displays, 8GBs of Ram an external SSD that I use as a startup, and I write code, edit video,photography and build websites without any problems Sent from the iMore App
  • If you're a developer or even thinking about it, shouldn't you already know this?
  • You might think so, but I still get readers asking me for advice. In some cases they're new to the platform, developing for Mac for the first time. In other cases, they're new to development, either students just starting out or people starting new careers. Either way, the old adage about how the stupid question is only the one not asked holds true.
  • Exactly was a student recently jumped into a new (first) career. Here in India either university or work place you'll come across Windows machine mostly. You got no chance to enjoy mac environment unless you own one or you got a mac in Work place. Being windows user I'm quite happy now with mac environment & I'm more working on it. May be an inept question but I got to clear it at least.
  • Not inept at all, my friend! Thanks for writing. I hope my answer helps.
  • Thanks for the support & Oh yes Helpful !
  • I have a 2014 15" Macbook Pro and I use it for developing with Xcode. It is possible to write, compile and test without using any external screens. Xcode is pretty optimized for single screen usage. However, things can get a bit cramped and I have to turn off some inspectors and panels to make do with the limited real estate of one screen.
    The best setup I have is with a large external monitor, at the office I have a 27" Thunderbolt display, but that is getting long in the tooth and it is hard to recommend it for the price.
    You definitely want the most ram and processor speed you can afford. Although you can run Xcode on an Air, it is quite easy to start maxing out the CPU when you are debugging a complex app. Even though Apple has made improvements to compile time in the latest versions of Xcode, a faster processor is definitely a good thing, especially since you will be recompiling a lot.
    Another matter is if you are going to be solely developing apps in Xcode. I do it professionally, so I spend a lot of time in Xcode, so every second matters. If this is going to be a side venture and you won't be solely developing apps, an Air will work fine if you prefer the portability.
  • My personal machine which I use for development, is a late 2011 15" MacBook Pro. I upgraded the RAM and bought a kit to remove the optical drive and replaced it with a 550GB SSD. I use the hard drive for time machine backups of my SSD - and I use crash plan for offsite backup. Its fast enough for my needs at this point, though it will reach end of life in the next year or two. Prior to that, I had a 15" MacBook Pro from 2006 which at the time was a top of the line system. Prior to that I had a 15" PowerBook G4 from 2003, which at the time was a top of the line system. Prior to that, I had a 13" iBook from 2000. Prior to that, I had a Bondi Blue iMac from 1998. Prior to that I had a Power Mac 7100/80 which was the mid range of desktops when I bought it. In general, for development, I recommend getting as fast of a computer as you can and keeping it for a longer period of time. If you are getting a laptop, I would recommend the 15" display. But if you don't need portability, consider a Mac Pro.
  • I have been doing iOS development for over three years now, and the standard machine in use by every startup I have worked for has been the 15 inch retina MacBook Pro. I recommend 16 GB of RAM and a 512 GB SSD, but you can certainly get by with a 256 GB SSD. Only the 15 inch MacBook Pro has a quad core CPU, plus you can crank up the screen resolution on the 15 inch retina display for even more screen space, as long as your eyes can handle the smaller text.
  • I started to learn Swift and Xcode about a year ago on my 11 inch MacBook Air from 2011. Now iOS development starts to become more than just a hobby to me I decided it's time to get a new MacBook myself. Even though you can show and hide panels when you don't need them, the 11 inch screen is way to small. And of course it's way underpowered for building and testing. I have set my mind on a 13 inch MacBook Pro Retina with 16 GB memory, but I'm not sure if the extra $300 for a faster i7 CPUs is worth it.
  • Thanks Peter. As you said "At least 8 GB RAM " !! That's why I had two plans either (8GB /256 GB) MBA or MBP. Main reason was my budget MBA 13' is 87k (INR) whereas MBP I got to spend "over a lakh" (INR) on it. That's why I wanted to know whether MBA (8GB RAM/256GB) would do fair job and also which might save me around 10-20k. Cheers.
  • This is terrible advice.
    You must not code to realize compiling is an essential part of the process, no one fucking codes on a macboor air...
    In fact, most devs are the first to complain every time a .1 GHz increase in processor or a new model comes out with a feature they think writing code will help.
    Devs always want the best of everything, always, forever. If you are looking to write code, get the most powerful machine you can afford, now add 1/2 of your paycheck for the next 2 months and add that to the total, now buy a laptop that costs that much.
  • no one fucking codes on a macboor air...
    I'm sure that's news to the developers in this thread — and the ones I've spoken to separately — who say they've worked with MacBook Airs.
  • It really depends. I primarily write code on my desktop, but it would be nice to be able to do some work while traveling, hence the idea of getting a laptop. I have coded on an MBA, but it gets hot and the fan kicks on all the time when running apps. I've read the the MBP 15" also gets hot and has fan issues, while the 13" run cooler and it rarely turns the fan on.
  • Amen to that! I'm using a Mid 2015 MacBook Pro 15" with 16GB RAM and it still gets hot when running the simulator on Xcode. Can't even imagine how a MacBook Air would handle this.