this post was submitted on 21 Jan 2024
695 points (100.0% liked)

Programmer Humor

421 readers
41 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 19 comments
sorted by: hot top controversial new old
[–] Venator@lemmy.nz 39 points 10 months ago (6 children)

Sometimes a fresh pair of eyes on a code base can reveal some opportunities for big improvements in maintainability 😜

[–] MajorHavoc@programming.dev 21 points 10 months ago (1 children)

Ahahhahhahha. Ha.....ha. Ahem.

Sorry. The idea that any of the opportunities for improvement at my last "job A" code base might need "revealed" struck me as really funny.

[–] Venator@lemmy.nz 5 points 10 months ago

Sometimes there's an opportunity to delete it and start again 😜

[–] gregorum@lemm.ee 16 points 10 months ago* (last edited 10 months ago)

Sometimes it takes a new dev coming in for management to give the greenlight for a major overhaul. It’s shitty, but it’s true.

[–] aksdb@feddit.de 6 points 10 months ago

Also new people are still motivated to change stuff. They are not yet worn down by bureaucracy.

[–] MonkderZweite@feddit.ch 1 points 10 months ago* (last edited 10 months ago)

In that Xamarin mess? The last handover only made things worse.

[–] tkk13909@sopuli.xyz 1 points 10 months ago (1 children)

Looks like we found the hr employee! Get 'im Bois!

[–] Venator@lemmy.nz 3 points 10 months ago

Lol, nah I'm a developer.

load more comments (1 replies)
[–] prof@infosec.pub 30 points 10 months ago

Recently switched jobs from maintaining a 15 year old Windows Forms .NET Framework legacy codebase.

At the new job we stick to Clean Architecture, use unit and integration tests, have a code generation tool, actually make nice use of generics and use dependency injection. Also agile processes, automatic build tools, whatever. The difference is night and day and I'm so glad my ex boss fired me because I told him he's an asshole and his codebase is shit.

[–] corytheboyd@kbin.social 21 points 10 months ago* (last edited 10 months ago)

You have to listen to your heart, at least once in your career, to learn that grass on the other side is covered in just as much dog shit as it is over here.

[–] brezelradar@feddit.de 19 points 10 months ago (1 children)

Just rewrite it with 80% functionality and force migrations on the users. Once the remaining 20% "edge cases" that require serious effort hop to the next job - where you where hired to "maintain" such a system and "just add a small feature here and there". Ooops.

[–] OsrsNeedsF2P@lemmy.ml 10 points 10 months ago

Reddit: You're hired!

[–] SolarMech@slrpnk.net 13 points 10 months ago (1 children)

Learning to deal with "unmaintanable" codebases is a pretty good skill. It taught me good documentation and refactoring manners. It's only a problem for you if management does not accept that their velocity has gone down as a result of tech debt pilling up.

Code should scream it's intent (business-wise) so as to be self-documenting as much as possible As much as possible is not 100%, so add comments when needed. Comments should be assumed to be relevant when written, at best. Git comment should be linked to your work ticket so that we can figure out why the hell you would do that, when looking at the code file itself. I swear some people seem to think we only read them in PRs (we don't). Overall concepts used everyday, if they need to be reexplained, should probably be written down (at least today's version). Tests are documentation. Often the only up to date one?

[–] corytheboyd@kbin.social 7 points 10 months ago

This right here. Get good at navigating code of questionable quality that you didn’t write. If you can’t do it, start questioning your tools, and mastery of those tools. For the big boy jobs, you should be working with existing code much more than writing new code. Learn to get excited by tweaking existing systems with a few well placed, well researched changes, instead of being The Asshole that adds a new abstraction wart.

[–] ReallyKinda@kbin.social 11 points 10 months ago

Switching jobs can be worth it just for the change up.

[–] floofloof@lemmy.ca 8 points 10 months ago

Can we arrange some swaps? I'm not getting paid enough and neither are you.

[–] magic_lobster_party@kbin.social 6 points 10 months ago* (last edited 10 months ago)

I left a company when management decided to discontinue a product right after we finally made its code more maintainable.

Had a look at the product that would replace it, and it was a bigger mess from what we started with.

[–] kassuro@feddit.de 3 points 9 months ago* (last edited 9 months ago)

I see it as a win, I love refactoring bad code . Just feels so nice afterwards.

Especially when you can remove thousands of lines of duplicated ui code.

That's so much better than writing new code

[–] Mesa@programming.dev 1 points 9 months ago

You guys are getting codebases?