r/programming • u/devmastery • Nov 15 '16
The code I’m still ashamed of
https://medium.freecodecamp.com/the-code-im-still-ashamed-of-e4c021dff55e#.vmbgbtgin2.3k
Nov 16 '16
Back in my first career job, I was working at an ISP, the regional cable company. It was my job to parse a bunch of emails that the big movie and music studios would send us with DMCA takedown notices. The general rule at the time was that 3 such violations meant a customer would have to be disconnected and potentially banned. Both my boss and I felt really skeezy about this, but we knew we had to do it. Comcast had already implemented such a system and if we didn't it would go to contractors who would make our lives worse when we had to support whatever they built.
So what did we do? The business requirements were pretty straight-forward, but the functional requirements got a bit weird. What constitutes a customer? The system had several ids that were often used interchangeably, but the business logic for each was different. None were specifically obvious for the task. The lowest hanging fruit was an ID attached to the hardware. The DMCA takedown had an IP address, so this was the easiest to turn around (IP -> assigned modem -> "customer" ID).
The thing about this ID was that even though it represented the customer, it wasn't immutable. Anytime the customer received a new modem, this ID changed. Anytime the customer moved, new ID. New package? New ID. Special promotional offer? New ID. We only discovered just how often it changed after we had already implemented it and started watching.
It was incredible. We had fulfilled all requirements, and made sure legal was fully aware of what the functional spec meant. Obviously a cable provider wasn't in the business of telling customers to keep their money, so it was an easy sell. Mission accomplished, ethics mostly upheld! I personally received 4 of these notices, all indicating that they were my first offense. When I left the company, I found out only 5 or 6 2nd offenses had been sent out, no one had received a third. I felt really proud of my little, crappy software that was functionally correct.
611
u/jerf Nov 16 '16
I personally received 4 of these notices, all indicating that they were my first offense. When I left the company, I found out only 5 or 6 2nd offenses had been sent out, no one had received a third. I felt really proud of my little, crappy software that was functionally correct.
The best part is, if you don't look too closely, this makes it look like the system is working. Look! Almost everybody who received one warning stopped their illegal activity! Mission accomplished!
I'm not just being sarcastic... it's entirely possible the people responsible for the decisions thought that way about the system. It would be a very easy mistake to make.
357
Nov 16 '16
The best part is, if you don't look too closely, this makes it look like the system is working.
You have no idea how correct you are. Not long after I wrote this program, I moved into the company's BI department. It became my job to understand these IDs and how best to correlate different information. It was mind boggling how easy it was to craft reports that could show the company being amazing vs totally abysmal. Since we were a regional, rural cable company, there really wasn't anything happening. We had something like 95% penetration in all our markets, which hadn't changed for years. So everything was focused on up-selling. And we could make just about any promotion look like a winner depending on how we joined tables. Really opened my eyes to how businesses operate.
→ More replies (3)121
u/Lokiem Nov 21 '16
Any published statistic is manipulated in the exact same way, exclude certain age ranges, ethnicities, genders, etc and you can make crime seem rampant or mild.
Unless statistics are published with their unmodified data sets then they're effectively fairy tales.
→ More replies (8)219
71
26
u/bduddy Nov 21 '16
ISPs don't really care about those warnings any more than their customers do... they just want to be seen to be meeting their legal requirements.
8
u/Nk4512 Nov 21 '16
Yea they do, we shut people down left and right for stupid shit. Virus, bots, mpaa, etc etc.
8
u/bduddy Nov 21 '16
Viruses and bots are "stupid shit"? And what does that have to do with my point in the first place?
→ More replies (4)17
11
49
u/ProFalseIdol Nov 16 '16
Just another problem with capitalism. We'd enjoy more music / movies / art etc. if only the abundant resources of this world weren't gobbled up in wall street. The way it is right now, you'll very likely to starve if you pursue making non-pop music (I live in the third world).
14
u/FlavorMan Nov 17 '16
Lol yeah, capitalism makes you do things other people are willing to pay for, how terrible.
→ More replies (2)→ More replies (45)5
u/buge Nov 21 '16
The way it is right now, you'll very likely to starve if you pursue making non-pop music (I live in the third world).
I would assume you're just as likely to starve making pop music. Do you have any reason to think being successful with pop is easier than say successful with rap?
→ More replies (2)4
4
u/GrijzePilion Nov 21 '16
...So what did you do? I think I'm missing something.
9
u/ShoGunzalez Nov 21 '16
He made it to where anytime anything changed the customer would get a new ID, new ID means DCMA tracking go bye bye.
7
Nov 21 '16 edited Nov 21 '16
Wrote code to the letter of the spec, but did not fulfill the spirit of the application. A more robust system would have ensured that we used a more permanent customer ID to track people through our system. Which would have meant a lot of people violating the 3-strikes rule and being disconnected from the internet.
Edit: Ah, I suppose I wasn't clear in the original message. When the ID changed, we started the count over. And considering that for a normal cable user the ID was changing every few months, it became extremely difficult for 3 strikes to accrue before the counter was reset.
7
u/GrijzePilion Nov 21 '16
Ah, I see. You interpreted the spec in your own way, and in such a way that everything was technically still correct.
→ More replies (2)3
3
Nov 21 '16
I had to create the exact same system for an ISP in Australia. Two weeks of design and code - only for it to never be turned on... every single DVD we got from the MPAA was locked in a filing cabinet without ever being inserted into a computer.
I too felt really proud of my crappy software that was functionally correct - it demonstrated that we had the capability to handle infringement warning notices.
→ More replies (15)4
2.9k
u/progfrog Nov 16 '16
"It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter." -- Nathaniel S. Borenstein, computer scientist
523
u/verydapeng Nov 16 '16
right, never hardcode anything!
307
u/ilion Nov 16 '16
I don't know... big difference between the two. This seems like scope creep and could put this out of sprint.
166
u/Razzal Nov 16 '16
Well what if we remove all safeguards and security, think you can squeeze it into a demo-able form by Friday?
→ More replies (54)58
u/d4rch0n Nov 16 '16
Then you go and spend 16 hour days and finish the DestroyCity procedure and product is like... "okay great, that's good, but we were reallllly looking for a CommitGenocide"
→ More replies (4)12
→ More replies (7)11
138
u/NoMoreNicksLeft Nov 16 '16
Why write a DestroyCity procedure when I can write a city administration software product in Visual Basic?
You people overthink these things.
0
Nov 16 '16
[deleted]
83
38
u/Sarcastinator Nov 16 '16
Why over-engineer it? We already have a working Excel 97 worksheet for this.
→ More replies (10)238
u/green_meklar Nov 16 '16
You know, just in case someone else wanted to destroy a different city.
156
u/caskey Nov 16 '16
Yeah, you don't want to lose the follow up contracts to retarget the software.
104
u/c1e0c72c69e5406abf55 Nov 16 '16
Oh but that is simple my friend, the front end is just one button hard coded with the parameter Baghdad.
→ More replies (4)147
u/goal2004 Nov 16 '16
Nah, that's short term thinking still. It'd have to be Destroy<T>(T obj).
115
u/memeship Nov 16 '16
I mean, cities, or specifically locations, are a pretty specific type of target. So maybe more like:
class CityDestroyer implements Destroyer→ More replies (2)51
u/RunasSudo Nov 16 '16
IDestroyer.java
AbstractDestroyerImpl.java
CityDestroyer.java
DestroyerFactory.java
→ More replies (1)51
Nov 16 '16
That's the wrong abstraction. The actual parameter should be a coordinate.
79
u/Kalium Nov 16 '16
Nah. It should be a Location, which has coordinates as attributes.
→ More replies (22)→ More replies (1)12
28
Nov 16 '16
The "code" for DestoryCity was "written" by Physicists, not Software Engineers.
Although I suppose there is code somewhere that can fire nuclear missiles at any location that's given to it as a parameter.
36
u/caedin8 Nov 16 '16
Some software engineer somewhere wrote that. I wonder how he sleeps at night
→ More replies (1)13
Nov 16 '16 edited Nov 16 '16
How did you think Richard Feynman slept at night?
(He was at the heart of the Manhatten Project).
→ More replies (8)17
Nov 16 '16
There are 8 million stories in the naked city.
But noone can remember any of them because some idiot called DestoryCity()15
Nov 16 '16
Surely a Destroy Area procedure would be better, which takes Lat, Long and Radius as parameters?
19
u/progfrog Nov 16 '16
sure, and "DestroyCity" could just wrap that procedure with Lat, Long and Radius being properties of City
while we are at it, why just not have Destroyable interface?
8
u/Kukuluops Nov 16 '16
But what if we want to destroy something that is not close-to-circle shaped like railroads?
→ More replies (3)6
u/ToTheNintieth Nov 16 '16
Well, reading this comment before the article led me to expect it would be a humor piece. It wasn't :(
22
u/contrarian_barbarian Nov 16 '16
That said, it is fine to specify Detroit as part of the unit test suite. Not like they'll notice the difference.
8
u/frenzyboard Nov 16 '16
You can't break a broken object as a test case. You can't assess the damage and prove you caused it.
2
→ More replies (37)2
1.0k
Nov 15 '16
Nice twist, I thought OP was going to talk about spaghetti code.
384
u/Guru_of_Reason Nov 15 '16
Me too. I was ready for another "look at this terrible code I wrote this one time" post (which is fine and can be entertaining, I mean I still clicked it), but this was really interesting to read. It's something I've never really thought about before.
77
u/dumbredditer Nov 16 '16
I was thinking this was going to be a dev from Ashley Madison who wrote all the fembot code.
0
71
u/reginalduk Nov 16 '16
He didn't sink that low, all he talked about was writing code that forced teenagers into suicide inducing medication. I'd have been truly mad if he had used global variables.
6
Nov 16 '16
With how harsh some CRs are nowadays, some people would choose to feed suicide drugs to people if it would free them from them.
27
u/cassandraspeaks Nov 16 '16
I thought it was going to be some kind of trite "the code I never wrote" thing, especially given the blog it's posted on.
20
Nov 16 '16
Haha Quora has the same problem, I've found. "Which is the best programming language?" "No language at all!!1" "How can I become better at programming?" "By not programming at all!!1" etc
→ More replies (4)2
u/nwsm Nov 20 '16
I actually didn't read this until today (now that there has been a second post about it) because I thought it was about spaghetti code
100
u/faithle55 Nov 16 '16 edited Nov 18 '16
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.
For years my dad told me he was paying me a generous salary.
I was an adult - started with him about 24 and went on until I was 40.
About 38 years old I joined a networking group. Found out everyone there was earning about 50% to 75% more than me.
In the meantime my dad, through the company, was paying himself the same salary as me, the same to my stepmum (who didn't work for the company) and the company paid his mortgage and his pension.
TL;DR: worked for my dad for 16 years and he paid himself 4 times what he paid me and told me I was well off.
Edit: shit, I forgot an important aspect. I wrote it but it's missing, must have accidentally deleted it with something else while drafting.
all this time he was saying: 'you're getting good money, I'm paying you the same as I pay myself. Concealing the payments to my step-mum and the mortgage and pension contributions.
21
u/n1c0_ds Nov 17 '16
Although that was a scumbag move, is there no way you could have learned that in the first 14 years of your career?
9
u/faithle55 Nov 17 '16
What can I tell you?
Must have been a sort of blind spot. I assumed you had to be really special - top lawyer, surgeon, CEO of a large business - to be earning that much more. Turns out that was wrong.
→ More replies (1)3
u/ciny Nov 16 '16
The point is - did you live with him? I mean, it took me years to get to the same comfort as when I was living with my folks. My first job I made $400-500 (not in the us, obviously) and paid $100 for all inclusive rent. When I moved a thousand km away I started making $1000 - but my rent was suddenly $300, I had to pay (and cook) my own food, wash my clothes, clean the place and pay all the misc. stuff. At the end of the day I actually was able to save/freely spend less money even though I was making double plus I had lesa free time...
6
u/faithle55 Nov 16 '16
No, I left to go to University and never went back to the family home.
Plus, my parents divorced, so....
0
0
0
94
u/philpips Nov 16 '16
Buddy of mine worked for a payday loans company where they modified a function that takes payment from a customer to retry with a lesser amount if it failed. So no matter how little money you have left they still take it.
The result was an immediate increase in profit and a company-wide celebration. The devs chose not to attend.
21
u/trempor Nov 18 '16
If you think negatively than they found a way to take what little a customer had left. If you think positively they now allowed a customer with not enough money to pay it back in parts, instead of getting a debt collector sent after them.
I don't see this as somehow purely "scummy".
56
u/philpips Nov 18 '16
I'm sure it doesn't feel good to be responsible for taking a person's last penny. Even if they owe you that penny.
8
u/trempor Nov 18 '16
Yes, that's the negative way of thinking about it. You could also say that it feels good that you are able to help the person by minimizing the trouble they have and making the best out of a shitty situation.
→ More replies (1)11
u/Zerhackermann Nov 21 '16
The problem is that with loans, especially payday loans, paying less than the minimum means they are not getting ahead at all. Because the minimum payment is just the interest and has no affect on the principle. Yeah it can be argued that they still owe the money. But that last 20 bucks is likely how they were eating or getting to work.
But try explaining that do the folks in the big offices.
→ More replies (1)10
u/Roxolan Nov 21 '16
they now allowed a customer with not enough money to pay it back in parts, instead of getting a debt collector sent after them.
They would still send a debt collector after them for the remainder. Why wouldn't they?
→ More replies (3)3
169
Nov 16 '16
It's easy to fall into the trap of thinking that just because a job is legal and has a steady paycheck and a successful company that it's ethical. I've found myself very nearly taking unethical jobs in a couple occasions, and it's not easy to say no. You'll always feel better in the long run though. Trust your conscience.
122
Nov 16 '16
Reminds me of an interview I had with Facebook. I was asked a question on strategies to get users to use a new feature on the site. I came up with a list of things like prominence on the page, messaging, or showing it on a feed. The interviewer looked a little displeased. He then said "what if you had to be a bit forceful and coercive with the users".
That gave me a lot of insight into how the people at facebook and a lot of other big companies think.
27
u/lost_send_berries Nov 16 '16
That explains the time where they "added the ability to specify which email addresses are shown in your profile" and conveniently set it to remove all existing emails and add a facebook.com email.
(Reality: you could already set any email to be visible to "only me", but they added an extra checkbox as an excuse to swallow the world's emails. Thankfully the experiment was a failure)
→ More replies (2)8
u/new_to_cincy Nov 20 '16
Their philosophy is it's better "asking forgiveness instead of permission." Seems they learned a lesson with privacy controls, but I'm sure they're pushing the envelope with everything else.
55
u/leadzor Nov 16 '16
I was taking a few extra weeks in my internship to help the company (a startup) out. My internship was supposed to last 6 months, I was already hitting nearly 8. Overall it was a shitty experience, and looking back I regret staying as long as I did.
The last straw that made me leave (aside from the lack of payment. I was actually paying to work there, as commute transport passes aren't that cheap) was when I was asked to make some kind of bot to scrape profile information from LinkedIn and create fake user accounts so he could tell investors how much the company had grown. I straight up refused and explained how unethical it was to 1. steal people information (i know lots of other entities do that but whatever) and 2. lie to possible investors to get money. After being yelled at, I never showed up again.
4
Nov 16 '16
You should've told their potential investors anonymously. Would've been a good move.
→ More replies (1)0
561
u/d_wilson123 Nov 15 '16
I remember I was the web admin for my high school's web site. This was back in probably 2000'ish so they web wasn't super fancy and it was mostly just HTML with a bit of VB. We had a fairly well regarded black history month portion of the site. I was one of the lead maintainers on that site and in charge of implementing content. So this was all part of an actual class and it tried to be ran like a business. So we had project managers, requirement gathering and all that. The teacher was in charge of signing off on all projects.
So thats a bit of backstory. The actual funny/odd part is coming up. They wanted to add a few games to the site. Made sense to me. I was just the coder so I wasn't in charge of the design process they'd just give me the basic layout for how it should operate. So then I saw the requirements come to me and I was getting ready to start on them. They wanted me to program Hangman on the site. The black history month website. The teacher signed off on all this and it was good to go. No one thought anything was weird until I came up to the teacher and told her I refuse to put Hangman on a website devoted to black history. Luckily once I called out how absurd the idea was no one challenged me. Eventually it was rebranded to "Guess the word" and I didn't even have to code up a little stick figure.
321
u/placeybordeaux Nov 15 '16
No one thought anything was weird until I came up to the teacher and told her I refuse to put Hangman on a website devoted to black history.
Narrowly avoided /r/crappydesign
125
u/AceDecade Nov 16 '16
Eventually it was rebranded to "Guess the word"
People who annoy you?
→ More replies (2)70
3
u/echo_61 Nov 21 '16
"Yeah, yeah, but your scientists were so preoccupied with whether or not they could that they didn't stop to think if they should."
Dr. Ian Malcom
20
2
u/angus_the_red Nov 20 '16
Have a similar story. Brother runs a business with crossfire in the name. Kid from his church designs a logo for it:
Actual flaming cross.
→ More replies (4)0
62
u/CheezyXenomorph Nov 16 '16
At a previous company I worked for, legal sent through a notice that the law was changing in a year so that any addons the users didn't explicitly select at checkout they weren't liable to pay for.
So like when you buy a domain from go daddy and they pre-tick the "Domain privacy for $2.99 extra a year!" box, that was being made illegal.
At the time our checkout process had a whole load of similar addons and none of them were pre-ticked. As soon as legal said it was going to become illegal to do it in a years time, the product managers decided that all the currently unticked addons should be ticked by default.
For 12 months that change was in effect, and revenue shot up because of it. But making that change was sketchy as hell, and we went back to legal first before implementing it.
61
u/pmckizzle Nov 16 '16
As someone who worked on surveillance and tracking software used by governments that has 100% lead to peoples deaths, I feel this guys pain.
→ More replies (3)
148
Nov 16 '16
If it makes anyone feel any better about the suicide, it's surmised by some doctors and therapists that anti-depressants can heighten the risk of suicide (this is a commonly warned-of side effect) because they actually provide the depressed patient with enough motivation to finally take action and end their life. It's a terrible and gruesome thought, bit it may not be anything intrinsically suicide-inducing with that specific medication.
39
u/four024490502 Nov 16 '16
This scenario where the cure to a problem briefly makes the problem worse reminds me of the control rods in RBMK nuclear reactors (the model of reactor that Chernobyl was). The rods were designed to absorb neutrons and slow the rate of reaction, but they were tipped with graphite which actually increases the rate of the reaction. During Chernobyl, when the control rods were inserted as part of an emergency shutdown, they spiked the rate of reaction as they were being inserted, causing the core to overheat and fracture, which caused the control rods to get stuck in their position, causing the situation to rapidly get worse and worse until the reactor exploded.
29
u/merreborn Nov 16 '16
The so called "black box warning" on SSRIs is a bit controversial. Some in the industry believe it overstates the risk
https://en.m.wikipedia.org/wiki/Antidepressants_and_suicide_risk
3
u/Beard_of_Valor Nov 21 '16
Andrew Solomon gave a tremendous TED talk on depression and anxiety. My favorite line was something like "the opposite of depression is not sadness; it is vitality". This idea that depressed people might suddenly find motivation with only one thing left on the to do list is easy for me to believe.
I think depression changes people in a way that can't be reversed. That said, though I consider myself depressed, I would say I'm in the 95%ile for happiness among depressed people. Like an alcoholic with 20 years sober, I'm perched on the precipice, but I've gotten better at balancing and built a ladder back up here for when I fall.
5
u/MuonManLaserJab Nov 20 '16
And of course there is no evidence for this at all; it is just the most upbeat way you could possibly describe the phenomenon, and so it's the only one you hear. Unless there's been research that I've missed providing insights into this...
→ More replies (2)2
u/CttCJim Nov 21 '16
one of our son's doctors told the story of a boy who in one video was calm and levelheaded, and in the other was moody and violent. he said that surprisingly the second was him medicated, because once the depression or anxiety or whatever else is no longer filtering, there's a moment where you look at your life and go "wow my life suck". it gets worse for a while before you fix the outside to match your newly-working inside.
48
u/Dicethrower Nov 16 '16
I once had to make a fake 4 digit 'products sold' counter on a website. I don't work there anymore.
At my current job I was recently tasked with making a gambling game disguised as a base-building resource-management strategy game aimed for kids. At the end of this month, I don't work here anymore either.
15
u/draymondsdickkickers Nov 21 '16
Clash of clans fits the description your talking about. I've seen multiple children become obsessed with it, to levels well beyond what they are with any other game. When it gets banned they become inconsolable an scream and yell, it's horrible and I hate the game so much because it's training terrible behaviours into children
7
u/masklinn Nov 21 '16
There's no gambling in it though.
There is[0] in the "followup" (clash royale) in the form of cards chests, but clash of clans is from the previous time-investment generation (and yes you can pay ridiculous amounts of money to play continuously or get more resources).
[0] to an extent relatively similar to TCGs/CCGs like MTG or Hearthstone
→ More replies (1)4
u/Reelix Nov 22 '16
Look at Lords Mobile. They recently had an event with a $1000 entry fee - About 50 people showed up
4
u/smegnose Nov 16 '16
You can always report the app.
7
u/crazybjjaccount Nov 20 '16 edited Nov 20 '16
That's how free to play games tend to work. Addicting people works better then providing fun.
→ More replies (1)4
u/dontworryimnotacop Nov 21 '16
Tons of games in the app store have gambling-like mechanics, "gambling" is not a black-or-white term. Technically anything that involves chance and variable payoff could be construed as a "gambling game".
8
u/Dicethrower Nov 21 '16
I know, but the way this game worked, you had to buy resources off a player-only market to construct buildings and once you had buildings you'd sporadically get random amount of resources back that'd either return a net profit or not. The idea is that after a while your building deteriorates, so you have to use more resources to keep it going, to generate more resources, in the hope that you get a net profit some day. The way it was setup, there was only a 12% chance you got a net profit, but you'd often get close because it's like a dice roll game where you have to throw an average of 5. It makes people keep buying resources because they don't want to lose the buildings they have already invested in or they have to accept a loss. Obviously using real-money, you can buy more resources and if you build enough buildings in a specific period of time, you get bonus resources that are pretty much neglectable.
→ More replies (6)
44
u/viperx77 Nov 16 '16
I worked for a computer based testing company and was asked to create computer skills tests that had incorrect answer so they could sell certification training and more tests.
327
u/ForeverAlot Nov 15 '16
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.
The single most valuable aspect of my CS degree was the mandatory ethics course I barely understood at the time. That stuff doesn't come naturally. Everyone should read A Gift of Fire.
22
Nov 16 '16
Wow I never expected that the textbook I had to buy for my boring ethics class that I did badly in and barely put any effort into would be recommended on Reddit.
22
u/markasoftware Nov 16 '16
What kind of ethics don't come naturally? Genuinely curious
126
Nov 16 '16
Uhhh any that don't relate to not hitting people with rocks or raping? We live in an unnatural world. Nothing to do with marketing or CS comes naturally.
→ More replies (27)9
u/speedisavirus Nov 16 '16
You would have to take the course to really understand I assume. A lot of the course content in the course I took and most I know of spend a lot of time in case studies where being dismissive or being unwilling to say no have killed a lot of people. There are other parts typically on how to challenge authority and identify situations where you should just say no. Also the morality and ethical stances on piracy and intellectual rights. There are a few books posted here that cover the topic from a developer perspective and if as a developer you haven't had an ethics course I recommend you read one of them.
6
3
→ More replies (96)2
57
u/SOL-Cantus Nov 16 '16
The first rule of any job is that your ethics matter and will follow you until the end of time. Just because it's easy money or some superior telling you "it's fine, don't worry, just do this one thing for me," doesn't mean you're off the hook for not documenting your concerns and standing up for what's right.
The second rule is that personal concerns should be followed up. Inexperience means personal research, not rote acceptance of other's experience. After working both QA and IT, I can say far too many people look at a contract or project materials and never question whether either the whole or its parts are truly benign. I've caught major mistakes and outright fraud in work from co-workers, clients, and even upper management. In every single case it was because I treated the material as if it needed due diligence, and I needed to sleep a little less to do it right. It pissed off everyone; paperwork was redone, signatures passed back around, deadlines pushed, and extra hours added.
No one could say that it wasn't the right thing to do.
A lot of college grads will walk into their first jobs and be thoroughly intimidated by the prospect of losing it if they don't obey. Wells Fargo was a perfect example of what happens when the system reinforces that intimidation. But working under such conditions means working under protest; making sure that grey areas never become truly questionable, that you Do No Harm.
8
u/catonic Nov 16 '16
Unless protest, or talking about protest becomes an unstated reason for dismissal.
16
u/DevIceMan Nov 16 '16
There is apparently an "Anti Disparagement Clause" where I work.
The enforceability of that is of course not very enforceable, but enough to make someone's life difficult.
→ More replies (1)
28
u/sign_on_the_window Nov 16 '16
Maybe I am reading this wrong... So women go to this site, fill out a quiz, and it will recommend the client's drug unless she is allergic or already taking the drug.
My main question is why are the women actually choosing this drug? Why aren't medical professionals doing that? The girl goes to the doctor and says, "I took this quiz online and it says I need XYZ drug." Isn't a medical professional suppose to not rely on that info?
8
u/Kissaki0 Nov 16 '16
This may differ between countries, but if the doctor prescribes a type of drug and not a specific producer it’s the consumers choice.
3
u/pbtree Nov 20 '16
Taking advantage of people's propensity to do stupid things is wrong, most matter how stupid those things are.
0
28
u/fiah84 Nov 16 '16
I quit my last job in less than 3 months because of this. I only found out after a month or so that the whole company was basically founded on the success of a single piece of malware, and that the owner was trying to replicate that success with no scruples
Oh yeah, the other half of what they did was basically fishing for government science grants, only possible by grossly overselling our qualifications
4
66
75
u/hexed Nov 16 '16
Ultimately the risks of the drug in TFA are a matter for the medical profession (TFA strongly hints it was prescription-only without explicitly saying). Who is ``responsible'' for the death referred to is ultimately a philosophical question with no definite answer.
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.
IMO this is a good message, but requires a dose of perspective.
12
u/DarthTJ Nov 16 '16
Who is not responsible is perfectly clear though, the guy who built the "ask your doctor about this drug " website bears no responsibility whatsoever.
→ More replies (3)45
u/entiat_blues Nov 16 '16
that developer bears some responsibility. the same way that any broadcast platform carries some responsibility for their content. it might not result in legal liability to the individual, but the breakdown of ethical behavior includes even a developer just following orders.
→ More replies (25)
52
u/phpworm Nov 16 '16
I don't know if it's just me, or the area I live, but almost every website I've ever built for local area businesses where I was in direct communication with the client, I've found the owners extremely shady and / or unethical. Now I find myself living here and not wanting to support any one of them. My places to work, shop and eat have slowly dwindled.
25
u/d4rch0n Nov 16 '16
As you're eating a burger out of the diner and he's explaining the site and giving you images, "Can you photoshop out this rat nest"
2
u/Kissaki0 Nov 16 '16
But now the real question is, are the ones you shifted to better, or maybe even worse?
18
138
u/name_censored_ Nov 15 '16
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.”
[..]
As developers, we are often one of the last lines of defense against potentially dangerous and unethical practices.
Ethics has nothing to do with being a developer, and everything to do with being a human being.
A developers' ethics are only distinct from anyone else's when understanding the ethical issue requires IT knowledge - like the complexities of handling personally identifying information, or penny-shaving on rounding errors.
In all other cases, being held to a different ethical standard from another human in the process is a total cop-out - marketers don't get a free pass to be bastards just because they can't write a fixed-point-combinator.
80
u/SirClueless Nov 16 '16
He's not held to a different standard; the marketer is behaving in a similarly unethical way. But unethical behavior by your clients or coworkers is not an excuse for being unethical yourself.
This is a really hard thing to do. The rational desire to provide for yourself and your family and a recognition that you are unlikely to be held accountable for your role in creating an unethical system, combined with conditioning and a human desire to fit in, lead to an easy way out which is to justify your unethical behavior to yourself or put it out of mind.
→ More replies (4)22
u/sysop073 Nov 16 '16
I think you read it wrong. It doesn't say "developers have a special set of ethics different from other humans", it says "developers are the last line of defense" because once a developer has implemented something, it's a thing now, even if it was unethical to do. Anyone along the way could've said "uh, no, we're not doing this", but the developer is the last person who can say no before it actually gets made
11
2
u/tree_or_up Nov 16 '16
Maybe I'm missing your point but I'd say being a developer is one of many possible ways of being a human being, all of which have ethical implications by definition.
17
u/panorambo Nov 16 '16
I don't know if they have it in the Canada, or United States, but in Norway during my higher education programme, we had a class that solely focused on work ethics of an IT-employee. Like what things one would think about when one is offered to program weapon systems etc. I still think it was very useful, but truth be told most of the people that showed up for that class were already all too conscious and aware of the problem being discussed.
5
u/GeneralAutismo Nov 16 '16
How do ethics classes stack up to the freedom offered by piles of money provided by contractors? My money is not on the ethics classes.
→ More replies (2)→ More replies (1)2
u/TheJack38 Nov 21 '16
Norwegian here as well. Which school did you attend? My CS degree doesn't seem to have any of this in it... Suprisingly enough, my physics degree did though.
14
21
37
u/LeCrushinator Nov 16 '16
This is how I'd feel if I coded for the NSA, writing software to spy on our own citizens, listen in on every phone call, copy every email, have access to people's cloud data.
37
u/d4rch0n Nov 16 '16 edited Nov 16 '16
Eh, sec people can be notoriously unethical simply because they find the shit they're playing with extremely fun.
"Build something that can intercept X traffic, pull out the password and then try to ssh onto their machine with that password and install this rootkit"
HELL YEAH. Fuck yes let's do this. What an awesome project.
Fast forward 2 years later, it's hooked up to the transatlantic fiber cable.
You wouldn't see that coming. You might, if you're the guy set up to deploy it and make it work on a huge scale, but bits and pieces come together and everyone likely has an idea it could be used bad, but building something like that is just so damn fun. This is why you learned the shit you learned, to do fun shit like this. But it turns out, the stuff you find fun is also extremely shady if used in certain ways... Who knows if they'll use this to catch a certain terrorist group or for mass surveillance. Only the guys that directly hook it up know what it's for. You just know you're writing a fun little PoC.
Not only that, but some sec guys are just straight up evil and think that weak security means they have a right to pwn the system. If you talk with guys at defcon, they'll legit argue shit like "they used old vulnerable software, it's their fault i dumped their DB". Lots of guys are unethical and just think they have a right to do shit like that because they can. I imagine lots of those guys could potentially get hired at the NSA if they can act professional enough and not do drugs. There are definitely a lot of anti-LEO anarchist types, but lots of those guys do crazy shit just because they like to do crazy shit, doesn't matter what context.
I don't know anyone that works for them, but I definitely have talked to people that would and wouldn't make a big deal about the mass surveillance.
9
2
10
u/K5Doom Nov 16 '16
In Canada, ethics classes in engineering are mandatory and they differentiate, among other classes, a science degree from an engineering degree. They make us swear to protect the public before graduating and since it's a professional order, we can get investigated on our work and sanctioned.
2
27
u/snuffybox Nov 16 '16 edited Nov 16 '16
Does anyone else hate that so many articles like this start off as basically a resume for the writer. I really don't care that you wrote your first line of code at 6 or you worked part time for your dad when you were 15....
Rest of the article was good, but the beginning seemed like unnecessary humble bragging.
7
u/deanat78 Nov 17 '16
Completely agree. Oh I forgot to mention - I have 164 IQ and wrote my first iPhone game at the age of 2 in 1991.
0
17
u/walterj89 Nov 16 '16
Shady marketing practices are one of the main reason I got out of web development. Even though I never had a part in the unethical parts, just seeing it and knowing about it grossed me out. The other main reason was the spaghetti code I had to deal with that no one cared enough about to even be ashamed of.
2
Nov 20 '16
I "know" a guy who works for a popular recruiting company that rymes with jobbrings. After looking at posts that seemed to good to be true I asked him about it. He informed me that marketing puts ghost posts up to harvest resumes. The jobs dont exist and they then contact you about another position. At least they have a term for lieing
17
u/mao_neko Nov 16 '16
I've spent some time being unemployed, and due to my experience and skills, got a few probing offers over LinkedIn etc. C++ developer? tick! Experience with UI design? Yes! Oh, it's a Gaming company! cool!... wait... no, it's a Gaming company. They want me to write code to run pokies.
Screw that, I'm not contributing to the problem.
8
8
2
6
u/PeacefullyFighting Nov 16 '16
As developers, we are often one of the last lines of defense against potentially dangerous and unethical practices
So true, i work in BI developing data warehouses and i see soo much reporting based on absolutely nothing solid.
→ More replies (2)
5
u/emotional_downvoter Nov 16 '16 edited Nov 16 '16
Is freecodecamp legit? Why do they appear to be botting stars on github?
→ More replies (4)
5
u/Mentioned_Videos Nov 16 '16
Videos in this thread: Watch Playlist ▶
VIDEO|COMMENT
-|-WarGames (3/11) Movie CLIP - Shall We Play a Game? (1983) HD|49 - PLEASE LIST PRIMARY TARGETS BY CITY AND/OR COUNTY NAME
Chevron vs. the Amazon - Full Documentary // Empire_Files|5 - Capitalism allocates resources much more efficiently Yeah, and you end up with empty fancy houses and homeless people. And foreign lands plundered. This discussion could get prolonged and unintelligent due to prevailing misconceptions which I do ... The Fantastic Mr Feynman|1 - How did you think Richard Feynman slept at night? (He was at the heart of the Manhatten Project).
I'm a bot working hard to help Redditors find related videos to watch.
5
u/wknight8111 Nov 20 '16
My first job was for a small startup which was venture-funded. Every few months we had all the investors come in for a tour, meet'n'greet and demo. We had some demo code that we pulled out for these occasions which generated some real-time graphs and other colorful nonsense to impress the investors. When they went away, we put that garbage code away too. It had nothing to do with what we were actually working on, but the stuff we were actually developing wasn't as good in a live demo. I still feel a little skeezy asking people to make investment decisions worth millions of dollars based on fake code.
I have also worked on some projects where our clients asked us for a feature to meet a business need, but we realized the feature they had requested didn't really meet the need they had described. I asked the PM to push back and propose a "real" solution instead, which would have, incidentally, taken fewer hours of development and therefore less profit for us. The PM never mentioned the alternative to the client ("they already approved the designs, so we're just going to run with it"), the client ended up not liking the feature when it was delivered and realized it didn't meet their needs after all. Months later they were asking us to rip it back out and put in a different solution.
→ More replies (1)
9
u/SanderMarechal Nov 16 '16
I have been involved in a few questionable projects. Some hobby, some professional.
I once wrote a tool to hack Yahoo mail accounts in order to stop online scammers. No regrets about that one.
I once helped build a penny auction site, complete with voting robots. I felt dirty after and told my boss "never again". He agreed. The client went belly up later and sold the site. When the new owner came to us for hosting and support, my boss told him to go take a hike.
I was asked to build a site for Monsanto. This one I refused to do and I told my boss exactly why. Site still got built but not by me.
4
Nov 16 '16
The code in my career I am ashamed of is just shitty code. It's embarrassing that it's out there.
4
7
u/nutrecht Nov 16 '16
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.
Anyone else that feels the "best dad" award isn't going to go to his?
Other than that; great article. We are in fact often the "last line of defence" when it comes to runaway capitalism.
7
u/Sworn Nov 16 '16
Underpaying your own child because you're providing something expected from every parent? Yeah, doesn't sound like a good role model.
→ More replies (4)
3
5
u/steelypip Nov 16 '16
I took the liberty of cross-posting this to r/badpharma since it seems relevant there too.
2
2
u/Zhang5 Nov 16 '16
Very interesting. To anyone out there looking for a tl;dr I recommend reading through still. But if you insist: he wrote a website for a pharmaceutical drug with a side effect of suicide. There is still ongoing litigation against that company for the drug, and he is ashamed for his part in making the site.
2
Nov 16 '16
Looking at the comments, I guess I should consider myself lucky that I've never been asked to write anything I've had a moral quandry about.
2
u/CrazyAmazing Nov 16 '16
/u/devmastery, I gotta say, you got me with that, and I was all in to sign up for the newsletter. I'm using Google Chrome on Windows 10 and I don't have any blockers installed, but the signup widget in the article is blank for me. It looks like it tries to load, but then doesn't.
2
Nov 16 '16
I'm happy to work for a nonprofit, and the code I write generally helps people. But for 200k a year, I'd write code that randomly does bad things. And if I wouldn't, two thousand software devs from India would jump at the chance to do it for a tenth of that.
2
u/redstonefreak589 Nov 20 '16
My dream job is to become a programmer and help people around the world with the code I write. After reading this, I'm not sure of it anymore. I'm only 17, enrolled in college but haven't signed up for any classes yet, so there is still time to change my major. I have very high standards and very good morals and ethics, but I'm just nervous that whatever firm I go to will just end up as me doing something sketchy. What do I do?
4
u/xaedes Nov 20 '16
old but gold: "dont worry be happy" you say you have good morals and ethics. what else do you need? just dont do the stuff you dont want to. you can always change where you work. don't throw away your future plans due to some anxieties from some random article. the anxiety you feel just shows you what is important for you. hear to it and just dont do the stuff that feels unethical.
→ More replies (1)
10
Nov 15 '16
Makes me think of the "it's not your fault" bit in Good Will Hunting.
Dude, you're a website designer not a doctor, lighten up.
23
10
u/Kissaki0 Nov 16 '16
This is more about consumer deception than anything. It presents itself as more than it is.
16
u/DarthTJ Nov 16 '16
I don't know why you are being down voted, you're exactly correct. Unless the website wrote a prescription it is ridiculous to attribute any blame from medication side effects at all on a website or developer.
→ More replies (12)
2
u/BeatnikDude Nov 16 '16
Thanks for this post. I to have worked for the ethically challenged during a "good" gig.
2
u/d4rch0n Nov 16 '16 edited Nov 16 '16
That's not something the author should blame themselves for. Lots of drugs cause suicidal thoughts and depression. Lots of people commit suicide. It really sucks that someone took the drug and killed themselves, but do they even know if they were thinking this ahead of time? Had they attempted before the drug?
People just commit suicide and you can't blame yourself for someone else's choice, just by associating yourself with the pharmaceutical company. Yes, it was a shitty thing to have to build a site that always says this drug is right for you... but that's pretty much what they all do. If you ever visit these drug sites, it's shit like "Do you suffer from aches and pains that everyone experiences once in a while? Do you occasionally feel stress because everyone alive does? TAKE THIS DRUG". Can't blame yourself for that, blame marketing.
2
45
u/losvedir Nov 16 '16
Good read, but
is dangerous. Non-medical professionals should not be handing out medical advice.