Blog

Random thoughts from my head.

Experience With Apple Silicon M1 MacBook Pro As A Software Developer

Posted about 3 years ago on 12th of March, 2021.
Experience With Apple Silicon M1 MacBook Pro As A Software Developer

If you have been on the internet in the past 6 months and have any sort of interest in technology, you probably have come across an article about Apple’s new MacBooks with their in house Apple Silicon M1 processor. Apple is not new to the processor game, they have been producing some of the best mobile processors for iPhones and iPads for a while, but this was their first time doing that for full size computers. There was a lot of hype on the internet before the processor even came out, and some of the claims seemed unreal and impossible. After the public release, lot of reviewers got their hands on the new MacBooks and were surprised to find out that the rumors were not only correct, but the processor broke a lot of barriers most people were not expecting. The single core performance was faster than anything out there, the system used way less power than any other processors in that class and the system stayed cool even under heavy loads with no fans kicking in for a long time. In fact, Apple was so confident about this processor that they completely removed the fan on the MacBook Air. Pair that with 17-20 hours of battery life, this was looking like the perfect processor for computers on paper.

Background

I have always admired Apple products, specially in the last 4-5 years, and this was no different. Although my 2019 16 inch MacBook Pro with Intel i9 processor had more than enough power for my needs as a software developer, I was never a fan of how hot it got under heavy loads, and how quickly I could kill the battery if I was doing anything CPU / GPU intensive. It was hard not to impulse buy and pre-order the computer, but when I saw that my local Apple Store had the exact configuration I wanted in stock, I couldn’t hold my impulsiveness and got a brand new Apple M1 MacBook Pro with 1TB SSD, 16GB Ram. I still remember giggling like a little kid at the candy store while driving to the Apple store to pick it up.

grey laptop computer

I finally got it in my hands, and I had a million things going in my head. I was happy and excited, that I got a new computer, kind of sad and angry at myself, because it was an impulse purchase, and curious, because I was excited to experience the next generation of computing. See, the thing is that this new processor is not just new in the sense that it is made by a company that has not made computer processors before, but also new in the sense that it is using a new architecture called ARM64 and an all new internal structure. I am no expert in processors and their inner workings, but I knew enough to know that this meant there were going to be compatibility issues with applications and external devices. That being said, all the reviews I had read and seen on YouTube pointed to the fact that Apple had thought that through and it was not going to be an issue. And they were right, Apple’s binary translation layer, Rosetta 2 is amazing, and we will be touching on that more later.

Compatibility

The primary purpose of me getting this new MacBook was to develop software. I have to work with a lot of different technology stacks and having proper compatibility was going to be a huge deal breaker for me. My stack currently is primarily Node.js / Typescript, React for frontend, Postgres for database, Docker for managing containers and deployment, VSCode as an editor and other tools like Webpack, SASS, HomeBrew and more. My experience has been all over the place when it comes to compatibility, but at the end things have been working well and I am happy I made the switch. Let’s dig a bit more:

Setup

Since I knew that the native arm64 versions of everything I use would take some time to appear, I had planned to use the Rosetta 2 versions of everything till native things got more stable. Rosetta 2 is an translation layer that converts Intel x86 instructions to the Arm64 instruction set being used in M1. According to benchmarks there is no significant drop in performance, and the processor is so fast that even things running under Rosetta 2 run faster than in most Intel based processors out there. And since it is a translation layer and not an emulation layer, binaries are translated the first time you load an app, adding about 2 seconds on the initial launch. But after the initial launch things start up as quickly as native applications.

Most apps will automatically run in Rosetta when the OS detects that it is using x86 architecture. So things like VSCode etc were as easy to get up and running as installing them like you would normally. I use HomeBrew as the package manager, and that one was a bit different to setup. I had to setup my terminal of choice iTerm to run under Rosetta so all the command line tools I had would run under Rosetta too, including brew. Here is how you set that up:

  • Open your Applications folder on Finder.
  • Copy iTerm or another terminal, and make a duplicate. Rename it to call it something like Rosetta iTerm.
  • Right click Rosetta iTerm, and open ‘Get Info’ option.
  • Check the ‘Open Using Rosetta’ checkbox.
  • That’s it, now you have a terminal that will always run under Rosetta.
  • Tip: You can change the default icon by dragging a new icon image (not file, the image) to the icon on top left corner of this dialog box.

Everything you run on this new copy of the app will now run using Rosetta. Then you can just install brew or any other tools normally in this terminal.

Node.js / TypeScript

I had almost no issues with this part of my stack initially. I was running Node.js under Rosetta 2, and the installation was really straightforward with brew and nvm, which is a Node.js version manager. Later a native arm64 version of Node.js was released for M1 Macs, which I installed right away. Things felt much faster, even npm install commands seemed to be faster than before but I am not sure if that is just placebo. But I realized that there were times where long running processes would crash intermittently. I still haven’t been able to pinpoint what is causing it, but it seems it be related to fswatcher which uses native bindings under the Node.js layer. It only happens once in a while, so it has not bothered me much.

HomeBrew

This is the big one, if you are using a Mac and are a software developer, you are most likely using brew already. Initially I was running brew under Rosetta and things were perfect, I had no issues at all. Later the native arm64 version was released, and me being me, I installed it right away. Things were pretty good for the most part, and they keep getting better. Some packages did not have the pre-compiled native bottles, so they had to be compiled on the machine, but that has been changing over time as more package vendors have been adding bottles for M1. Since it was a one time thing, and since this computer was so fast, compiling things from source was not a huge deal to me.

Postgres

No issues here, my initial install through Rosetta brew ran perfectly, and later when I switched to native brew, things were still stable.

Docker

Ok this one was where things broke, initially docker did not run on M1’s at all, not even under Rosetta. Since Docker was mostly being used in my stack for deployments and packaging of containers, it was not a huge issue for me. But if your workflow depended on Docker, you would have to hold off on getting the M1. Docker released a tech preview later, but I have not gotten around to testing it.

Update (4/27/2021): Official Docker support is now available: https://docs.docker.com/docker-for-mac/apple-silicon/

VSCode

Microsoft has been doing an amazing job developing VSCode and it reflects even in this case. They were one of the first ones to release a native preview version for M1 Macs, and I had been using that since the first release. I have had no issues, but they recently released a stable M1 version which works really well.

Others

I haven’t had too many issues with other parts of my stack. Sass was throwing errors randomly at the beginning but it started working after reinstalling node.

Experience

My experience with this computer has been nothing but amazing. I knew it was going to be a great computer before I even got it, but it beat all of my expectations in every way possible.

Battery Life

This one is life changing, not having to think about charging the computer lifts a huge mental block. This computer is insane, Apple advertises 20 hours of battery life and I have gotten pretty close to that with medium – heavy usage. Even with consistent heavy usage, I get around 10 hours, which is more than what I was expecting. I rarely think about charging anymore, and I don’t remember the last time my battery went below 20%.

Look and Feel

The looks have not changed from the previous version, and the computer still has touchbar, same trackpad and a pretty good keyboard. I switched from a 16 inch model to 13 inch, which turned out to be a blessing in disguise, as I am now able to use the computer in airplanes, and it’s a lot more portable to carry around. I take my computer to more places now allowing me to get work done with more flexibility, compared to my 16 inch which mostly used to sit in my desk. The display is good as always, and stays bright even in direct daylight.

When it comes to how it feels, it is night and day. The thermals are incredible, the fans almost never come on. It’s a weird feeling to not have your palms get sweaty because of heat, which was a normal thing in my last computer. The computer stays cool to the touch all the time, but the downside is you will no longer have a lap-top heater with you when it’s cold out. The keyboard is amazing, since it is the updated version that fixes a lot of flaws from the previous version.

Productivity

This was a surprising side effect of the changes on this computer. I have realized that I have been much more productive after I made the switch. I dismissed it initially thinking my increased output was just because it was a new computer and I was just trying to use it more because it was a new toy. But the more I used it, the more I realized that it was not just the new toy syndrome, I was actually getting more shit done.

Turns out, this computer removes a lot of friction associated with using a computer, which in turn translates to productivity increase. First one is speed, and this is one of those things that you don’t realize till you actually use this computer. Everything feels so smooth and snappy, that it does not feel like you have to wait for anything. I always felt that Mac’s were snappy and smooth no matter what hardware config they came in, but after using this M1 even my old 16 inch version feels jittery in places. I did not expect those micro jitters that only last milliseconds to cause that much difference in productivity, but our brains work in a weird way and even minor changes to reduce micro-friction in everyday work reduces your cognitive load significantly. Everything from opening applications to switching workspaces to browsing the web feels super snappy, and there are no slowdowns or jitters whatsoever. I even tried launching all the apps I had installed in my computer at once, just to see how far I could push this computer, and was pleasantly surprised to find that Affinity Photo was still usable with close to 100 other apps running actively on the computer. This list included some heavy softwares like all of Affinity suite, Final Cut Pro, bunch of IDE’s, Logic Pro, Apple Pages, Numbers, Slides and so much more. I know that is an unlikely use case for anyone who will buy this computer, but it just shows that this computer will not break a sweat no matter what you throw at it.

Next productivity gain was from the instant on feature, which I bet most people don’t even think about. See, Apple has changed the way the computer wakes up, so now as soon as you lift the lid of the MacBook you are greeted with the login screen. Before, there was a second or two delay for the computer to wake up, and even more if you were plugged in to an external monitor. While that might not seem like a large amount of time to wait, having instant on changes your behavior in a subtle way where you want to grab the computer and open it really quickly to get something done and close it immediately. I have had instances where I come up with a solution to something I was working on randomly, and would immediately open my computer to update it. In the past, I would hold it off till I can sit down, settle properly with the computer then use it. Pair this instant turn on with quick authentication with Touch ID or Apple Watch login, you will start using the computer a lot more with minimal effort even for little things, sort of like how you use your phone to quickly check on something.

Last but not the least, not having a hot computer in your lap really helps you use it for a long period of time. I remember having to walk away from my old 16 inch MacBook few times because it got too hot to use it comfortably, specially while doing processor intensive things like compiling large codebases or rendering video. That is not a problem anymore, but it has spoiled me to a point where when my work MacBook which is Intel based gets even a little hot, it starts feeling uncomfortable. Also being able to downsize from the 16 inch to 13 but still have the same amount of power makes this computer perfect for getting things done on the go. The whole reason I chose 16 inch MacBook was for the faster processor options, but we are no longer restricted to that form factor anymore.

space black case Apple Watch, silver MacBook Pro, jet black iPhone 7 Plus, and silver iMac with corresponding boxes

Issues

Even though this computer is amazing at most things, it does not mean that it is flawless. I have dealt with my fair share of issues with this MacBook, and here are some of them:

  • Only two USB C ports which are both on left side means I cannot charge the computer from either side like I used to be able to. I understand that this problem will not be an issue in the future iterations of the computer, but as of now this is something I miss from my old computer.
  • I have noticed random freezes here and there. I had a couple instances where the computer completely froze out to a point where I had to hard reset it to get it working again. That being said this has not happened recently after the new updates, so I am crossing my fingers on this one.
  • The screen, while being amazing at reproducing colors and rendering things well, is a dirt magnet and gets dirty quickly. There is no easy way to clean it either. The anti glare coating Apple uses on the new MacBooks works really well against glares, and allows you to use the computer in bright daylight, but makes it easy to get it dirty and harder to clean. This has been an issue for a few generations of MacBooks, and is not specific to M1 models. You win some, you lose some, I guess.
  • It still has the TouchBar. Oh you thought I was going to complain about the TouchBar, weren’t you? I freaking love this TouchBar, and after a bit of customization it adds more things that speed up my workflow. I’m sad they are removing it in the future versions. I feel like the people that complain about this are the ones who have a hard time changing their workflows to use the TouchBar, and still do things the old school way using function keys, but who am I to complain if it works for them.

Verdict

Apple has really shown the world that there is a better way to go about computing in general by not being afraid to dive down to the fundamentals of processor design and change things that most of us thought were set in stone. This ground up approach to innovation has pushed Apple ahead of the pack in multiple product areas, and this new MacBook is just another example of that. If you are a software developer and are thinking about getting the new M1 MacBook, I would highly recommend it. I am very excited to see the direction Apple is heading in, and will keep an close eye on the future iterations of this processor. I would love to hear what you think about the M1 and your experience with it in the comment section.

 View Other Posts