每天推薦一個 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.
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