djwonk

June 1, 2014 at 9:02pm

2 notes

What if Ansible used XML for configuration management?

You don’t have to go far to find people claiming that one of Ansible's strengths is its “declarative” configuration. Some claim this declarative language is better than, say Ruby (used in Chef) or Puppet’s custom language. Now, this may indeed be true, but let’s get into the details. What declarative language does Ansible use? YAML. This does not seem to raise eyebrows.

My goal is simple. Next time you see any person or project using YAML as a declarative programming language, I want you to raise an eyebrow. If you do this, then I will be happy.

Let’s have some fun. What would people say if Ansible had chosen a different “declarative” language? Pick your favorite. Go on.

Oh, you picked XML? Me too! Let’s think about it: what would happen if Ansible went with XML instead of YAML?

Madness. Chaos. People would run Ansible straight out of town! The pain from XML is still too fresh.

This is strange, though, because YAML isn’t fundamentally different. Yes, I realize that YAML is easier on the eyes (and soul) than XML, but both are fundamentally languages for data transport, not programming.

Perhaps Rails made YAML hip. Perhaps others have not yet despoiled YAML. I suggest to you that Ansible may have, under your very noses, taken YAML too far. Let me explain.

But back to our thought experiment: Ansible + XML! There is little love lost on XML. Big surprise. In addition to being an unwieldy data format for humans to write without significant tool support, it also has come to embody the idea of configuration-gone-too-far. In order to use XML for logic, one often re-invents ways of handling variables, control flow, iteration, and more. To do so, one must create a programming language. Alas, it may not be a good one.

Here is my point: if you find yourself creating a new programming language, why use data exchange format as the substrate? I have a few guesses.

Guess #1: Perhaps you don’t realize that you are creating a programming language. You just went for it.

Guess #2: You thought about using an existing language, such as Ruby or Python, but were concerned about users abusing the power.

Guess #3: You didn’t want to have to write a parser for a custom language. You chose a data language (e.g. XML or YAML) because it is syntactically easy to parse.

To comment on the last theory: parsing the syntax is the easy part. Afterwards, you have to build additional logic (that acts effectively as a run-time) that can execute your programs. Maybe this is easy too, at least at the beginning.

Perhaps, to start, you only need a few language features; perhaps only some basic looping. But then what about sorting, conditionals, custom functions, and so on? As your tool becomes more popular, I predict you’ll find that your users, which happen to be software developers, will ask for more programming-language capabilities.

Personally, I felt a bit uneasy when I saw Ansible using YAML. This uneasiness became more pronounced when I saw `with_items`. Some might say that `with_items` is a helpful hack given the YAML constraints. That’s my whole point: Ansible has invented a programming language (a DSL within YAML), probably without admitting it.

My tentative view is that Ansible is taking an Icarus-inspired risk in using data-exchange language for configuration management. My hunch is that an existing programming language would be better suited.

Thankfully Ansible is not using XML, but that don’t let that comfort you. YAML isn’t fundamentally better, since it is still a data-interchange format.

I see YAML-as-configuration-management as a problem because there have to be better options. Hundreds, if not thousands, of programming languages have evolved to address abstraction, composability, and readability in various ways. It seems like a shame to fall back on YAML without a very good reason.

Yes, this is a one-sided argument. Otherwise, Ansible seems to be a nice configuration management (and remote execution) tool. As a practical matter, YAML may have been a reasonable place to start.

And please don’t tell me YAML is a nice choice simply because it is declarative. It is a declarative data language, not a declarative programming language. There are declarative languages that solve particular problems very well. Some of my favorites are: Prolog, SQL, and Verilog. (I realize that if you made it this far into this rant, I might as well compliment SQL while I had the chance.)

That’s all I’ve got for now. If you have ideas for building an elegant declarative language for configuration management, please get in touch.

P.S. I’m not particularly satisfied with the configuration management tools I’ve seen. They seem too complicated from a data modeling point of view. There seem to be too many arbitrary names being created. It seems to me that all we need are basic functions that can be called, composed, serialized, and versioned. I certainly don’t have it figured out, but I have the impression that no one else has really nailed it either.

UPDATE 9:36 PM: I was wrong in saying “Ansible has invented a programming language (a DSL within YAML), probably without admitting it”. Ansible’s playbook documentation says that “Playbooks are Ansible‚Äôs configuration, deployment, and orchestration language.”

2:26pm

3 notes

Economics of a Supposed Deep Learning Gold Rush

If there is some truth to a deep learning “gold rush”, then I expect the economics will be different from the 19th century gold rush.

I see two key differences in how the underlying resource works:

  1. Finite vs infinite. There is only so much gold available that can be profitably extracted from the earth, but I can’t think of any limit to the amount of customer data that can be extracted. This gives a comparatively level playing field when it comes to accessing the resource. Of course, such theoretical access may be quickly limited by business partnerships or technical constraints. Thought leaders in particular technologies will have competitive advantage to get mind-share and access to early adopters.
  2. Rivalrous vs. non-rivalrous. If I own physical land, there is only so much gold available; I cannot simply copy it. But if I own a significant web property, I can pay multiple data analytics firms to mine my data simultaneously without exhausting the source. If you are a data analytics company selling a service to the owner of a web property, you don’t necessarily *have* to be the first in to add value and get commercial success, at least not due to this particular line of logic.

There is at least one similarity:

  1. Excludable vs. (partially) excludable. If you own physical land, you have reasonable ways to prevent people from stealing your gold. As the owner of a web property, you might think you can control who accesses your customer data. To a large degree, this is true; unless you get hacked or surveilled, you may retain control of your customer activity data on your web properties. That said, your customers leave tracks on various places on the Internet. So their data that you see is, in effect, only partially excludable. Your customers are also someone else’s customers, by way of their other activities and third-party ad placement and cookies. So if you have a valuable customer demographic, you should expect that others are racing to get the insight and value from their data.

The above thoughts are inspired by how economists think about public goods, but they are tentative and could certainly benefit from criticism and discussion.

March 28, 2014 at 2:17pm

0 notes

Toggl, please eradicate your annoying pop-up messages

Dear Toggl,

You recently updated your time-tracking service. One of the changes includes some periodic and annoying notifications that slide up from the bottom of the screen. These notifications implore the user to act on such essential messages such as “Upgrade to Pro” and “Share the Love” — hardly things that a user cares about.

As soon as I figured how to turn them off, I did. I was a few minutes away from switching to another service, too. Why?

These notifications serve your company, not your users. These notifications distract users from their main tasks: doing work and quickly tracking it.

Such “dark art” techniques erode the utility of your user experience. They are the modern day equivalent of nagware. They are just as annoying as those silly countdown timers that are proliferating all over the web. Such visual devices distract our attention without benefit.

Surely your team knows that your users (like me) are multitasking and don’t appreciate unnecessary distraction?

Sincerely,
DJ Wonk

October 1, 2013 at 11:37pm

0 notes

Why is the USA so far to the right of other Western countries politically, both economically and socially? →

Nick M. Garcia’s answer grabbed my attention:

Worth a read. How you live, where you live, how many people you interact with is a key driver in how you view the world. This point really hit home: Put another way, people with unique or fringe interests have less chances that others in their area can reciprocate those interests.

July 31, 2013 at 1:21am

0 notes

Interactive Git Cheatsheet →

July 12, 2013 at 9:52am

0 notes

DuckDuckHack Squatting?

I just searched for “ruby gsub!” in DuckDuckGo. Apparently gsub! is a registered DuckDuckHack, so I got whisked away to the less-than-useful Greek Subtitles Project, which I am not going to link, intentionally. I can see why the creators of the site would do this! Still, one has to wonder how many greek movie enthusiasts want subtitle searching as compared to how many programmers want documentation about regular expressions!

So, is this the future of search? Goodbye domain name squatting, hello DuckDuckHat squatting.

Note: please consider this to be a work-in-progress. I have not investigated how DuckDuckHacks work yet.

June 30, 2013 at 8:30pm

0 notes
Some folks on Hacker News apparently did not appreciate my Perl humor. Maybe it hit too close to home?

I just posted two follow up zingers on the original thread. I’m probably just inviting more grumpster downvoting, but that will be part of the fun!

Some folks on Hacker News apparently did not appreciate my Perl humor. Maybe it hit too close to home?

I just posted two follow up zingers on the original thread. I’m probably just inviting more grumpster downvoting, but that will be part of the fun!

June 28, 2013 at 11:35pm

0 notes

Backfiring Self-Promotion

I just saw this on an open source project: “Why are you not following me on Twitter?”

Why not? Because you are an annoying self-promoter who writes “Why are you not following me on Twitter?”

I just submitted a Github Pull Request as a suggestion to stop this madness.

June 18, 2013 at 10:48am

0 notes

Packed with _THREE-DIGIT-NUMBER_ equations, this cutting-edge book introduces the latest advances in _ADVANCED_ theory, discusses their relevance to _BIG-PROBLEM_, and examines applications of _COOL-TECHNIQUE_ to _GNARLY_ and _GNARLIER_ problems.

— This is a winner book summary style, directly adapted from an Amazon book review summary. I converted it to mad-lib form. If you use this style, I guarantee I and others will want to buy your book.

June 17, 2013 at 6:29pm

0 notes

RocketLawyer: Broken Questionnaires, Broken Login, Clunky UI

Here is my experience with RocketLawyer. I’ve given them two tries.

When I incorporated my business with them, they signed me up for a ~$400/year plan without me realizing it. (They probably didn’t mention it, as I tend to notice large fees.) At the time, I just thought, “maybe it will be worth it.” About a year later, I haven’t been impressed with the value add given the cost. So I didn’t renew.

A few weeks ago, I needed to draft some independent contractor agreements. So I signed up again. The site does “look” nice on the surface. It creates the impression that the experience will be good. In my experience, that is skin deep. Today, I pulled the plug. Again. I don’t think I’ll be going back. Here’s why.

* The UI is clunky. Managing documents feels like a bad Windows program instead of a modern Web UI.

* Their systems have obvious problems. For example, I updated my email address, but I continued to get notifications to the old address weeks after.

* Content. The “document from questionnaire” idea is decent in theory — TurboTax has it down — but RocketLawyer hasn’t gotten it quite right yet. I’ve seen them generate errors in the generated document. So, proofread your documents and be ready to remove “ERROR” if the numbering is incorrect. How many other incorrect clauses are generated is unclear. When I noticed a problem, I contacted customer support, hoping to see corrections right away. I didn’t hear back quickly, unfortunately.

* If you have to modify the contract outside of the questionnaire, you can’t go back to the questionnaire. As a software developer myself, I can see that this is a non-trivial problem, but I also wish they would put some effort into solving it well.

* Today, the login page was broken. Customer support says it was for site maintenance. I’d call that unannounced site maintenance — right when I wanted to look over some documents. So, my conclusion is that RocketLawyer is not taking their online service very seriously — unfortunate considering that they seem to have sizable investment and the ability to do so.

Customer service, via chat, has been professional and kind. But I don’t the ship is going to move much unless customers demand more. I was a squeaky wheel, I admit.

I hope there are better alternatives out there. Maybe legal services are relatively overpriced and relatively underperforming in comparison to other online services. Maybe I’ll be disappointed by LegalZoom or whatever else is out there. But I’m definitely going to send a signal to a $400/year service that I expect more than mediocrity.

(I’m reposting this from my answer on Quora.)

Update: Customer Service says they’ll refund my annual plan on a pro-rated basis. I’m supposed to be on the lookout for an email.