3.9k
u/faze_fazebook Nov 25 '22
super modular code that can cope with changing requirements :
gets so complicated that it gets scrapped by the next developer
1.4k
u/bam13302 Nov 25 '22
I've literally been both devs in that comment for the same code, twice. As in, wrote code, scrapped it for being unmaintainable and wrote new simpler easier to maintain, then had to scrap it and write new code again.
656
u/sillybear25 Nov 25 '22
Thoroughly field-tested code with all the weird exceptions, edge cases, and other discovered requirements covered: "This code is so complicated! It's not even worth refactoring, so let's just scrap it and start over."
Rewritten code: "It used to frobnicate instead of mogrifying when you click the 'download' button after sorting the table by reverse priority order during a month with two full moons. The customer needed that functionality yesterday, get it fixed and pushed to prod ASAP."
Several top-priority bug-fixes and tens of thousands of man-hours later: All the weird edge cases, exceptions, and unspoken requirements have been rediscovered and implemented. Go to 1.
208
u/No-Witness2349 Nov 25 '22
Occasionally you can genuinely find abstractions which make expressing and maintaining those requirements easier. Designing a high-quality rule system can be difficult, but often well-worth it, imo
87
107
u/DoktorMerlin Nov 25 '22
3. Several top-priority bug-fixes and tens of thousands of man-hours later: All the weird edge cases, exceptions, and unspoken requirements have been rediscovered and implemented. Go to 1.
You forgot that these top-priority bug-fixes (and feature-requests) are top-priority while coding but then this part of the software is never used once by the customer. 7 months later you are asked how the functionality works only to figure out that it has never worked in the first place because the SQL query is containing a syntax error
→ More replies (1)48
u/sillybear25 Nov 25 '22
Nah, the bug reports wouldn't exist if the functionality was never used by the customer. (You think we're spending money on QA when refactoring is "too expensive"? Ha!)
No, it's used roughly once every couple of years by the manager of the customer's purchasing department, who misunderstood the requirements relayed to them by the manager of the people who actually use the product.
→ More replies (5)→ More replies (6)31
u/tangentandhyperbole Nov 25 '22
Its funny how similar this is to architectural design.
Floor plan that incorporates all the required structural and client needs, is designed around real world products.
But you need to rotate part of it 5 degrees.
There is an overwhelming urge to reach for File > New
213
u/Ler_GG Nov 25 '22
aGILE iS gOOD
51
u/marcosdumay Nov 25 '22
Well, actually, the faster you can rewrite, the less you have to protect against it.
97
u/invalidConsciousness Nov 25 '22
With waterfall as the alternative, agile is preferable.
Agile is like democracy. It's shit, but it's less shit than any other alternative.
→ More replies (24)→ More replies (1)45
→ More replies (1)8
93
u/Alarid Nov 25 '22
"It's too modular" says management.
69
u/tomkat0789 Nov 25 '22
“What we need is a tightly integrated monolith… yeah it could probably be modified later for those other products and their corner cases. It’ll be fine.”
35
u/TheAJGman Nov 25 '22
We aren't even launched and we have to re-architect the monolith because our contractors through the design docs were "guidelines". As a plus I get to engineer a few systems from the ground up with no tech debt; it's a rush to assert my will on the codebase like that.
→ More replies (2)46
Nov 25 '22
A team lead at AT&T told me that a single function shouldn't be too clever because that makes it harder to read, maintain, and reuse. This was in reference to a monstrosity I created that would take in an object of data that could have arbitrarily nested arrays and objects and try to transform them into html groups, headings, tables, etc. I made it a little too clever when we wanted to handle some data differently so I added a second parameter for transformation options like rules for pluralizing, sorting, or entirely replacing some keys.
I started this solution because they gave me 2 or 3 days to model and map literally hundreds of fields into a very simply formatted series of tables. The tedium was so great that doing it by hand would actually take longer than the time allotted. It was actually great for a few sprints that whenever we wanted to add another massive page they could just pipe the data through my ember component. But eventually we started adding overseas people to the teams and coordination was harder and they were much less skilled, so the team lead tasked a few people with converting all of those pages to html.
Unfortunately they didn't ask me to. They were happy with the generated output, but they wanted it to be easier to maintain by the new folks. That's all well and good, but we could have saved a lot of dev hours if they mentioned that so I could tell them to just capture the html being generated by the component instead of writing all of the HTML since they were not changing names, orders, or styles lol.
And that's my story :)
→ More replies (1)13
u/shrubs311 Nov 25 '22
this is the most classic software developer horror story lol it has everything
→ More replies (3)67
u/vhite Nov 25 '22 edited Nov 25 '22
Yeah, I work with something like that, large codebase elegantly divided into modules and plugins. It usually works like this.
Layer 1 - General top level function handling basic logic between several components. Calls specific component functions.
Layer 2 - Component's outer interface function, has few parameters to appear simple, does pretty much nothing but some boilerplate to call internal component function.
Layer 3 - Internal component function, takes dozen parameters with mysterious meanings, and uses dozen more private states and variables and has even more boilerplate. You think you're are finally getting to the core functionality you're trying to uncover, but then...
Layer 4 - DoTheThing function. Short and simple, the only problem is that it doesn't do the thing. Instead is calls some higher communication interface with an action flag and some data, and then shoots it into the oblivion.
Layer 5 - You have finally reached the point where the flag is being processed, at least you think so because the direct path was lost in a dozens of communication interface functions and so you just searched for the flag used in DoTheThing function. You found 6 results but this one looks closest to what you want. Here the interface notifies all the members of a mysterious array.
Layer ??? - You dig trough the origins of the array, it's type, initiation, all the instances where members are added, etc., but you only keep finding more abstractions. The name of the type suggest some higher level components, but you don't know which ones are in the array at the time it's being notified, and you don't know how the abstractions are connected to the actual components. Notify only calls an abstract function, and you have no idea where and by what it's being overriden. You're lost, cold, and you just wanna go home.
41
u/shrubs311 Nov 25 '22
Layer 2 - Component's outer interface function, has few parameters to appear simple, does pretty much nothing but some boilerplate to call internal component function.
it says "layer 2" but there's probably 2-4 of these
Layer 4 - DoTheThing function. Short and simple, the only problem is that it doesn't do the thing.
me after spending two hours looking at our codebase in layer 4: i'm convinced this app literally doesn't process the data
me after spending 5 hours looking at code: oh it's actually extremely simple
me 3 days later: it wasn't simple at all but i have tamed the code to do what i want, i'm a god at software development and imposter syndrome has been defeated (for the next 16 hours)
→ More replies (2)20
u/Discount-Avocado Nov 25 '22
Jesus. So relatable.
Finally you add 300 breakpoints where you think it could be. Turns out it’s none. Then you add 50 more and find it. You relieved, but then experience the same thing again when you reverse the logic and realize how insane it is.
5
u/AlternativeAardvark6 Nov 25 '22
You want to follow the code in your editor but the genius before you used reflection for everything so clicking on the method returns no uses and you need to text search the entire codebase.
→ More replies (1)26
u/mrheosuper Nov 25 '22
With 10000 Lines config file, this module can be used anywhere
→ More replies (1)16
u/ImprovementTough261 Nov 25 '22 edited Nov 25 '22
This is something I struggle a lot with.
I always start my projects with modularity in mind, but then the spec changes and I have to add conditions to account for super weird edge cases.
Or the spec changes and a function is meant to do something slightly different, but it is already referenced everywhere throughout the program so it is not feasible to re-factor. Instead, I end up having to do some really hacky workarounds that would make this sub cry.
How do I combat this? Is the answer to just make everything even more modular until the program can resist all possible changes in spec? I feel like I would end up with hundreds of hyper-specific functions that way, which is hard to keep track off.
→ More replies (1)40
u/Tetha Nov 25 '22
Hm. I've kind of grown into a kind of effective lazy over the years, with ideas how to progress from lazy.
By now, if there is a requirement, I tend to write the most simple and straightforward code possible. Like don't bother with anything. Is there a requirement for different database engines? Pfsh, just hardcode some ORM to postgres during startup. No one asked for XML or YAML on an endpoint? Pfsh, hardcoded JSON decoding it is. And then just add the most boring straightline code to make whatever they want work.
And if you need to add something new, embrace copy-pasting code (for now). Just take whatever is doing 60% of what's doing what you need now, copy it, adjust it, stop bothering. Yes this violates DRY and that's good, keep reading.
However, there are two important off-ramps and de-tours to look at there.
One is the three-times rule, or the same-bug rule, or the same-change rule. If you have the exact same code in three places, try to extract some abstraction. If you have to introduce the same new feature, or fix the same bug in three or maybe two places, try to introduce an abstraction so you have to fix it once.
Code isn't duplicated because it's the same code. Code is duplicated because it changes together and because it gets fixed together.
And additionally, if you have to change a function, a class, or something, consider the open-closed principle. A class or a function should be open for extension, but closed for modification. So if a method, function, or class has to change behavior, it's good to think if you could introduce some callback, some function parameter, some interface to call into. Something like that.
This is good imo, because if you have to change a detail about a function once, you will have to change that detail more often. So it is good to add a way to add functionality by injection, without changing existing code. This avoids breaking old stuff, because you add stuff, and if the added stuff is broken, just turn it off.
This way, I've found that the systems I touch or stand up start entirely naive and stupid, but they change and mold to accept the changes in requirement the business needs. Instead of putting up an idea of these abstractions and then the requirements move entirely left field and shit becomes weird. Or you know, requirements don't change and we have some entirely dumb code running for years.
11
u/Calm_Leek_1362 Nov 25 '22
A good enough understanding of YAGNI and SOLID works in every single situation.
→ More replies (2)→ More replies (5)8
u/cs_office Nov 25 '22
This is pretty much how I work too, but it's easy to say it out loud. It's a skill that experience gives you, and I think most people have to first walk the path to understand this mindset
7
6
u/GeneReddit123 Nov 25 '22 edited Nov 25 '22
super modular code that can cope with changing requirements :
Requirement never change, all that abstraction is useless and just adds complexity. However, every developer joining after you diligently updates all future code to integrate with all the cases your abstraction was designed to handle, unbeknownst the product doesn't use any of it. After some time, most of the code's complexity evolves like that joke about the five monkeys and the banana.
→ More replies (1)→ More replies (5)2
u/sintos-compa Nov 25 '22
NEXT developer? I’ve been on vacation and come back to my wesome modular solution and been like “this makes zero sense, what was I thinking?!”
→ More replies (1)
2.0k
u/dasmau89 Nov 25 '22
Nothing is as permanent as the temporary solution
575
Nov 25 '22
I think it was CodeWarrior for the PS2 or PSX (definitely a playstation compiler around the year 2000) we were having issues with byte alignments. Eventually we discovered that the tokenizer was including commented out code which was then used as a part of padding/alignment and you could break the ABI by changing comments. Those comments were locked into place, even after they were no longer relevant and flat out wrong. It was horrible.
478
u/helpiminabox Nov 25 '22
"These here are load-bearing comments, so don't touch them."
92
u/Zoidburger_ Nov 25 '22
It's only necessary when you name your game package "your_mom.ps2"
→ More replies (7)→ More replies (1)8
98
95
u/qoning Nov 25 '22
Tbh the obvious solution there is to write a precompiler to remove all comments.
But I bet the dude who discovered the source of the bugs had an awesome day. I would LOVE to be there at that minute.
→ More replies (2)72
Nov 25 '22
And suddenly you have to spend resources chasing down every other hack which was put into place to fix the stuff. PSX/PS2 were real-mode memory. It was common to directly access raw addresses and implement pointer math on top of that. Removing all comments in the primer would have gone from "okay here's one big headache we are aware of" to "we have no idea where all these small headaches are coming from."
→ More replies (2)→ More replies (2)16
215
u/PooSham Nov 25 '22
That's because it's full of side effects that make things work, which means that replacing it with something better will break things and be much more work than it should be
46
u/lightninhopkins Nov 25 '22
Doesn't that make it not better by definition?
150
u/elon-bot Elon Musk ✔ Nov 25 '22
I'm gonna need you to come in on Saturday...
58
u/emiliathewhite Nov 25 '22
First time seeing this, who the fuck made this bot HAHAHA
→ More replies (5)5
→ More replies (12)5
u/DoctorWaluigiTime Nov 25 '22
Also these outcomes are completely interchangeable.
A well-thought out solution can last 10 years, and a temporary hack can go away should requirements change.
9
1.0k
u/DenormalHuman Nov 25 '22
the number of times I have seen this be literally true is amazing
227
88
u/DoctorWaluigiTime Nov 25 '22
I've seen the reverse true too. Temporary hacks can be temporary due to requirements change, or because tech debt was cleared out; and the pristine solution to a thing lasts a decade and is relatively bug-free because of the good foundation.
83
u/All_Up_Ons Nov 25 '22
The reasons are obvious when you think about it for a second. The projects that require temporary fixes are business-critical with tight timelines. The only projects with time for perfectly-crafted artisan code are unimportant ones.
23
u/BetterOffCamping Nov 25 '22
"we don't have time" is a logical fallacy that is usually just shorthand for "I don't want to deal with it" on management's part.
I find that when I simply do it well without "asking permission" I am able to get it done quickly enough to avoid uncomfortable discussions, and the inevitable feature changes are much easier to implement (thus faster turn around).
Good design focuses on generic enough code to be resilient to change. This is a result of isolating feature specific volatile code to small pluggable modules.
Often, some of the resulting code can be substituted in other areas of the system, further simplifying it.
→ More replies (2)4
u/qhxo Nov 26 '22
Never enough time to do it right, but always enough time to rewrite it ten times. Good code isn't just nice to look at, it produces value in terms of hours spent maintaining it.
→ More replies (1)→ More replies (1)6
685
u/mr_claw Nov 25 '22
Obligatory xkcd: https://xkcd.com/844/
149
u/TheGamerSK Nov 25 '22
Of course there’s a xkcd for that.
29
u/JoostVisser Nov 25 '22
There should be a PG version of rule 34, just for xkcd comics.
→ More replies (1)79
u/Zoidburger_ Nov 25 '22
Hahaha how do people find these?? Is it like the SCP fandom where everyone memorizes the different codes? Or is there a dedicated search engine that finds the most applicable xkcd for a given topic? The fact that someone always has one on hand is just ridiculous at this point lmao
31
u/ktappe Nov 25 '22
We don't memorize the number of every XKCD, but we do recall there was a comic about [insert topic here]. A quick google with the right keywords and you have it.
0
13
Nov 25 '22
40
113
Nov 25 '22
The lesson is: your target is in the middle. You'll never reach it! But if you start out with a temporary hack, and give it the smallest modicum of thought and peer reviews you'll do pretty damn well.
28
27
3
u/All_Up_Ons Nov 25 '22
The first step is recognizing that temporary fixes don't exist. If your fix isn't production-worthy, it's not a fix, it's just a tourniquet, and the urgent issue/ticket/whatever should not be closed. The second step is realizing that as the only people who actually interact with the code, engineers are the only ones who can or will drive the real fix home. This is what trips up newbies.
129
u/justrandomnametag Nov 25 '22
No-coder solution: don't use code, then ask a dev to rebuild everything with code
62
u/MindIfILeaveThisHere Nov 25 '22
3 Months!?
You lucky bastard, my requirements change the moment I deploy to prod.
10
u/Secret_Shaktimaan Nov 25 '22
PO changed the requirement just before live deployment. It feels so bad that I had to revert my code I had written for last one week.
6
→ More replies (1)2
u/Joe_Ronimo Nov 25 '22
Those lovely meetings when you're showing the POC the latest bit that's been built to cover everything that's been discussed and they decide to throw in 3 new requirements, 2 new "it would be nice if", and a "that's not what I meant."
God I miss my old PM. She would absolutely shut that shit down.
6
u/Mispelled-This Nov 25 '22
As a PM, if your demo shows compliance with the ACs, the story is deployed and closed. If I realize I asked for the wrong thing, or someone else has other input, that is a new story into the backlog.
It’s on me to write better requirements, not on you to read my mind.
→ More replies (3)
242
u/tiberiumx Nov 25 '22
Well-thought permanent solution. Deprecated after 3 months due to requirements change
This is why you don't write code you don't need. The number of times I've seen hundreds of lines of some overwrought generic extensible solution trying to anticipate requirements that didn't exist that could be 20 lines of easy to debug no-bullshit code is too damn high.
166
u/harrysplinkett Nov 25 '22
that's why web back end development is great. drink coffee, write shit code fast, make money. gonna scrap half of it in a year anyway. and if it breaks, who cares, it's just a stupid website, not Boeing control software
28
→ More replies (1)9
u/CSThrowaway022 Nov 25 '22
Shhh, be quiet over there - we don’t want everybody knowing the secret of life!
62
u/RandallOfLegend Nov 25 '22
New college grads try to flex their degrees instead of meeting their specifications. If it doesn't need to be scalable then your burning time and company dollars until a manager sees what's going on and puts the boot down. Considerations for future functionality need to be considered, but if the management decision is to put it on the back burner you do a disservice trying to backdoor it in.
21
u/Real_Guru Nov 25 '22
You have the kind of faith in management that I, as a PM, have in most devs, but I can tell you that one of us is wrong repeatedly about the initial feeling of whether something should be scalable or not and it's not them.
Most important skill I've learned as a PM is to shut up where I'm not 100%. The budget takes care of most critical decisions anyway.
→ More replies (1)14
u/DoctorWaluigiTime Nov 25 '22
The power or YAGNI. Start simple, iterate when complexity is needed and only then.
6
u/Feroc Nov 25 '22
A short conversation I had with a co-worker.
Him: „Damn, why didn’t I make this function flexible enough to [solve current issue]?
Me: „When did you write that function?“
Him: „4 years ago…“
—-
I guess you can imagine how some parts of our code looks like.
→ More replies (2)26
u/Kwarter Nov 25 '22
Nothing drives me nuts like single implementation interfaces everywhere. It's such a little thing but it's maddening.
34
u/DoctorWaluigiTime Nov 25 '22
Interface-based development is more than "you make an interface so you can plug multiple implementations" into it, though. Helps keep good code decoupled and reduces dependency infestation across projects and classes. Makes it easier to mock/fake too when testing code.
Making an interface for a class is not some symptom of overengineering a simple solution, nor does it take excessive amounts of time to do.
→ More replies (5)5
u/euph-_-oric Nov 25 '22
Agreed. Everyone here glorifying spaghetti code, because business...? It's like you save time and money in the long run by writing clean code. But literally in every field it's like the only thing thst matters is right now. This quarter. Not long term viability. In code and in business.
18
u/elon-bot Elon Musk ✔ Nov 25 '22
Whoever writes the most code this month gets featured on my Twitter!
47
u/davidmkc Nov 25 '22
Literally that's what I am doing everyday as a "business analyst". Although I am not BA specialist, I just work in my field (maritime) with a little programming (vba, SQL, c#) knowledge. Whenever the requirement/regulations changes, I need to pull out all my legacy project and add whatever just added/discussed last week.
39
30
u/molly_jolly Nov 25 '22
Given what I am currently working on, I feel like the Simulation meant for me to see this post today.
→ More replies (5)19
30
u/Anooyoo2 Nov 25 '22
Actual industry practice: mvp solution that becomes refined overtime
49
u/MisterDoubleChop Nov 25 '22
Sales: Build a prototype to show our client
Dev: ok, here
Sales: they loved it! Deploy to production, we're done here.
Dev: wot11
10
17
u/LaMaquinaDePinguinos Nov 25 '22
I reckon that the real art is in interfaces. Hacks are fine as long as 1) they’re predictable, and 2) the nastiness is hidden behind an interface. Hacks can go on forever in my book as long as they can be used predictably in something better.
22
u/MisterDoubleChop Nov 25 '22
Hacks that have a thorough set of automated tests and a few "why" comments are just good code
6
u/lNTERNATlONAL Nov 25 '22
Exactly. Hacks are only hacks when they haven’t been robustly tested against all/most edge cases and eventualities. i.e. any code that has been proven to behave predictably is not a hack.
9
16
u/lightninhopkins Nov 25 '22
I am probably the dumbest developer at my work. I have been there almost 20 years. My garbage hacks are an integral part of the foundation that the ERP is built on. Hell the whole thing was written by accountants and not trained software developers. It has made billions. I'm not sure what I am saying except its shocking how little best practices matter in software.
3
→ More replies (1)2
u/fridgeridoo Nov 25 '22
sell low code platform
wait
sell very expensive consulting to fix the mess
3
u/lightninhopkins Nov 25 '22
Nah, more like.
3) Hire expensive consultants to do a bunch of work that doesn't help do anything except burn cash.
→ More replies (2)
8
7
14
u/hangfromthisone Nov 25 '22
Worse yet. You get the code onto production. But the DevOps dude is an asshole so it does not give that server enough resources and calls your code low performant.
16
u/mpyne Nov 25 '22
But the DevOps dude is an asshole so it does not give that server enough resources and calls your code low performant.
Why does your org call an ops/sysadmin 'DevOps' if they're not doing DevOps? If your team developed the code your team should also be able to assign it the needed resources in production and if that's not happening it's not a DevOps thing.
10
u/Mumbleton Nov 25 '22
This seems sooooo common. Everyone just did a find/replace for Admins to DevOps then pats themselves on the back
5
4
u/redballooon Nov 25 '22
Why does your org call an ops/sysadmin 'DevOps'
Probably for the same reason why they are calling their waterfall model “agile”.
You need to use the right words to hire people.
→ More replies (1)3
u/FatStoic Nov 25 '22
100%
The amount of resources your code is using is between you and and whoever is paying for your project. If you write dogshit nonperformant stuff I don't care at all, as long as it's not throwing alerts that I need to see.
2
u/Alzusand Nov 25 '22
the code:
while(true){
}althogh seriously that sounds like a really annoying situation to be in.
→ More replies (3)
5
5
u/notbobby125 Nov 25 '22
I think the developers for Half Life Alyx were talking about how the Source Code still has weird hacky programming from a Half-Life 2 E3 demo but they are too afraid to touch it when making Source 2.
→ More replies (1)
5
u/venuswasaflytrap Nov 25 '22
This happens because we falsely assume that the business requirements drive code independently, when in reality the realities of the code feed back into the business.
That temporary hack becomes permanent because
It's ridgid and hard to change so modifying it is always quoted as more time than the business wants to spend
The business adapts it's practices to compensate, which further solidifies the hack, since now everyone is familiar and trained on the wonky model.
The elegant solution gets deprecated because
It's adaptable so it's easy to change
It's single responsibility so the business process that gets built off of it is simple and straightforward and doesn't get "stuck" so when the market changes, naturally the business will try to be flexible in the practices that are the most flexible, rather than the archaic jammed up ones.
5
u/BoomerTheStar47_2 Nov 25 '22
So if I make a well-thought permanent solution, then give it a “// Temporary Hack” tag… bingo.
5
u/thugarth Nov 26 '22
Old system is overly complex. Doesn't scale. Isn't maintainable.
Spend months writing new system, but you have to rush it so it can replace the old system in time to actually be usable.
In the rush, the team is forced to take shortcuts to implement the new systems, despite a team culture mandate of not taking shortcuts, and Doing It Right, The First Time. Some of them don't even realize the shortcuts used; they can't see the forest for the trees.
So the old system is tossed. But as the new system grew, those shortcuts added up. To add any new functionality, you need a buttload of infrastructure across multiple code projects. It's a manual process so there's a thousand points of failure. You try to propose making templates or code generation, but they don't feel like it's worth the time investment (in direct contradiction of the purported culture of "no shortcuts," and "do it right the first time," - or maybe they shut down your suggestion because it came from you).
So adding anything has a massive overhead. Any suggestions for reducing the overhead are shot down (unites it was the team lead's idea in the first place). Everything is so fucking tedious you get fed up with it, so ask for a transfer. Denied - the team is shorthanded and has too high turnover; can't let anyone go.
Time for a new job. So long and good luck with that mess, and with that retention and turnover problem!
4
3
3
3
u/imwearingyourpants Nov 25 '22
Quick patch is created because the problem was critical and needed to be fixed ASAP, while the diamond was made because there was time as the feature was non-critical, thus could be scrapped in the end.
3
u/brokennthorn Nov 25 '22
That is the problem with big upfront designs. You don't design a diamond and then build it and by the time it's done, it's already deprecated. Instead, you strive to always respond to changing requirements (maybe they need a ruby instead) and in that you have to release often, always have the software in a releasable state, even if it's just 10% of the requested feature, show the customer that you have that 10% completed (basic atomic structure) and working like it should (refracts light, etc.), then continue to address the next 10-30%, and so on, and if requirements change before you finish your complete feature, you only throw away a small bit of the solution and might even be able to reuse portions of it and adapt it to the new requirements because of less coupling or less specialization (change the atomic structure, the shape, or the refracted light frequencies, etc.)
5
u/SteeleDynamics Nov 25 '22
Ah, the classic Ad-Hoc Solution versus Highly-Optimized Solution
When we should have focused on the Modular Solution
2
2
u/BadAstroknot Nov 25 '22
I’d give my left nut for defined business processes and documented business requirements.
→ More replies (1)3
u/Dantzig Nov 25 '22
Dont think you will ever get “the complete business requirement” - just acknowledge it is a never stopping iterative process.
Build, measure, learn.
→ More replies (2)
2
2
u/Aschentei Nov 25 '22
Why did this hurt me more than it should…it happens all the goddam time
→ More replies (1)
2
u/Sangarasu Nov 25 '22
Might be a variation on Twitter:
Simple, clean, commented, effective solution -----> Not flashy enough for Musk = you're fired.
2
u/Peregrine2976 Nov 25 '22
The top one puts the app into production, making money, right now. It is, unfortunately, the best solution.
2
u/Ambitious_Ad8841 Nov 25 '22
the grass withers and the flowers fall, but the proof of concept endures forever
2
2
u/Deep-Secret Nov 25 '22
Some dumbass keeps writing shitty code that I end up refactoring or rewriting from scratch every fees months.
That dumbass is me.
2
1
1
1
1
1
1
1
1
u/OurHonor1870 Nov 25 '22
PDSA- Temporary hacks are just process improvements that were adopted. That’s how we find permanent, sustainable, solutions
1
1
u/danjtitchener Nov 25 '22
This is because decision makers are often people who don't understand the value of or technicalities underpinning well thought out solutions.
1
1
1
1
u/JustaRandomOldGuy Nov 25 '22
The band-aid needs the third iteration, move the band-aid into the cloud to solve all problems forever. And add blockchain.
1
1
u/CanadaPlus101 Nov 25 '22
I guess the trick is to find something where the requirements never change. Which is probably why I'm using an antenna simulator that requires me to insert pretend punch cards.
1
u/helpiminabox Nov 25 '22
Lmao I'm feeling that bottom half working on my own game engine. I'm taking my time to do everything as proper as I can on the first iteration, and I'm hearing about new major versions of libraries I use starting their development. Hopefully it won't be a painful migration when it releases in a stable state.
1
1
u/Lanfeix Nov 25 '22
There never enough money to do it right first time but there’s enough money to do it wrong every year.
1
1
1
u/AdOdd5690 Nov 25 '22
I remember one senior dev made an amazing modular excel converter of data extracted from DB for the company’s requirements. It was so good it pretty much everyone used just one function.
Along came a client that REQUESTED some additional information that the excel should have (talking about highlighting, rounding specific numbers, etc.). I worked on it and made some temporary hacks. A few uses by the client lead them to requesting more changes, meaning more hacks eventually leading to something breaking. Everything was rewritten because the senior dev couldn’t foresee clients requesting highlighting. He quit few months later
1
1
1
u/Pleasant_Ad_2433 Nov 25 '22
DEF INT _BEER
DEF BOOL _GET_MORE_BEER=FALSE
_BEER=20
STOPRE
Drink:
If _BEER==0.
_GET_MORE_BEER=TRUE
ELSE
_BEER=_BEER-1
STOPRE
GOTOB Drink
ENDIF
IF _GET_MORE_BEER==TRUE
_BEER=20
GOTOB Drink
ENDIF
M2
1
u/fahamu420 Nov 25 '22
That one apple in that one game that couldn't be removed or otherwise the entire game's code would implode. Can't remember it but reminds me of that
1
u/mittens11111 Nov 25 '22
The same concept applies to strategies in many other fields. Law in particular. Heaps of legislation that sort of works but would be to hard to rework for optimum outcomes.
1
u/ilinamorato Nov 25 '22
My dad always says "there's nothing more permanent than a temporary solution."
And he's not even a software engineer.
1
u/yourteam Nov 25 '22
Look you do your part and charge accordingly.
If the management removes it you learned a good coding practice and still worked the same hours for the same amount of money.
1
u/FitMathematician811 Nov 25 '22
Before the commit: What is this horrible, disgusting piece of code? Maybe I should refactor it and make it more elegant?
After the commit: HOLY SHIT, GIT REVERT, GIT REVERT, GIT REVERT!!!! OH MY GOD, I THINK I'VE KILLED THE COMPANY!
1
1
1
1
1
1
u/thickener Nov 25 '22
Ouf that hits me in the feels. Not so much specifically coding but good hard work that just went out the window for various reasons.
→ More replies (2)
1
u/MasterBathingBear Nov 25 '22
When posts like this come up it always reminds me of this ancient article about NASA programmers
1
Nov 25 '22
Man it hurts, my code from a project was almost completely changed because client went crazy changing all requirements on the project
1
u/tlubz Nov 25 '22
It's almost as if we need a thoughtful balance of clean software design and reusable extensible logic. 🤔
1
1
u/xerns Nov 25 '22
If I ever have a company, it will be mandatory to print, frame and display this in any and every office.
1
u/_The_Great_Autismo_ Nov 25 '22
The problem is the comment says next month. Every time a dev reads the comment they think "it's not next month yet, we still have time!"
1
u/fluffypebbles Nov 25 '22
The strategy is a band aid? looks like failure from the start.
Also something fancy? We're doing functional
1
1
u/SexyCouple4Bliss Nov 25 '22
Many a diamond has been replaced by a temporary hack because the new head of dev didn’t write the diamond. I’ve seen code refactored four times over the years just because people didn’t like it because they didn’t write it. New head dev? New refactor. It’s stupid.
1
1
1
u/MoreNMoreLikelyTrans Nov 25 '22
When I was still programming with iOS, I incorrectly started to believe that Apple was going out of its way to fuck with me.....
I don't even consider myself a programmer anymore and this meme wrenched me into a rage.
1
687
u/KingsmanVince Nov 25 '22
"Write the code that no one can replace you"
Sun Tzu, Art of Programming, 1985