• Dogfooding

    I can’t remember when, but I recently heard someone use the term dogfooding, as in a shorthand verb form of eating your own dog food. Every noun in tech becomes a verb, usually when it gets to marketing or sales, but this one made me roll my eyes a bit more than usual.

    My wife had never heard the term, which is a bit ironic, since she actually works in the dog food industry. I have mixed feelings about it, although it’s marginally better than “drinking your own champagne,” because I don’t drink, and when I did, champagne was second only to tequila as the alcoholic beverage I disliked the most. But in the late nineties in the tech industry, they would roll out champagne almost as much as they would print team t-shirts. Anyway.

    The term “eating your own dog food” is supposed to mean using the tools your company makes to actually operate your company. If your company makes bug tracking software, you shouldn’t be paying Atlassian to use Jira; you should be using your own software, to show customers that it actually works.

    (Side note: I’ve always called it JIRA. I started at the new place, and everyone was saying Jira. Turns out the name changed in September of 2017. See here. This is partly the trend of making everything lowercase, and partly testimony to how infrequently the last place updated their software.)

    So, the actual news here is that I’m “dogfooding” by moving this site away from Wordpress and doing it all with a static site generator. This is the same docs-as-code approach I do at my job. That means:

    • Writing everything in Markdown.
    • Using Atom as my editor.
    • Using Jekyll as the SSG.
    • Using the Minima theme with some customization, most notably pagination.
    • Pushing it all to GitHub.
    • Hosting it with GitHub pages.

    There’s lots to cover here, and also not everything is done. My redirect from jonkonrath.com to the new hosted site is a bit of a hack, and I’ve barely started any page design. I’ll get to that, and I plan to explain all of it as I go. But first, I need to go eat something other than dog food for lunch and not think about Alpo.


  • Onward(s) and Upward(s)

    Just a small programming note: after ten and a half years, I left my last position, and moved on to a new one. I’m still managing, still writing, but at a much younger company, which is always interesting.

    As per my usual policy, I won’t mention names here, but if you follow me on LinkedIn, you can figure it out.

    Also worth mentioning that as always, all words here are mine, and I don’t speak for my employer.

    Unrelated grammar nit: I was trying to determine if the saying was onward and upward or onwards and upwards. The  first one sounded right to me. Both of the -ward words in question are adverbs with the -s, or adjectives without. (You look downwards; Nine Inch Nails has a great record called The Downward Spiral.)

    The saying could be using adverbs or adjectives though, so none of this helps. I think both AP and Chicago Manual of Style would say that Americans would drop the -s and British love to keep it. So, onward and upward.


  • A quick cmd trick

    I wish I could tell the 1990 me that the 2020 me would be posting DOS commands in a blog instead of using a brain-implant computer on the surface of Mars. (I also wish 2020 me could tell 1990 me to patent the idea for an online book store, or that the Reds would sweep the A’s in the World Series.) Anyway, here’s a quick one I should have known already.

    You can set the prompt in a command window by setting the environment variable PROMPT. There is a PROMPT command too, which I vaguely remember from the DOS days and setting up an AUTOEXEC.BAT file. But the PROMPT command only works for that session. The variable works for every session.

    The default would be PROMPT $P$G: show your current directory, then a greater-than sign, so you get C:\this\that> as your prompt. But you can do some other fun stuff:

    • $D – the date
    • $T – the time
    • $V – the OS version number
    • $B – a pipe symbol
    • $G and $T – greater-than and less-than
    • $S – space
    • $+ – a plus-sign for each level of depth in the PUSHD directory (If you’re not a habitual user of PUSHD/POPD, look into it.)

    There are more; do a PROMPT /? to see them.

    I normally set an environment windows by right-clicking My Computer and going to Properties > Advanced > Environment variables, but another fun trick is you can use the SETX command to do this, too. So I did this:

    SETX PROMPT=$T $P$G

    That adds the time to the front of the default prompt. The reason I did this is because Jekyll builds take forever, and I wanted an easy way to tell if I started the build two minutes or seventeen minutes ago, because time loses all meaning on the last day of a release.

    (Thanks: http://www.hanselman.com/blog/a-better-prompt-for-cmdexe-or-cool-prompt-environment-variables-and-a-nice-transparent-multiprompt)


  • The one-line web server

    Every now and again, I run into a situation where a bunch of HTML files can’t be opened by simply double-clicking the index.html, and need to be hosted on a web server to behave properly. I think this used to happen with WebWorks output, and built Jekyll output does this. It’s also sometimes handy to have a web server spinning in the background so you can modify and preview things on the fly.

    In the past when this came up, I’d fall down a wormhole about installing the Apache or IIS web server, or trying to figure out where Apple moved the built-in out-of-date Apache web server in the latest version of macOS. (I think it’s gone completely in Catalina.) But instead of sifting through the many different Apache installers and Medium articles about how to get an entire full stack going, I realized this is dead simple if you have Python installed.

    First, do you have Python installed? A quick python -V will tell you. If you don’t, grab a copy.

    Open a command line in the directory you want to serve up, and if you have Python 3, do this:

    python3 -m http.server

    If you’re a Windows user, that is probably python and not python3.

    If you’re still using Python 2, do this instead:

    python -m SimpleHTTPServer

    Now point a web browser at localhost:8000 and there’s your stuff.

    If you’ve already got something on port 8000, put another port number after the command, like python3 -m http.server 90125.

    Don’t expect to run your Fortune 500’s production environment on this. It’s great for testing, though.

    (Thanks: https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server and https://docs.python.org/3/library/http.server.html)


  • Various Cabin Fever Projects

    Due to cabin fever (or whatever you call it), I’ve been working on a lot of oddball programming projects. I mean, I’m working way too much at the day job, because I can’t really leave the house, so I’m always on. But I’ve also been doing various things (and then not finishing them) mostly because I don’t have a basement where I can start building a boat out of matchsticks or something.

    Anyway, here’s a partial list of what’s on the various back burners of my stove. If you’re really insanely curious about any of these, let me know and maybe I’ll actually finish them.

    • I’ve been messing around more on GitHub. I’ve been doing this at my job too, but I’m trying to make an effort to be more active on my personal profile. If you have the time and you use any open source software, I’d encourage you to do the same. Even if you’re not a programmer, it’s good to know how to complain about their documentation and maybe fix a few things if you find them. My personal profile is here: https://github.com/jkonrath
    • GitHub has caused me to dig up all of the various college coding projects and see if they’re worthwhile to post on there, just for kicks. They are all fairly horrible, so no. I’m almost tempted to post the first coding project I actually got paid to do, which I still have. It was for the USGS and it did something with well depth analysis, which I totally don’t understand. The code itself is an exercise on how to not to do what we’d call Big Data analysis now, and would probably be about ten lines of Python. Fun nostalgia though.
    • Just for kicks, I started writing a Markdown to HTML program, but decided to do it all in straight-up C, using C89 ANSI C and the standard library, nothing more. Outside of Arduino C, I haven’t done much C program in… a long time. I realized why when I started working with strings. I have a newfound appreciation for Python’s built-in string support.
    • I also realized, digging through the archives, that I know more XSLT than I realized. I posted a gist about this on GitHub, but I probably should make a whole project that’s a collection of all the dumb little building blocks I used constantly when I did this on a daily basis. (Like I always have to look up how to split one file into many files. I need to write that down somewhere.)
    • I found this giant XSLT I used at a previous job to chop up Doxygen’s XML output and convert it into something I could pull into a structured FrameMaker doc. Looking at it, I’m not sure how useful it is, because I was doing a bunch of arbitrary reordering of the doc because… well, let’s say just because.
    • I also started working on an XSLT to convert WordPress output to a Flare document. I really do love that Flare documents are just XML, and you can do anything with them.
    • I converted this blog to Hugo, but in the process I realized it’s faster for me on a site this small to keep it in WordPress, so I didn’t use the conversion. It was a fun learning process, though.
    • I’ve been messing with ArchiveBox, which is a neat idea. It’s a system where you feed in URLs and it archives them in various formats. It’s sort of a DIY Internet Archive. I’ve been learning more Docker by running it with Docker-compose, and complaining on their GitHub page about various minor problems. I should spend some time helping them rewrite their docs.
    • Another site where I should pay more attention is Stack Overflow. I’m on there at https://stackoverflow.com/users/99038/jon-konrath. Funny to look back at all the FrameMaker and Doxygen posts I was answering way back when.

    Speaking of obsessively building stuff in your basement, this is one of my favorite videos ever: https://vimeo.com/166403522