Technological Conservatism

April 08, 2013

John Siracusa has, in his laser-focused, analytical style, perfectly captured something about technology that I always knew, but never knew I knew. His latest post, Technological Conservatism is a must read:

Beneath what seems like a reasonable feature request lurks the heart of technological conservatism: what was and is always shall be.

(emphasis his).

I love everything about this, and it’s a helluva lot better than [Steve Yegge’s stinker][yegge].

Siracusa’s article inspires me in two ways:

  • Stop holding “what I know” so dearly. “Lead or bleed”, as Chad Fowler says
  • Stop accepting unjustified idioms & conventions as being “more correct”. “That’s just the way it’s done” is often the best explanation for doing things a particular way, but it’s not actually a legitimate reason for anything.

What RSS Means to Me

March 18, 2013

With the recent announcement that Google is shutting down Reader, there’s been a lot of talk about RSS: Is it just a geek-only thing? Isn’t Twitter good enough? Why don’t you read “real” journalists instead of blogs?

RSS is a huge part of my online life - every time I fire up Reeder and see stories, I get very happy. The way I use RSS (which I believe is the best way to use it) can’t be replaced by anything else that I’m aware of.

So, why do I think RSS is so great?

Is Your DSL Really a Type System?

February 28, 2013

The UserVoice developer blog posted an interesting article yesterday talking about how they solve “The Rails Problem” of complex Rails apps having obese models that stymie code re-use. The naive approach is just to make classes.

UserVoice’s approach is different: they made a DSL for describing service calls. The thing is, it’s sort of a type system - and a verbose one at that.

Stitch Fix!

February 19, 2013

Today is my first official day1 a Stitch Fix, where I’ll be joining the small but awesome engineering team! What I love about Stitch Fix is that it’s such a simple business: buy clothes for one price, sell them at a higher price. It’s the very essence of what a business does. “All” we have to do is find more people to buy things from us, figure out what they want to buy, and sell to them as efficiently as possible.

What I mean by 'calling out' bad code

January 30, 2013

In my earlier post on how the replace command-line app isn’t “bad code”, I said:

Now, I’m all for bad projects and bad code being called out. Our industry produces some shitty code, and a general lack of respect for craft can kill business, or even people. So bad code needs to be pointed out.

The words I’m using here are a bit loaded, and actually distract from my real meaning. I don’t want to change the post, but thought it was worth explaining what I meant and why it’s important.

What I learned working at LivingSocial

January 27, 2013

Friday was my last day at LivingSocial. I’m moving on to a small team at a small startup that I hope will eventually be big. My tenure at LivingSocial was short - it would’ve certainly been longer had this opportunity not come along - but I learned a lot in the 14 months I worked there.

Sure, I learned stuff about Rails, Ruby, service-oriented architectures, asynchronous processing, and credit card payments. But that’s not what I’m talking about. Those skills are great experience and will look just fine on my resume, but I learned two things that made me a better developer:

  • Deliver results, not promises
  • Assume everyone knows what they’re doing

If you call out bad code, make sure it's bad first

January 24, 2013

So, someone shared some code on Github and some classic developer snark rolled in. And then there were some apologies about it. I saw those snarky tweets when they came through, clicked to the Github project, didn’t understand what the issue was, and went back to work.

Now, I’m all for bad projects and bad code being called out. Our industry produces some shitty code, and a general lack of repsect for craft can kill business, or even people. So bad code needs to be pointed out. The question is, is this bad code? I think we can all agree that if it is bad code, we should try to point it out in a more constructive way (and I know it’s easier said than done), but let’s forget the tone and focus on the message. Is replace a silly project, or implemented in a stupid way?

No, it’s not.

Bad Programming in Java is Dangerous

January 20, 2013

Saw a blog post this morning titled Why Functional Programming in Java is Dangerous. Author Elliotte Rusty Harold sets up the world’s worst straw man I’ve seen. He talks about Uncle Bob’s post on the advantages of functional programming. Elliotte’s thesis is that Java and JVM just can’t handle this sort of thing, and then sets out to prove this with some terrible code that, unsurprisingly, is terrible. He takes this bit of Clojure

(take 25 (squares-of (integers)))

And “re-implements” it in Java. He does this by implementing integers to just allocate an array of all the integers.

Yeah.

What Dependency Injection Really Is

January 07, 2013

Both DHH and Tim Bray make great points about “dependency injection” and its issues regarding Ruby and testing. My colleague Adam Keys makes a similar point, though doesn’t call his anti-pattern “dependency injection”.

The scare quotes are because neither DHH nor Tim are accurately representing the purpose of dependency injection. Dependency Injection is not about a framework, XML, factories, or testing. It’s about simplifying code. Let’s see how.

DCI vs Just Making Classes

January 02, 2013

There’s been lots of talk about DCI in the Ruby community lately. As I mentioned, I am only partway through Jim Gay’s unfinished book on the subject, but I ran across a blog post that had a more substantial example in it.

Titled Why DCI Contexts?, someone named rebo, shows a starting point of “normal” code, then “DCIzes” it, then walks through adding new features to the system. It’s a bit long, but his explanation is great, and it shows a lot more than just calling .extend on an object - he clearly demonstrates how roles and contexts are used to implement specific use cases.

Despite the deftness of his explalnation, I find the result code entirely too complex, thanks to confusing abstractions, a needless DSL and leaky abstractions. It would all have been a lot simpler if he Just Used Classes®

Let’s see why.