The Ups and Downs

Hello, I’m Jonathan Sampson. I am a Web Developer.

Unfortunately, today you can’t be just a Web Developer. Not if you want to remain active in the industry, that is. You have got to do so much more, and it can be very tiring.

I work on a Browser. Our project is a native application, but under the hood it is largely HTML, CSS, and JavaScript. Well, JSX, Less/Aphrodite, and React, but you get the point. Every now and then I have to venture into the world of C++ though, and that may be a bit out of the wheelhouse for a web developer.

I’m happy to explore beyond my comfort zone; C++ isn’t that foreign to me. My primary complaint is that I can’t test changes as rapidly as I can JavaScript. In a browser, you need only to refresh after a single change. With C++, you have to wait a few minutes in order for the build to finish (assuming you don’t have to do a full build, which could take hours in my case).

I recently ran into a problem on Windows where LOG statements weren’t printing to the CMD window, or to our browser’s console. I have spent days trying to figure out the cause, but to no avail. I finally decided to revisit Ubuntu; perhaps if I did my development there, logs would print as expected.

There were many other reasons to explore a UNIX system again; the vast majority of our team is already using Linux or macOS. Many of the tools we rely on work less reliably on Windows, if they even work at all. But that is neither here nor there. Let me get to what I really want to discuss.

I decided to download an ISO for Ubuntu, and get a Virtual Machine up and running. Since I don’t spend much time thinking about VMs these days, I decided to go with the software I last recall using―VirtualBox.

Not long after I had the ISO downloaded, I had a VM setup, and I was configuring my account details in Ubuntu. VirtualBox was dead-simple to use. Shortly thereafter I was reminded that Windows 10 has built-in virtualization tech called Hyper-V.

I remember trying Hyper-V once, the last time I setup Ubuntu. That experience was plagued with network connectivity issues, abysmal performance, and more. Perhaps things were better now though. Knowing full well how incompetent I am with these things, I decided to give it another shot. Who knows, the issues I faced before may have been due to a mistake on my part.

Well, this is when the evening started to go downhill. VirtualBox and Hyper-V refuse to coexist on the same machine, at the same time, apparently. Once I had Hyper-V up and running, I was unable to start my virtual machine. Flustered, I even tried to delete my VM. I couldn’t do that either.

I must have spent an hour, at least, trying to get Hyper-V working. Ideally, I’d stick with Windows tech. But my patience was quickly wearing thin. I decided to shelf this effort, and go back to Virtual Box.

I rage-quit Windows, told my Wife I was headed out for a few minutes, and went to drown my sorrows in a chocolate shake. I recommend that when you face any technical issue. Upon returning home, I set out to revisit VirtualBox.

The evening was already going downhill, but this is when it began to tumble violently. Upon returning to VirtualBox, I found that I could no longer start my virtual machine. Crap! Did I delete the disk image or something? My mind started to enumerate all of the crazy things I might have done to bring this agony upon myself.

If it weren’t for sites like Ask Ubuntu and Super User, I’d be entirely lost. With a bit of searching, I found that I needed to disable Hyper-V in order to run VirtualBox reliably. Fair enough, though it does stink that this process requires another restart of the machine.

Fast-forward about 10 minutes, and I’m in Ubuntu setting up Python PIP, Git, Nodejs, and more. My goal for the evening was to clone the Browser project onto the VM, install it’s dependencies, and complete the initialization before bedtime. After a few minutes, Ubuntu prompted me that I was running out of space.

Side note, think about your needs before progressing too far into a project. I naively applied the recommended disk size of 10GB to this VM. I should have known better.

Part of our project initialization downloads many, many gigs of data onto the host machine. My 10GB quickly ran out. Now I had to figure out how to expand the size of the virtual disk, and pick up where I left off.

For all that VirtualBox does well, empowering the user to make post-hoc changes to virtual disk sizes isn’t covered. Instead, I had to use VBoxManage, a utility that ships with VirtualBox. You can see my Tweet about this online.

Once the disk was resized, I jumped back into Ubuntu to pick up where I left off. Sadly, it was still complaining about a lack of space. Oh! The partition! So tired was I from the fruitless hours spent wrangling virtual machines that I forgot to expand the partition. GParted was a pretty stellar application, and worked with very little effort.

So here I sit, typing away, waiting for the npm run init script to complete. I’m still not 100% positive that it’s going to work. I’m hoping that 30GB is sufficient. I guess we’ll just have to wait and see.

On a positive note, I was able to make a contact on the Hyper-V team. Kudos to Sarah Cooley for assisting. I’m hoping to continue the discussion with her, and figure out where I went wrong to begin with.

The terrain of any given day is hard to predict. There are days where things flow smoothly, and you advance toward your goals light-footed. On other days you lift up your eyes to see a cascade to mountains before you, each with razor sharp rocks, lining unforgivable cliffs.

The one thing I’m thankful for is the experience, the forced education, and the figurative calluses that line my hands at the end of the ups and downs.

Update: Everything was going great, until I tried to install build dependencies only to learn Ubuntu 17.04 is not a supported distro. C’est la vie 😒