每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


今日推荐开源项目:《Go 语言处理 prose》传送门:GitHub链接

推荐理由:这是一个用于语言处理的 Golang 库,在新的版本中它成为了 Go 的自然语言处理库,它可以做到诸如把语言符号化之后分割,命名实体识别(这名字是个人还是个地名等等)这样的工作,这个库接下来将会向着简单实用的方向发展,有兴趣的话可以关注一下。


今日推荐英文原文:《The code I’m still ashamed of》作者:Bill Sourour

原文链接:https://medium.freecodecamp.org/the-code-im-still-ashamed-of-e4c021dff55e

推荐理由:今天的文章大家就当个故事看吧,不过要知道,每个人都应该为他们做过的所有事情负起责任

The code I’m still ashamed of

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.

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.

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.

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.

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.

The home page of edfactscanada.com circa 2001, via The Internet Archive

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.

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.

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.


每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg