HACKER Q&A
📣 BoxOfRain

Have you ever written code that you later regretted for ethical reasons?


Have you ever written code that you later regretted for ethical reasons?


  👤 throwaway998811 Accepted Answer ✓
{Anon for obvious reasons}

Yes. But possibly not in the way you were thinking of.

Waayyy back when I was still very much a green-horn / fledgling I was in charge of a revenue processing department that consisted of a whole bunch of AS400 batch queries (CSV output of course) that was imported in to Excel using various macros which also had various macros and look-up tables that processed and presented the data in an easy for users to edit format. Once they were done updating their figures all they had to do was hit a button that then exported that unholy mess in to a MS-Access DB (shudders... yeah, I know).

Anyway - For {$reason} I decided to write some code (functions were distributed between a mixture of VB, VBA and a few batch files) that would look for any numeric field and multiply the value by a very small random amount. It was very basic but used the day of the week to decide on how many fields to look for/update (Monday = 1 field, Tuesday = 2 different fields etc). Sometimes the random multiplication rounded the field value up, other times downwards, some times it made no difference. (And yes, I grew up on a diet of 80's movies about hackers and was heavily inspired by them. Side note - Office Space is a good one to watch).

Because the changes were so small and so random it wasn't picked up until their annual financial audit. By that stage the back-ups were useless.

Do I feel guilty? Yes. Would I do something like that ever again? I hope not. But Anon for obvious reasons.


👤 cableshaft
Felt a little dirty managing data analytics integration for a free to play video game where the client would go "ooooh!" whenever someone who paid >$100 on currency to spend in the store, want to see whatever they bought, and then immediately set the entire dev team on creating more of that type of content (like cosmetic items), and not caring at all about improving the overall gameplay experience at all, which the game desperately needed.

Pretty sure he would even call them whales (pretty standard term for it, but still) in our meetings with him.

But not too dirty because ultimately the game failed and the client lost millions of dollars on it.


👤 criticaltinker
Is it unethical to leave behind horrendously complex and undocumented code for your coworkers to inherit? Then I'd say yes - many of us have been on one or both sides of that situation, and regretted it.

👤 jobigoud
I once accepted to do a customized version of an open source application I'm working on, and I realized half way through that they were using it for recreational hunting which I'm opposed to.

To be clear I don't mind people using my software for things I don't necessarily approve of, this is the nature of open source, but this felt like directly and personally helping them and that left a very bad taste in my mouth.


👤 shaftway
Yes.

I was desperate for work and found a job building out websites for sub-prime auto loan lead generation (yes, the red flags should have been going off, but I was young and dumb). At first it was just minor HTML changes for the UI. The company had dozens of similar looking websites, so it got harder and harder to manage. Eventually I built a UI framework so the designers could churn out site after shitty site plugging their deals.

Then I turned my attention to the backend. We had essentially been dumping these leads into Excel spreadsheets and someone was manually mailing them out to dealers to contact the victi.... uh.... potential customers. So we built a processing framework to pull credit checks and bundle the information together and send it to dealers in real-time. We also started trying to go after our drop-off by finding abandoned applications and emailing them a few times asking them to come back and finish. All of this was made dirt simple so the designers could tweak the workflow / copy / whatever.

At this point I start doing a major overhaul of the whole thing, so I'm basically heads-down for a few months. I come back and start trying to migrate the old workflow into the new system. I found a few weird extra funnels that had been jammed in, some would effectively email people with their already-filled-out application, urging them to resubmit it. Some for applications from several months before.

That's when it all finally dropped into place for me.

- The owners were defrauding the dealers by soliciting for multiple leads from the same user, often using multiple sites to make the user think they were going to a new company. Each lead submission by a user counted as a new lead.

- Some of the spam made it look like the user hadn't finished filling the form out (even though they had). The email had a handy link to a pre-filled form so the user just had to click submit. Boom, new lead.

- The dealers were reporting defaulted payments to the sales people. These profiles would be looked up and dropped back into the funnel so that right when their car was getting repossessed they'd see spam tailored for people who couldn't afford a car, needed one, and had bad credit because their car had been repossessed.

- Looking at historical data only about 15% of customers were new, the rest were all people caught in this cycle.

I couldn't do it any more. Walked off the job that day. Just dropped everything as it was and left. No malicious actions, but no more help.

Not anonymous (or at least no more anonymous than I usually am). This was a long time ago, and I was young and naive. I didn't realize how my code was going to be used and as soon as I understood I walked away. Now I try to think about how my code will be used and the ethical ramifications of it. It's important to have these lessons.


👤 quickthrower2
I don’t regret a single line of code. Which is a nice feeling!

👤 dusted
My boring answer is: No. Less boring answer: There are probably tasks I'd refuse to do, but they'd be something like directly causing harm or pain, or exploiting the least fortunate in society.