货物管理ssm_货物崇拜编程

货物管理ssm

货物管理ssm

Some great reminders to folks about cargo-cult programming by Eric Lippert.  This concept was taught to me in college, I think in a CST115 class.   Boy is it the truth.   Sometimes programmers try to make excuses for not understanding the how - "I don't need to understand SOAP, I'm not a plumber."  Well, I'm not a professional plumber either, but I do own a copy of the Consumer Reports "How to fix anything in your house."  Does that make me a plumber?  Hardly.  Just a guy who knows that water flows through pipes.  If not, I'm just an amazed townie who thanks the magical water gods when I get hot and cold running water upstairs. 

埃里克·利珀特(Eric Lippert)提醒人们有关货物崇拜的编程。 我想这概念是在大学里教给我的,我认为是在CST115班上。 男孩,这是事实。 有时,程序员会为不了解操作方法找借口-我不需要了解SOAP,我不是水管工。 ”嗯,我也不是专业的水管工,但是我确实拥有“消费者”的副本。报告“如何修理房屋中的任何东西”。 这会让我成为水管工吗? 几乎不。 只有一个知道水流过管道的人。 如果不是,我只是一个惊讶的乡镇,当我在楼上得到冷热水时,他会感谢神奇的水神。

During the Second World War, the Americans set up airstrips on various tiny islands in the Pacific.  After the war was over and the Americans went home, the natives did a perfectly sensible thing -- they dressed themselves up as ground traffic controllers and waved those sticks around.  They mistook cause and effect -- they assumed that the guys waving the sticks were the ones making the planes full of supplies appear, and that if only they could get it right, they could pull the same trick.  From our perspective, we know that it's the other way around -- the guys with the sticks are there because the planes need them to land.  No planes, no guys. 

第二次世界大战期间,美国人在太平洋的各个小岛上建立了简易机场。 战争结束后,美国人回家了,当地人做了一件非常明智的事情-他们打扮成地面交通管制员,挥舞着那些棍子。 他们误导了因果关系-他们以为挥舞着棍子的家伙是那些使飞机装满了补给品的家伙出现的人,并且,如果他们能把事情弄对,他们可以拉同样的把戏。 从我们的角度来看,我们知道情况正好相反-手持棍棒的人在那里,因为飞机需要它们降落。 没有飞机,没有人。

The cargo cultists had the unimportant surface elements right, but did not see enough of the whole picture to succeed. They understood the form but not the content.  There are lots of cargo cult programmers -- programmers who understand what the code does, but not how it does it.  Therefore, they cannot make meaningful changes to the program.  They tend to proceed by making random changes, testing, and changing again until they manage to come up with something that works. 

货运人员拥有不重要的表面要素,但对整体情况看不够成功。 他们理解形式但不理解内容 有很多对货物狂热的程序员-懂代码但不懂代码的程序员 因此,他们不能对程序进行有意义的更改。 他们倾向于进行随机更改,测试并再次更改,直到他们设法提出可行的方案。

Read the three-part (and counting) series here: Part 1 Part 2 Part 3  [Brain.Save()]

在这里阅读由三部分组成(和计数)的系列文章:第1部分第2部分第3部分[ Brain.Save() ]

All this talk about cargo-cults and Mort/Elvis/Einstein reminds me of the Programming by Coincidence stories.

所有关于货运邪教和Mort / Elvis / Einstein的谈话都使我想起了“按巧合编程”的故事。

Do you ever watch old black-and-white war movies? The weary soldier advances cautiously out of the brush. There's a clearing ahead: are there any land mines, or is it safe to cross? There aren't any indications that it's a minefield---no signs, barbed wire, or craters. The soldier pokes the ground ahead of him with his bayonet and winces, expecting an explosion. There isn't one. So he proceeds painstakingly through the field for a while, prodding and poking as he goes. Eventually, convinced that the field is safe, he straightens up and marches proudly forward, only to be blown to pieces.

您是否曾经看过黑白战争电影? 疲倦的士兵谨慎地从灌木丛中驶出。 前面有一个清理工作:是否有地雷,或者可以安全穿越? 没有任何迹象表明它是雷场-没有迹象,铁丝网或陨石坑。 士兵用刺刀猛扑着自己的脚步,畏缩了一下,期待爆炸。 没有一个。 因此,他在田野上苦苦挣扎了一段时间,在前进的过程中刺探和戳戳。 最终,他确信场地是安全的,他站起身来,自豪地向前迈进,结果被炸成碎片。

The soldier's initial probes for mines revealed nothing, but this was merely lucky. He was led to a false conclusion---with disastrous results. [The Pragmatic Programmers]

士兵最初对地雷的探测没有发现任何东西,但这只是幸运。 他被误导了一个结论-结果不堪设想。 [务实的程序员]

Being a Mort or an Einstein isn't about VB.NET vs. C#.  It isn't even about VB6 programmers without CS degrees.  It's about caring how code works.  Not just for caring's sake (although it helps) but because it makes you a better, more well rounded, and ultimately effective programmer.  So, here's MY cargo-cult-programming-by-coincidence story:

成为Mort或Einstein与VB.NET与C#无关。 没有CS学位的VB6程序员甚至都没有。 关心代码的工作方式。 不仅出于关心的目的(尽管它会有所帮助),还因为它使您成为更好,更全面,最终有效的程序员。 因此,这是的巧合的“按货代崇拜”编程故事:

My sister in law immigrated here from Zimbabwe.  She's a teacher, in her thirties, but had never driven.  So, we took the Prius over to the parking lot and practiced for days.  We finally got to parallel parking, and she just wasn't getting it.  It just didn't make sense to her.  So I said, "imagine how the front tires turn left and right when you turn the steering wheel." 

我的sister子是从津巴布韦移民到这里的。 她是位三十多岁的老师,但从未开车。 因此,我们将Prius带到了停车场,并练习了几天。 我们终于可以并行停车了,而她却没有停车。 只是对她没有意义。 所以我说:“想象一下,当您转动方向盘时,前轮胎如何左右旋转。”

"The front?" she said.  "What difference does it make?"  Turns out she didn't realize that the front tires were the ones that turned.  She'd imagined ALL FOUR tires turning left and right when the car turns.  I insisted that, no, on cars, it's just the front wheels that turn.  She didn't believe me until she got OUT of the car, and watched me parallel park.  She was utterly amazed that the back tires stayed straight and followed the front ones. 

“前方?” 她说。 “这有什么区别?” 原来她没有意识到前轮胎是转过的轮胎。 她曾想像过汽车转弯时,所有四个轮胎都会左右旋转。 我坚持认为,不,在汽车上,只是前轮在转动。 直到她下了车,看着我平行停车,她才相信我。 她对后轮胎保持笔直并紧跟前轮胎感到惊讶。

"You didn't know this?" I asked.  She said "I never gave it any thought.  I assumed they all turned, and never asked the question again." 

“你不知道吗?” 我问。 她说:“我从未想过。我以为他们都转过身,再也没有问过这个问题。”

Certainly this assumption became a problem when trying to 'debug' the process of parallel parking. 

当试图“调试”并行停车的过程时,这个假设当然成为一个问题。

翻译自: https://www.hanselman.com/blog/cargocult-programming

货物管理ssm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值