Just a quick blog post because this took way too long to figure out, hopefully this saves somebody else an hour of head banging… We use puppet to manage our machine configurations. In one case I wanted to manage a multi-line config file with the structure:

[core]
repositoryformatversion = 0
filemode = false
bare = false
...

Fortunately puppet makes this pretty easy with the augeas resource, but figuring it out took a little digging… at first it appeared I should use the Inifile.multiline lens however apparently the Inifile module isn’t meant to be used directly but rather from a derived lens. So armed with knowledge here’s the puppet directive to set filemode to true:

	augeas { "core-filemode":
		lens => 'MySQL.lns',
		incl => "/path/to/config",
		changes => [
			"set target[.='core'] core",
			"set target[.='core']/filemode true",
		]
	}

 

In The Hungry Programmer Jesse Storimer writes about the small decisions we make on a regular basis and how the affect our health and our code. The analogy is a play on the concept of technical debt which I have been fascinated with lately. Technical debt is the idea that when you take shortcuts to ship code you are borrowing against the future. Future resources will be consumed fixing old issues rather than developing new features.

Every day “the business” places constraints on just how long development can go before shipping a feature or new version. This is good when if provides momentum but bad when it creates debt however in financial terms sometimes it makes sense to go into debt to accomplish a goal. Imagine if you couldn’t buy a house until you had all the cash up front to pay for it, or you missed the sale on that new car because you were short a $100, in these cases debt is a tool. In foodie terms sometimes it’s just more realistic to eat at takeout than take the family to the new gastropub with locally sources grassfed beef. These practices are not bad but they are unsustainable – so the question is how do you measure the cost of the “interest” you’re paying, how do you know when your code is “fat” and about to suffer a heart attack?

Well like a real diet you have to start measuring. About two years ago I went on a diet and lost 50lbs so the analogy is fresh for me. On that diet I measured two things: overall weight and percentage of body fat. Progress was slow at first but by about 30 days I started to see some limited progress and then rapidly my body learned a new pattern and by 60 days I was loosing 10lbs a month. Because I could see my progress each day I had real-time feedback on the positive or negative impact my previous day’s choices had and this further entrenched positive choices.

So let’s take this back to programming. We need a scale and some consensus on what healthy looks like. First off you must know where your time is going. It’s against the software engineering ethos if you cannot account for where your time is going you cannot hope to understand the cost of poor code. Even simple measurements like a daily break down of time on new features v.s. bug fixes and firefighting can provide the basis for understanding just what that last half ready release cost and continues to cost going forward. The more granular you can get (within reason) the more insight you can provide and the more convincing your argument to non-technical counterparts.

Most of the environments have typically been about 50/50 in terms of new development v.s. bugs. I don’t know if this is particularly healthy (I rather think not). How about you – what do you think healthy code looks like?

Wired Magazine has dedicated it’s January issue to robots and the humans they serve. One of the coolest bots they feature is Baxter designed by Rethink Robotics. Whats so cool about Baxter? Unlike other robots Baxter is aware of it’s surroundings and in a limited way able to use emotive expressions to non-verbally communicate with those around it. Read the rest of this entry »

As CTO of Skinit I’m constantly meeting with prospective customers who are eager to learn how they can add a co-creation, customization, or personalization feature (collectively “Customization” with a capital ‘C’) to their existing product offering. Conversations, guided by our prospective clients, often start off with an overview of their current product offerings and quickly move to a discussion about which products cater to the “customization” demographic and then finally how and where they want to add this new “feature” to the limited set of SKUs where it makes sense. Customers know exactly what they want – or so they think.  Read the rest of this entry »

For those of you who don’t know the namesake of this blog, Vannevar Bush, was not only a leader in early computing but he also played a major political role in the development of the US nuclear weapons program as director of the National Defense Research Committee. It is only appropriate then that I follow in my namesake’s steps with a few thoughts of my own about the current political state of nuclear materials and proliferation. Read the rest of this entry »

Since moving to x86 hardware and the introduction of virtualization tools like Parallels (and other similar applications) many of the barriers that once prevented users from leveraging Apple solutions have been removed. Apple has seen a small but growing resurgence in enterprise adoption. In our organization Read the rest of this entry »

Recently we had to change our ecommerce system so that shipping costs scaled with the number of units in an order. It would have been easy to simply create a table of X price at Y units, but that seemed so arbitrary, so unfair to the customer that I should just dictate price changes.

Formulas on the other hand Read the rest of this entry »

I recently had a somewhat frustrating experience with mod rewrite, it appears I’m not unique in this. There are a lot of decent explanations and examples of mod rewrite out there so I’m not going to cover that ground. I will however cover the particular problem I had which had to do with i18n (internationalization) and backreferences; so if those topics interest you stick around.

First the problem: We run a web platform hosting several domains (e.g. http://www.supersite.com, and short.url.com, etc…). We’re already using mod rewrite to store Read the rest of this entry »