Helping people solve problems

Tonight, we were at my brother-in-law’s for dinner, and his two year old wanted him to help her with her food. The chicken had already been cut into small pieces, and the bowtie noodles weren’t very big, so it wasn’t like she couldn’t eat it herself… she just didn’t want to make the effort.

My brother-in-law did something cool: he asked her, “What do you want me to do? Show me.” And then he had her walk through exactly how she wanted him to help her eat the food: stab the chicken with the fork, dip it in ketchup, and eat it. “There! You just did it! You don’t need my help at all! Good job!”

That got me thinking about the approach I take to helping people with their problems. If I’m not terribly busy and I’m in a good mood, I might be willing to spend a few minutes to explain the solution, but very rarely do I help people help themselves: spoon-feeding might put a band-aid on the problem, but the next time they need help, they’ll come right back to you.

A wise man once said that the best lessons aren’t given, they’re caught (as in, catching a fish versus having someone give you one that they caught themselves). Most people aren’t incapable of learning how to solve problems on their own, they’ve just been conditioned to ask for help and receive it without a challenge.

I’m making a commitment from now on to give people the pieces and the tools they need (like I said, the chicken was already cut up for my niece… the part of the problem that would’ve been beyond her skill had been solved for her), and helping them come to their own conclusions. Once people start to see that they can solve their own problems, and have before, it sets a precedent and starts a pattern of self improvement. Which is great for the days when I’m in a bad mood and don’t have time to field questions.


Bringing “hello world” to the masses

You remember a few years back, when the market for health information management exploded, and everyone was throwing money at startups targeting it? I think I figured out what the next that will be. There was an article published on nytimes.com a couple days ago called A Surge in Learning the Language of the Internet, that hits on a big one:

> The market for night classes and online instruction in programming and Web construction, as well as for iPhone apps that teach, is booming. Those jumping on board say they are preparing for a future in which the Internet is the foundation for entertainment, education and nearly everything else. Knowing how the digital pieces fit together, they say, will be crucial to ensuring that they are not left in the dark ages.

I’ve been thinking about this, and I don’t believe that the apps and businesses in this market that are going to be wildly successful will be targeting people who want to be programmers. There’s already plenty of ground covered there (the article mentions Codecademy, which wants to monetize by helping recruiters and companies find new programmers). I think the tools that will see the most success are those that try to put computer programming in the skillset of people whose jobs aren’t related to software development at all: receptionists and doctors and what have you… people who aren’t interested in making a living as a developer, but who realize that knowing how to write a simple program will help them stay competitive in the job market.

Think about it: how many people do you know who have some part of their job which is just mind-numbingly repetitive work? If a receptionist knows how to parse a CSV file with a simple script instead of copy-pasting for hours, and their competitors do not, they’ve instantly gained value as an employee. Everyone benefits.

Of course, it also helps that being a programmer is sexy right now, and being a “nerd” has gone from being a derogatory term to one of praise. The time has literally never been better for the uninitiated to break into the world of computer programming; it’s really just a question of who will take them there.


Information should be free, and that’s why I can’t hate Google

I’m trying really hard to dislike Google, I really am. I think their position as king of the search has gone to their heads, but try as I might… they just make too much cool stuff for me to hate them.

Case in point: Google Consumer Surveys. The basic idea is that people who want surveys done pay a few cents for every one completed, and Google’s network of advertising partners display the surveys as an access point to premium content. When a user completes a survey, the surveyer gets their information, the partner gets paid, and the user gets free access to what they want to see. It’s brilliant.

Here’s why I like the model so much: I’m constantly torn between two schools of thought that seem to conflict on a fundamental level. On one hand, I believe that information should be free. As a user on the internet, I don’t want to shell out my hard-earned cash for a subscription to read an article that I have little more than a passing interest in.

On the other hand, I agree that content providers should be compensated for their efforts. It seems like an eternal struggle, one which paid advertising has tried to resolve before, but for which I have yet to see a satisfactory solution (be honest… when was the last time you clicked on a banner ad? It has to be working on some level, but I honestly can’t remember the last time I did).

This Consumer Surveys thing is a good step in the right direction. It’s still a minor annoyance to the user (I hate interstitials), but less of an annoyance than having to leave an article unread because I’m unwilling to pay for a subscription.


Why developers should do their own testing

I read a post from the Google Testing Blog tonight called Introducing “Testing on the Toilet”. The article was moderately interesting, and I’m a believer in the value of unit tests, but what really caught my attention was this comment:

> Hm. I have to say, I think this is misguided.

> I’ve worked for a long time in the testing/QA engineering field for software (seems like every company calls it something different, and there are different expectations of each, but that just leads to my point). My point is that QA needs to have a bright line between it and development. No doubt, developers need to be good at creating good unit testing. By the same token, good QA/Testers need to be good at development.

> But the two should remain separate. Go to any mature industry’s engineering department, and ask how much of the release testing is done or defined by the actual development engineers. The answer will be you’ll be laughed out of the office. There’s good reason for this.

> This is a sign of the immaturity of the software development industry. We’re getting there, though. I’ve worked for a couple of the truly big Seattle software interests, and they are slowly getting more mature in how they deal with QA. The key is, (for as good and happy as developers doing a good job developing unit testing for their own work): SDEs are not QAEs, and the distinction should not be blurred, if you want to maintain true quality.

I disagree with this assessment with my whole entire heart, and here’s why.

First, unit testing is documentation, and all code should be documented. If you write good unit tests to go along with your code, then any other developer can look at what you’ve written and be able to determine exactly what you meant to have happen in theory and, if they run your test suite, whether what happens in theory and what happens in practice line up.

Second, if you’re not writing unit tests, you’re not thinking about edge cases very thoroughly. When I’m writing code, I try to consider the outliers and uses other than its intended one, but it’s usually not until I make a pass to flesh out my tests that I really start to see the edge cases clearly. Yes, I just admitted that I am not usually a tests-first developer… I hope that doesn’t come between us.

Third, nobody knows your code like you do. If you move on, get fired or get hit by a bus one day, someone else will have to maintain and modify it. And while you might think it will be an amusing exercise for them to go back through all the spaghetti code that you wrote when you were in a hurry, I promise you: if you have not documented (tests are documentation, remember), they will hate you for it.

So, while I guess I can see the value of having a QA department to make sure that everything is working before launch, I fundamentally disagree with the idea that development and testing should be separate from each other. If you can’t test the code you’ve written, I don’t think you’re really a developer at all.


Two sites you should really check out

I’m playing a cop-out by doing this, but I’m sick and I want to go to bed. So, two sites you should really check out:

Khan Academy
I don’t know if they’re trying to gamify learning or learnify gaming, but I seriously spent 20 minutes doing single-digit addition to get points and achievements. I don’t need 20 minutes worth of practice doing single-digit addition, but those achievements sure do feel nice! Oh and also, now I know a lot more about black holes, which are awesome. Check it out.

I’ve been spending the last five or so weeks learning how to program a self-driving car; the course is taught by Sebastian Thrun, the guy who programmed Google’s self-driving car. The courses are seven weeks long, but you can hop in at any point. And if that’s a little high-level, or just not to your taste, you can always learn Python at the same time you learn to create a search engine. Plus, more courses coming in April.

The best part? They’re both free. Free learning… who knew?


How I picked a stack for our startup

So, I’ve been doing a lot of thinking and research about the right stack for building a web app. I think I’ve finally come to a conclusion, and I figured I’d share it with all y’all.

First, language of choice. I’ve been involved with PHP for years, so that seemed like an obvious choice except for one thing: I really want to get out of PHP. It’s just lost my interest as a language. I’ve no interest in a verbose, restrictive language for writing a web app, so that rules out Java (I can hear the Java web crowd getting up in arms; you can both leave now). And it has to have solid, well-supported web framework options. The two languages I’ve been toying with recently are Python and Ruby, but I just can’t bring myself to love Ruby on Rails. So, Python.

That one was actually a tough choice. I like how simple and fluent Python is, but I love how expressive Ruby feels. In the end, I had to make a gut check, and I felt like Python would be a better business decision.

Next, framework of choice. I was originally gonna go with Django, I don’t really like the way that it “feels.” It’s hard to describe, but part of it is that I don’t really like Django’s ORM: the Active Record pattern (and approximations of it) has never been very appealing to me. So anyway, I was mulling it over, and I came to the conclusion that a monolithic one-stop framework might not be the best choice. Using something a bit more lightweight that would us swap in components and go for best-of-breed functionality would be more practical. Maybe Pyramid + SQLAlchemy + Jinja2 (since I do love me some Twig), using Redis for ephemeral stuff that can be reconstructed from the on-disk database if necessary.

But then, what about the front end? I’ve been meaning to build a production app with Backbone.js, and using Backbone.sync, the onus is completely on the front end to render content. So scratch Jinja2, use mustache instead, with hogan.js to compile the templates. The Pyramid/SQLAlchemy/Redis trio becomes an API only, decoupling the front end from the back end and allowing us to easily port the web app to anything else that we can imagine: mobile web, iPhone/Android app, whatever.

For deployment, I’ve become a big fan of Amazon’s EC2: cheap and easy. I’m not particularly a fan of CentOS though… Ubuntu is more my speed. So, EC2 instances running an Ubuntu 11.10 server AMI from alestic.com will serve as the deployment bed.

Final rundown:

  • Python + Pyramid
  • SQLAlchemy + Redis
  • Backbone.js
  • mustache + hogan.js
  • Amazon EC2 instance(s) running Ubuntu server

I can live with that.


Let’s create a FOSS search engine

Since writing that post about what it would take for me to move away from Google as a search engine, I’ve been giving it some thought. Why can’t search be open-sourced?

I mean, I know why Google hasn’t opened up their repositories for public inspection: without a corner on the search market, their ads become much less valuable. Call me cynical; maybe I’ll write about that point of view another time. But really, with how popular it’s becoming to use FOSS solutions for everything these days, isn’t it about time to have an open engine? A cursory Google search (oh, irony) came up with a couple possibilities, but unless I’ve been living under a rock, there’s not a really viable open alternative out there. Sure, there are open search standards, but I’m pretty sure I’d’ve noticed a concrete implementation.

What are some of the benefits? Well for one thing, it would have a robust API. If everything is transparent (even the crawled and indexed data), there would be no reason to keep it under lock and key. Any site would be able to request search data via the API… an immediate benefit would be much better and more relevant results than a SELECT * WHERE column LIKE '%term%' query could ever hope to provide.

Another benefit would be the weight of the community behind finding solutions in the result-ranking problem space. Results should be ranked by relevance and the quality of content, not tricks and schemes to game the system. If the nameless masses get to decide what qualifies as “relevant content,” you’ve just gone a long way toward solving the problem. Even if content has to be curated to some extent to keep it relevant (because let’s face it: the major players on the market spent truckloads of money on developing algorithms to do this automatically, and they still don’t always get it right), the curation can be done in a public, transparent fashion, and even crowdsourced to the userbase to some extent.

Third, we’d own the web, and our use of the information on it. For a long time, I thought I was a fan of Google’s approach of datamining and personalization. “I’ll sign away whatever I have to so that they can keep giving me awesome stuff,” was my mindset. Even now, it’s sometimes strangely appealing to have someone else decide what I find interesting… but that’s not how it should be. Yes, I’ll grant you that having personalized results over arbitrary ones is nice, but it can be taken too far: when Facebook and Google and Twitter and the rest become so good at recommending things that they know I’ll like that it takes preference over anything else, I’ve just been robbed of the opportunity to expand my worldview and experience things outside of my comfort zone.

Now, I’m not talking about a “show snuff films to your grandma”-level of out-of-comfort-zone, but consider this example: if I like Italian food, and I spend time on the internet looking up stuff about Italian food at least a couple times a week, then it should come as no shock to anyone when a personalization algorithm suggests that I check out content about Italian food.

What would be shocking, and pleasantly so, is if the personalization algorithm comes up with a result that says something to the effect of, “I know you’re not usually a seafood person, but you should really check out this recipe for lobster bisque. It’s won a lot of awards, and you’d like it,” and be right. Or if not right, then at least I’d be able to learn a little more about myself: yeah, the lobster bisque might be award-winning, but either I’m not a very good chef, or I really don’t like seafood.

A lot of the responsibility for staying informed is taken from us when the media that we consume has been so heavily tailored that we only hear about or see results for things that are safely inside our comfort zone. If we choose to stay sheltered, fine, but it should be our choice. In the open web that I’m suggesting, the input sanitization that I’ve described wouldn’t occur. Filtering and sterilization, if it took place at all, would happen in a very transparent way: a summary of result customizations would be available with every query, along with the necessary tools to modify those customizations.

I know that what I’ve described is a big project, and a lofty goal, but I think it would be an enormous step toward creating the kind of web where users control the information, instead of the other way around. Thoughts?


Preserving inspiration

in·spi·ra·tion (noun):

  1. The process of being mentally stimulated to do or feel something, esp. to do something creative: “flashes of inspiration”.
  2. The quality of having been so stimulated, esp. when evident in something: “a moment of inspiration in an otherwise dull display”.

One of the very first posts I ever did was a review about Trello. Six months later, I thought I’d check back in about how I’m using it, and the largest single use that I have for Trello is in its ability to preserve inspiration.

Even more than a developer, I am an ideas guy. I constantly look up from whatever I’m doing to say things like, “wouldn’t it be cool if x existed,” or, “I should make y.” Then I get distracted by the task at hand, and the idea gets lost. So, I’ve started writing them all down, no matter how trivial they might seem. I have a Trello board that I call the “little black book of ideas” that holds these creative thoughts so that I can retrieve them later.

I’ll admit it: not everything that makes it into the little black book is a great idea. They’re not even all good ideas. But I copy them down anyway, even if only so that I have a digital paper trail of what’s been on my mind, and then I filter through them occasionally and move all the dead weight to the Rejected list. It’s like a little graveyard of crappy ideas.

From the ideas that survive after culling, I’ve noticed something interesting: almost all of them have been implemented in some way before. Sometimes they’ve even been implemented well. But in the overwhelming majority of cases where prior art exists, I’ve added the concept to the board for one of two reasons:

a) the existing implementation lacks some crucial feature that would make it completely awesome, or
b) an implementation done “my way” would focus on a specific problem that is a subset of the issues that the existing implementation addresses

I interpret that to mean that “good ideas,” or at least survivable ideas, don’t have to be completely unique. They just have to either add significant value to an existing solution, or focus on one aspect of a problem set and solve it well. When I think about it that way, it doesn’t seem so daunting; after all, part of my job description is being innovative and solving existing problems in new and interesting ways.


Being invaluable, not irreplaceable

I saw a quote on Twitter the other night that I really appreciated:

Let’s talk about what it means to be “irreplaceable” as a software developer. To me, it means that the cost of replacing you is so great that it’s easier to take almost any measure to keep you on board rather than to lose you. In software development, there’s something called a bus factor, which essentially asks, “How many of this project’s developers would have to get hit by a bus before the project can no longer succeed?” If you are irreplaceable, it means that your project’s bus factor is low: possibly just you.

Sometimes (not always, but I’d even dare to say usually), the position of power that this creates goes to the developer’s head. In the worst case scenario, he turns into a monster, making unreasonable and unfair demands of his employer in terms of benefits and compensation. At best, when a developer realizes that his employer can’t and won’t fire him unless he shows up to work naked and takes a dook on the CEO’s desk, he’ll lose all motivation to excel.

I say best case scenario, but that second option can be far more destructive than the first: a developer who’s just going through the motions stops being a developer and becomes just a programmer. A programmer with intimate knowledge of the business systems, sure, but just a programmer. There’s no longer any motivation or drive to a) be smart, and b) get stuff done.

So, what can be done? Well, if being irreplaceable is a bad thing, then being invaluable should be every developer’s goal: instead of being so damaging to replace that they’re forced to keep you, be such a valuable asset that they’d do anything to keep you. The distinction is subtle, but it’s there. Here are a couple things that I can suggest:

  1. Be innovative. Think of Steve Jobs. He might’ve come off as a crazy person at times, but he found out where the problems were, and solved them in interesting ways. Even if you never invent an iPhone in your lifetime, you can still find ways to improve your process and make life easier for yourself and those around you.
  2. Have integrity. If people know that they can trust you to do what you say you’ll do, when you say you’ll do it, they’ll turn to you more often.
  3. Communicate well. The first two don’t really matter if you only sit in your office in the dark and growl at anyone who comes near. Learning to express yourself clearly is important, but learning to listen and try to understand others is even more so.

If you can make yourself invaluable while avoiding the negatives of making yourself irreplaceable, your employers and coworkers will love you. But more importantly, you will find greater enjoyment and satisfaction in your job.


Upstaging Google

This article, entitled “Frighteningly Ambitious Startup Ideas,” floated across my Twitter feed the other night, and it contained a really interesting paragraph:

> […] lately when using Google search I’ve found myself nostalgic for the old days, when Google was true to its own slightly aspy self. Google used to give me a page of the right answers, fast, with no clutter. Now the results seem inspired by the Scientologist principle that what’s true is what’s true for you. And the pages don’t have the clean, sparse feel they used to. Google search results used to look like the output of a Unix utility. Now if I accidentally put the cursor in the wrong place, anything might happen.

It goes on to suggest that there are two places where Google is vulnerable to being upstaged: in search, and in email. Which I find kind of ironic, since those two things form Google’s identity in my mind. Since then, I’ve been doing some research, and there are quite a few sources who proclaim that Google is “losing its touch,” so to speak… the signal is starting to get drowned out by the noise. So, I’ve been thinking. If I were, as the article suggests, to write the search engine I’d want to use, what would that entail?

First, I’d want complete control over my search results. I’m sick and tired of getting search results for w3schools when I’m looking for credible sources of information. I’m also tired of content scrapers who rate higher (or even anywhere close to as high) as the sites from which they are stealing.

Second, no more of this “personalized results” garbage. Half the time, I can’t even get a search page with the same results as another friend, unless our circles are similar enough. Provide me with a way to see what my friends think is cool for a particular query, sure, but I want to see sites that rank highly on their own merits, not because it was suggested for me based on previous activity. And yes, I’m aware that you can turn this feature off, but I still don’t trust that the results I’m seeing haven’t been filtered and customized for me in some way.

Third, cut the ads way, way down. I realize that advertising is a huge chunk of Google’s income… I think that makes it even more irritating. They’re getting paid to replace useful information with stuff that I usually have no interest in seeing or clicking on. And roughly a made-up percentage of the time (but it’s a lot), the top search result and the advertised link are the same anyway. Real estate is precious, and I want to see less of it used up by things that aren’t search results (to Google’s credit, I noticed that they moved the “people and places related to this search” pane out of the main column and off to the side; step in the right direction).

Give me those three things, and I’ll consider switching. That’s it. Kind of scary, huh?