Stop and Think
When I started out as a developer and designer, I know I was clever. When folks asked me to design and develop a software product, I would ask a few questions to confirm that I understood what was asked of me, listen to their answers, then set about making the product. Request, build, ship. Easy!
My mentor, who was definitely smarter than me, used to yell at me to Stop and Think.
Migrate Octopress / Jekyll Posts to Ulysses
I wanted to move my published writing stashed in my Octopress/Jekyll site into my current writing workflow environment, Ulysses. Dragging and dropping the files from the _posts folder was not an option, because:
- The file names were messy
- There is no title in the file, it’s in the Markdown metadata
- I wanted to keep the publication date on the imported files
So, I wrote a horrible script to do it.
The script takes a _posts Octopress or Jekyll folder and processes each file into an OUT_PATH as a set of clean Markdown files, making a few changes along the way. It’s a mix of Ruby to handle the YAML front matter and shell commands to do the actual work. And it runs as follows:
Notification City
It is best for your technology stack to tell you what went wrong as soon as it goes wrong to get the right level of attention in the correct timespan.
I run a massive technology stack at work, filled up with multiple servers, plenty of web applications, loads of C++ programs and massive numbers of scheduled and recurring tasks, and I do it with an insanely tiny team and no DevOps folks. Almost all of the time, our software works as designed and the entire network of systems runs just fine. Just like yours.
Coding Style Standards in 2017
I’ve been writing software for well over 30 years, I’ve spent well over my 10,000 hours and gotten rather good at it. And I still write to a very rigorous coding style standard.
You’re kidding right? Its 2017, code style guides are so passé.
Nope. I’m deadly serious.
Get off my lawn
Some of us remember when coding styles were de rigeur. When you climbed off your commuter dinosaur and joined a coding team, the first document they gave you was the coding style guideline. It was a thick, three-ring binder that covered everything from naming, spacing, commenting, position of braces, white space rules, spaces or tabs and the line length rule.
MathJax in Markdown
Adding mathematical formulae to HTML pages is easy these days using MathJax. But I create all my documents in Markdown format on my Mac. This post shows how to add mathematical formulae to your Markdown documents on the Mac and have them preview and export to PDF correctly.
MathJax in Markdown
Adding mathematical formulae to a markdown document simply requires you to use the MathJax delimiters to start and end each formula as follows:
On the New MacBook Pros
Much has been written, tweeted and complained about the new MacBook Pros released by Apple last week. Complaints about the 16GB limit, all-in switch to Thunderbolt 3 (USB-C), the removal of the SD-card and MagSafe, the new keyboard, the aged CPUs, the slow GPU, dongles, that they are not “Pro” level machines, and more. More and more influential folks are writing that Apple has forgotten the Mac, that the Mac is doomed or dead.
The Gentleman James V
Last evening a package arrived from Amazon. A package that neither I nor my wife had ordered. A mysterious, enigmatic package. From the outside, there was no indication of its content or providence.
We discussed where it could have come from. What could it be. Should we open it. Maybe Amazon sent the package to the wrong person. Yet the delivery address was certainly mine.
Finally, I opened it.
It contained a bubble wrapped box, a bunch of packing bubbles and three slips of paper. The first slip was a packing slip describing the content of the bubble-wrapped box. The second was a return slip. Where this package came from remained a mystery.
The Annual Dependency Library Upgrade Process
At work, we write a lot of code. In order to remain productive, we reuse the same proven dependent libraries and tools over and over again. Which is fine. Until we start seeing end-of-life notices, vulnerabilities, deprecations, performance improvements and bug-fixes passing us by. At some point we need to update our dependencies for performance and security.
But its not that easy.
Take some of the libraries we use:
- Google’s Protocol Buffers are amazing. We’ve been on 2.6.1 for ages, but 3.1.0 is out and it supports Swift and Go, two languages we surely would like to use. But the
proto2format we use everywhere is not available in the new languages. We need to migrate. - ZeroMQ moved to a secure
libsodiumbase in 4.1, making it much safer to use. But the C++ bindings from 4.0.5 are incompatible. We need to migrate. g++on CentOS 6 is ancient, version 4.4.7 from 2010. We’ve been using thedevtoolset-2edition 4.8.2 from 2013 to get C++11 compatibility, with a few library hacks. But that version ofg++produces horribly slow and insecure C++11 code. We skippeddevtoolset-3even thoughg++4.9 was better.devtoolset-4is out, usingg++5.2.4 from 2015, still not the latest, but it is much better at C++11 (without our hacks), more secure and faster. Yet is ABI incompatible. We need to migrate.
The amount of work seems staggering given we have well over 100 protobufs used across our code base, ZeroMQ everywhere and everything is compiled for production using devtoolset-2. The old libraries and tools are a known, proven platform. The current code is stable, reliable and fast enough. It ain’t broke.
Minimal Project Management - 6 Months Later
Just short of six months ago, I wrote about how I was transitioning to Minimal Project Management as my team was growing at work. So, how did it go? Did it work? Any Problems?
In short, after a few false-starts getting our heads around the intent of the Statement of Work document, it went — and continues to go — very well. Projects we used to start and never finish are now completing and shipping. Communication within the team and with our users is better. And our throughput is up.
Attractive Multi-Line SQL Statements in C++
I often need to embed SQL statements in C++ code. Unfortunately, many of mine are long and complex. Even the simple ones are wide. This leads to the following ugly code:
std::string s8("SELECT id FROM lst_quotes WHERE route_id = $1 AND lst_request_id = $2 AND quote_id = $3;");
… which means I need a massively wide screen to view it (and it violates my 80-column rule), its not formatted legibly and even with wrap, its hard to understand — and this is a simple example. Its a maintenance nightmare.
