Chrisの梳羽之礁

A look of quick intelligence and soft refinement
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

[转] Building Software Is like Escaping from Prison

Posted on 2012-06-18 18:41  Chrisfang6  阅读(156)  评论(0编辑  收藏  举报

 

原文:Building Software Is like Escaping from Prison

Building Software Is like Escaping from Prison

| No TrackBacks

If there's one thing that the earth has enough of, it's social media professionals. If there's another thing that the earth has enough of, it's software development analogies. Regardless, I'm going to spin one here. You know what building software is like? It's like escaping from prison.

Think back to your favorite prison break movie, whether it's the Great Escape, Shawshank Redemption, the cleverly-titled TV show Prison Break, or the Rock (which, granted, is about breaking into prison - further proof that Nick Cage doesn't play by your rules). What was involved?

A cast of quirky characters, drawn together by a shared goal.
On a prison break team, you might have a group of guys digging the tunnel, another group laying down the track inside the tunnel, and then some more guys securing fake IDs and afro wigs for once you've escaped. There's always (ALWAYS!) a scene earlier in the movie showing how none of these guys liked each other originally. Once they settle on the idea of a prison break, they quickly become inseparable and ready to lay down their lives for each other.

Between developers, marketing, biz dev, management, and investors, the typical software organization is a collection of people who'd never gather together for any other reason. It rivals the most dysfunctional family in the world. And yet, the end goal, be it world domination, billions of dollars, or just happier users, is enough get this odd bunch of folks to put in thousands of hours in extremely stressful situations. Weekends are skipped, holidays go unobserved, and your kids come to refer to you as 'That smelly guy who drops by occasionally to swear at us and change underwear', all for the sake of the software.

A group of antagonists, out to thwart the escape.
In the prison break movie, there's always a group of guards charged with preventing the prisoners from escaping. We might get a scene showing what happens when some other group tried and failed to escape. We come to learn that these guards are some rough hombres.

Similarly, your competition is there to keep you from the rich rewards you'll gain upon your glorious software release. This competition could be a competing company in this market, or it could be another department in your organization. Regardless, an inordinate amount of energy is spent worrying about these antagonists.

Fortunately, the antagonists aren't very smart.
Remember how, in all of those movies, the prisoners empty one handful of dirt at a time into the yard, so no one realizes they're tunneling out? And how they put a dummy made out of socks in their beds each night so the guards don't notice their absence? If the guards were actually intelligent and engaged, they'd probably notice that kind of thing. They never do.

Your software group's antagonists are probably the same. You'll spend a ton of time worrying that they've figured out what you're up to, based on a few sentences on your website or a line in some PR piece that slipped out. Oh God, maybe they even signed up for a beta account! And then you'll worry that once they figure this out, they'll beat you to market and steal the money, fame, and silk snuggies that accompany both of those. This will probably never happen either.

Months and months of drudgery.
Unsurprising fact: it's a lot of work to tunnel through a building, under the prison yard, and out to safety. Especially when all you have is a spoon.

Along the same lines, it's a lot of work to write software. No matter how many practices, methodologies, and tools we use, it is ultimately just a hell of a lot of typing. Not all of this is exciting; you'd probably rather dig through a wall with a spoon than revisit your password reset logic. Nonetheless, the goal depends on this, so we type and type and type.

Followed by short bursts of brain-melting terror.
What happens when the prisoners finally escape? All hell breaks loose: somebody realizes the fake IDs never showed up, there's a police-looking-guy in front of the rally point, and the prisoners can hear the guards and their dogs a few hundred yards away.

A software release is quite similar. What should be a triumphant moment quickly turns sour, as the production environment goes down, Google de-indexes us for some reason, and we discover a bug that's led us to charging some people 100x more than we ought to.

Hooray, we escaped from prison and everything's great! Except for when it isn't.
Here's the surprising part: for all the cliches, prison break movies diverge when it comes to the conclusion. Some end happily, with everyone free. In some, no one escapes. And then some end on a mixed note, with a few prisoners escaping and the rest being captured/shot/nibbled on by guard dogs. In general, the endings aren't anything to be depressed over, because there's always a high chance of a sequel.

Software works the same way. There are endings that are happy, non-happy, and all emotions in between. If that's the case and we're not guaranteed success regardless of the sacrifices, then we should focus on the practice itself of software development. Let's have fun, treat each other excellently, and learn. Let's understand that there's an element of luck in these results, but that shouldn't detract from our satisfaction of doing a job really well and building something wonderful.

If we take over the world in the process, that's all the better. Even if we don't, we'll still be in fine position for the sequel.

Many thanks to everybody who helped me think of prison break cliches on Twitter.

No TrackBacks

TrackBack URL: http://www.codypowell.com/mt/mt-tb.cgi/26

 

译文:软件开发如同越狱

 

如果说这世界上有一种东西太多了,那它就是广告。如果说这世界上还有另外一种东西太多了,那就是对软件开发的类比。尽管如此,今天我还是要编造一个。你知道软件开发像什么吗?它像越狱。

  回想一下你最喜欢的越狱类型的电影,不论是《大逃亡》、《肖申克的救赎》,还是享誉海内外的电视剧《越狱》或者是《勇闯夺命岛(the Rock)》(不好意思,这不是越狱,而是关于潜入监狱的)。但这跟我们有什么关系?

  “我们都是来自五湖四海,为了一个共同的革命目标走到一起来了。”

  在一个越狱团队里,有一伙人是专门负责挖地道的,另一伙人是负责清除挖地道的痕迹的,还有一伙人是负责弄假身份证和假发的——一旦越狱成功就需要用到这些。在影片的前半部分,你毫无例外的能找到一幕场景来证实他们起初是多么的相互讨厌。但一旦达成了越狱的共识,他们立即变成了能为对方两肋插刀的兄弟。

  在一个典型的开发软件的组织里,程序员,市场销售,业务经理,管理人员,以及投资者,这是一群不会有第二种理由能把他们聚到一起的人。它不次于任何世界上最奇异的家族组成。然而,这最终的目标——成为市场霸主,百万美元的收入,或者仅仅是为了取悦用户——这以足够让这群奇异组合的人在最高强压力的环境形势中共同度过一年半载。周末取消了,节假日忘了,你的孩子在众人面前指着你说“这个臭臭的家伙偶尔会到我家来换内衣,而且冲着我们大呼小叫”,这些全是为了软件。

  一伙敌对势力百般阻挠越狱

  在越狱电影里,总有一批狱警在防范犯人越狱。我们通常会看到的一幕是另外一伙人企图越狱结果失败了。我们多少会发现,这些狱警多少有些愚蠢。

  相似的,你的对手也在坚持不断的试图阻止你从将要发布的伟大的软件中获取丰厚的回报。这对手可能是市场上的一家竞争公司,或是公司内的某一个部门。不管怎样,你的相当大的一部分精力被消耗在担忧防范这些敌对势力上。

  不巧的是,敌对势力都不怎么聪明。

  是否还记得,在所有的这些电影里,犯人是如何一次次的成功把挖隧道的泥土转移的监狱院子里,所以没有人知道他们在挖洞。还有他们如何晚上把用袜子做的假人放到床上,这样狱警就没发现他们的缺寝。如果这些狱警稍微聪明一点,尽职一点,他们就会发现这些猫腻。但这种情况永远都不会发生。

  你的软件开发团队的敌对势力也跟此差不多。你很可能无时无刻的不在担心他们已经搞清楚了你们在开发什么——根据你网站上的一些描述,或广告宣传中泄漏出来的一些信息。哦,天哪,也许他们在我们的测试环境中已经注册了帐户!你会担心,他们一旦知道了你的产品,他们会在市场上打败你,偷走你的钱、声誉, 以及伴随它们而来的锦绣前程。但你担心的这些事情可能永远都不会出现。

  成年累月的苦干。

  毫不奇怪的事实:从监狱下面挖一条隧道,穿过围墙,你需要做很多的工作。尤其是当你只有一把勺子的情况下。

  同样的境遇,开发软件也是一个苦力活。无论你有多少开发经验、理论指导、开发工具,你最终难免少不了昏天黑地的敲打键盘。完全不是一种让人兴奋的运动;也许你宁愿用一把勺子去挖穿一堵墙,也不愿重新整理你代码里密码重设的逻辑。尽管如此,为了目标必须做这些,所以我们编呀编啊编。

  紧接着是惊心动魄的一刻。

  当犯人最终逃出监狱时会发生什么?最不想看到的事情全都出现:有人意识到他们的假身份证永远等不到了,有一个警察模样的人正站在他们集合点的前面,警察和警犬的声音从几百米外的地方传来。

  软件的发布与此很相似。本以为是一个欢欣鼓舞的时刻,结果情况急转直下,生产环境宕机,谷歌不知什么原因拒绝收录你的网站,系统中的一个 bug 导致多收了用户 10 倍多的钱。

  万岁,我们成功的越狱了,一切顺利!除非事情没按这样发生。

  让人惊奇的是,在所有的老调重弹的越狱模式电影中,在影片的末尾,故事开始出现分歧。有些结局是高兴的,所有人都获得了自由。而另一些电影中,没有一个人逃脱。剩下的一些电影中两种情况混合到一起,一些人逃出去了,余下的人要么被抓住,要么被打死,要么被警犬咬住不放。故事的结局通常不会是过度沮丧的,因为还要留一些拍续集的情节线索。

  软件开发也是这个套路。结局有高兴的,不高兴的,或喜忧参半的。世界就是这样,尽管我们做出了很大的努力,付出了很多牺牲,但不必一定能换来成功, 所以,我们应该把重点放到软件开发自身的过程上。我们在其中获得了乐趣,我们相互关怀,相互学习。我们应该明白,虽然最终的成败与否带有一些靠天的成分, 但我们在做优秀的工作、开发杰出的软件过程中获得的满足不会因此而减少。

  如果世界正向我们预期的方向运转,那是再好不过。如果不是,至少我们的续集有了一个很好的基础。