After many years of using Apple computers exclusively, I decided to switch back to using a PC. This post outlines the struggles I went through in trying to set up my PC for game development, and my recommendations for anyone making the switch in the future.
WSL: A Great Idea, But Not Quite There Yet
The first thing I set up when I got my PC was Windows Subsystem for Linux (WSL). One of my major reasons for switching to Mac in the first place was that it was a Unix-Like system that contained bash. So I was super excited to set up Ubuntu and work with the command line on it.
Whenever I tried to do anything that affected the windows file system as opposed to the Ubuntu file system, it corrupted the files. Then the only way to fix those files was by running check disk.
Also, the Ubuntu for WSL doesn’t contain all the features of Ubuntu. So when I tried to install
docker, it was just a no go.
Lastly when I tried to use Git LFS, it would download files at a ridiculously slow rate. So slow in fact, it eventually froze and I had to restart Ubuntu.
Git Bash is Your Friend
After about two weeks I gave up on WSL and installed a lot of the programs I needed through Windows, including Git Bash.
Git Bash gave me the experience I was looking for with WSL: the ability to use git, java, maven, hugo, docker, and more using the command line. The only caveat was that for some of the programs I needed to add them to my System Path, but after dealing with WSL for weeks, I was willing to do anything.
Windows Line Endings vs. Unix Line Endings
It had been so long since I used a PC that I forgot that Windows line endings are different than Unix line endings. In case you’re unaware, Unix line endings are
lf while Windows Line Endings are
cr stands for carriage return). This became an issue due to the other members of the team still using Macs, so I had to add the following line to the
.gitattributes file in all our git repos:
This line tells git to convert all line endings to LF on checkout and stops you from having to deal with horrible merges. I also needed to update my git config with the following command:
git config --global core.autocrlf true
After that everything ran smoothly and I haven’t had an issue with source control since. If you’re interested in reading more about how to deal with line endings, check out this article from Github.
We have a bunch of REST services we maintain at 56, and when I looked at our Maven pom files, I decided it was time to docker-ize everything. Our services run tests with DynamoDB Local, and to get it working on Mac is a pain, let alone trying to get it to work on Windows.
I had been planning on docker-izing our setup for a while since a lot of our services depend on each other (i.e. to test most of the services we needed one of the other ones running as well), so this was just the driving force behind it. After converting the services to docker, they run much more smoothly.
I’m Not Missing my Mac
After sorting out all those issues, I’ve been able to program quitely easily on my Windows computer. All the IDEs I was using are also available on Windows, as well as the other programs I use personally. While I’m not missing my Mac, I’m not overly in love with Windows either. I could be convinced to switch back.
Although I do rather like that I can now play Sonic Adventure 2 Battle on Steam whenever I want… :)