Choose Boring Technology

But of course, the baggage exists. We call the baggage "operations" and to a lesser extent "cognitive overhead." You have to monitor the thing. You have to figure out unit tests. You need to know the first thing about it to hack on it. You need an init script. I could go on for days here, and all of this adds up fast.

...

The problem with "best tool for the job" thinking is that it takes a myopic view of the words "best" and "job." Your job is keeping the company in business, god damn it. And the "best" tool is the one that occupies the "least worst" position for as many of your problems as possible.It is basically always the case that the long-term costs of keeping a system working reliably vastly exceed any inconveniences you encounter while building it. Mature and productive developers understand this.

via Dan McKinley :: Choose Boring Technology.

I've had way too many conversations recently that had some variation of "people should just get over it and learn new things". New has a lot of cost. Even if it's good, new brings load. If you exceed the digestion rate of new technology on people, they hit a wall, give up, and go home mad.

OpenStack Emacs Tools

Over the past few weeks I've been tweaking my emacs configs, and writing some new modes to help with OpenStack development. Here is a non comprehensive list of some of the emacs integration I'm finding useful in developing for OpenStack (especially things that have come up in conversation). URLs provided, though I won't walk through all configuration in depth.

tramp

Tramp is a built in facility in emacs that lets you open files on remote machines via ssh (and other protocols). This means your emacs runs locally, with all the latency gains that has, as configured as you would like, but editing can be done across multiple systems. A remote file url looks like /servername:/file/path. All the normal file completion that you expect works after that point.

I tend to do code that doesn't need a full stack run locally on my laptop or desktop, but full stack code happens on my NUC devstack box, and tramp lets me do that from an single emacs instance.

More info about tramp at emacswiki.

fly-hack

Emacs has an in-buffer syntax checker called flymake. There are various tutorials out there for integrating pyflakes or flake8 into that. However in OpenStack we have hacking, which extends flake8 with new rules. Also, every project turns on custom ignores. Also, many projects extend flake8 further with custom rules for that repo.

screenshot_151

fly-hack uses the flake8 in the .tox/pep8 venv for each project, and uses the tox.ini config for each project, so when in Nova, nova rules will be enforced, when in Cinder, cinder rules will be enforced. Mousing over the error will pop up what it is (you can see the H306 in that screenshot). It has a fallback mode when using it over tramp that's a reasonably sane flake8 least common denominator for OpenStack projects.

More info at fly-hack github page - https://github.com/sdague/fly-hack

stacktest

Our testr / subunit / testtools testing toolchain gets a bit heavy handed when trying to iterate on test development. testr discovery takes 20 - 30s on the Nova source tree, even if you are trying to only run 1 test. I became inspired at the Ops Summit in Philly to see if I could do better. And stacktest.el was born.

screenshot_153

It's mostly a port from nosemacs which allows you to run tests from an emacs buffer, however it does so using tox, subunit, or testtools, depending on whether you want to run a top level target, test a file, test an individual test function, and/or use pdb. It works over tramp, it works with pdb, and it uses the subunit-trace tooling if available.

I've now bound F12 to stacktest-one, which is a super fast way to both iterate on test development.

More info at the stacktest github page - https://github.com/sdague/stacktest

pycscope

OpenStack is a lot of code, and uses a ton of libraries. git grep works ok in a single repo, but the moment some piece of code ends up calling into an oslo library, that breaks down.

Peter Portante, OpenStack Swift contributor, maintains a pythonized version of cscope. It parses the AST of all the files to build a quite rich symbol cscope database. This lets you search for definitions (searching down), calling points (searching up), and references (searching sideways). Which very quickly lets you dive through a code path and figure out where you end up.

screenshot_155

The only draw back is the AST parse is consuming on something as large as the Nova tree, especially if you index all the .tox directories, which I do to let myself get all the way back through the library stacks that we include.

You can learn more about pycscope at it's github page - https://github.com/portante/pycscope

flyspell-prog-mode

Emacs includes a spell checker called flyspell. Very useful for text files. What I only learned last year is that there is also a flyspell-prog-mode, which is like flyspell, but only acts on comments and strings that are semantically parsed by Emacs. This helps avoid a spelling mistake when writing inline documentation.

screenshot_156

More information at Emacs wiki.

lambda-mode

This is totally gratuitous, but fun. There is a small mode that does a display adjustment of the word 'lambda' to an actual 'λ'. It's a display adjustment only, this is still 6 characters in the buffer. But it makes the lambda expressions pop out a bit more.

screenshot_157

More information at Emacs wiki.

The important thing about having an extensible editor is actually extending it to fit your workflow. If you are an emacs user, hopefully this will give you some fun things to dive into. If you use something else, hopefully this will inspire you to go looking into your toolchain for similar optimizations.

Keeping track of work / life balance

Working from home is great. No commute. Really good coffee 50ft away. Being able to get started as soon as I wake up. Being able to break for exercise / food / etc when it fits in my natural flow, instead of having to work around an office / commute schedule.

There are some drawbacks. One of which is there is no real signal on when the day is done. Not realizing the building has emptied out and you shouldn't be there any more either. I had a few weeks early in the new year where I was completely burnt out and grumpy by the time I got to Thursday. Doing some quick mental math, I realized I had put in far too many hours those weeks.

I have a pretty solid work from home routine. I work in my home office (and that's almost the only time I'm in there). I have a fast desktop computer that I do all my work from when I'm home. Enough so that I've written automation around the screensaver events to do things like mark me away on IRC. This seemed like a natural way to keep track of how much I was actually working at my computer through recording all the lock / unlock events.

screenshot_216

The latest version of this program records these lock events week by week. It can then add them together and give me a view on how long I've worked both today, and this week. A Linux desktop notification is sent every time the screensaver is unlocked, as well as every time it hits a round number. It's just enough of a signal to realize it's time to stop for the day / week.

I've been doing this for a month now. The results are interesting. First, I learned out much I was actually working. It was far more than I had realized. So I consciously started capping days and weeks when I got to a number I felt was fair. This often means that Friday is a pretty light day, and includes a long family lunch outing. It also means I never miss a chance for a family walk in the middle of the day, because I have time for it, I even have numbers to prove it. (Note: I'm mostly proving it to myself so I don't feel guilty when I put down the computer, as I work in a great organization where no one else cares about this as a metric.)

It's also had an interesting impact on free time hacking. I now still have enough energy in my tank at the end of the week to still be able to do interesting things with computers that aren't strictly work. Saturday mornings before the girls wake up has become tech exploration time again. This has included relearning elisp, and actually writing some emacs extensions recently (fly-hack, stacktest). I also made progress on my home weather station code for the first time in a year.

It's amazing what happens when you measure a thing, not for anyone else, but for yourself.

Unicode Shortcomings

The evolution of emoji is impressive and fascinating, but it makes for an uncomfortable contrast when other pictorial writing systems – the most commonly-used writing systems on the planet – are on the chopping block. We have an unambiguous, cross-platform way to represent “PILE OF POO” (💩), while we’re still debating which of the 1.2 billion native Chinese speakers deserve to spell their own names correctly.

via I Can Text You A Pile of Poo, But I Can’t Write My Name by Aditya Mukerjee | Model View Culture.

A really eye opening look at Unicode's missing content. A system which was designed to encode the languages of the world has some really gaping holes when it comes non western characters.

A memory desk

Memory Desk

This Memory Desk is a tool to record all the small items you write down once, but intend to forget tomorrow.

I've come to realize that I'm somewhat obsessed with how we remember the past. This is the latest installment in that series and a more serious attempt at furniture making. There are a hundreds of little things that we don't try to remember every year or even every week. Does the sum of all these tiny parts produce a new narrative on our lives?

1,100 yards of paper will record the lists, the phones numbers you call once, the pixel size of that box on that website, the street name of that business, and the long division you try to remember.

via ANALOG MEMORY DESK - Kirsten Camara.

Extremely cool idea. If I had a place to put one of these, I'd definitely do it. Blueprints available under a creative commons license, so you can build your own.

Microwaves Explained

The reason microwaves don't cook evenly comes straight from physics. When you continuously feed waves into a space—which is what microwaves do—you'll often have some "dead" spots:

In two dimensions, you get a similar but more complicated pattern.

via Microwaves.

All to answer the question of what's the best way to reheat Chinese leftovers. How I love 'What If'.

On Remote Work

As soon as you get beyond a few people, you are working “remotely”. If you aren’t in the same room you will have your main workflow happening through tooling. Yes, you can get together to meet face to face on topics, but that isn’t your general workflow.

via Why we run an open source program - Walmart Labs // TODO: Talk openly, develop openly.

I've never seen that so crisply and truthfully stated before. The whole article is pretty great.

The Expanse

Early in January I found out that the SyFy channel has a new TV series coming this year, called The Expanse. It's a story that takes place 200 years in the future. Humanity has colonized Mars, which has become independent, and set up mining / science operations on a number asteroids and moons. It's all based on a series of books that started publishing in 2011.

I decided to not wait for the series to air, and dive in on the books. 4 have published so far, and they all follow a narrative style, where the chapters flip back and forth between different character's perspectives. The first book is two character perspectives, all the later ones are four. Some people that have distinctly small sub roles in early books become a main point of view later. The way it's done makes it feel like a rich environment, you'll never know when players will return in the future.

I've really enjoyed the series so far, can't wait for book 5 to come out this summer. There are lots of really neat ideas in the books so far. The time delays on communication throughout the solar system, and what that causes. The "spinning up" of Ceres and Eros to provide centripetal artificial gravity on the inside. The use of Ganymede as both a Farming Planet, and where all the Belters go to carry their children to term (because it has a magnetosphere). And many more really interesting ideas that provide spoilers to  the big story arc.

Definitely worth a read.  And check out the trailer below for this coming to TV later this year.

Smart Home Woes

Gizmodo has a great piece on cheap home automation gone terribly mediocre. It's actually really interesting to realize how often we as humans need to relearn the idea of resiliency, durability, usability and in systems. Home automation is neat, and I've enjoyed playing with parts in it. But if your normal workflow requires a smart phone, you are taking a step backwards. Sadly, most of the solutions out there today head down that path.

A much better approach would be to put smarts directly into existing electrical structures (wall plates, switches), and ensure that all of them had physical manual override. Some of the zwave wall switches out there do that, to the best of my knowledge no one has done that with plugs.

I think a lot of the folks working on these solutions probably need to read The Design of Everyday Things. I promise if you read that, you'll never look at a phone or a wall switch the same way again.

 

Various rambling thoughts from my personal corner of the internet