r/AskProgramming • • Dec 15 '21

Career/Edu Are You Afraid of Your Software?

I’m curious to know what other software developers think of this.


Twice in my career I’ve worked for companies that (apparently) were afraid of their own software. By their own software, I mean key components that they had developed themselves.

The first time I was using a toolkit that my company wrote as a basis for several of its software products. I told the architect that I had fixed a memory leak in that toolkit and wanted to check it in.

Instead of reviewing my change, his eyes went wide and he said, “NO! That toolkit is perfect! We’ve had so many problems getting it to work. Just leave it alone!” He sounded both angry and frightened.

It was a rather simple fix, so I was puzzled by his response.

This was early in my career and it was the first time I had seen a reaction like this.

The second time this happened I was tasked with implementing a communication system between two apps. The main app contained our database, but the secondary app needed access to that database.

I suggested that instead of the communication system, I factor the database code out into a common library that both apps could link against.

“NO!” I was told. “The database code isn’t thread safe -- that won’t work!”

It turned out that our database had been created by someone who no longer worked at the company, and that no one currently working there understood it. My task was basically a workaround to this problem. Apparently this company spent a lot of time on workarounds to deal with the problems with it’s database.

I offered to look into the root problem, but I was told “NO! Just leave it alone!”

I saw that same fear and anger I had seen before, so I let it go.


I will confess, in both cases I felt a moderate level of disgust. I think software companies should be comfortable with what they produce.

Do other people experience this?

Does it bother you like it bothers me?

58 Upvotes

29 comments sorted by

18

u/khedoros Dec 15 '21

Dig enough, and it's not that hard to find something that's black magic to someone. If they don't understand it well enough to fix it, then it often seems easier to them to find a work-around, to avoid dealing with the core issue. Sometimes that's actually the fastest solution anyhow (thinking strictly in the near-term).

More commonly, I've run into "Yes, we know about the issue and how to fix it. No, we don't have time to do it that way." Then it comes up as a major emergency a couple releases later, when we need something that the workarounds don't account for, and a huge amount of effort goes into fixing it the right way.

10

u/danpietsch Dec 15 '21

Haste is not speed

-- Wisdom of Thrintun

3

u/khedoros Dec 15 '21

True enough. This product had a very waterfall-ish dev cycle. If a large effort hadn't been planned for a release, then it was going to wait until at least the next one.

4

u/pe1uca Dec 16 '21

And then you have to find a workaround to fix it without breaking the previous workarounds.

It happened to me, but luckily I made the case where I was able to strip it completely and redo a lot of things.

1

u/Nathan1123 Dec 16 '21

Sometimes it is a legitimate limitation of budget or scope of contract, but at least it would be good to document and bring it up to the customer like "hey, we found this other problem and if we expand the contract a bit we could fix that for you".

34

u/[deleted] Dec 15 '21

Oh yeah there are always some parts of the codebase that I won't touch with a ten-foot pole

3

u/c_edward Dec 16 '21

For me those are the bits that usually don't have enough test coverage...so we just write the tests and then rewrite them

9

u/[deleted] Dec 15 '21

The first case seems like maybe they were speaking from bitter experience. Like they've tried to fix a memory leak in that code before and what seemed "simple" ended up breaking something else.

It seems like you would only get that kind of reaction if the tests were bad or nonexistent. I think it's natural to be cautious about changing code which is badly tested. If the memory leak is only minor and no one's reporting any issue then there is only risk when making a change like that. Be very careful about making changes which add no business value but still incur risk.

As for the second case, the way you've described it doesn't sound to me like they are afraid of their code so much as your solution was infeasible, at least in the timeframe they were planning. You could have made the code thread-safe but the implications seems to have been that it was a bigger task than you perhaps realised.

2

u/DangerousElement Dec 16 '21

Then in the first case, they should explain why his simple fix does not work.

3

u/[deleted] Dec 16 '21

It's not that it doesn't work, because it doesn't sound like they looked at OP's change to be able to determine that. It's that it might not work.

In both cases here, it seems the communication wasn't great though, though we do only have one perspective. Even if everything I've said was right, it does seem like they could have done better at explaining things to OP.

7

u/WJMazepas Dec 16 '21

There are parts in our code that i always tell people to not mess with it much.

Thats because you need a good understanding of the systems that we integrante with, and because we dont have unit nor end-to-end tests. Also our QA doesnt have the time to test everything. So even If seems that is working, a small change can affect something that we didnt expected and then It will be a lot of work to fix It.

The thing is, to refactor something that is working, you need time. And normally we dont have time to spare

6

u/immersiveGamer Dec 16 '21

Sure, I've seen it before. Last two companies. The first company has a standard windows service that watched their e-commerce system for new orders, processes them into the ERP software and also updated the e-commerce system with shipping or other updates. It was the core of a segment of business that was growing very rapidly for the company. But every time someone touched it they broke it. When it broke orders backed up and so production and orders got delayed. I was tier II tech support at the start so I only had a thin understanding of it. It was a high risk change even for small fixes or new features. I eventually worked my way to application developer. I broke it a couple times and after that was also in a state of don't touch it. However, after a while I decided to tackle it. I was afraid of it so I took the time to read and document every code path inside and out. Then I wrote some very simple automated tests. We wrote reports that would be published daily if there were orders not touched indicating the service wasn't working right away. I started with zero change refactors. Then improvements. Then automated deploys and quick rollbacks. Then code reviews. Guards, checks and balances. At the end it was no longer a high risk change to touch it. Still a critical code base but things were more stable.

Then there was the second company. 30 years of business logic and code. Promo codes were half data driven and half code. A critical business app for manufacturers wanted a new feature and some bug fixes. I spent months trying to get it working for them. Every time I fixed a bug something would break because there was code that was dependant on the bad logic. Oops, didn't make a back up of the original version of the code and the priority system doesn't have source versioning, whelp we have to fail forward now. And so and so on. People who did know the code base well were quick to make changes. Once someone was out of their comfort zone it was slow going.

People become afraid of code they created because they have been burned on breaking the critical and now tip toe around it. It is high risk since it is the money makers / movers.

I'm not sure I would have said 'No' out right to your memory leak problem but if it was a high risk change we would want to be near 99% positive it didn't break anything. Who knows if there is some bad code that may have been relying on the memory you are now cleaning up. I most likely I would said to compromise and said restarting once every so often would be better than fixing a small memory leak (I'm just guess and making stuff up about your memory leak problem just to show how people think about critical changes).

6

u/levine0 Dec 16 '21

No, my software is afraid of me.

1

u/BertProesmans Dec 16 '21

My code editor gets the kill -9 if input latency reaches +30 ms. He's scared too.

3

u/amasterblaster Dec 16 '21

Once something:

- Is integrated in 1000s of places

- Has passed tests for years

Then editing that code is not worth the likely cost. So, what you are missing is thinking about not just that code, but everywhere that code lives, and how long / expensive all the regression tests will take.

Similarly, when updating code, editing code in small pieces, or creating new versions is ideal, as it saves you from regression testing years of product.

So, when considering how to add a feature, the lowest risk areas are higher in the stack. Example: If I want to add a new button to my program, I'm more likely to implement the code in the GUI layer than I am in the OS layer. If I edit the OS to add the feature, I could change every application on my computer in unanticipated ways. If I get the GUI wrong, then this button doesnt work.

2

u/lordheart Dec 16 '21

More like works in production, mostly, is manually tested by qa, maybe.

3

u/TranquilDev Dec 16 '21

My last position they were often worried about using certain functions of the apps that they didn't use on a regular basis.

When I started I was asked to disable a user or something like that, I remembered seeing a button for it. So I just went in to the software and was like "Hey, I'll just do it this way.". They kind of gasped and was like - "We usually do it in the database, we don't know if that works.".

Part of the reason for this, in this case and probably many others, is that there wasn't just that one app with that one button. There were 3 apps, all clones of each other, all separate repositories, databases, servers, etc. Keeping the development of the apps separate required so many changes across them that even though they were initial clones of each other they eventually started having different behaviors.

3

u/quetejodas Dec 16 '21

Don't you have a testing or development environment? Why not go ahead with your fix and demonstrate it in the lower envs. "Look, it not only works fine, but we won't have these issues anymore: ..."

2

u/FilsdeJESUS Dec 16 '21

Sometimes because there is no unit tests , with them we can touch every part of the software and know when we have broke something .

1

u/YellowSlinkySpice Dec 16 '21

What about undiscovered edge cases?

Maybe that isnt specific to OPs problem, but this is my concern for testing.

2

u/Xx_heretic420_xX Dec 16 '21

There's one specific PL/PGSQL function that was rewritten so many times, like 2000 lines of shit, and if one null got into a query that was being constructed by string concatenation, EVERYTHING became null. And that's not even getting into the rats nest of PHP that queried said database at the time.

I still have flashbacks about that code, waking up from nightmares thinking it broke again.

2

u/LogaansMind Dec 16 '21 edited Dec 16 '21

Interesting question.

In my early career I also experienced this, I can put responses into two categories; those who believe that I didn't do a good job testing it, and those who believe they own the code they have written.

To elaborate on the second part, I have seen plenty of people who absolutely hate people refactoring or going anywhere near the code they have written. I call it the "mine" attitude and after years of experience I often have to teach them (often people older than myself) that they don't own the code, code should be able to change, and if they left/fired I would now be the caretaker. But I also try to engage these people to pair programme or collaborate on design changes.

I have been on the other end as well, where I designed and wrote a beautiful sub system just to have someone come in a break its rules, it can feel hard/bad/violated when this happens, but if you think about it, if someone breaks the rules then I didn't do a good enough job with my design or documentation. It is an opportunity to grow and learn.

One of my wishes in life is to be able to have an in-depth (NDA breaking) discussion with the current maintainers of software in a company I left years ago, as there are some parts I would love to know how they have stood up over time, did I do a good job designing and building them. Was there anything that caused them grief?

There was on one occasion where I guess a "fear" was addressed. The code was a C++ core system that one developer managed, our manager (also a coder) basically said to the entire team (including this C++ maintainer) that "we should not be afraid to modify the C++ code", which lead to all of us skilling up and taking the code base and software to new levels.

I love working with legacy code, it has become a skill, something I love sorting out as no one else likes it and makes me feel special. Everytime I get hands on a legacy project I feel like an adventurer and explorer breaching the deepest parts of a long lost continent. Most of the time its just about understanding the goal (plenty of "WTF is this...", "Why did you do that" leading to... "oh I see what you are trying to do", "theres an anti-pattern"), adding tests and refactoring.

What I try to do is not be that person, instead I try to say "ok, but watch out for this", read the documentation etc. I want to encourage everyone on my team to feel like they can modify any part of the solution and not have pillars which require specific people or knowledge to modify them. I want to be able to move on safe in the knowledge that there is someone else I can hand it over to and will have the ability to maintain it. You could concentrate it to the fact that I don't want to be bothered all the time, I invest in people to that effect.

2

u/hlxco Dec 16 '21

I have a software development company & manage years-long projects with clients. A few things about what you wrote sound wrong, but not the parts that you seem to think are wrong.

There are a few legacy apps that we've agreed to take over that were written poorly by previous developers. The client does not want to re-write them and they also don't want to decommission them. So whenever we have to update/modify them, we do so with a heightened sense of care as the software will break easily. It's not a best-case-scenario but it also isn't really a problem. We're doing as the client asks & the client's reasons are sensible. There are situations where even simple fixes should be considered carefully.

The part that I find jarring is the complete lack of oversite in those companies you described. In the first example, it sounds like you were a junior developer & given publish access to the master branch of a toolkit that is used across multiple production projects. That is, assuming that your company even used version control software. Either way, the issue there is not the software but the development process. Developers shouldn't be allowed to modify & deploy to live software without any sort of understanding of the circumstance for exactly the reason you described.

The second one is again a problem with the software development process. For whatever reason, even experienced developers don't seem to understand databases. They (often) make poor decisions about which logic should be on the application layer & which should be on the database layer. I wish that people would pay more attention to understanding databases as something more than a bucket of information. That being said, it is a common problem. In fact, I think the biggest barrier to solving that problem is that people don't understand that they're doing it wrong. For this reason, I am flexible on many parts of software development but almost exclusively handle database development personally.

I do get the initial intent of your post but I think the reasons run a little deeper than what you're able to see. So the behavior you're describing is not "weird" as much as it is a compensation for a deficiency.

2

u/ericanderton Dec 16 '21

Do other people experience this? Does it bother you like it bothers me?

Short answer to both: yes. Zombie projects happen for a range of reasons and should be taken seriously. I won't get into the engineering implications here - best practice here is to somehow bring the project/app/system under O&M so it's no longer as much of a risk.

Let's talk about people for a second. If this is happening and nobody in charge agrees it's something to be addressed, you likely have much bigger problems.

It turned out that our database had been created by someone who no longer worked at the company, and that no one currently working there understood it. ... I offered to look into the root problem, but I was told “NO! Just leave it alone!”

Folks might just be looking out for you here, but maybe not. It depends.

A bit of warning here, systems like this are basically treated like illegally disposed nuclear waste. As long as nobody disturbs it, and it's just an assumed part of the environment, everyone goes on to fight another day. Touch it, you become "poisoned" and become the only person qualified to go near it. Doing so is basically taking a bet that you can overcome some or all of the tech debt in that system, as well as the fallout of breaking it.

That said, nobody should just be "okay" with a zombie system like this.

I saw that same fear and anger I had seen before, so I let it go.

In my experience, scenarios like this are a mirror of the engineering and/or management culture around them; see "Conway's Law." Drawing attention to bad infrastructure like this will likely uncover a litany of management missteps and possible coverups. Stuff like this can seriously embarrass people in charge of your paycheck. Be careful.

I've seen a few workplace anti-patterns that let this happen. These don't mean you're in a bad job, but you may want to consider tackling this in "people space" rather than just as a straightforward engineering problem:

  • Disorganization in general - Maybe the company could just do better all the way around. Does this shop have inventory tracking? Is there a culture of over-committing on internally developed projects? Is anyone actively trying to save on labor by integrating 3rd party solutions? Is the development team the lap-dog of the CTO, CEO, or someone with more clout than their direct management, resulting in too many software projects?

  • Constant fire-fighting - the organization is so used to stamping out flare-ups that this doesn't register as anything outside the norm. At worst folks are complacent and/or overconfident that they can do something heroic to keep it all duct-taped together as long as needed.

  • Disorganized management - managers can be overworked, or just plain confused of what they're in charge of. Re-organizations, layoffs, mass-hiring (growth), and passing of responsibilities from one team to another, can let things slip between the cracks. At worst, management can be just straight up lazy, pushing off all but the most essential maintenance (see fire-fighting).

  • Underfunded org - Are there enough O&M hours to go around to bring everything under proper management? Does the development team invent more software than they can properly test and maintain? Is anyone else involved over-committed, putting the zombie system to the end of the backlog?

  • Uncooperative peers - teams can become so siloed, or work for people with an axe to grind, that zombie systems become a kind of ammunition or trap. This can apply inside a given team, inside a management chain, or to an entire field-office or business unit; anywhere there's an "in group" and an "out group." Basically you can be forbid to fix something knowing it will tarnish or outright destroy the reputation of some other employee(s). Never mind what it could do to everyone; that other guy has to get what's coming to him, right?

2

u/myearwood Dec 16 '21

I don't know if it's fear, but the Peter principle applies. I have seen so much awful barely holding together stuff it's a shame. Definitely a case of growing beyond the skill of the programmers.

1

u/KingofGamesYami Dec 15 '21

Oh yeah.

We had a system with a MSSQL database linked to multiple MySQL databases because at some point someone had performance problems and decided moving the data closer to the client applications would make it work better, but we didn't have spare MSSQL licenses.

Performant: yes. Bypasses all the validation and logging? Also yes.

That was one of the minor issues we discovered while replacing the system.

For reference, this was THE SYSTEM. If it was down, everything else could be and would be put on hold, because this was more expensive.

1

u/MiddleSky5296 Dec 16 '21

Like hell. Yeah =))

1

u/Nathan1123 Dec 16 '21

Do you experience this? Not personally but I've seen it happen to others

Dose it bother you? Yeah, it is pretty unethical

0

u/[deleted] Dec 15 '21

[deleted]

17

u/CharacterUse Dec 15 '21

they are bad developers

Not wanting to touch old code which works is one thing, but not even looking at a memory leak when it's brought to you (with a fix!) is a pretty sure sign of being a bad developer IMO.