Ten Anti-patterns and Malpractices in Modern Software Development

其它細(xì)節(jié)請參照原文以及在infoQ中的部分翻譯

1) Business Thinking Favors the Short-Term?—?To an Extreme(業(yè)務(wù)思維偏愛短期效益)

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(不能成長發(fā)育的,不可行的) 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.
但是,軟件工作剛剛相反。在軟件開發(fā)工作中,考慮越長遠(yuǎn),軟件就會越健壯,成本就會越低,痛苦就會越少。

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.
但由于經(jīng)濟環(huán)境驅(qū)使,管理者采用了一種短視的思維方式。軟件系統(tǒng)的完整性不僅沒能成為應(yīng)該受到尊重的約束,反而被看成了軟件開發(fā)的障礙。

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.
不管你多么高效,不管你加了多少班,或者與同事合作得多好,只要你的想法與管理層出現(xiàn)了分歧,你就會被釘上十字架。

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.
因為你的工作是幫助管理層達(dá)成下一季度的預(yù)期。你必須修復(fù)上一季中本可以避免的缺陷,或者僅僅重構(gòu)幾段不相干的代碼實現(xiàn)下一個拙劣的特性。

Next. Crucifixion? Good…

3) The Software Architect is a Politician (軟件架構(gòu)師成為政客)

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.
成為一名軟件架構(gòu)師的資格不是技術(shù),而是具備強迫一線工程師以不可持續(xù)的方式實現(xiàn)軟件功能的能力,因為這是滿足短視的管理層所必須的,而構(gòu)建精心設(shè)計的系統(tǒng)就不再是軟件架構(gòu)師的首要任務(wù)了。

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.
讓你獲得軟件開發(fā)職位的不是你的技術(shù)能力,也不是你同其他工程技術(shù)人員合作的能力,因為日常工作只需要你很小的一塊能力。真正讓你獲得職位的是你對莫名其妙的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.
業(yè)務(wù)和管理人員短視,但與你共事的人比他們更短視。管理人員會考慮下一個報告期,而他們可能只考慮下一個工資期。

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!
有人從不抱怨代碼,也從不“浪費時間”梳理代碼,并且總是最先終止“有害”的討論。一旦團隊的代碼庫變得混亂,他就會取代現(xiàn)有的軟件架構(gòu)師,成為新的負(fù)責(zé)人。

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 (責(zé)任心被剝奪)

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.
集體代碼所有是了讓開發(fā)工作不中斷,但它允許任何人以任何方式修改任何代碼。這會導(dǎo)致“公地悲劇”。而實際上,有時候“阻塞”是必要的,高級工程師可以藉此防止代碼庫遭受短期思維侵害,確保軟件以一種可持續(xù)的方式開發(fā)。Bryanedds認(rèn)為,集體代碼所有是自JavaScript出現(xiàn)以來最損害代碼的事。

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.
方法論無助于創(chuàng)建更好的軟件,敏捷就是一個很好的例子。它開始時是一種合理的軟件開發(fā)方式,但現(xiàn)在卻變成了“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.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 229,460評論 6 538
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 99,067評論 3 423
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事。” “怎么了?”我有些...
    開封第一講書人閱讀 177,467評論 0 382
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經(jīng)常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 63,468評論 1 316
  • 正文 為了忘掉前任,我火速辦了婚禮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點故事閱讀 72,184評論 6 410
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 55,582評論 1 325
  • 那天,我揣著相機與錄音,去河邊找鬼。 笑死,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,616評論 3 444
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 42,794評論 0 289
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 49,343評論 1 335
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 41,096評論 3 356
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 43,291評論 1 371
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,863評論 5 362
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 44,513評論 3 348
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 34,941評論 0 28
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 36,190評論 1 291
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 52,026評論 3 396
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 48,253評論 2 375

推薦閱讀更多精彩內(nèi)容