r/ProgrammerHumor • • Nov 25 '22

Meme Coding strategies

Post image
52.2k Upvotes

385 comments sorted by

View all comments

Show parent comments

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
  1. 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."

  2. 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."

  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.

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

u/CanadaPlus101 Nov 25 '22

That's the dream, isn't it?

→ More replies (8)

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

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 (1)

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

→ More replies (6)

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.

→ More replies (1)

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.

15

u/electrius Nov 25 '22

Are humans just not good at software development?

71

u/Soupeeee Nov 25 '22

In my (limited) experience, software fails in the requirements gathering phases more than anywhere else. It's really a communication / process issue more than anything else.

→ More replies (1)

32

u/SuspiciouslyElven Nov 25 '22

We can, but it gets complicated when other people are working on the same thing. Even more so when the goal is software that needs to meet requirements of people who aren't the programmers.

20

u/shrubs311 Nov 25 '22

yes, i heard that roughly 50% of software development projects fail. humans suck at software development but the people on the business side have no alternative to us anymore >:)

17

u/[deleted] Nov 25 '22

Ironically Cobol was meant to solve that exact problem, letting businesses build their own software in-house in a programming language specifically designed for end-user development of business software. Not really sure if it actually accomplished that goal, but Cobol is still in use 60 years later. It's even object-oriented now, lol

22

u/xavron Nov 25 '22

SQL was also designed for business people, and it ended up becoming another domain specific language with wizard DBAs to perform magic tricks.

→ More replies (1)

11

u/Calm_Leek_1362 Nov 25 '22

Yeah but that's really hard to quantify. Overwatch is an example of a failed software project. It was going to be a call of duty / halo type single player game with multiplayer.

They ended up scrapping the project and trying to salvage the assets in a multiplayer game.

There are so many failed projects where bits and pieces and ideas are brought into successful production it's hard to draw a hard line between success and failure.

Also, this is true for all product development, not just software.

→ More replies (4)
→ More replies (5)

16

u/StijnDP Nov 25 '22

We are but not all humans on a project have the same mission.

Some want their work to go faster by automating a task. Some want to automate that task as it was asked.
Others want to automate that task but do more or do less than asked. Others want to automate that task but do it different so that it doesn't work as it was asked. Others live on a cloud of theories and setup an architecture that turns your project of 3 months into 3 years. Others invent extra tasks and non-sense so that they can bill multitudes of time as would be required. Others are consultants and their own firm has a golden partnership with vendor X so their agenda is to make sure the use and purchase of software from vendor X unnecessarily becomes integrated into processes and that their client becomes dependent on it; no matter if it was in their interest which it most often was not.

That's how software projects but also projects in all other industries fail. People rowing in different directions.

→ More replies (3)
→ More replies (4)
→ More replies (2)

8

u/[deleted] Nov 25 '22

When you realize the permanent abstraction layer was you.

→ More replies (1)