Ten Anti-patterns and Malpractices in Modern Software Development

其它细节请参照原文以及在infoQ中的部分翻译

1) Business Thinking Favors the Short-Term — To an Extreme(业务思维偏爱短期效益)

According to Alan Kay, there are legislative(立法) problems in the US that effectively force businessmen to make myopic(短视的,目光短浅的) decisions Alan Kay, 2015: Power of Simplicity

Some propose(v. 提出,打算) that the phenomenon of easy credit and low-interest rates make it economically nonviable(不能成长发育的,不可行的) for a company to act in its longer-term interests.

Some people just blame capitalism for its inherently exploitative nature.

Whose opinion is most accurate is immaterial for this discussion. What matters is that your manager, and all the way up to the CEO, spend no time thinking about, much less preparing for, future engineering concerns. This is for the same reason that a Firefighter blasting a water cannon doesn’t think how much water damage he may be causing — the goddamn building is on fire.

Anyone whose eyes are not glued to an IDE for 50+ hours a week is effectively blind to the company’s metastasizing engineering problems.

The ‘business view’ of the engineering problems.

But software works in the opposite way. The longer-term you can think about your software, the more robust and less costly and painful its development will be. The more time you put up front into building simplicity into the system with intelligent layering, the less of a nightmare it will be to develop.
但是,软件工作刚刚相反。在软件开发工作中,考虑越长远,软件就会越健壮,成本就会越低,痛苦就会越少。

The Business Team addresses a technical issue.

Sorry to say, but because of the short-sighted way in which management must think (again, likely due to the incentives provided by the larger economic environment), the integrity of your software system isn’t even on their radar. If they notice it at all, they’ll more likely see it as an obstacle to work around rather than a constraint to respect.
但由于经济环境驱使,管理者采用了一种短视的思维方式。软件系统的完整性不仅没能成为应该受到尊重的约束,反而被看成了软件开发的障碍。

2) You Will be Crucified for Not Being a ‘Team Player’ (不合群就会被钉上十字架)

It won’t matter how productive you are, how many late nights you invest, or even how well you actually collaborate with your fellow engineers. The moment you engage in thinking misaligned with management’s above view, you will be up for crucifixion on this cross. And if you’re the type of person who relents to plain reason, you will eventually find yourself voicing legitimate engineering concerns.
不管你多么高效,不管你加了多少班,或者与同事合作得多好,只要你的想法与管理层出现了分歧,你就会被钉上十字架。

You will feel the room temperature rise every time you do so, for you stepping into the fire.

Ultimately, your job is to help management meet expectations for the next quarter. This means that most of your time will be spent fighting fires lit from the previous quarters, hunting bugs that could have been easily prevented, or refactoring several unrelated pieces of code just enough implement the next broken feature.
因为你的工作是帮助管理层达成下一季度的预期。你必须修复上一季中本可以避免的缺陷,或者仅仅重构几段不相干的代码实现下一个拙劣的特性。

Next. Crucifixion? Good…

3) The Software Architect is a Politician (软件架构师成为政客)

Ever wonder why you never find yourself in a maintainable commercial code base? Surprisingly, it’s not at all due to a lack talent in the software world. There are tons of great software architects just biting at the chance to build the next great system.

The problem is that the main qualification for being a software architect is not technical wherewithal. The qualification for being a software architect is in having the ability to coerce front line engineers to implement functionality at an unsustainable pace. For this is what is required to satisfy our short-sighted management.
成为一名软件架构师的资格不是技术,而是具备强迫一线工程师以不可持续的方式实现软件功能的能力,因为这是满足短视的管理层所必须的,而构建精心设计的系统就不再是软件架构师的首要任务了。

When it comes to building a coherent, understandable, and well-designed system, the software architect will not have this as his top priority, or likely anywhere near it. This is true regardless of the long-term necessary benefits of doing so.

Two legs good, four legs bad.

The architects job is to a) appease the business people to whom he is beholden, and b) engage in any manner of political fuckery needed to coerce the engineering team to follow suit.

If our architect were ever to grow sufficient backbone to stops producing at the rapid-fire, unsustainable pace as demanded by short-term interests, he’ll eventually be replaced by someone with sufficiently less integrity. Someone who can ‘get the job done, bygod…

4)Suffering is the Commodity That you Provide (忍受痛苦是你提供的商品)

You might be under the impression that what makes you qualified for various positions in software development is primarily your technical acumen and ability to work with other technically-capable engineers.

You’d be wrong.

While a certain minimum of capability is required to do your day-to-day work, what your value really consists of is in grinding yourself against the piercing pincers of elusive bugs and razor-wire bundles of bullshit code until something resembling progress is made. You are not a problem-solver, you are a problem-endurer.
让你获得软件开发职位的不是你的技术能力,也不是你同其他工程技术人员合作的能力,因为日常工作只需要你很小的一块能力。真正让你获得职位的是你对莫名其妙的Bug和混乱代码的忍受能力。你不是一个问题解决者,而是一名问题忍受者。

This is what you went to college to do.

Oh sure, you can solve the endless little meaningless problems that plague the day-to-day life of programmers everywhere, but the source of these problems — defects at the engineering level — are effectively untouchable. Also untouchable are the systemic issues that cause each of these should-be-trivial-to-fix problems into 5–8 hour tasks. The interesting problems that have long-term engineering and business impact, the problems you went to college to solve, might as well not be on your radar.

Rich Hickey gave one of the most powerful and beautiful talks on how to elegantly engineer 90–95% of these bullshit day-to-day problems out of existence — Simple-Made-Easy. Watch it in full; you’ll be inspired. But despair, for these are the engineering techniques you won’t get to apply. The business team can’t or won’t see the value of putting in even the smallest amount of up-front work into anything you do.

5) Your Peers Won’t Support Change (周围的同事不支持变革)

Businesses and management are short-sighted. But if you’re like me, their shortsightedness is dwarfed only by your coworkers. Whereas your manager can’t think beyond the next reporting period, your co-workers probably can’t think beyond the next pay period.
业务和管理人员短视,但与你共事的人比他们更短视。管理人员会考虑下一个报告期,而他们可能只考虑下一个工资期。

Because human beings are a coping species, within them lies a mechanism for swallowing lies that help them justify reaching their primary goal of… well… getting paid. They are genetically programmed to gobble up lie after lie as long as it suits their most immediate purposes.

There is a whole class of literature of self-deception and what motivates it, but I’ll just leave couple choice links here -

Your peers from left to right — The one you confide in, the one who speaks up for you, and the one who looks out for you.

6) Someone is Always Ready to Undercut You (总是有人伺机“削”你)

And the guy who is going to replace our newly-spined software architect? He’s the guy sitting across from you who never complains about the code, never ‘wastes his time’ cleaning things up, and is always the first to shut down ‘toxic’ discussion. He’s the one whose ego has him up to his eye-balls in debt on consumer goods. As to thinking in terms of the next pay-period, he’s already adjusted his spending habits for his next promotion!
有人从不抱怨代码,也从不“浪费时间”梳理代码,并且总是最先终止“有害”的讨论。一旦团队的代码库变得混乱,他就会取代现有的软件架构师,成为新的负责人。

If you think your team’s code base is fucked now… just you wait till Douchbag McGee is put in charge.

Ya, he’s pretty much all that — at your expense.

7) The Conscientious are Disenfranchised (责任心被剥夺)

It stands to reason that an engineer with sufficient seniority could put a stop to this circus. After all, code is as much about experience as it is about expertise.

Perhaps this used to be the case, but not any more. Today, we have something called ‘collective code ownership’. The reason given for this practice is at once a truth and a lie. Collective code ownership is to keep people from being ‘blocked’. After all, as we are constantly ‘coached’ by people who traded their spines for three weeks of management training, everyone is allowed to change any code, in any way, so long as it helps them meet their short-term goals.
集体代码所有是了让开发工作不中断,但它允许任何人以任何方式修改任何代码。这会导致“公地悲剧”。而实际上,有时候“阻塞”是必要的,高级工程师可以藉此防止代码库遭受短期思维侵害,确保软件以一种可持续的方式开发。Bryanedds认为,集体代码所有是自JavaScript出现以来最损害代码的事。

If our dilapidated, ruined code bases can do anything well, they can teach us viscerally the meaning of the term ‘the tragedy of the commons’ — Tragedy_of_the_commons

A pictorial representation of how much fun remains in working in collectivized code.

Putting even that valuable lesson aside, let us consider that being ‘blocked from making changes’ can actually be a very good and necessary thing. It’s something that the senior engineers of yesteryear once had the power to do. They sometimes did it out of spite, yes, but more often to keep code over which they had stewardship from being compromised by short-term thinking. Blockers were put up to ensure that software could be developed at a sustainable pace with the minimum of human suffering involved, and to be used as a check and balance against a management team not in a position to understand or learn about engineering trade-offs at stake.

No longer.

Our long dead (or at least retired) heroes, who slayed dragons in business suits with little more than cunning and guile, have finally been cut down by systematic disenfranchisement. The stewards of our lands and balancers of power have been lain waste by top-down collectivization, the business-engineering equivalent of Mao’s Great Leap Forward. Collective code ownership may be the most pernicious thing to happen to code since the advent of Javascript.

8) Methodologies Are Management Tools (方法论成为管理工具)

What all methodologies eventually revert to.

Which brings me to my next point. They’re not there to help you create better software, and if they are, they will be warped into the opposite.

Agile has been the perfect example of this. What started out as a reasonable means to develop software has been turned into, as Mike Judge calls Psych 101 MBA Bullshit.
方法论无助于创建更好的软件,敏捷就是一个很好的例子。它开始时是一种合理的软件开发方式,但现在却变成了“Psych 101 MBA Bullshit”。

9) You Will Think your New Team / Project is the Exception

Sometimes naivety is good, especially if you’re behind on bills from being out of work. In fact, lying to yourself can have serious short-term benefits. Such habits are probably so ingrained in you that you often decide to do so unconsciously. The term for this is being on one’s ‘Honeymoon’.

But if you’re going to lie to yourself, at least admit that’s what you’re doing! The more deeply you believe a lie, the more rude your eventual awakening will be. And then you’ll find yourself spending hours writing articles like this and raging against the whole blind stupid world on Twitter.

The sum of my recent productivity.

10) It’s a Race to the Bottom — and No One Gives a Shit

The truth is, commercial software development is a race to the bottom. Whoever can trade away the optimal amount of personal integrity and endure the most suffering wins.

Management thinks you’re just paying your dues to be a part of their club (even if you have no interest in management), so they don’t give a shit.

Your peers adopt a macho attitude against it all, and will see your frustration as a liability, or in D-Bag McGee’s case, weakness upon which they can capitalize.

The average Joe thinks your life is puffery compared to his, so he doesn’t give a shit. He gives even less of a shit because you and your hipster brethren are jacking up his landlord’s property values.

In fact, you’re lucky to find a person who can admit to the above problems in the first place. Most people delude themselves into thinking nothing’s wrong, so that they don’t have to carry the burden of giving a shit. Few dare broach subject in public, much less at work.

What is to be Done?

Pull requests welcome.

But in all seriousness, we can start by telling the truth about the situation, to others and especially ourselves. At the very least, it should help to lessen the shock of the reality to people entering our field. The people most affected by this shock are the honest young people who are least suspicious of this type of chicanery. In other words, the people we lose the earliest are the people we may need the most.

We can stop deluding ourselves, and stop putting our energies into the impossible.

However, the recognition of these truths do put us in a precarious position. To be employable for more than a week means acting in accordance with these ugly facts. But to become employed in the first place, we must act mostly oblivious to them! I suspect that most discrimination that happens against older programmers is not, in fact, age discrimination, but is, in fact, ‘wisdom discrimination’.

In order to work in a dishonest system, we must become like it, if only a little bit, if only temporarily. But go too far toward in that direction, and you become the problem.

As I said, precarious.

Like any radioactive substance, limit your exposure to the software industry.

Another thing is to prefer only short-term contract work, or to treat their full-time positions as anything but. If you need to, lie about your intended level of loyalty — they’re already lying about theirs.

You may think that this is a problem due to introducing gaps in your resume. Maybe this was a problem when your father was slinging code, but it’s not going to be for you. Again, companies are thinking short-term. Due to their shortsightedness, they cycle through employees as fast as your local burger joint. The last thing they care about is whether you will be at their company 5 years from now. Their only question is — can this guy help us meet our next quarters’ expectations?

So go ahead, negotiate for that extra $50k / year, and leave as soon as your bank account is ready for your next 3 month vacation. I personally consider myself semi-retired since the age of 30. Though it is a life of seeming instability, they’ve done all they can to make long-term engagement unsustainable.

Act to change the laws and stimulus-induced environment that force businesses to act shortsightedly?

Sounds promising, until you realize it was the businesses themselves that wrote these rules. Things are precisely as they are intended to be.

Remember all those stupid wacky idiots who railed endlessly against government regulation and the federal reserve, and spammed up your internet chatrooms with Ron Paul or Ralph Nader’s talking points? LOL, right? Well, we’re living out their nightmare, one software fuckery at a time.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 199,636评论 5 468
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 83,890评论 2 376
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 146,680评论 0 330
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 53,766评论 1 271
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,665评论 5 359
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,045评论 1 276
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,515评论 3 390
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,182评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,334评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,274评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,319评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,002评论 3 315
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,599评论 3 303
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,675评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,917评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,309评论 2 345
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 41,885评论 2 341

推荐阅读更多精彩内容