0:00 24:00

Tue August 23rd
Comments (View)

16:01

"at Boundless Learning, engineering sets the pace. We get shit done, we get it done fast, it goes into production within 15 minutes of pushing it to master (feels like an eternity - we’re working on lessening that time), and we move on. If marketing or corporate wants something a certain way, they come to us, it gets prioritized, and it very often gets done later that day. Nothing ever gets held in limbo because someone needs to sign off."

Ben M Greene: Why Continuous Deployment Matters

True that; it’s great defining your startup engineering culture deliberately. Our team decided to have a scalable, auto-deployed infrastructure from day #1, and it’s paid dividends in a big way since then.

Mon August 22nd
Comments (View)

14:00

Insidious state of State / Python ruins weekends.

TL;DR: the worst bugs involve state. Prefer functional languages, and you’re far ahead of the curve.

This weekend, I went to visit a good friend in NYC. Unfortunately, there was a lingering bug in a part of Boundless Learning’s code that was gnawing the back of my mind. Some of our data collection was corrupt, and for the life of me, I couldn’t figure out why.

Like all epic bugs, it went from major-issue, to full-stop-critical, and I spent my sunny NY-Saturday in front of a laptop, followed it with four fitful hours of sleep, and awoke from a nightmare finally capable of solving the issue.

And it all came down to Python’s woeful implementation of default function arguments.

In Scala, Ruby, and perhaps a hundred other languages, you can provide default values to function arguments. If the caller doesn’t provide an argument a value, the function uses the default value instead. Simple, convenient.

In Python however, the “default value” is not bound at call-time, but at the time of function-definition. 

That’s ridiculous & wrong.

I’ve recommended Python to a fair number of people. In terms of semantics, syntax, general productivity, maintainability, it far outstrips a language like PHP. However, spending your weekend solving a subtle multi-threaded data/state issue that exists because of poor language-design choices, is a reminder that tools AND abstractions matter. Abstractions shape your productivity, and they shape your thinking.

At Boundless, we aren’t afraid of using some seriously good abstractions, and while part of our server infrastructure is Python based, the other 97% is written in Scala. Beyond having sane default-argument semantics, Scala code skirts this class of problem entirely: you simply don’t use mutable data structures. When your sessions are client-side, your server stateless, and your code stateless, it frees up developers to just look at the single function they are in, and know that everything needed to understand it is laid out lexically in front of them. 

Let me repeat that, and then contrast to any non-functional/state-ful language:

In a functional language, to understand the realm of possibility for how a function will evaluate, you need only look at the value bindings in scope (typically your arguments), and the other (side-effect free) functions you call. You can make very real, valid assumptions, and understand your invariants. You needn’t consider what the rest of the application is doing, because none of it is allowed by the compiler to alter the value of what is in scope. “What you see is what you get” in functional languages. 

Contrasting that: in a imperative/state-ful language, you CANNOT make assumptions, and there are FEW invariants. You MUST to take the rest of your code-base/execution model into account to understand any given line of code, because your assumptions are at the mercy of how well the system & your team-mates happen to respect them. You might not worry all the time, and if you code idiomatically, generally you’ll avoid problems, but you can never be certain, and once in a while, you’ll lose a weekend to the most subtle of issues that is ultimately caused by using mutable data structures.

It can’t be stressed enough that by greatly restricting the realm of what’s allowed, you make more expressive what’s written (hence the name of this blog). The more guarantees you have (lack of mutability, adherence to known types, code invariants, etc), the more can be said about your code.

It’s late 2011, and if I deal with another state-based bug this year, it’s too soon.

Footnotes:

  1. For those of you who would poo-poo functional/typed programming languages, I wish you well, the rest of us will be producing skyscrapers, and you can continue repairing brick huts. 
  2. Yes, Scala has mutable data structures & variables, which are avoided by idiom. On balance, this is more of an issue in theory than it is in practice. Defaults matter, clearly, if the bug in subject was any indication. There is always need for state-ful programming, because sometimes it IS the best abstraction. The point of this post is that it is not the best DEFAULT abstraction for the vast majority of programming problems & day-to-day code.

Wed August 17th
Comments (View)

16:01

Sat August 13th
Comments (View)

17:11
As usual, Boundless is cranking & rocking. Feel free to fuel our fire w/ your tunes!

As usual, Boundless is cranking & rocking. Feel free to fuel our fire w/ your tunes!

Wed August 10th
Comments (View)

21:14
infoneer-pulse:

Spoilers Don’t Spoil Anything

The experiment itself was simple: Nicholas Christenfeld and Jonathan Leavitt of UC San Diego gave several dozen undergraduates 12 different short stories. The stories came in three different flavors: ironic twist stories (such as Chekhov’s “The Bet”), straight up mysteries (“A Chess Problem” by Agatha Christie) and so-called “literary stories” by writers like Updike and Carver. Some subjects read the story as is, without a spoiler. Some read the story with a spoiler carefully embedded in the actual text, as if Chekhov himself had given away the end. And some read the story with a spoiler disclaimer in the preface.
Here are the results.
The first thing you probably noticed is that people don’t like literary stories. (And that’s a shame, because Updike’s “Plumbing” is a masterpiece of prose: “All around us, we are outlasted….”) But you might also have noticed that almost every single story, regardless of genre, was more pleasurable when prefaced with a spoiler. This suggests that I read fiction the right way, beginning with the end and working backwards. I like the story more because the suspense is contained.

» via Wired

If it was good enough for the ancient Greeks, it’s good enough for us.

infoneer-pulse:

Spoilers Don’t Spoil Anything

The experiment itself was simple: Nicholas Christenfeld and Jonathan Leavitt of UC San Diego gave several dozen undergraduates 12 different short stories. The stories came in three different flavors: ironic twist stories (such as Chekhov’s “The Bet”), straight up mysteries (“A Chess Problem” by Agatha Christie) and so-called “literary stories” by writers like Updike and Carver. Some subjects read the story as is, without a spoiler. Some read the story with a spoiler carefully embedded in the actual text, as if Chekhov himself had given away the end. And some read the story with a spoiler disclaimer in the preface.

Here are the results.

The first thing you probably noticed is that people don’t like literary stories. (And that’s a shame, because Updike’s “Plumbing” is a masterpiece of prose: “All around us, we are outlasted….”) But you might also have noticed that almost every single story, regardless of genre, was more pleasurable when prefaced with a spoiler. This suggests that I read fiction the right way, beginning with the end and working backwards. I like the story more because the suspense is contained.

» via Wired

If it was good enough for the ancient Greeks, it’s good enough for us.

Thu July 28th
Comments (View)

13:53

Scala, want to win? Here’s what’s missing:

Killer compiler errors.

In my 10+ years experience w/ statically-typed functional programming, I can say without a doubt, the biggest impediment to both productivity and newbie-adoption is the utter OPAQUENESS of the compiler errors.

When one decides to use a compiled language, you agree to argue with the computer in exchange for correctness of code. You tell it what (you think) you want it to do, and it complains you’re not making any sense. Once you reach a common ground, the code flies, the bugs dissolve, and you’re left with a kick-ass executable.

So why, then, do compiler writers so rarely invest in making user-friendly compiler error messages? In large part, it’s because the compiler authors have a *deep* and intuitive understanding of even the most complex semantics, and like most logging, error output is a necessary evil. However, for a neophyte, the language presents just a few pieces of UX: the syntax, and the compiler errors. 

At Boundless Learning, we’re a happy Scala-shop. And yet, near daily, someone on the dev-team runs into a perplexing compiler error/issue that could be quickly resolved if the compiler formatted the error just a little bit smarter, surfaced more detail, or frankly, was written in a more human manner.

Scala contributors, what you’re doing is amazing, and the opportunity to increase/ease adoption by investment in compiler errors is *significant*.

Sun July 3rd
Comments (View)

14:31

Wed June 29th
Comments (View)

20:31

Thu June 16th
Comments (View)

12:34

Tue June 14th
Comments (View)

11:54
thegongshow:

I *love* all the data exhaust coming out of Stack Exchange.  
Here’s a simple chart demonstrating the correlation between the quality of a developer and age.  Older hackers rule.

This is pretty cool stuff. Although, I’m sure there’s a real bias here towards older devs who are still involved w/ community are better hackers, because clearly the pool of them on stack exchange is much smaller, it makes it harder to trust the average rep as being indicative of older hackers as a whole.

thegongshow:

I *love* all the data exhaust coming out of Stack Exchange.  

Here’s a simple chart demonstrating the correlation between the quality of a developer and age.  Older hackers rule.

This is pretty cool stuff. Although, I’m sure there’s a real bias here towards older devs who are still involved w/ community are better hackers, because clearly the pool of them on stack exchange is much smaller, it makes it harder to trust the average rep as being indicative of older hackers as a whole.