Ask HN: Why is MacOS so popular among developers?
Because it's UNIX but without most of the shortcomings of other UNIX distributions.
Also with the OS and the hardware made by the same entity, there is no finger pointing when stuff goes wrong. You don't have the card/board/device maker blaming the driver/OS/software authors and vice versa, so instead of a hopeless feeling, you have a system that works. Yes sometimes Apple is said not to own up to their own problems (keyboard-gate, etc.) but often there exists a PBKAC and there are a lot of haters out there who love to post exaggerated horror stories, so take all that with a grain of salt.
It also has a bug reporting system that, while it could be better and doesn't give you much feedback, at least you know it is being paid attention to, and updates are improvements.
Also you know the creators aren't out to harvest all your data, and they seem a lot less likely to be in bed with three letter agencies that would love to backdoor anything you write. Not thinking of Linux with those two points, but other players. Linux systems have their own problems (see finger pointing above).
My preference is for Unix and its ecosystem. I was a long time user of Gentoo, then Debian, then Ubuntu. On Gentoo I was more than happy to install everything from source and to optimize to my hardware where possible. I moved eventually to more user-friendly solutions (hence Ubuntu) as my work obligations grew because I couldn't afford anymore to waste half a day just fixing up an update in xorg/pulseaudio/whatever.
MacOS is pretty much the ultimate Unix environment where everything just works. You may not get as good package managers like Portage, but MacOS usually has a good enough solution like MacPorts back then or Homebrew now.
OS Updates while sometimes may have hiccups here and there (like the migration from GCC to Clang) it's usually painless with me only having to tweak a couple of settings here and there in my day to day tooling, like tmux. In Linux I expected it to break something major and actually scheduled at least a day to fix it.
In summary, I like Unix and I just want to focus on work.
Until recently, MacOS was the only OS with all of the following available natively: a Unix shell, Microsoft Office, Adobe Creative Suite. The fact that they made great hardware also helped.
I guess at this point it's just inertia, but if there were a comparable alternative I'd love to move.
When I was learning Rails on a windows laptop I was running in to all sorts of problems and issues when following tutorials. Something wouldn't work and you would go off in to a two hour rabbit hole googling around trying to find the solution. Eventually I would get it working on windows. Most tutorials are for the mac but I would be following them on windows. One night I ran into another issue following a tutorial and I decided I was going to try to same tutorial on my wife's macbook. Tutorial went super smooth and I completed it in less time than I had been spending trying to trouble shoot each issue that came up doing the same thing on windows.
OSX just works. It will save you enough time to pay for the hardware and give you piece of mind make your life way easier.
Sure you could develop on windows but OSX is way easier at least in my experience (Rails and Laravel Development).
A macbook air is more than powerful enough for web development and you can get them on sale for less than the price of an upper end windows laptop.
I think about a decade ago or so MacBooks covered a nice sweet spot in terms of programming work. My bet is that this coincided with the growing world of web development too. It was a commercially-supported Unix laptop with decent hardware and a sturdy unibody shell. They came in a variety of sizes and a good number of ports for peripherals. A Linux or BSD laptop in the same capacity can require a little more work to source or configure.
I use Windows at work and both macOS and Linux at home for making games. I don't think I'll buy another MacBook in its current state, but I do think a lot of the Apple environment has been nice for programming, personally.
1. MacBooks are really, really nice pieces of hardware. Windows laptops tend to run the gamut in quality (even Surfaces), and getting support for them isn't as easy as heading to the Apple Store. (Surfaces can be serviced and replaced at Microsoft Stores, but there are less of them around.)
1b. MacBooks have the best displays on the market. Surface displays are a close second. Everything else is a mixed bag. Some represent colors poorly; most have terrible viewing angles.
2. The terminal feels like home for Linux and UNIX devs (which there are a lot of).
3. Cargo cult factor. Linux devs hated all things Microsoft for a long time because of the whole embrace, extend, extinguish thing, but there weren't many "portable" Linux options out there, so many settled on Windows machines. OS X, being a UNIX, was an easy sell, and because devs tend to make a lot of money on the average, buying one (or getting one from work) wasn't hard. Microsoft has done a lot to change their image, and I think many folks are catching on, but the inertia is real.
4. People still think that Windows is crash-prone or easy to hack and that OS X is immune from all of that. (See Google's latest Chromebook commercial.) That hasn't been true since Windows 7, but, again, the inertia is real.
A UNIX environment with common *nix tools (via brew) and a solid desktop experience with access to commercial applications should I need them.
Why Mac? Like many, many devs: (1) acceptable font rendering, unlike Windows, (2) compatible with Adobe CS unlike Linux, and (3) it's a *nix, allowing me to develop stuff that will run on linux cloud instances.
I have spent many (>100) hours with Windows 10 over the past three years. Everything I want to do is a special-case silo; after three simultaneous installs of Git, VS Code still complains that it needs yet another alternative stack.
Cywin, Chocolatey, GitHub Desktop App, Windows Subsystem for Linux...
I feel like Dr. Evil's son Scott. Everything is so damn complex!
So many features.
Microsoft Dev Team blog posts announcing stuff are pages and pages of great documentation. Linux dev posts are shorter, people write simple examples, expect you to engage with code samples of your own. Apple devs post nothing at all.
MacOS provides a most effective desktop environment that has careful graphic design, hosts some damn fine applications, and a Bash command-line interface to the actual system.
Solaris would have grown into this, they were very close.
Unix shell and the friendly, no fuss UI. It's that simple really.
I developed for a long time exclusively on the Mac because I wanted a unix backend with a good user interface and hardware that "just worked".
Recently though I've moved away from OS X and back to Linux on the desktop. The experience is much rockier in general and requires much more setup/customization but in the end I feel that the developer experience is better. There's a broader selection of tools and better native support for things like Docker.
High Sierra was the straw that broke the camel's back for me. I was having a lot of weird issues and general slowness.
They make several of the very few laptops with buying, IMHO.
OSX enjoys a lot of network effects these days.. all the devs use it, so all the sexy apps tend to be first class citizens on it.
Despite all that, I still prefer a Linux machine for development though. I think even gnome 3 is a step up from osx when it comes to usability. Luckily, Macs are so widy used among devs, you can generally be sure their laptops will end up being supported pretty well by some flavor of Linux, eventually.
If anyone reads this and is curious about market share like I was, here's some (imperfect) data: https://insights.stackoverflow.com/survey/2018/#technology-d...
Windows is 50%. Mac and Linux each have about 25%.
That makes OS X about 2x more popular with devs than desktops as a whole.
"Which developers?" is a relevant question.
In my experience in the games industry the PC has long been the most favoured platform amongst game developers. It was the standard for games development up until very recently when Unity appeared and game development on the Mac became viable.
For your typical console or PC game studio it's likely to be all PCs with the coders themselves favouring PCs at home.
It's easy to have both though. For a long time, my development environment has been a Linux VM (now OpenSUSE Leap 15) that I've moved from host to host. My MacBook has development tools but they're rarely used, as it's easier to just fire up VMware Fusion and the VM. I can easily snapshot or fully clone my development VM too.
1- a unix system without the hurdles of managing a unix system. Even if Apple provides regular updates to macOS, the unix layer is more stable than on Linux distributions.
2- it's the only platform that lets you develop easily for macOS, MS-Windows, Linux, iOS, Android, and others.
That said, I still prefer Linux; but it is more work using Linux than macos.
No focus stealing when compared with Windows.
Exception here is IntelliJ - best and worst IDE at the same time...
iTerm2 for me. With command + tab and command + ` I can code without a mouse. Terminator is ok, and windows, well... Nothing is as usable as iTerm2, at least for me. Plus, it just works, no need to remove old kernels or Windows update bloat.
I even rsync all my local changes from Mac to Ubuntu for development that requires a gpu.
When fuacia or magenta or whatever it's called now, becomes a thing, I'll see if I can switch :)
Windows isn't great for coding - I tried and ended up using Vagrant for almost everything (I still have no idea how to get Rails working on Windows, and only set up Python to run a desktop app I wrote for myself on Linux), but sandboxing programming into a VM that takes time to start up, having to configure port forwarding, etc. gets annoying quickly. And Linux can be a little cranky sometimes.
iPhone app development can be done on non-apple machines, but it is harder, so I assume that adds some reason to getting a mac, at least it did for me. Even though I don't primarily do app dev, having a mac, and not having to mess with a hackintosh, was worth the extra money.