sm羞耻任务
If you write code for a living, there’s a chance that at some point in your career, someone will ask you to code something a little deceitful – if not outright unethical.
如果您以谋生为目的编写代码,那么在您职业生涯中的某个时候,有人可能会要求您编写一些欺骗性的代码-即使不是完全不道德的。
This happened to me back in the year 2000. And it’s something I’ll never be able to forget.
发生在2000年的我。这是我永远无法忘记的事情。
I wrote my first line of code at 6 years old. I’m no prodigy though. I had a lot of help from my dad at the time. But I was hooked. I loved it.
我在6岁时编写了第一行代码。 我不是天才。 当时我从父亲那里得到了很多帮助。 但是我迷上了。 我爱它。
By the time I was 15, I was working part-time for my dad’s consulting firm. I built websites and coded small components for business apps on weekends and in the summer.
到我15岁时,我就在父亲的咨询公司兼职。 我在周末和夏季为商务应用程序构建了网站并编写了小组件的代码。
I was woefully underpaid. But as my dad still likes to point out, I got free room and board, and some pretty valuable work experience.
我的薪水很低。 但是,正如我父亲仍然喜欢指出的那样,我得到了免费的食宿,还有一些非常宝贵的工作经验。
Later, I managed to help fund a part of my education through a few freelance coding gigs. I built a couple of early e-commerce sites for some local small businesses.
后来,我设法通过一些自由编码工作帮助资助了我的一部分教育。 我为一些本地小型企业建立了一些早期的电子商务站点。
By age 21, I managed to land a full-time coding job with an interactive marketing firm in Toronto, Canada.
到21岁时,我设法在加拿大多伦多的一家互动营销公司找到了一份全职编码工作。
The firm had been founded by a medical doctor and many of its clients were large pharmaceutical companies.
该公司由一名医生创立,其许多客户是大型制药公司。
In Canada, there are strict limits on how pharmaceutical companies can advertise prescription drugs directly to consumers.
在加拿大,对制药公司如何直接向消费者宣传处方药有严格的限制。
As a result, these companies would create websites that present general information about whatever symptoms their drugs were meant to address. Then, if a visitor could prove they had a prescription, they were given access to a patient portal with more specific info about the drug.
结果,这些公司将创建网站,提供有关其药物要解决的症状的一般信息。 然后,如果访客可以证明自己有处方药,就可以访问患者门户网站,获取有关该药物的更多特定信息。
One of the projects I was assigned to involved a drug that was targeted at women. The graphics and general style of the website made it clear that the client wanted to specifically target teenage girls.
我分配的一个项目涉及一种针对女性的药物。 网站的图形和总体风格清楚地表明,客户希望专门针对十几岁的女孩。
One of the features of this website was a quiz that asked girls a series of questions and recommended a type of drug based on their answers.
该网站的功能之一是测验,询问女孩一系列问题,并根据她们的回答推荐一种药物。
Remember, this website was posing as a general information site. It was not clearly an advertisement for any particular drug.
请记住,该网站是冒充一般信息网站。 这显然不是任何特定药物的广告。
When I received the requirements, they contained the questions for the quiz, along with multiple choice answers for each question.
当我收到要求时,它们包含测验中的问题以及每个问题的多项选择答案。
Missing from the requirements was any indication of what I should do with the answers at the end of the quiz. So what rules determined what treatment the quiz would recommend?
需求的缺失表明,在测验末尾我应该怎么做。 那么,什么规则确定了测验建议的治疗方式?
I spoke to the Account Manager about this. She emailed the client and got me the requirements. With those, I proceeded to code up the quiz.
我曾与客户经理谈过此事。 她给客户发了电子邮件,并向我提出了要求。 有了这些,我便开始编写测验。
Before submitting the website to the client, my project manager decided to give it a quick test. She tried the quiz, then came over to my desk:
在将网站提交给客户之前,我的项目经理决定对其进行快速测试。 她尝试了测验,然后来到我的书桌上:
“The quiz doesn’t work,” she said.
她说:“测验不起作用。”
“Oh. What’s broken?” I asked.
“哦。 怎么了?” 我问。
“Well, it seems that no matter what I do, the quiz recommends the client’s drug as the best possible treatment. The only exception is if I say I’m allergic. Or if I say I am already taking it.”
“好吧,看来无论我做什么,测验都建议服用者的药物是最好的治疗方法。 唯一的例外是,如果我说我过敏。 或者,如果我说我已经接受了。”
“Yes. That’s what the requirements say to do. Everything leads to the client’s drug.”
“是。 这就是要求所说的。 一切都会导致委托人的毒品。”
“Oh. Okay. Cool.”
“哦。 好的。 凉。”
And she was off.
她离开了。
I wish I could tell you that when I first saw those requirements they bothered me. I wish I could tell you that it felt wrong to code something that was basically designed to trick young girls. But the truth is, I didn’t think much of it at the time. I had a job to do, and I did it.
我希望我能告诉你,当我第一次看到那些要求时,他们困扰了我。 我希望我能告诉你,编写基本上旨在欺骗年轻女孩的代码是错误的。 但事实是,我当时并没有考虑太多。 我有工作要做,我做到了。
Nothing that we were doing was illegal. As the youngest developer on my team, I was making good money for my age. And in the end, I understood that the real purpose of the site was to push a particular drug. So, I chalked this tactic up to “marketing.”
我们所做的一切都不是违法的。 作为我们团队中最年轻的开发人员,我为自己的年龄赚了很多钱。 最后,我了解到该站点的真正目的是推销特定药物。 因此,我将此策略归纳为“营销”。
The client was extremely pleased with the site. So much so that their rep invited me and the entire team out to a fancy steak dinner.
客户对该网站感到非常满意。 如此之多,以至于他们的代表邀请我和整个团队一起参加一场精美的牛排晚宴。
The day of the dinner, shortly before leaving the office, a colleague emailed me a link to a news report online. It was about a young girl who had taken the drug I’d built the website for.
晚饭的那天,即将离开办公室的时候,一位同事通过电子邮件向我发送了一份指向在线新闻报道的链接。 这是关于一个年轻女孩服用了我为其建立网站的药物的。
She had killed herself.
她自杀了。
It turned out that among the main side effects of that drug were severe depression and suicidal thoughts.
事实证明,该药的主要副作用是严重的抑郁和自杀念头。
The colleague who had emailed me didn’t show up to dinner.
给我发电子邮件的同事没有出席晚餐。
I still went. It was difficult and awkward. I never mentioned the news report. I just ate my steak quietly and tried to force a smile when I could.
我还是去 这是困难而尴尬的。 我从没提到新闻报道。 我只是静静地吃着牛排,并在可能的情况下努力使自己微笑。
The next day, I called my sister. She was 19 at the time. We had discovered while working on the project that she had actually been prescribed the very drug I was building a site for.
第二天,我给妹妹打电话。 当时她19岁。 我们在进行该项目时发现,她实际上已经开了我正在为其建造场所的药物。
When we first talked about it, we thought the whole thing was a neat coincidence. Now, the tone of our conversation was very different. I advised her to get off the drug ASAP. Thankfully, she listened.
当我们第一次谈论它时,我们认为整个事情都是一个巧合。 现在,我们的谈话基调大为不同。 我建议她尽快下药。 谢天谢地,她听了。
There are a million and one ways for me to rationalize my part in later suicides and severe depression. Even today, there is ongoing litigation with former patients.
我有百万种方法可以使我合理化自己在以后的自杀和严重抑郁症中的作用。 即使在今天,仍在与前患者进行诉讼。
It’s easy to make an argument that I had no part in it at all. Still, I’ve never felt okay about writing that code.
提出一个我完全没有参与的论点很容易。 不过,我从未对编写该代码感到满意。
Not long after that dinner, I resigned.
那晚饭后不久,我辞职了。
As developers, we are often one of the last lines of defense against potentially dangerous and unethical practices.
作为开发人员,我们通常是防范潜在危险和不道德行为的最后一道防线。
We’re approaching a time where software will drive the vehicle that transports your family to soccer practice. There are already AI programs that help doctors diagnose disease. It’s not hard to imagine them recommending prescription drugs soon, too.
我们正在接近一个时代,软件将驱动将您的家人运送到足球练习场的车辆。 已经有可以帮助医生诊断疾病的AI程序。 不难想象他们也很快会推荐处方药。
The more software continues to take over every aspect of our lives, the more important it will be for us to take a stand and ensure that our ethics are ever-present in our code.
越来越多的软件继续占据我们生活的方方面面,对我们而言,站出来确保自己的道德观念始终存在于我们的代码中就显得尤为重要。
Since that day, I always try to think twice about the effects of my code before I write it. I hope that you will too.
从那天开始,在编写代码之前,我总是尝试三思而后行。 我希望你也会。
These days, I spend a portion of my time writing and sending a regular newsletter that aims to help developers master their craft and advance their careers. Please sign up below to receive it.
这些天,我花了一部分时间写和发送定期的新闻通讯,目的是帮助开发人员掌握其手艺并促进其职业发展。 请在下面注册以接收它。
UPDATE 2018: I am now a member of the Association for Computing Machinery and adhere to their 2018 Code of Ethics and Professional Conduct. I hope that you and the organization(s) you work with will consider doing the same.
2018年更新: 我现在是计算机协会的会员,并遵守其2018年道德和职业行为守则 。 我希望您和您与之合作的组织会考虑这样做。
If this article touched you in any way, please use the applause icon to help spread the word.
如果本文对您有任何影响,请使用掌声图标来宣传。
翻译自: https://www.freecodecamp.org/news/the-code-im-still-ashamed-of-e4c021dff55e/
sm羞耻任务