When Windows Turns Jekyll into Hyde

I Lied

So much for that whole deployment idea for my Jekyll blog from my last post. Fuck that idea. But I will get to that in a few.

Spoiled By Mac and Linux

I remember something like 6 years ago when I refused to develop on a Mac and preferred Windows. Then I went to a job where the only option was a Mac. Within a few months, I preferred Mac with Ubuntu as my second choice, only because asking for a Mac guaranteed a pretty high bar on the hardware, whereas Ubuntu or Windows can be put on any machine that calls itself a PC. Tools and libraries I needed to do my job just worked on Mac and Linux. Of course, there were issues now and then, but I got spoiled.

But up until the last month, I haven’t really touched a Windows machine for about 2 years. I forgot things.

And then I tried to get Jekyll running locally. And the repressed memories came back to haunt me. I remembered using the early versions of node and npm on Windows when you had to pick and choose packages based on version. It was sort of like a house of cards. And just as you were putting the last few cards up, some fucking package that had to be compiled just wouldn’t do it on Windows. And fuck that idea. After a few of these charges into the valley of death, I just uninstalled Node. Sometimes the problem with being an early adopter is you get gun shy and it takes years to come back. And then there were Python libraries. It was hit or miss, but nowhere near as bad as Node.

Sometimes things just never worked on Windows and no one gave a flying fuck. Once I was off of Windows, I joined those people. If you can’t get a browser right, I’m sure your operating system is aces. Yes, I get that I was dealing with open source code. But guess what. VS2015 just broke all the references to a C# application I was working on to point I had to copy dlls from another computer.

Later that day, I have another issue with VS2015 with an “Unspecified Error” that wouldn’t let me do anything except kill the whole application from the task manager. Now when a tool designed to help you write code does this, it’s like, “Fuck you with your squigglies on my code, look at this shit. Fucking hypocrite.” A half an hour later of trying about 5 different things, the solution was finally: Click on the sln file and as soon as it loads, hit the keyboard shortcut to build the project and if you’re lucky and fast enough, the project will build and the error will not occur.

In Linux, it was pretty amazing to find a big bug in a package. Maybe some small one off thing, that you ran around and told every other developer about because it was a rare thing. You found something all these awesome developers missed. On Windows, you get “Yeah, shit like that happens sometimes”. And instructions like those above.

So since I’m a developer who leans towards open source, going back to Windows is like going from a later model car to a vintage Volkswagon bug. First pump the gas 3 times, not 2 and not 4. Then let off the gas, wait 5 seconds and turn the key. If I’m wrong, go read the instructions that worked again two paragraphs ago. I’ll wait.

So by the time I tried to install Jekyll, all of these repressed memories were still buried to prevent damage to my psyche. The event above happened later, just a few days ago.

Try 1 - Just Do It - You Know Like in Linux or Mac

Windows eventually told me it was not Windows or Mac. I installed Ruby and all the dependencies by downloading. Broken, of course. Ok, so let’s try chocolatey. I am literally amazed at how well apt-get and yum work now. I had taken that for granted. Chocolatey is package manager. So…it should be the same experience. Not! Of course not. What the fuck was I even thinking. This is not the world where things just work. This is windows. So back and forth, this version, that version.

Ok, skip that and think of another way. Docker or possibly using TravisCI. Sweet, two options. One should work. Oh, to be innocent again in the garden of Linux where you didn’t have to work by the sweat of your brow to install a god damn blogging platform.

Try 2 - Docker Image Running Jekyll

Docker is great. I have done amazing things with it. Vagrant is a bitch compared to Docker. I got Docker working on my Windows machine. I have used it many times on Mac and Linux with no issues other than having to look up a command or two when I needed to.

So I added a docker-compose file to my project and synced my Jekyll blog folder. And then proceeded to spend the next three hours figuring out why it wouldn’t sync shit. And gave up.

I heard from another developer that if I run docker through Powershell, I will have no problems. Guess what. Now it’s like when you eat some food right before you get sick and can’t stand it for years. One day, when I don’t have my own Linux laptop available and the only option left in the world in to start a docker project on the Windows machine, I might do it.

Try 3 - Github and TravisCI

Github is free. What I was going to use TravisCI for would be free. There are a few online apps to edit Github projects in Markdown. I could do all this without a local installation for a while. I’d want one eventually, but this plan will do for now.

So there was no Windows issue here. The issue was deployment. Everything went smooth and fine, except for the fact that this is an old blog and I am pushing it to a shared host. Yeah, I’m a Senior Software Engineer and I host a static blog on a shared server because it works and it has been my most trouble free blog (Other than this saga) since the beginning. Also the quickest loading. What the fuck do I need hundreds of dynamic things happening on the server when nothing changes. It’s a blog. It needs to get over itself.

So back to deployment. I need to figure out how to push only changed files, but it seems no other Jekyll user has so far, so why start being logical now. Blow it away and push it every time. That’s what how we do it. So it takes over 10 minutes to push 10 years of posts to my server every time I write one post. It’s called eventual efficiency. Once the files get there, things are efficient. But up until that point, it seems like using dial up. Write a post. Run the publish script. Then go eat lunch, because it’s going to take longer to publish than it did to write. I will fix that eventually.

Turns out when Travis doesn’t hear any output for 10 minutes, it just breaks the whole Continuous part of its name and it gets pissy and says your shit is broken. And there is some special command to have it wait longer. But guess what. Fuck that. Been down that route. It’s been all day and special commands can go suck it. Actually, I did try to fix it for about half an hour, but the fictional ranting is funnier

Try 4 - Give Up For a Few Days and Read the Instructions

Confucius say “If something works on Linux, on Windows, you must hunt for the special instructions”.

So I went here and followed the instructions and everything worked. I thank the guy that climbed down that rabbit hole and figured it out. Hopefully, the sabbatical he had to take after dealing with Windows madness did him well.

And now finally, I am able to publish a post from this machine along with the stupid cocky, happy go lucky, Linux-tinted previous post. So hopeful that person was. He will learn, people don’t just do it in Windows land. First, they have to fix it, pump the pedal three times. And don’t forget to touch the windshield before you go over the train tracks.