Code on Mac Instead of Windows - Is It Better?
Code on Mac Instead of Windows - Is It Better?

In this post I want to talk about why I prefer MacOS to Windows when it comes to writing code. And actually I used Windows first 20 years of my life and after this I used MacOS 12 years. And somewhere in between I used Linux for my own purposes and also inside companies.

Libraries and Dependencies

From my point of view programming in Windows is really painful. Why is that? The most important point that beginners don't understand is that all dependences of all libraries are tested with Linux. Why with Linux? Because actually on production we have typically Linux servers. Windows servers are really expensive and not that popular which actually means by default every single developer will test code on Linux.

And a lot of developers use MacOS. Why it is important? Because actually MacOS is just polished Linux which means 99% of things which will work in Linux will work in MacOS.

So, it is much easier to bring support of libraries or your dependencies from Linux to MacOS then to Windows.

Also a lot of developers don't have Windows machine at all because they are developing in Linux or MacOS. And actually Windows operational system is super different from Linux. This is why it won't work there out of the box. And this is exactly why I am getting so many questions in my courses from people who are using Windows because they have problems with different packages, with dependences, with installation of databases and much more.

Docker

But nowadays it is actually not that bad because we have Docker. And if you don't know what is Docker, Docker is a possibility to run all your applications inside Linux container. Which actually means it will work even in Windows exactly like on Linux. Because code will run with Linux inside Linux environment. And Docker here is a really good solution to our Windows problems, but even there you will have some problems with Docker itself because it is running with Windows operational system and file system and file structure is working differently from the Linux.

Terminal

Another thing that might be important for you in Windows is the lack of good terminal. The default Windows terminal is complete garbage. And actually if you need a better alternative for Windows I highly recommend you to install Cmder. It is completely free and it looks at least a little bit like typical terminal from Linux or MacOS.

Cmder

Another thing which is helping us a lot is Chrome engine. Nowadays a lot of applications are being built with Chrome engine, which actually means inside every single application you are running Chrome browser. And it is for sure not the fastest variant but your application works in the same way in every single operational system. This is why tools like for example VSCode, Google Chrome or Postman are working so nicely in every operational system and even in Windows. But still there are a lot of other tools that you might need as a programmer and they are not working that nicely in Windows.

Configuration

Another important point for me is that configuration inside Windows is done through UI. And it might be really nice for beginners because you can simply click click click and you change your configuration but it is not that flexible and you can't change a lot of things there. This is why even updating path for your environment variables might be difficult. So Windows for sure is not that configurable as Linux and for the programmer with some experience it might be a problem.

Viruses

One more important point for me is viruses. After I got MacOS I forgot about all these programs that must be running in your machine in order to protect you from viruses. Because actually almost all viruses are just written for Windows. It is super difficult to get a virus if you have a MacOS or Linux because not a lot of people are writing viruses for these operational systems.

Why not Linux?

And at this point you might say "Ok I get it you don't like Windows but why you simply can't take Linux and be done with it?". And actually I tried that and it just doesn't work. It is possible to work in Linux and I did it in different companies several years but still it is not a polished operational system. A lot of stuff can be broken, you have problems with several monitors then you are getting new monitor or something else and you need to fix problems again and again and it is not fun. I want my operational system to be polished I don't want to sit every single day there trying to tune something and fix it.

Why MacOS?

So this is why here I want to share with you why I really like MacOS and why I think that this is really nice operational system.

  1. First of all here we are talking about Linux based operational system and this is important feature for me.
  2. Secondly it is just a Linux, but it is super polished because they invested a lot of money and efforts in it.
  3. It is highly configurable because we are talking here about Linux.
  4. All our packages and dependencies typically work without problems inside MacOS because it is 90% still the same Linux.
  5. A lot of programmers nowadays are using MacOS which actually means they tested the applications or libraries in the operational system also.

More benefits

If we are talking for example about development with Docker which is a standard nowadays then it works best in Linux after this is coming MacOS and the worst is obviously Windows.

And one more important point for me is how fast and silent my computer is. And currently I am using M1 IMac. And actually compared with Intel processors it is completely silent. And this is exactly what I want I don't want to hear noise all day in my room.

So, why do you need Windows at all? First of all if you are into gaming then Windows machine is for you. There are not a lot of games, which are supported in MacOS or you need to use some specific tools like for example cloud gaming if you want to play on MacOS. Secondly if you have some programs which exist only on Windows and you can't find any alternatives than you must stick with Windows. And last but not least if you are a .NET developer then it makes sense to stick with Windows because dot net was written on Windows and it is not working that good in MacOS.

And actually if you are interested to know how to deal with eye strain as a programmer make sure to check this post also.