Slashdot Asks: Are You Ashamed of Your Code? (businessinsider.com)
Programmer and teacher Bill Sourour wrote a post last week called "Code I'm Still Ashamed Of," where he recounts a story in which he was hired to write code for a pharmaceutical company. Little did he know at the time, he was being "duped into helping the company skirt drug advertising laws in order to persuade young women to take a particular drug," recaps Business Insider. "He later found out the drug was known to worsen depression and at least one young woman committed suicide while taking it." Sourour was inspired to write the post after viewing a talk by Robert Martin, called "The Future of Programming," who argues that software developers need to figure out how to self-regulate themselves quickly as software becomes increasingly prevalent in many people's lives. Business Insider reports: "Let's decide what it means to be a programmer," Martin says in the video. "Civilization depends on us. Civilization doesn't understand this yet." His point is that in today's world, everything we do like buying things, making a phone call, driving cars, flying in planes, involves software. And dozens of people have already been killed by faulty software in cars, while hundreds of people have been killed from faulty software during air travel. "We are killing people," Martin says. "We did not get into this business to kill people. And this is only getting worse." Martin finished with a fire-and-brimstone call to action in which he warned that one day, some software developer will do something that will cause a disaster that kills tens of thousands of people. But Sourour points out that it's not just about accidentally killing people or deliberately polluting the air. Software has already been used by Wall Street firms to manipulate stock quotes. "This could not happen without some shady code that creates fake orders," Sourour says. We'd like to ask what your thoughts are on Sourour's post and whether or not you've ever had a similar experience. Have you ever felt ashamed of your code?
quadrupled efficiency of the cig sorter (cigarette carton stamping/shipping) module in the largest dry goods shipper in north america before a career change
...often ashamed of my comments on Slashdot.
Yes, but I will never admid it in public. I will defend it till the end how others are wrong.
Don't fight for your country, if your country does not fight for you.
We're waiting for a response.
Therefore I started collecting some code fragments for my own amusement. https://sourcecode.love/ Perhaps some non-spam will ever reach that site?
Yes, I'm ashamed of my code, but for an entirely different reason. 99 little bugs in my code ...
But I am driven to produce the most efficient code possible. In fact, it's cost me more than one job because I wasn't meeting productivity quotas, while at the same time a lot of the other programmers would come to me for advice on how to solve difficult problems. I always wonder what the hell those people do when I'm gone.
In civil engineering, when any project is bigger then a certain amount, it's required to have a civil engineer signing the project, responsible for all the stuff. Sometimes I wonder if we need a similar regulation in software. By example: if it's covering something sensible to life, like medical, airport, etc, law should require a software engineer signing the project and responsible for it.
Like on civil engineering, probably this will force software people to really invest in QA (until current days, QA is really, really bad in software).
I was tasked writing benchmarking software to show that the New Device from a Device Manufacturer was much faster than the Old Device. It wasn't. But we did find corner cases where it was, and based the benchmarks on that. We got paid. The New Device didn't do well in the market anyway.
No, I'm not ashamed.
Hell, no. I ain't ashamed of my code, and if a man says something bad about my code, there's gonna be some blood spilt.
You are welcome on my lawn.
I can see this being more about negligence than breaking the rules.
The emissions requirements are not going to be dealt with directly by all engineers. That will be a management issue. They'll look at all the emission requirements, and basically add that to the requirements.
The engineer then has two sets of conflicting requirements. Emission below X. Power above Y. There are additional rules though. The emissions requirement is only needed under certain conditions. So the tired, stressed engineer adds an "if()" statement based on those conditions. The manager is uncertain about this but sends it up the chain asking if it's okay. Next person up the chain doesn't understand or want to understand the technical details. All he cares about is that the emissions test is passed and the performance isn't affected.
As someone who moved from the developer world to secure testing, whenever I get a chance to pen-test my old product, I am very grateful for all my old code.
I've written and performed QA on Flight Software. It's a tedious process where actually coding is but maybe 2% of the total time involved. It's the process that produces good code and following the process is what lets us live with ourselves if the code does damage.
There are no shortcuts to producing good reliable code. It's time consuming and takes discipline. The Wild West Days of coding were over decades ago.
I'm not ashamed of my code in any way, especially when I was tasked with getting 10,000 lines a day out, or else lose my job to the offshore dev house. Bugs? Who gives a shit, as long as marketing gets their features. Customers are used to paying buggy, non-working stuff, and if it wasn't something I could handle in a few minutes, I mark the bug as FNR (fixed next release) and move on.
Comments? I have them in my journal, but they don't go in the code. Job security, since if I get axed, it will cost more time for someone to refactor the code than it costs to keep me. Even if I do get axed, why make the job of the bargain basement contractor easy?
As a lead dev, marketing could tell my manager to get me fired, and a H-1B from a contract house put in my place. A pissed off customer could be mollified with some attempt at a fix that broke stuff somewhere else. I know where my bread is buttered; marketing gets their features, even if means shipping a steaming pile of garbage. The alternative is fighting for scraps that the offshore dev houses leave behind.
I thought "ashamed of code" would be e.g. using a for loop on a Java Collection rather than an Iterator; or using EJB methods to simply wrap database layer calls, instead of encapsulating business rules (because you see our project uses a 3-tier architecture because someone somewhere read it is a good thing to do); or not doing unit tests.
Writing code to put bread on the table for employers whose business ethics are questionable (or cut corners when it comes to generally accepted good software engineering practices) is to be expected. It's not as if these things are discussed at the hiring interview. And jumping ship at the drop of a hat when these things crop up is seldom practicable - a new round of interviews takes time, so does induction into a new workplace.
We are all prostitutes, either from the neck up or the neck down.
Free, as in your money being freed from the confines of your account.
No shame?
I am not a coder although I know enough to throw something together. At my previous job I was working on a simple interface for looking up part numbers and viewing the corresponding CAD drawing. I had the logic figured out based on what they told me they wanted. Meanwhile, I got another job and I put in my two weeks notice. As I had them demo the new software, we discovered a few edge cases that weren't accounted for. Not having time to figure out the "best way" to accomplish this programmatically, I threw in a few nested IFs. Another day of testing, more edge cases, more IFs. By the end of the week I had 20-some nested IF statements and the code was slowing down. I was out of time, so that's how I had to leave it. The last time that I compiled the code I left a remark for the next poor IT soul who found that pile of slop. I apologized and said that if it ended up on TheDailWTF I would understand. Not life and death dependent software, but I didn't like leaving my name on something I wasn't proud of.
I've at times had to code up things I haven't been happy with, but rather than refuse to do it, I tried to modularize stuff so it could be fixed later when management changed.
This is, I think, better than refusing, and having someone else code it up. To quote Mordin Solus, "someone else might have gotten it wrong".
(And in at least one occasion, that worked -- for one product I worked on, we managed to safely and quickly kill the "phone home" DRM before it got out into the wild. Felt filthy working on it, felt good to bury it.)
Ashamed of what my code does/did? No...
Ashamed of what my code looks like? Yes! I am a lazy bastard when I'm working on a project alone....
The airline example, tragic as it is, is an example of a mistake. Preventable perhaps, but still a mistake.
The VW example is malice.
Cannot compare the two.
I am very small, utmostly microscopic.
That is about it :)
I am ashamed of some of the code that's been written in programming languages I've written
Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.
Stack Overflow for all the code that I've cut and pasted
Until we're out of the limelight, the idiocracy will just fuck it up.
The last thing programmers need is a power grubbing QA task manager on top of the idiot scrum manager, in addition to whoever else wants to run things. Quality starts with planning and thinking before coding and not rushing code out the door. A better approach would be not allowing non software people the ability to make statements of quality, cost and capability about software, via legal fiat. Let software engineers as individuals sign off on it.
Folks there's a lot less science, predictability and consensus in the legal profession. People need a license to cut hair. If software as a profession isn't to be regulated, neither of those professions should be as well.
Which would also make an interesting story.
If we're talking about how are code was used, I remember in high school (many moons ago) writing Turbo Pascal programs and Lotus 123 macros for a shipping department of a sizable company that hadn't yet computerized. I was brought in by the manager of the shipping department because he could hire a high-schooler when he couldn't get authorization to computerize from within the internal IT department (which was busy sinking the company with some massively expensive software controlling the manufacturing).
Anyway, I was very proud of allowing my boss to get all the data that he wanted, and he was very, very pleased that his department now had some means of seeing what was going on.
I distinctly remember when he called me in and thanked me. Due to my program, he'd had enough data to improve efficiency 25%!
I glowed.
Now he'd been able to let go 2 out of the 8 drivers they had.
I stood there speechless.
There were real people underneath those numbers.
It points out a real problem, and I'm glad the author has the conscience to care and to promote change. But I wonder what can effectively be done. In the average corporate environment, senior programmers are typically read in on the business details only on a need-to-know basis. Low-level code slingers usually don't get told jack. It's pretty difficult to act according to one's conscience given such a dearth of information. And if you demand more information - well, there's always someone waiting to take your job who'll just shut up and code.
The video linked in TFS points out that civilization depends on programmers. For a century or more, it has also depended on engineers; yet we still have Volkswagen-like scandals, not to mention all the mostly-unnoticed little day-to-day ethical compromises made by engineering staff in the name of business. It seems to me that the only solution is for designers and implementers to have a say equal to that of bean-counters, PHB's, and investors. And in our current world-wide corporotocracy, that simply isn't going to happen - at least not in the absence of bloody revolution.
'The Economy' is a giant Ponzi scheme whose most pitiable suckers are the youngest among us and the yet-unborn.
You get what you pay for, you can have good, fast and cheap.
Pick any 2.
We're all whores. We'll write code for the highest paying employer we can find. You want ethics on this stuff you need to go up the chain of command, because I promise if you speak up about this stuff there is someone cheaper who won't talk so much, standing right behind you and you're occupying their next job.
I've seen some shady things, and it was ALWAYS in a setting full of people too junior to ask questions. Junior people are sometimes naive, and will believe management when told that certain shady things are normal. Junior people may have no resume to speak of and are basically forced to look good at their first real job. Junior people may not be able to afford to quit without having something else lined up, and don't want to be marked as job-hoppers. Senior people have the marketability to leave, and the experience to see through BS. They may also have enough savings to quit out of principle and take a sabbatical, or the ability to shift gears to their side business. I don't really know how to solve the problem, given that young adults need to eat regardless of their ethics. I do know that the problem is hardly contained to computing. Maybe we gravitate to this field because we love logic, but the rest of the world isn't logical. We still have to deal with human nature in this field too.
Some of the highway projects on I-95 interchanges in Maryland should be examined for poor design - imagine spending millions on infrastructure to make the traffic worse and accidents more likely?
HBI's Law: Frequency of calling others Nazis is directly correlated with the likelihood of the accuser being Communist.
I worked somewhere that had a policy of amending reports that if seen by auditors may have gotten the firm in trouble. This used to be done manually and I was asked to automatically flag up when data which was outside the legal standards (which would then mysteriously change in the next couple of hours). I didn't have a big issue with the reasons why they were hiding evidence of breaking the rules but the general principle of it still bothers me. I still don't know if I should have kicked up more of a fuss about it, though arguably I should have done that for the rule breaking as soon as I became aware and not just because I later made the process easier.
I'm ashmed that Debian that Google created a spyware for Debian to cloudfy targeted users's source codes to steal ideas, mainly for mobile games.
I love how half the comments here are about the ethics of what people did and the other half is about the elegance of their code. Sometimes I think we need a bigger emphasis on ethics in our educations. Then I think about the ethics classes I did have, and for the most part they were not all that relevant and were fairly artificial. It may have been I simply was not mature enough to understand what they were about, but it did not really seem to get into the ethical frameworks as much as I would have preferred. In terms of the folks posting here, I would much rather work with the folks thinking bigger about what their code does as opposed to the folks focused on what their code looks like.
Any bad code I write was because of bad management: lack of specifications, deadlines, lack of QA, etc. ;)
Don't stop where the ink does.
Doesn't this describe almost every job?
I mean, I generally agree with the article. But the article seems a little... self-aggrandising, doesn't it? As if to say "hey, we're just as important as doctors and engineers!"
The thing is... I kinda agree - programmers are very important and their actions can have serious consequences if done poorly or incorrectly. But like... plenty of other jobs are just like that too.
If the person stocking the shelves at your local grocery store doesn't clear out the expired stock, or maintain proper hygiene around fresh food, they could easily contribute to someone getting sick or spreading bacteria or a virus.
If the person selling gear at a bicycle store doesn't realize the wheel or frame is broken, or that a frame has been recalled due to a defect, they could easily contribute to someone being seriously injured.
If a school teacher ignores serious bullying or doesn't fact check the information they're teaching or doesn't make sure their students properly know how to do proper calculations, they could easily contribute to a serious mistake made by the student some time in the future.
If a salesperson helps someone get a loan approved when they've very much shown in all likelihood that they probably can't afford the monthly payments or that the loan is predatory in nature, they could easily contribute to that person's life taking a serious financial turn for the worse - and we all know how stressful and desperate people can get when they can't make ends meet.
Yes, programmers need to be aware of their moral compass - but so does everybody else to varying levels, pretty much. Generally speaking, just - don't be a dick, don't be apathetic and use some common sense. That'd go a long way for pretty much anybody in any situation.
I avoid shame by making sure my code does not work and is not seen by anyone else.
I also saw Robert Martin's talk, and generally agreed with it. I am generally surprised (and disappointed) at how insensitive and irresponsible colleagues are. At the end of the day, most just want their salaries in their bank accounts, and keep their jobs. Software engineers appear to be just like everyone else. So I agree with Martin that laws are badly needed.. to root out the cowboy/hacker attitude for this coming century. On the subject of Martin's talk, I actually bought his book "Clean Code" as a result of seeing his talk. Robert should be ashamed of his book though.. if it's to be an example of the self-regulating quality consciousness he's talking about, the book is the opposite (it lacks writing discipline, among many other qualities).
I've written plenty of code I wasn't proud of, most of which was quickly rewritten by myself or a co-worker. The only code I'm really ashamed of was when I had to do a terms of service update, and they wanted one version for people that weren't signed in, and a totally separate, much more malicious one for signed in users. There was no notification to users that the terms were different what so ever. I rallied against it, but in the end I was just a code monkey that had no say. Either I did it or someone else would. Quit that job soon after.
Not been ashamed after i startet replacing all flow control structures with goto's
And even back in 1985, software was killing people, gruesomely. Probably before.
And it was testing that failed back then. Nothing much changes. Agile process has given project managers a way to avoid testing as a function, and so there is no real testing. Hilarity ensues.
deleting the extra space after periods so i can stay relevant, yeah.
I code in COBOL.
I'm so sorry. Please forgive me.
So rise up, all ye lost ones, as one, we'll claw the clouds.
Back in my late teens I designed a way to bend fiber optics at right angles. My intent was to get fiber to the desktop more practical in compact cities like New York and Tokyo. I really didn’t think it through much beyond that. I ended up interning at a tech company mostly of former military types. They, naturally, realized that this was far more saleable to defense contractors. It wasn’t until I was on the phone with an engineer with Corning being told that the unlisted specialized fiber that I’d been sent samples of to do tests on by a team from Hughes was a special radiation-resistant version meant for use in cruise missiles and other nuclear weapons that it really came home to me.
I didn’t have what it took to be honest that I couldn’t do this with the people in charge. I was still just a fucking kid. I just collapsed into depression, started stalling everybody else, and was just an obstructive lump until they all gave up and moved on.
I promised myself to never work on military-related projects again.
A few years later I designed a template system for workflow optimization inside Sports Illustrated. The idea was that this system of pre-built templates, optimized procedures, and some special routing that I built into the config of the automated workflow system would let journalists in the field start doing numbers-heavy content without needing to wait for some designer to join in and start mocking up tables, text styles, and so on.
From what I heard, not only did SI use it where planned but Time, Inc. implemented it across a whole bunch of their other publications and started getting this influx of cheap to generate, fresh from the field numeric content.
Happy stuff, right?
A couple years later I’m doing another gig in another Time,Inc. pub and I socially engineer my way into a meeting that looks tasty. It’s this whole bunch of MBA types sitting around doing this weird thing of not seeming to be talking about anything in particular. Just batting around these odds bits of phrasing, some of which they’ve evidently been testing and, to use their kind of jargon, “running them up the flagpole and seeing who salutes.”
It takes me a while to finally figure it out. This is all about them trying to come up with some kind of benign kind of spin for a premium price service that will give access to all of that now massive body of numerical content. HIGH prices. SERIOUS user limits.
The issue, it turns out, is that they have realized that they can sell “my” data to compulsive gamblers, partner somehow with the casinos, and use this to not only generate stacks of cash but to also push the gamblers further into addiction with carefully set up teases, fragments, and blah, blah, blah. And then use this to shift the revenue streams and general culture as part of the planned reorg of Time,Inc. in preparation for the merger with AOL into just generally more exploitative shit in general.
I didn’t tell them who I was. I just snuck my way back out.
I don’t know how big the body count is from my work. Probably as big as a small “civil conflict” in some country the name of which we all forget.
I try to promise myself that my work has otherwise never done anything of the kind. I don’t really much believe it.
That escalated quickly. I assumed they were talking about how ashamed I am about that spaghetti code I wrote for my client last week, not killing people.
Popisms.com - Connecting pop culture
Some people might set out to write software that is ONLY usable for malevolent purposes - and they could be fully aware of this when they do the job and deliver the result. Just like some people will work in cigarette factories. Or design more "efficient" land mines.
However, the vast majority of software that is used for evil can also be used for good. Take GPS for example. It can be used to guide ambulances to accident victims and it can be used to guide missiles to their targets (it can also be used to make those missiles more accurate thereby reducing collateral damage - go figure).
Is the person who invented the for() loop responsible for all the unknown uses it is put to? Is the team that fixes a bug in car's firmware responsible for saving lives? These are unknowable points. The best that programmers (and testers and designers) can do is to produce high quality work, that fits within their ethical framework. Then sleep easy at night.
politicians are like babies' nappies: they should both be changed regularly and for the same reasons
being ashamed of your code is completely different thing,
than being misled to write code for something unethical.
But the other side of the coin is there had to be enough clues to make you aware there was something fishy.
Are/were you desperate? Or are your blinders that big?
So Yes you should be ashamed.....
Rick B.
I recently started reading A Deepness in the Sky (https://en.wikipedia.org/wiki/A_Deepness_in_the_Sky ) by Vernon Vinge who briefly touches on this issue.
He speculates that eventually hardware will stabilize allowing code written over the period of centuries to still be used. He says that bugs in old code, (the original designer, coder, maintainer are dead) eventually cause more deaths than hazardous activities like space travel.
I can see how code that hasn't needed TLC for years but is still used extensively (i.e.in chains like awk and grep) could have an impact on computing for years to come.
Vinge also talks about how back doors created by the coders but forgotten over time might be rediscovered and lead to control and manipulation of massive systems that still use those old libraries.
I wrote a whole video game as a kid without understanding the idea of "function". The whole code was working inside a huge "main" loop, that was more than 1000 lines long... I don't know if I should be ashamed or proud of this feat.
Not ashamed of anything I do professionally, as if I'm made to do something I don't like, I air my objections and go full "I told you so" if it fails, and make sure the responsibility lies in the direction of the people who overruled me.
Anything more shameful, I wouldn't be doing it. The people who code malicious junk just because their company wants it? Those people might well have something to be ashamed of. Even if they "moved on soon after" or whatever. You should have just not done it if you were that close to leaving anyway.
There's a line - for instance if you work at a firm that makes DRM for a living, and you have some not-unreasonable DRM, I see that as okay. There are uses and nobody is being forced to use your product over any other.
If you work at a software firm that sucks in that DRM product, I see that as more dubious. And if you work at either at are installing overreaching DRM into your software, then I see that as very dubious.
But once you get into life-critical systems, you're not just a coder, and anyone who employs, utilises or fails to hold such coders to the relevant standards (by specifying, testing, etc.) is inexcusable. The VW is an example - you have pumped pollution into the air deliberately bypassing air quality standards, in order to sell a few more units. You knew you were doing it, it was quite obvious what you were doing, why you were doing it (your engines are shit and can't compete with others that didn't need to cheat), and that you'd GONE OUT OF YOUR WAY to do it. No excuse. And the coders there must have known what they were being asked to do (nobody "accidentally" codes a routine to detect the official testing procedure) and should take responsibility for that.
And if you get sacked for failing to code something that's illegal or hugely damaging, well then you REALLY don't want to be working for that company in the first place. First, you can then sue them into oblivion and cause them a lot more problems than they can cause you, and secondly they're scumbags who will drop you in it later if you don't do it to them first.
Apathy, ignorance and laziness are the biggest problems, though. "Do we need to test this? Nah." has probably led to more deaths in more industries than anything else.
But personally? My conscience is clear, not just because I can gloss over things I've done. I've either objected, vocally, and then held people responsible when it's gone wrong, or I've refused or got out of there.
I had stood, in front of the top-boss, and point-blank refused to perform an action they were demanding. It was illegal. It was unnecessary. And I refused to do it. To their face. Despite their threats. It's just not going to happen. I'm sure someone else would do it for them, but that's tricky after I reported them for doing exactly that, quite publicly, and documented my response to them.
Now try and deny you weren't trying to get me to do something I shouldn't, or that the next guy "didn't know" that he shouldn't. Because for damn sure I made sure he would, and stopped you continuing down that line of thought to make him responsible for it too. I wouldn't have minded so much if it hadn't been the most petty and worthless course of action ever anyway, at least then you could see who would have profited from my doing it.
But there is no way I'm going to break the law for you, break the rules for you, or - if you act like that - do you any favours that might help your cause.
I am surprisingly alone in such things, I've watched any number of people keep their head down, stay quiet, and just do things they should never have been doing. They wouldn't ever back you up (except in the over-a-cup-of-tea kind of way), take a stance, or fight your corner. I know that much. But I'm always shocked at quite how many people that applies to.
Me? Just try it. There's a line, a bit of flexibility and freedom where you can say "Look, does it matter, are we hurting anyone at all, is it important, etc."
The very nature and absolutely empowering thing about software is that it is flexible. It's purpose abstracted from the machine that fulfills the purpose. It doesn't get any more awesome than that. That's why we are gods in our own little world of the systems we work on and that's why we love tinkering with and building software.
That's the whole point of it.
So when I dig up my old EDI connector/serial processing ERP software I wrote 14 years ago in Python I don't think "OMG! What was I thinking? This abstaction is non-existant and if it is it's abysmal!". I think about the other things: How I wrote the filters for Amazon Marketplace before they even had an open API. How chains of regexes filtered the competitors pricing and how another script adjusted ours one cent cheaper than the cheapest offering of our competitors. How orders went from 15 to 120 the day we started using those scripts. How we were adjusting to changes in amazons websites on a daily basis, and how we built a billing system with Python, RTF Templates and an cli-automated Open Office.
If you look at that code today without context you'd think it's some bizar experiment or something. But it pushed our revenue back then from 20 000 Euros to 480 000 Euros.
Same goes for the very first Flash video and multimedia streaming client that I built. The code looks a mess and the player works very strangely. But we had to find out the hard way that you have to render your objects off screen in order to force the flashplayer from back then to actually load them. Likewise, if you call an XML object in Flash 4 / ActionScript 2 without instancing it, the Internet Explorer would reference the file on the far server, reloading it every time and causing traffic to skyrocket from 40kb to 3MB (Note: This was before DSL and when 68kbit ISDN was avantgarde for internet access.) ... That's why that piece of code makes an 'unnecessary' copy of that XML object and deletes the old one.
Likewise today, using WordPress, I see abysmal software architecture in the whole way WP is built. But not for a moment do I delude myself and think this could've been done from the very beginning. WP is historically grown and design decisions made back then might have had very good reasons, even from a software architects perspective.
So, long story short, I'm not really ashamed of my code. At all.
I know where it came from and what it did and why.
We suffer more in our imagination than in reality. - Seneca
There is no excuse.
ISOC/IETF:
http://www.internetsociety.org/get-involved/join-community/individuals/code-conduct
IEEE (adopted by nearly every engineer in the world):
https://www.ieee.org/about/corporate/governance/p7-8.html
Association for Computing Machinery (ACM) code of ethics (compatible with IEEE, but far more explained)
http://www.acm.org/about-acm/acm-code-of-ethics-and-professional-conduct
Sysadmin Code of Ethics (adopted by several professional sysadmin groups):
https://www.usenix.org/lisa/system-administrators-code-ethics
The product sold almost a million times and didn't cause any deaths, to my knowledge.
My ability to produce readable, maintainable and debuggable code have improved signficantly since then.
I was working for a company that made pharmacy management software and helped implement support for Prescription Monitoring Program reporting. There is a gigantic amount of personal information that gets sent to the government any time someone gets prescribed a controlled substance (including personal information even of the person merely picking up the prescription, if not the patient).
"[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz
If they wanted quality code, they should have paid for the time to create it correctly in the first place.
Since nobody wants to pay for quality code, then they get exactly what they paid for. Something that gets assembled as quickly as possible to maximize the return on investment.
If you don't have at least one project you have worked on that you aren't proud of you probably aren't a programmer.
Mine is a steaming turd of a purchase order request "system". Written in VBS inside of Excel, talking to a MySQL database back end.
It's not pretty. It's not fast. It's not sustainable. But, it met the purpose of the request using the tools I had available to me. And it was better than what they were using at the time. 5 project managers all writing purchase orders, or not, off of their local computers. Most of the time the PO wouldn't get to the Accounts Payable person, and if they did it was usually a hard copy. There were no backups. Nobody knew how the database worked. Nobody knew how to re-install it, or where the source for it was. Many many dollars lost.
I would have never imagined they would still be using that system, this was 8 or 9 years ago. I have a feeling that's how most of these embarrassments work, a fast and messy fix to an immediate problem that will be "replaced eventually" that never gets touched again.
I helped build RF systems that guide missiles. As I understand it, missiles aren't like Kinder Surprise eggs filled with toys.
If a product, including one that is or involves software, can pose a significant risk to public safety then it falls under the purview of a Professional Engineer who needs to review the design and stamp it. Just because it uses software doesn't mean it's something entirely new.
It's great when as individuals we have the luxury of choosing where we work. I'm at a point in my career where I have that luxury and I use it. I'd leave a place that frustrates me enough, either in terms of mission, management, or coworkers. As a group though, a lot of us lack that choice, and even for those who do, when they step away the employer will just find someone else to deal with the crap they left behind, because funds are sustenance, we've all got to eat, and if there are spare funds to hire people, more people will keep entering the industry (it's not like other industries are exempt from this - they often have it worse).
None of this means we should give up on trying to make the world a better place, for those of us who have that ideal. We just usually will lack the leverage to do much, like almost everybody else. And if we start with the idea that we're wiser, more ethical, or the people who are uniquely situated to debug society's ills, we're starting with a significant handicap.
For every problem, there is at least one solution that is simple, neat, and wrong.
"We are killing people," Martin says. "We did not get into this business to kill people.
Speak for yourself buddy! I have a counter for my kills. ;)
Anons need not reply. Questions end with a question mark.
I am ashamed of my code !
My code is an abomination that must be ejected from the visible universe !
We must send a message that will pass through the Big Crunch that will alert future universes that my code should not exist in any possible future !
Etc.
I am so ashamed.
If one has an insurmountable ethical issue with what they are developing for an employer, the only viable recourses are to find an alternative employer or to become self-employed.
File under 'M' for 'Manic ranting'
Comments are for switching off code you don't want to run.
If you are going to say "programmers should refuse to program unethical things", remember that this will be taken to heart by programmers who have ethics different from yours. It's not only going to apply to drug websites.
We don't *want* programmers who are working on web sites for abortion clinics to do all they can to end the project because they have an "obligation" to avoid the "unethical behavior". (If you happen to be against abortion, imagine an example using a gun-rights website instead.)
Right now, the majority of people writing code are writing code because they're being paid to do so, either by individuals or more likely, a business.
Those people, in turn, are not hiring programmers purely for altruism, they're doing it to achieve some goal, usually profit, increase in efficiency, and so on. They have to cope with estimating the curve for diminishing returns. They can figure out having a product that works 95% of the time, or one that works 96% of the time but costs 2x as much and takes 3x as long to develop may or may not be worth it. ... and ignore for now that developers are pretty bad at estimating project efforts as a whole, much less individual pieces of code.
There's no incentive for these employers to pay their people to produce 'perfect' code. Even in the field of medical devices or self driving cars or a number of other systems, there's still a point of diminishing returns, and largely the business determines it based on market expectations, and adjusts it based on market reactions (no one will buy a self-driving car that crashes 1/5'th of the time, but they might buy one that crashes only 1 in 500,000 times).
So developers aren't going to be given the time and other resources required to write perfect code. There will always be a balance between time, money, and quality, and outside of hobbists and a few industries, that'll never change. Unless there's some requirement that it change.
I think it's very likely that in the near future, we'll have legal regulation regarding software that runs in certain environments; medical and transportation industry is very likely, but also public works like water or power management subsystems. On the other hand, there's really no reason to engage the entertainment or office productivity industry, and that includes cell phones and most personal computer apps.
What form this regulation will take, I can't tell you, but due to the very nature of the process, it can be very difficult to detect flaws. My guess is that it'll be more of a fine-upon-discovery mechanism. Again, not much different than how we work now, with the added difficulty of a legal fine on top of market loss.
Of course, were I in this situation, I would assign the rights of software bundles to do-nothing child corporations that act as defacto owners of the code, and then declare bankruptcy due to the cost of fixing the software AND paying fines. At the same time, child corporation 2.0 has a wholly compatible new app that will fix that issue...
but that's me - I'm a problem solver, and this is just a paperwork issue.
But that's because I learned a lot in the last 12 month going from Fortran 77 to Java. That process is called "learning".
C. Sagan : A demon haunted world:
http://www.amazon.com/gp/product/0345409469/
visit randi.org
The Reasonable question: Are you ashamed of your code's efficiency, documentation, clarity and reasonable brevity?
Unreasonable Question: Are you ashamed of your code because of some stupid SJW viewpoint?
When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
And dozens of people have already been killed by faulty software in cars, while hundreds of people have been killed from faulty software during air travel.
... the number of suicides by those early users of /. Beta may never be known ...
It must have been something you assimilated. . . .
On my very first job as a programmer, got given a "special task", which i jumped at with it being my first job and wanting to impress.
Ended up being a fax machine robo-dial app which had a list of over 2 million fax machine numbers, would cycle them all sending them a fax with our marketing information, and then loop back to the beginning and start again on the next piece of material. Would even switch the numbers it came from to disguise it was coming from the same place. Sent 2 million faxes every 3 days or so (using 90 outgoing lines).
Was initially an internal app, but the company was so impressed with what i came up with, they packaged it and started selling it as a product.
If you get robo-dialed faxes in the UK, its probably my fault...
portfolio
That ship sailed decades ago. See WWII + IBM + Germany.
I think the summary hinted at one big problem. Sometimes you don't know what it will be used for - and by malice or incompetence does something bad.
Hell - we sell software that generates fake trades on purpose. It's supposed to be for testing ...
No, I write perfect code. It's always perfect because I wrote it. Don't bother reviewing it, it's perfect and works as designed. I designed it.
Go away, you're preventing me from writing more code.
Harrison's Postulate - "For every action there is an equal and opposite criticism"
My first IT job was at a little itty bitty startup. I got hired right out of high school as a software developer. One day my boss asked me to write a spamming utility. He didn't call it that, of course.. It was a program to allow us to communicate our exciting new products to potentially interested parties... Using a list of millions email addresses purchased from some shady site... And the emails had to change subtly and fluxate send rates and other tricks to avoid being "accidentally" detected as spam.
I wrote it.. it was used.. I felt like crap.
Sure it's going wrong now and then but overall I'm quite positive code saves lives. For every aircraft that crashes there are probably hundreds if not thousands of crashes that did not happen because of all the pilot aids. For all car crash that did happen, there are hundreds if not thousands that did not happen thanks to all those driver aids - including Tesla's autopilot. Software makes hospitals more efficient, helps to diagnose diseases and develop medication faster, may help doing a quick cross check on known side effects by combining medication, etc. X-rays come in faster, nearly real time. That all saves lives. That it is not perfect doesn't mean it's not effective, the few lives lost to software errors are nothing compared to the lives saved thanks to software.
I have Aspergers so I can translate the social norms on this subject into a nice decision tree:
1. Does the job pay well? If no: invent a reason to dislike the job. If yes: proceed to next question.
2. Does the company have a good work culture? If no: invent a reason to dislike the job. If yes: proceed to next question.
3. Do you like your work life balance? If no: invent a reason to dislike the job. If yes: proceed to next question.
4. Do you need the money? If no: invent a reason to dislike the job. If yes: proceed to next question.
5. Is there a job you want more than the one you have AND that you believe you can get? If yes: invent a reason to dislike the job. If no: proceed to next question.
6. Do you like your supervisor? If no: invent a reason to dislike the job. If yes: proceed to next question.
7. Do you like your work hours? If no: invent a reason to dislike the job. If yes: proceed to next question.
8. Are your work hours flexible? If no: invent a reason to dislike the job. If yes: proceed to next question.
9. Do you like your commute to work? If no: invent a reason to dislike the job. If yes: proceed to next question.
If you need to invent a reason to dislike the job(check all that apply):
[ ] unfulfilling
[ ] lack of growth opportunities/dead end for career
[ ] the company is doing something unethical
[ ] monotonous
[ ] feel unchallenged
[ ] can't telecommute
[ ] dislike your coworkers
[ ] salary isn't high enough
[ ] safety/health concerns
Now, notice that if you never had a reason to dislike your job: ethics is not a part of the equation. This effectively makes you a hired gun/mercenary. People don't like to think of themselves in those terms because of the negative connotations, but it is actually the default position for almost everyone. If you like your job at a university: you're "helping educate the future". If you don't like your job at a university: you're "tricking young naive students into taking on student loans they can't possibly afford to pay back in exchange for nicely organized trivia which you can download off the internet for free."
Here's the important part: if anyone ever asks you if you would be willing to do an unethical job if it paid well and you liked the working conditions, then the correct answer is to genuinely believe the answer is "No! Of course not!"
Next time you see a PBR-sipping hipster tell some virtue-signaling story about their employer doing something unethical, just realize what they're actually saying is that they don't need the money and can afford to invent reasons to refuse to get paid to do something that is 100% legal.
Whenever I find myself spending a lot of time coding compatibility so a closed source OS will work, I do feel the spring being sucked out of my step for prolonging the lifetime of said closed source product by improving its usefulness.
Someone had to do it.
A lot of people kill for their own profit and power. They are called criminals. The rest of us already has decided to live up to higher standards and not kill people.
The boss decided the software would be written in Visual Basic. Somehow the mess passed CE-certification.
Your response strikes me as typical of programmers in that they don't recognize how their work can affect a great deal more people than almost all of the examples you cite. With the possible exception of mishandling food, none of the other examples come close to affecting the same order of magnitude of people as programmers can.
The recent VW emissions scandal is a perfect example: VW's proprietary software was used in around 11 million VW cars worldwide (that VW admits to) from model years 2009-2015. Comparable proprietary software was used in more cars of other makes and model years. VW's software apparently turned some VW cars into cars that never should have been sold. Other makes and models of cars are also showing bad signs of polluting too much and not being in line with regulations. The full scope of the damage has not been accounted for. Only centralized food processors working on very highly used ingredients have the potential for that kind of adverse impact.
This creates a situation that kills us slowly instead of quickly by polluting our air in ways our (admittedly inadequate) regulation framework was designed to disallow. Proprietary software cheated those tests by behaving radically differently in regular driving than in testing mode. These cars should all be taken back by their manufacturers at full cost to the manufacturer, giving the current owner a complete refund of whatever they paid for the car, and the manufacturer's higher-ups should pay with criminal penalties and huge fines because this is a serious environmental matter. Programmers know their software is widely used (some programmers even value the wide reuse of their code) but rarely do programmers brag that their software treats people ethically and well.
Being "aware of their moral compass" is too low a standard and something programmers have typically balked at besides. As Brad Kuhn points out, software freedom doesn't kill people, security through obscurity kills people, yet programmers today still debate the value of software freedom for its own sake instead preferring to either work on proprietary software outright, or choosing to value a non-free software-allowing right-wing corporate reaction to free software known as "open source". Read just about any /. thread today and you'll find plenty of technically literate people who balk at introducing ethics into the discussion, or try to explain away giving us all the means of helping ourselves via software freedom. Our best chance of finding and fixing the cheating car code is to require copylefted free software for all vehicles and make transfer of the complete corresponding source code and build instructions for said software with ownership of the vehicle. But we choose not to do our best motivated in part by those who would rather not enter into a moral discussion because they place business desires above how people ought to treat other people.
One easy way to help fix this is helping those who help us. Today the Linux kernel is used in a lot of products that end up in people's homes, listening and watching them all the time via cameras and mics controlled with proprietary software. It's hardly a stretch to imagine that non-technical customers are being spied on without their knowledge or consent. It's bad enough that Linus Torvalds' fork of the Linux kernel allows proprietary software (as opposed to GNU Linux-libre which does not), but GPL violations are rampant. We can help the Software Freedom Conservancy by funding their efforts to pursue GPL violations, and I hope you'll do so. We owe the entirety of free software routers to comparable efforts, freeing code from Linksys which we can apparently reuse in many other routers. That freed software and its derivatives makes routers more trustworthy, improv
Digital Citizen
Classic e.g. audited by Malwarebytes' folks = APK Hosts File Engine 9.0++ SR-4 32/64-bit https://www.google.com/search?...
Ads rob speed, security (malvertising) & privacy (tracking).
Hosts add speed (hardcodes/adblocks), security (bad sites/poisoned dns), reliability (dns down), & anonymity (dns requestlogs/trackers) natively.
Works vs. caps & PUSH ads.
Avg. page = big as Doom http://www.theregister.co.uk/2... & ads = 40% of it.
Hosts != ClarityRay blockable (vs. souled-out to admen inferior wasteful redundant slow usermode addons)
Less power/cpu/ram + IO use vs. DNS/routers/addons/antivirus (slows you) + less security issues/complexity.
Compliments firewalls (blocking less used IP addys vs. hosts blocking more used domains) & DNS (lightens dns load).
Gets data via 10 security sites.
APK
P.S. - Safe https://www.virustotal.com/en/... (Verified by Malwarebytes' S. Burn "seen the code & it's safe" http://forum.hosts-file.net/vi... )
It's very simple. With enough time, you can both do great design, architecture and prototyping, so that when you create the final system, you do it completely from scratch and make a great system, after scratching countless blueprints and prototypes. There's also other costs to consider.
But since everything is rushed out "on purpose", everything turns to shit.
Captcha: impunity
Civilization depends on a lot of things. I'm sure that code makes it more efficient and makes it possible to do more things as the population increases but it's hardly a pillar upon which civilization is built.
But my code has directly or indirectly lead to an unknowable number of human deaths. My personal portion is probably over 100, perhaps over 1000. It is used in military vehicles that are used to kill people, so I could never know. That was before I was even old enough to vote, so it gets worse.
Far more directly, my work has resulted in the incarceration of literally hundreds of people (that I'm directly aware of), likely running well into the thousands.
Software is much more powerful than most of us realize - it amplifies the effectiveness of those that use it. We often fail to realize this when we are writing it.
What a piece of total junk. Wrote it 14 years ago to create mainframe application, it used JCL, and Oracle Database, LDAP queries all tied together in VB6.
It ended up costing some people that I dearly loved their job.
Besides being a total mess I regret every day since that I wrote that piece of shit application.
Not what I expected to see from that headline but I wrote code that was used by the ExtenZe people in their earliest days when they were spammers.
As for programmers and the higher tiers of systems/db/network engineers we do actually have the power to enable terrible things, cause extreme harm through negligence, including loss of life. Industry is trying to grow our numbers as much as possible to keep salaries down but the world is probably a better place if we keep the club more exclusive.
Computer professionals should probably have ethics boards and professional regulation like Doctors, Attorneys, and other flavors of Engineer. How do you feel about he possibility your spouse/child/mother might be flying on an aircraft tomorrow which is being piloted and air traffic controlled by software taken over by an H1B with zero experience and an Indian no academic standards and no 4 actual years required 4 year degree code monkey? A doctor can refuse to oversee military experiments modifying humans or testing chemical weapons because of ethical constraints. Should we not also be refusing to do harm?
Especially if the code looks like this:
http://uguu.org/sources.html
But a truckload of people that I've worked with in the last four years very well ought to be.
I'm glad you take pride in your work, but it comes across as a superiority complex that is not warranted. For your domain, the VERY HIGH COST in terms of money and development time can be amortized over many years of that aircraft model's lifetime. However, to think that can be applied to other domains like websites or tax software is foolish. There the requirements change way too fast for your methods, and you could never meet the required turnaround times. Even if you could by adding massive manpower, customers would be unable to justify the price to them. BTW, when I first started programming (long ago), C was considered an unsafe "cowboy" language that no safety critical software should be written in. The industry finally gave in on that one like they do so many things for economic reasons. No industry is immune to this!
//no comment
I was ashamed of my naivety when I worked on an freelancer-scheduling app for event planning.
I was embedded with this team of about 15 people whose job it was to fill slots for servers, greeters, busboys, drivers, etc for a large event planning business. I sat with these people for 2 months, learning how they did their job and writing some software to help automate it.
When I got done they fired all but 2 of the people because they weren't needed. I really didn't see that coming and felt terrible, especially since they had really helped me succeed at my job.
there are 2 kinds of people. those who divide people into 2 kinds, and those who don't.
It looks like the real subject is: are you ashamed of your application?
Being ashamed of the code is something that happens when I write something in a big hurry, especially if I wrote it before I even knew a fraction of the real requirements. Hell yes I'm ashamed of that code.. sort of. Except it got done and someone had been waiting (someone is always waiting), so I'm probably more ashamed than I ought to be.
No, even then, it gets pretty shamey. Especially a few years down the road, when the overall cumulative maintenance time is way more (i.e. you PAID more) than it would be, had I done it right. But then I can rationalize that too: it's the price of being in a hurry, and me taking wild guesses (sometimes right, but sometimes hysterically wrong) about what you were going to be asking for next week .. next month .. next year. Rationalizations aside, though, the shame is still there because I'm looking at horrible code, and I wrote it. Nobody likes that! If I'm going to maintain shitty code, I prefer it be someone else's, so that I can armor myself with smug. You can't do that with your own crap.
And yes, I worked on some crap like that today, so it's fresh in my mind. I'd love to rewrite it, but nobody's going to pay for that. So instead, they're going to pay and pay and pay for it every time I modify this overly-complex nightmare into something even more complicated.
The OP isn't ashamed of his code. He is ashamed of what was his job and the company he used to work for. Call it what it is.
It certainly isn't 'shameful code'. It could have been great code (TFA doesn't say), but it was in the service of a poor cause. Frankly, calling it shameful code kind of underrates the problem, taken out of context. To be clear, TFA makes it clear what the issue was and his attitude towards his time there.
Mere talk from you a do nothing "ne'er-do-well" that can't even do any code of your own (this means YOU unidentifiable weasel).
* My code in a 'toy language' like Python which I merely played with for around a month, works - you're NON-EXISTENT CODE OF YOUR OWN? Doesn't exist & certainly doesn't work... lol!
APK
P.S.=> Gotta LOVE weasels like you - why? You're TOO easy to tear apart - You write PERFECT CODE - how? Code with NO LINES has NO BUGS (lol, & doesn't do a damn thing either - it's non-existent).
Yea, I love weasels - Especially ones that try 'attack me' via unidentifiable WORM ac posts (like you) since I've crushed you before, obviously (probably using that python code which is why you note it)
Lastly - as far as indents? Try paste code on /. & see how well indents or not work - then again, you WOULD HAVE TO HAVE CODE OF YOUR OWN, & you don't you're ALL 'talk' & talk is cheap - Plus, fact: I've never seen a WORKING program from "Anonymous Coward" like you, a true coward)... apk
Back in the dotcom boom times when the web was the next big thing, I got a job at a small company who happened to get a big global player as a customer out of sheer luck. We build their website and their intranet sites. It was one of the really big companies, who did a bit of everything. They also had some weapons and arm companies under their belt. I felt a bit uneasy about that, but I quickly forgot about it, since working there was exciting and boosted my young ego (being just a self-taught programmer, high-school dropout and pretty much a loser beforehand).
One day they started a big ad campaign with a very positive message, basically putting them in a bright, altruistic light, as if they were only working for the greater good of mankind... which, in some areas, they really did (renewable energy, development projects, etc).
A satire magazine published an edited version of their ad with a picture of their trademark tanks in battle, complete with soldering ruins and dead bodies and said ad slogan. What really made me think was not so much the ad itself, but the way the PR manager, sitting in her office, swiped that magazine of her desk, ridiculing and laughing about it, remarking that they didn't even get the size and placement of the company Logo right and they should read their corporate identity specs next time. All she cared for was their design guidelines.
I'm not ashamed of my code. If anything, I've been criticized for being too careful, in a world where sloppy, quick, ugly work is celebrated.
Most programmers, in the corporate world, have no aesthetic sense and minimal mathematical knowledge. I prefer working with scientists and mathematicians and quants who think they're mediocre programmers, but don't try to do anything clever/stupid, over corporate coders who have to drag in 30 dependencies for some simple ETL task. Given the nonsense I've seen and occasionally been politically unfortunate enough to end up maintaining... no, I don't think I have anything to be ashamed of in terms of code quality.
I am, however, embarrassed (my attitude is more one of guilt than shame) by many of the companies that I've worked for, and many of the purposes toward which I wrote code. When I came into the software industry, I really thought that I would improve lives. In truth, we're mostly harmful, and the negative reputation that we are developing as "techies" are well-earned. No, we don't deliberately choose to unemploy and harm people, but we don't fight back against our masters and that makes us complicit. We create mass unemployment and the obscene concentration of wealth (that mostly accrues to nontechnical people, because we programmers suck at collective action). We sell pointless virtual "goods" and "social media" status that no one needs, and then we use "Big Data" "science" to help corporate fucks find addicts. We make "business processes", like rich people firing poor people, more efficient. Oh, and while it's arguable whether we "elected Trump", there's plenty of evidence our products have been to the benefit of demagogues elsewhere in the world.
I'm embarrassed to have been a corporate programmer. That cuts deeper than coding mistakes, which of course I have made as everyone does, but aren't in the same category. Missing an opportunity for tail recursion doesn't make you a horrible person. On the other hand, if you write performance monitoring/review software that results in factory workers getting fired, you're a fucking stain.
The next employer was also a sleazeball.
Yes - who wrote this sh*t?!? Oh. Me. Ugh. I realize that more often than I'd like.