DEV Community

Cover image for How to use unsupported macbooks for modern software development
Chamal Mallawaarachchi
Chamal Mallawaarachchi

Posted on • Edited on

How to use unsupported macbooks for modern software development

If you clicked on this, chances are either you own an old unsupported macbook or willing to buy one to kickstart your development journey.

Hey, that's a great decision in my opinion. If you don't have enough money to jump to a new MacBook, do not go for cheap Windows laptops. Instead consider an old MacBook.

But why?

  • Coz they have great displays. You will be starring at text for the rest of the journey so why not go for a better display?

  • Great keyboards (except the 2016-2017 models)

  • Great webcams, speakers and battery backup.

  • MacOS is optimized for MacBooks and probability of you getting into OS related bugs are very low compared to a Windows machine.

  • Looks sleek, well built, good hinge mechanisms, auto brightness for both keyboard and display and many more quality of life things that most cheap Windows laptops skips.

  • You can even install Windows alongside MacOS if there's something that isn't working for you in MacOS (Only on Intel MacBooks).

A note before going any further

Please do not buy unsupported macbooks for iOS or any apple application development. While you will be able to develop, you won't be able to publish those to appstore.

Here are some models that I recommend

  • 2013-2015 models (super cheap)
  • 2018-2019 models (if you can spend a little more)

Alright, Still in?

Cool, then from here on I'm gonna tell you exactly what you need to do once you get that old mac to set it up to get the best juice out of it.

Don't use Homebrew

For those who don't know MacOS is a unix like OS but doesn't come with a package manager like other unix like OSes. Homebrew is one option but it only supports upto 3 latest MacOS versions and if yours aren't in that, every cli app you install will build from source. It is a nightmare. Don't install homebrew if you're even on the supported OS list as it will get unsupported soon and after that you can't go any OS beyond that.

Instead go for MacPorts package manager. It supports versions as old as El Capitan (Even a 2012 model can go beyond that version).

As long as you're on a model later than 2013, you'll have no problem installing modern software development kits like Java 21, Node.js latest, C/C++ 17, Flutter 3.x.x, Python 3.x.x, Dotnet 9 and etc.

Macports -> https://www.macports.org

macports-macos

Keep the OS lightweight

While this things is pretty expected to know by anyone but added this anyways in case some might think that they would be able to run whole bunch of heavy applications. Only keep neccessary applications and do not add anything if that thing is provided by OS itself.

lightweight-macos-1

lightweight-macos-2

Some things you get from MacOS by default,

  1. A simple screen recorder and screenshot tool
  2. Voice recorder
  3. A color picker (Useful for webd dev and designing)
  4. A camera app
  5. Notes taking app
  6. Music and video players

There's many more that MacOS has built in so definitely Google what you need to see if it already in the OS before going for a third party application.

Switch to CLI apps as much as possible

This is the most impactful trick and this also helps you to become a better software developer as well. Always stick to CLI apps as much as possible. There will be a steep learning curve but it's gonna reward you along the way. Belive me.

Some examples,

  1. Use Git CLI instead of any GIT GUIs
  2. Use terminal for files, and folder navigation.
  3. Use things like grep, sed or awk for searching files
  4. Use a terminal multiplexer to split the terminal instead of openning multiple terminal windows.
  5. Skip code editors like VSCode or any of it's forks. They run on electron which takes a lot of CPU and RAM just to even keep it running without doing anything. Switch to efficient editors that provides native binaries. I'd recommend Emacs if you need a Graphical User Interface or VIM/Neovim if terminal is comfortable.

macos-cli-experience

Do not customize your terminal too much

I have seen that customizing the terminal too much also affects older macs to get slow even inside the terminal.

Notable performance culprits I have noticed,

  1. Do not use Starship to customize your prompt. Use powerlevel10k. They are similar in customization but starship takes a lot of CPU power which makes your terminal emulator laggy.

Use an efficient terminal emulator that supports true color

There's many. Choose something that fit's your liking. I recommend Alacritty or Kitty.

Alacritty -> https://alacritty.org
Kitty -> https://sw.kovidgoyal.net/kitty

Use Turbo Boost Switcher

A third party free software that use can use to turn off turbo boost when doing normal work. (I only enable turbo boost when compiling fairly large software)

turbo-boost-switcher-macos

Turbo Boost Switcher -> https://tbswitcher.rugarciap.com

Finally, Some etc tips!

If this MacBook is your first computer, it's better you understand how Unix works a little bit as well because it will help you to setup the computer, fix bugs and save from many other pifalls many new MacOS users face as developers.

Some things that I think you might needed.

  1. XDG Base Directory Specification
    While MacOS itself doesn't respect this, many applications that will use as a developer in MacOS will respect this spec. So give it a read so you won't be hammering ChatGPT or google search asking "where the heck is my config for X app or Y app" and end up with delusional answers utltimately breaking other apps.

  2. How manage environment variables

  3. File System Hierachy Standard
    You won't find all of the directories in this standard in MacOS as apple has done some modifications to this like /Library for an example. Nevertheless, you might find this useful. Just read it, try doing ls for each of those directories so you can know what you have, which you'll be able to use when you need them.

  4. When you first try to see if git is available or a compiler is available, you'll be prompted to install xcode-commandline-tools which will install many other programs behind your back. (i.e. Python3, Git, Clang(MacOS C-compiler), curl, grep, rsync and few others). Why I'm telling this is that, while it is good that they get installed automatically but they're not the most upto date versions. So I recommend you to install upto date tools using a package manager like macports set it has the default using the environment variables.

  5. Many kids start with web dev. So you might getinto trouble with npm failed to install packages when you try to install them globally.

New users eat their hair trying to fix this. The most simplest and easiest solution that I can suggest is creating a directory for npm global packages in the /home directory and assign it to npm using environment variables.

Let me leave it here in case you want to fix it quickly

$ pwd # make sure you're in home directory
/Users/<your-username>

$ mkdir .npm-global # create a directory

$ npm config set prefix '~/.npm-global' # Set the prefix config variable

$ vim .zshrc # open .zshrc file with a text-editor (i use vim here)
Enter fullscreen mode Exit fullscreen mode

Paste the below line to it. Save and exit.

export PATH="$HOME/.npm-global/bin:$PATH"
Enter fullscreen mode Exit fullscreen mode
source ~/.zshrc # reload zshell config
Enter fullscreen mode Exit fullscreen mode

Now your npm global package installs will work!

That's it!

If you can bear with those things, I think you'll have a great overall experience.

Thank you for reading upto here ❤️.

Top comments (2)

Collapse
 
shemith_mohanan_6361bb8a2 profile image
shemith mohanan

Good write-up. Old MacBooks are surprisingly great for dev work, and the MacPorts tip is a lifesaver for unsupported macOS versions. Keeping the system lightweight and using more CLI tools is solid, practical advice.

Collapse
 
chamal1120 profile image
Chamal Mallawaarachchi

Thank you for your comment. ❤️