c++杀死软件

tech2023-08-19  97

c++杀死软件

“Snefru’s Bent Pyramid in Dahshur” by Ivrienen at en.wikipedia.

伊夫林嫩在en.wikipedia上撰写的“ Dahshur的Snefru的弯曲金字塔”。

This is the ‘Bent Pyramid‘ – a 4600 year old monument to engineering failure.

这就是“ 弯曲的金字塔 ” –一座已有4600年历史的工程失败纪念碑。

From the base, the sides set off at an alarmingly steep 54-degree incline, before abruptly switching to a gentler 43 degree slope about halfway up.

侧面从底部开始以惊人的陡峭54度倾斜,然后突然过渡到大约中途的缓和43度坡度。

It’s believed that the design was altered during construction following the catastrophic collapse of the Meidum Pyramid — another steep-sided pyramid — about 60 kilometres to the south.

据信,随着Meidum金字塔 (另一个陡峭的棱锥)在向南约60公里的灾难性倒塌之后,设计在施工过程中进行了更改。

Of course, it’s hard to blame the ancient pyramid builders. They were effectively inventing engineering as much as they were learning it.

当然,很难怪古代的金字塔建造者。 他们在学习工程的同时就有效地发明了工程。

One thing hasn’t changed since that time: when structural engineers mess up, people get hurt. We can’t know for sure, but it seems unlikely that the Meidum collapse could take place without a human cost.

自那时以来,一件事没有改变:当结构工程师陷入困境时,人们受到伤害。 我们无法确定,但是Meidum崩溃不可能在没有人为代价的情况下发生。

By comparison, ‘software engineer’ can seem like a fluffier flavor of the engineering sciences. A mistake might prevent a user from accessing their account or entering information, but it surely isn’t life threatening?

相比较而言,“软件工程师”似乎是工程科学的柔软的味道。 错误可能会阻止用户访问其帐户或输入信息,但这肯定不会威胁生命吗?

No-one gets hurt, right?

没有人受伤吧?

Or that’s what we think.

或这就是我们的想法 。

The truth is, every year our systems — from power to traffic to agriculture to emergency services — become more dependent on us all creating high quality software to support them.

事实是,从电力,交通,农业到紧急服务,我们的系统每年都越来越依赖于我们所有人创建支持它们的高质量软件。

And when we fail — like those ancient Egyptians — people can actually get hurt.

当我们失败时,就像那些古埃及人一样,人们实际上会受到伤害。

Surprisingly, as the sad case of the Therac-25 shows us, this isn’t even a 21st century problem.

令人惊讶的是,正如Therac-25的悲惨案例向我们展示的,这甚至不是21世纪的问题。

软件可以杀死 (Software Can Kill)

By the late 1970’s, Atomic Energy of Canada Limited (AECL) had earned a good reputation for building radiation therapy machines.

到1970年代后期,加拿大原子能有限公司(AECL)在制造放射治疗机方面赢得了良好的声誉。

These machines used targeted electron beams to attack tumours in patients. Make no mistake, these beams are high-intensity and potentially lethal.

这些机器使用定向电子束攻击患者的肿瘤。 毫无疑问,这些光束强度高并且可能致命。

AECL had previously enjoyed great success with their Therac-6 and Therac-20 models. These units needed to be manually controlled by a trained operator, and used mechanical switches and hard-wired circuits to ensure high levels of safety.

AECL之前在其Therac-6和Therac-20型号上获得了巨大的成功。 这些单元需要由训练有素的操作员进行手动控制,并使用机械开关和硬接线电路以确保高度的安全性。

The Therac-25 was to be their ‘dream-machine’.

Therac-25是他们的“梦想机器”。

Smaller and cheaper, yet more efficient than its predecessors, the new machine incorporated two different beams technologies — an x-ray and a high-energy electron. The different beams allowed operators to target tumours at different depths without damaging nearby healthy tissue.

新机器比以前的机器更小,更便宜,更高效,它结合了两种不同的电子束技术-X射线和高能电子。 不同的光束使操作员可以在不损害附近健康组织的情况下将肿瘤靶向不同深度。

The Therac-25 was both ambitious and sophisticated — and for the first time all this hardware was controlled by a software layer.

Therac-25既雄心勃勃又精巧-第一次,所有这些硬件都由软件层控制。

Unfortunately, though AECL’s intentions were good, their software design was tragically bad, incorporating a series of horrendous design flaws.

不幸的是,尽管AECL的初衷是好的,但他们的软件设计却很可悲,其中包含了一系列可怕的设计缺陷。

Later investigations carefully documented these flaws and they still make chilling reading today.

后来的调查仔细记录了这些缺陷,它们仍然使今天的阅读令人震惊。

In one instance, during a treatment one machine continuously shut itself down reporting a cryptic ‘H-tilt‘ and ‘no dose‘ error message each time. The baffled operator attempted to deliver the treatment six times before giving up.

在一种情况下,在一台治疗机中,一台机器不断关闭自身,每次都报告一个隐秘的“ H-倾斜 ”和“ 无剂量 ”错误消息。 莫名其妙的操作员试图放弃治疗六次。

It was only later that it was determined that the machine had indeed delivered the full dose every time — a catastrophic overdose.

直到后来才确定机器确实每次都已交付了全部剂量-灾难性的过量。

From its launch in 1982 till its withdrawal in 1986, six patients received ultimately fatal injuries from Therac-25 treatments. It’s particularly horrendous when you consider that these poor people were already sick.

从1982年投放市场到1986年退出市场,共有6位患者因Therac-25治疗而遭受致命伤。 当您考虑到这些可怜的人已经病了时,这尤其可怕。

Today AECL exists not as a company, but as a tragic textbook example to us all of how poorly-designed and untested software can impact lives. To this day, the Therac-25 tragedy still informs a lot of the ideas we have on systems design and safety testing.

如今,AECL并不是作为一家公司而存在的,而是作为给我们所有人一个悲惨的教科书实例,说明所有设计不良和未经测试的软件如何影响生活。 直到今天,Therac-25悲剧仍然为我们提供了许多有关系统设计和安全测试的想法。

photo: kmf164

照片: kmf164

Even if you’re a front-end designer, and don’t consider yourself a ‘serious engineer’, Therac-25 has important lessons. While some flaws were caused by poorly coded processes, at least as much damage was caused by inadequate documentation, useless feedback and incomprehensible errors messages. These are areas that everyone — designers, coders, managers, UX people and testers — should have influence over.

即使您是前端设计师,并且不认为自己是“认真的工程师”,Therac-25都有重要的教训。 虽然某些缺陷是由于编码不正确的过程引起的,但至少同样多的损害是由于文档不足,反馈无用以及错误消息无法理解而造成的。 这些是每个人(设计人员,编码人员,经理,UX用户和测试人员)都应该影响的领域。

Looking back at those ancient egyptians, it’s clear that they learned from their early mistakes and went on to build some of the most breathtaking structures that have ever existed.

回顾那些古老的埃及人,很明显,他们从早期的错误中吸取了教训,并继续建造了一些迄今为止最令人叹为观止的建筑。

Software engineering is still a comparatively young field — let’s hope we’ve already built our Bent Pyramids.

软件工程仍然是一个相对较年轻的领域-希望我们已经建立了本特金字塔。

Originally published in the January 29th issue of the SitePoint Design Newsletter. Subscribe here.

最初发表在1月29日的SitePoint设计通讯中 。 在这里订阅 。

翻译自: https://www.sitepoint.com/therac-25-bad-software-kills/

c++杀死软件

最新回复(0)