Technology and philosophy for a modern world.

This isn’t a post about kernels or compilers, but believe me I can barely fathom the humblingly impressive work that went into the GCC or Linux kernel. I am talking about languages. Allow me to explain.

A very good measure of a ‘language speaker’ is an agent able to tell lies and jokes. In order to lie or tell jokes, one must understand the architecture of a language (not just its syntax, but its semantics as well) enough to fundamentally alter its meaning. But language is only communication of ideas, so by changing the meaning of the language, you are applying your world-view and literally crafting new meaning into the world.

Sarcasm and irony, two of the most complex vehicles for humor, are impossible without first understanding the contexutal linguistic basis of the situation, and then extending that knowledge to recognize its subtle absurdities. To first take a sentence’s literal definition and twist its meaning to fit a different, often diametrically opposed, application requires a deep, meta-comprehension of a language.

So how does this relate to C?

Have you ever tried to lie or tell jokes in C? I admit to having a very passing knowledge of its constructs, but it seems to me that you cannot. Yes you can name variables ‘foo’ or ‘not_a_pointer’ when it really is, but that’s not what I mean. You cannot significantly alter the structure or meaning of the language itself.

Consider macros in Clojure or meta-programming with method_missing and define_method in Ruby. Forget shooting yourself in the foot, you can blow your leg clean off! C is an amazingly efficient means of communicating with a computer – it is fast, maps well to the constructs of assembly, and maintains a respectably logical simplicity. But as a linguaphile (both in computers and humans) I think it lacks a certain richness, a humanity that I find very appealing and attractive in the meaning that languages can convey. The expressiveness found in higher language may have given us the vapid wasteland of Call Me Maybe, but it also gave us the fun, enlightening works Vonnegut.

About these ads

Throughout my growth as a developer, I’ve heard a lot about TDD and it’s greatness. I’ve seen, felt, what it strives to prevent and have learned the importance of solid code coverage. It’s not about lines covered, but scenarios, edge cases, and complex inter-object interactions thoroughly tested.

But time and again I find TDD getting in my way of getting shit done. Let’s face it, for all the time it saves you in the future, TDD is a laborious process. Maybe not when you’ve mastered it, and I certainly haven’t, but there is something more counterintuitive – it’s very approach – which is why I develop using EDD or evolution Driven Development.

This doesn’t mean that I don’t write tests. The code I write is backed by a safety net of testing meant both to convey expectations and prevent the new from breaking the old. I just don’t write them first. As the name implies, I got this idea from natural selection and evolution.

Mother Nature doesn’t use TDD, and she’s done pretty damn well.

Think of what time and struggles went on for humans to evolve: innumerable failed prototypes, abandoned branches, and billions of lifeforms dead from experimentation. Luckily, our craft has little penalty for shitty iterations. Command-N in most text editors gets us back, or a well executed git revert.

What boggles my head about TDD is the assumptions it makes. When I begin a project or a new feature, I don’t know what the fuck is going to come out of my head. That blank-canvas-driven creativity leads to novel solutions and unique approaches that keep my code fresh. Many TDD’ers I know would say that if you’re doing TDD correctly, you make 0 assumptions about implementation. I hear that, and it’s total bullshit.

While you’re writing code, deciding what to test and hat is trivial, you make choices. You think about the behavior of the code. At that point, the desired behavior already implies an implementation strategy, whether you care to admit it or not. So by the time you actually get around to writing the code, you are already primed with the complexity of the project at hand.

Just shit it out

With EDD, you just shit it out. If something breaks, you fix it. You build fast on top of code you wrote before and write new code to be as open as possible. You make no assumptions about the future because you are literally writing it. When you have a finished product, you go back through and test for the essentials: the PRE and POST conditions of methods, the functionality of classes, etc.

Keep that hackathon creativity, fail fast, and learn faster. Feel free to experiment and then delete it if it doesn’t work. You’ll stop shipping shitty code because it makes the tests pass.

I ran into an unfortunate scenario recently where a team member of mine had written a beautiful navbar in only JS that would dynamically update based on cart contents and logged-in user. This meant that many pages could be entirely cached and a significant improvement in page load time. And we could use it. Because it broke all of the tests. We toiled away with Capybara and Selenium, but it was just taking too much time. We could see that it work, could feel that it was fast. But our test suite stopped us from implementing a new feature.

And that sucks.

Let me be clear – this does not mean you should ship code without tests. Thorough tests. Carefully written tests. I’m saying that you shouldn’t write tests first, because it limits your creativity and ultimately slows you down. Stop fixing tests when your implementation breaks them, and start writing awesome code without the fear of red.

I read an email this morning that began with “Good Evening!” Well, yes, maybe when you wrote it, but it joggled my early-morning mind a bit reading nevertheless. I’ve experienced similar miscommunication talking with my dad when he is abroad – if it is 10am in DC and 3pm in London, is that a good morning or afternoon?

Computers, naturally, are exceedingly good at this kind of thing. Hell even the last Pokemon version I played (Silver) adapted to the time of day. Paul Graham suggested that email needs to be replaced, and I think conditional logic is just one of many basic HCI improvements that can be made. We’ve all been there, furiously pinching-to-zoom inside emails designed for more spacious displays.

Sure there are limits – email size would certainly go up, mobile connections would strain even harder – but with breathtakingly quick hardware becoming the mainstream and LTE connections increasing bandwidth, why not shoot for the stars*?

*unless it is daytime, when the sun may be a more fitting analogy

Over the end of last week and this past weekend, the tech world was up-in-arms against OMGPOP CEO Dan Porter. After selling his users company to Zynga, Porter tweeted he was happy that one engineer would not be making the move because he was not a team player. Immediately, self-righteous twitterati dramatically proclaimed their illustrious Draw Something career coming to a screeching halt.

Let me get this straight. You’re shocked and awed that the man at the helm of a company called OMGPOP was acting immature. In response, you showed him who was boss by no longer playing his Pictionary™ clone.

How noble.

I assume that also means you haven’t contributed a dime to your 401k since the financial crisis, when we learned that the reward system on Wall Street encouraged terrible investments and unethical behavior? Or that you no longer watch the NFL because it merely slaps wrists to penalize murder, sexual assault, drunk driving, and dog-fighting?

My point is this: I don’t play Draw Something because Dan Porter is an exemplar of strong character. I play it because I like drawing pictures with friends. Nor do I invest in my 402k because I trust the investors behind it further than I can throw them. I invest because my employer gives me free money to do so. And I’m certainly not a Ravens fan because Ray Lewis was found innocent of stabbing a man to death, in fact I’m rather sure he did it. I watch because it’s entertainment.

With all of the real injustices happening throughout the world, whether working conditions in China, internet freedom in Egypt (or neutrality at home), or human rights violations in the Sudan or North Korea, I’m sure you can find a better way to take a stand. Fight the battles that matter, not just every asshole who says something stupid on Twitter.

At the end of the day, I don’t care one bit whether you continue to Draw Something, but at least take time out of your day to Do Something.

Last summer, President Obama ventured out to Silicon Valley for a fund-raiser summit with America’s greatest innovators. When asked about the hundreds of thousands of Chinese employed producing Apple devices, Jobs sternly responded “Those jobs aren’t coming back.” I agree (and it would be hard not to), but unlike many I am perfectly okay with it. Allow me to explain.

Over the past month, I have been improving my programming chops at the Hungry Academy with Ruby. Ruby’s core is written in venerable old C, a language with so few abstractions above assembly language that it would be hard-pressed to beat in terms of speed. I doubt any useful application could be written in Ruby whose C equivalent would run more slowly. And I’m perfectly okay with that.

With Ruby, in exchange for performance, I get meta-programming, objects, lambdas, dynamic typing, no header files… the list goes on and on. So sure, I’m sure Rails could have been written in C, but that would just suck. DHH would have hated writing it, we would hate using it, and it’s hard to argue that the world would be better off.

Nike Factory in China

Nike Factory in China: should we bring these jobs home?

China and India are like C. For simple, repeatable tasks there is no cheaper or speedier option. And that’s cool! The foundation of Ruby, again, is built on that. But for America’s sacrifices in unadulterated performance, we’ve gained orders of magnitude in happiness. Almost every American can get a smartphone today for free (on contract) with access to the internet wherever they go. Sure we have laws which limit our businesses, but would you rather have lead paint and asbestos around your children or cars without airbags because it’s cheaper? Maternity/paternity leave may cause our businesses to be less productive, but our families are stronger because mothers and fathers spend time with their children.

So we lose jobs to China and India. Hundreds of thousands of jobs which, in a recession, sure look good. But for everything we’ve lost in cheap labor by moving from unbridled capitalism, we’ve gained in happiness. And that’s a trade I’d make any day.

Though, as an interesting aside, I wrote this post in Chocolat (a beta version of a text editor for OS X) over feature-rich word processors Pages or Word. Sometimes simplicity wins after all…

There’s a game around the Valley where someone asks what the success rate of a given tech startup is, and then the other person makes up a pitifully small percentage and both parties giggle. For an environment supposedly centered around solving tough problems with ingenuity and hard-work, however, there has been little effort put into why only 1 out of 1000 or 5000 or 10000 companies live long and prosper.

A prevalent problem has been where these fledgling launch. Everyone knows the supposed path to startup success:

  1. Come up with an idea to solve a problem
  2. Pitch prototype to investors and raise capital
  3. Launch exclusively on TechCrunch and Hacker News
  4. ???
  5. Profit!

Many of my non-nerd friends will regularly ask me what the next Facebook/Twitter/Google is that I’m using right now. And sure, from keeping up with a litany of tech sites I can toss out a few names that I’ve ben using for a while that have sparked my (p)interest. But I’ve noticed that the hugely successful ideas come from companies that I don’t know about years in advance from Arrington or Siegler, but who specifically market to a wider audience immediately. I knew about Pinterest before it really exploded, but only by about 3 weeks. I was on Fab early, but again only a short bit before things got huge. Let’s look at a company that has botched more launches than anyone cares to admit: the Google, specifically Google+.

Who were the first users of Google+? Googlers, to be sure (though not it’s management for some odd reason), and people who read Hacker News or Slashdot or Techmeme. And we loved it! Robert effing Scoble was on it! But here is what goes on when a friend of mine asks why this is such a big deal:

Q: Where did you hear about this site?
A: Hacker News.

Q: What’s that?
A: A news aggregation service provided by Y Combinator, which is probably the premier startup incubator in Silicon Valley. (Very few people outside of our Nerdom will get through that sentence and give a shit about more than 50% of it.)

Q: Are there a lot of people on it?
A: Robert Scoble has joined, which is a pretty big deal, and there are tons of people joining everyday!

Conclusions of a non-geek:

  1. I don’t give a shit about Robert Scoble.
  2. The first 10k people who have signed up are all nerds who seem to know each other and talk about nerd things.
  3. I don’t want to be a part of this.

Startups need to realize that they’re developing in a bubble. You hang out with people who read TechCrunch, and ‘exclusively’ launching there is supposedly a big deal because other people you hang out with think it’s a big deal. So you try to launch to your peers in the Valley and (whoa!) get a ton of early sign ups, but then registrations stall because nothing is really escaping the bubble.

So who do you emulate?

Facebook. We hate them because we gave them all of our personal information then got mad when they knew all of our personal information. But their launch was beautiful and it was to non-nerds. Imagine, a social network built from the ground up to garner favor from their ideal consumers (status-hungry college kids) and not aimed at itself. Growth spread because, instead of TechCrunch commentors telling other TechCrunch commentors about a product, students at one school told students at another school.

So yes, invite-ony betas launched at techy news sites are what all the cool kids are doing these days, but don’t wonder why you’re not seeing viral growth after launching to an isolated bubble of interconnected nerds. Sometimes the truth hurts, but making the right tough decisions breeds success better than an Arrington exclusive ever will.

Why I’m Leaving #college

In my data structures class last semester, a couple of students were having difficulty with the idea of recursion. The idea that a function could call itself (naturally, I think) mystified them. They asked our professor how he knew it would work, and his response has led me to drop out of college one day after my 21st birthday. “It works,” he said, “because we just wrote it to work.” I love this answer. It epitomizes what it takes, in any line of work, to be successful.

His response also demystified the art of getting shit done. Recursion is not some magical force that makes repetitive tasks simple. Every recursive function is written by you, the programmer, to do a task until a condition is met. It takes work, practice, and thought. I absolutely believe that there are minds who think about the world with a unique perspective, but at the end of the day, ideas don’t build products. People with ideas, working their ass off, build products.

So, beginning March 5th, I will join LivingSocial’s Hungry Academy. Are there risks with my leaving Hamilton College without a degree? Absolutely. Am I terrified? Every day since I got the call. I’ve reached out for advice from the wonderful and inspiring people I’ve met in my family, in the Valley, and at Hamilton. They’re worry and excitement matches my own, and I’ve thought more about my life in the past few days than at any other point. But what made the decision for me was that quote about recursion. Do I know where I’ll be in 5 years? Nope. Will I work at LivingSocial forever? I don’t know. Will I have a huge impact wherever I go? Yes, because I’m going to out-think and out-work every problem I face.

So sure, maybe I won’t have a BA on my resume next to a meaningless number between 0 and 4.3, but I hardly think I’d be happier just because I can hang a piece of paper on my wall. I want to build beautiful, world-changing products and Clinton, NY just isn’t the place to do so. Sure, I could mess around here for another year + change, write a philosophy thesis no one will ever read, and refine my love of Keystone Ice. Or I could take a chance and go after my dream of working in technology, only 9 months after cramming my first programming language, surrounded by some of the best in the business. That’s an opportunity I just cannot pass up.


Get every new post delivered to your Inbox.

Join 708 other followers