More Dev Ops Humor

Robert Tsai
4 min readDec 8, 2018

I love this Dilbert I saw on Sven Efftinge’s article “How to streamline developer onboarding: dev environment as code”

Source: http://dilbert.com/strip/2017-01-02

One of the hardest things about managing developers is that you lose visibility into the code base, and you are no longer the expert on the applications that you manage or own. You’ve trusted your teams to own the code base, and that’s a great thing. Sure you can read through the git commit history to see what your team is doing, and you can do some code reviews and walkthroughs, but I think a great way to get a deeper understanding is to actually help implement some features or bug fixes. So I decided to set up a build on my machine.

I think every organization has to make a decision on where/when to standardize (hardware/software/dev process) and where to trust your teams to make the right decisions that they are comfortable with. So right off the bat — you can see that in your desire to give freedom and autonomy to your developers, this could naturally cause some challenges. You see, I am a Windows fan. I run a Windows 7 Server box at work, and also a Win 10 Pro laptop for development. I use MinGW/MSYS for my dev environment (and I know other windows developers prefer Cygwin, CMDR, etc). I also run Python (CPython) through the native builds and NOT through Anaconda.

Guess what — a lot of people like/prefer Macbooks. Out of the 5 developers on my team, we have 3 Macbooks and 2 Windows.

So — I totally get Sven’s humor on what it takes to set up a dev environment:

“Instead, on-boarding a new team member on any non-trivial project usually is a multiple hour (if not days) exercise.

It often goes like that:

  1. A new developer gets pointed to the readme
  2. Reads lengthy, mostly outdated setup procedure
  3. Installs requirements on the developer machine,
    updates/downgrades versions, etc.
  4. Tries to run the build … waits 20 minutes
  5. Build Fails. Try figure out what went wrong.
  6. Asks colleague. “Oh, yes. You also need to do X & Y”
  7. goto 3

Here’ a funny story on running the build , which shows just one example of challenges in developer onboarding.

Since my developer team on this one app that I was interested in standing up is all on Macbooks, I had to go ahead and read the Mac install docs, and work collaboratively to troubleshoot and stand up a Windows version.

One of our apps is running MongoDB Community edition as our NoSQL database. Of course — they wrote up their dev onboarding manuals on how to build and install on a Mac (brew install, etc.)

Pretty simple right?

Install the MongoDB on windows, set up the connections, start your application, and you’re good to go right?

You run a terminal, run mongod, go to your flask app, run that thing, go to your react app, run npm start, and boom you’re good to go.

Yet — our app was running, and I couldn’t see any logs to the STDOUT on the mongo side. I could even kill the Mongo process, and my app was still running. WHAT? For a brief moment, panic set in. Was I connected to the production db? OMG. What have I just done?

The answer is much more innocuous.

It looks like on Windows, Mongo automatically sets up its own configs to autostart on windows boot. So when you start your machine, you have a Mongo process that you don’t know about. (This is not the default behavior on Macbooks).

So when you run mongod from a terminal, it turns out you are running a second mongo process, but your app is really connected to the process that autostarted. That is why you don’t see any logging out to STDOUT in your terminal, and you can kill your mongod session from the terminal, and the one that autostarted is still humming away.

Of course — this is very bad from a developer perspective. So, you pretty much have to run some of the windows utilities (like services.msc) to switch off the autostart on MongoDB to manual. Is this common knowledge? I guess you learn this lesson once and you’ll remember it.

So yes — we now have two versions of a dev onboarding document, one for Windows and for Macs — and, yes, this made it onto the doc :)

--

--