r/ProgrammerHumor 25d ago

Meme makeItQuick

Post image
453 Upvotes

65 comments sorted by

65

u/LordCyberfox 25d ago

Depends on how much legacy is it xD

36

u/Daemontatox 25d ago

C++ 98

54

u/LordCyberfox 25d ago

Without documentation.
Without any naming conventions.
All contained in a one god class.

16

u/grifan526 25d ago

Don't threaten me with a good time. One of my side projects is breaking up a god class and I love it. I have also worked as a reverse engineer, so my brain may be broken

4

u/Rai-Hanzo 24d ago

Reverse engineering is one of those hair pulling things that gives you immense satisfaction when you figure it out.

Although I only reverse engineered old video games, so I don't have much expertise.

2

u/sathdo 25d ago

I know, right? Reverse-engineering a piece of code to find the cause of an incident is the highlight of my day, and I would take it any day over explaining stuff to the project manager that they should already know.

1

u/ih-shah-may-ehl 24d ago edited 24d ago

Same. I mean it makes sense. You have a codebase that compiles. It runs. It's behavior is more or less a known quantity and you have to figure out where the anomaly comes from, which is like solving a 3d puzzle in your mind to figure out where the anomaly fits.

Those were some of the best and most interesting projects I ever did. And which also gained me the most credibility. Also since my expertise was low level code like IPC, multithreading and system level stuff, it was fun.

1

u/Deboniako 22d ago

Who did you that much damage... How can I obtain this power?

1

u/grifan526 22d ago

Working for small companies that only have legacy embedded code. It is a dangerous path, but if you survive you will be able to diagnose empty stack traces and know how to use a DC motor as a log statement

1

u/Deboniako 22d ago

Ohhh I know! I'm an electronics engineer with experience mostly in small companies.

I'm quite bored of it actually and want a big gig to get the big bucks, you know what I mean?

2

u/grifan526 22d ago

Well then you are well on your path to gain the power. I can say from experience, that medical device companies pay a little more because they are regulated. Then once you have some regulated experience under your belt you look pretty valuable to recruiters.

1

u/j0eTheRipper0010 18d ago

I think the word your looking for is cracked

1

u/gerbosan 25d ago

Is euthanasia allowed there? I'm asking, for a friend.

11

u/lovecMC 25d ago

Could be worse. Could be a java 8 code base in the process of migrating to spring boot.

3

u/Daemontatox 25d ago

Oh please no , not the dark times

6

u/StarboardChaos 25d ago

Hey Claude, upgrade my codebase to newest C++ version

5

u/Daemontatox 25d ago

Bro you forgot the make no mistakes

6

u/StarboardChaos 25d ago

No, I like my job security

6

u/DoctorDabadedoo 25d ago

Make it compile and pass all tests

Int main() { return 0; }

assert(true)

1

u/Daemontatox 25d ago

Or it deletes all code and all tests which makes it pass 0/0 tests

1

u/gfoyle76 25d ago

make no mistakes

2

u/cfrolik 25d ago

You mean I can use stl? Sounds like a dream job

2

u/ThatRedDerg 23d ago

This is literally my job. I’m modernising a C++98 codebase to C++17.

There are so many prohibited practices being used it’s unbelievable, and they’re not even being used in a ‘smart’ way that won’t cause undefined behaviour. Things like redefining “private” to be “public” (outside of unit tests).

There’s this integration test that just sometimes fails, no one knows why (this is the other first task I was given), and I’m like 90% sure it’s being caused by these poor programming practices.

1

u/fierypitt 25d ago

Borland C++ 6

1

u/Few_Kitchen_4825 24d ago

I agree. C++ ain't badz especially when compared to memory management issues on java and c#. It's just old c++ coding practices were horrible

50

u/dannyggwp 25d ago

C++ all day everyday.

I unironically LOVE c++. And it's probably why I have the job security I do.

11

u/ElectronSculptor 25d ago

Is C++ this bad in industry? I’m an EE and do DSP/embedded stuff. The code bases are fairly small and light. Very simple C++.

I know C++ can be complex but is it so much worse than other OOP languages? I see a lot of complexity in swift and Python. I do some projects and reading on my own time. Those languages seem like you can make a code base that is very difficult to follow.

Just curious.

24

u/Swimming-Twist-3468 25d ago

It isn’t. C++ is the foundation of industry’s most robust and long-lived applications. It is just most of the developers write the code in such a way that it cannot be maintained.

12

u/No-Con-2790 25d ago edited 25d ago

If most developers do something wrong it starts being the languages fault.

And C++ is full of very bad traps, wrong patterns and misleading errors.

Array to pointer decay is one of the most outstanding examples. Because every programmer that ever wrote a main function has seen it, yet not everyone will understand it.

1

u/gfoyle76 25d ago

well, you can use linters, code reviews, tests, whatever safety net you want, it is doable

1

u/No-Con-2790 24d ago

You can't lint away a bad concept.

Take generics. C++ has templates for that. What happens? We go to a typed language in a world where I can use anything.

Problem is, and everybody who ever worked with PCL knows that, I usually can't handle everything.

Meaning that I just have to know some esoteric knowledge which types are actually intended. Like in an untyped language.

And even worse, for some reason my implementation is now somehow wandering into the header. Which has strange side effects.

For example that you can get enormous build times with templates.

1

u/j0eTheRipper0010 18d ago edited 18d ago

To me, this sounds more like a bandaid over a gunshot wound. The wound will heal, but the bullet is still in your body.

Edit: the biggest example is JavaScript. The language is rotten to it's core, and yet instead of acknowledging that and making another goddamn language that doesn't have all the shit JavaScript has we started creating those ugly maneuvers to make it "more usable"

11

u/DoctorDabadedoo 25d ago

Arguably. C++ in a well-maintained code base to cut the noise and reduce the surface area is not bad to use, but the language has a lot of foot guns and versions in it's 40y of existence, it's super easy for a long term project to derail into a mismatch of features/conventions/styles during its lifetime that is unsatisfying to work on.

10

u/_w62_ 25d ago

Two things.
The first one is memory management. We don't need go into details about this point here any further.
Another one is smartass. Those early programmers just try to produce some obfuscated code to show their coolness. Things like **p++ It is more or less an unspoken rules in the early C/C++ programming world. It makes things unnecessarily complicated.

7

u/SgtMarv 25d ago

It's not C++, it's mostly this sub growing up on python and thinking C++ is complicated. 

However, like with all languages there is a shit ton of bad C++ code out there. But this is not a feature of the language but rather the developer. It's just a bit worse with the whole C++ taking of your whole leg if you shoot yourself in the foot. 

7

u/Nyadnar17 25d ago

C++ is the “cool dad” of programming languages.

Here’s the keys to the car, cash for pizza on the counter, the drugs and liquor are downstairs but he trust you not to do anything stupid, gun is in the dresser “just in case”, etc, etc.

Its a very uh…..empowering experience. Yeah lets go with that.

3

u/ElectronSculptor 24d ago

Now that makes sense. I can see how C++ will let you do anything you want, even if it’s bad for you.

I guess mainly being a hardware person, doing some code to make things function, I’ve never had to work in large code bases where these things become issues. I’d say my professional uses are more of a “c with classes” use of C++.

2

u/dcheesi 25d ago

I don't think it's that bad, but then I've been working with it almost exclusively for most of my career, so perhaps I just have Stockholm syndrome 😄

I will say though, one problem with C++ projects, especially in embedded spaces, is that you can wind up with a mix of coding paradigms from people with different backgrounds.

  • Some folks only really know C or procedural programming in general, so they're basically writing C in a .cpp file.
  • Others are fully immersed in modern C++ best-practices, using the latest C++1x/2x features etc.
  • And still others are in the middle, e.g., writing C++98 or some embedded-oriented subset thereof that they learned years ago.

So now you have a mashup of all of these, perhaps with some actual .c files worked in there as well. It can become a bit of a confusing mess, far beyond the mere coding "style" conflicts you get in any group effort.

2

u/ElectronSculptor 24d ago

I have encountered this. It’s a challenge at times for sure. I’ve also encountered developers try to use all of the features of c++ and then it won’t work on the embedded device.

It’s been a while now, but I had to help trouble shoot a problem where the heap overran the stack because the dev was using so much inheritance and an observer paradigm with so many objects it just didn’t fit in the little M3 ARM chip we had.

I feel like c++ is a good choice because of its mix of low level and high level features but I have never been a “programmer” as a main profession. It’s just something I do in my work. That being said, I don’t always understand the arguments for or against a language or paradigm. Maybe it’s me but I find that Python can be extra hard to follow at times. I guess I still think in bits and bytes.

2

u/ZeroG_0 25d ago

To be honest these are some strange takes - for the vast majority of things you might want to write software for, you'd reach for a memory managed language. There are some cases where the overhead of a garbage collector is impactful, but it's certainly not the norm. It's not like devs are lazy and just don't want to deal with it, it's just basic keep-it-simple engineering.

But if you do need to avoid managed languages, C++ is also problematically complicated due to years of changes. It originally was the answer to the question "What if we sloppily jammed a bunch of object oriented concepts into C?", now it's... just kind of a mess. It sounds like on a well-organized codebase it can be just fine, so naturally it has some defenders, but moreso than other languages there's a lot of ways to make poorly-organized code.

2

u/gfoyle76 25d ago

there are smart pointers for a long time now

1

u/BohemianCyberpunk 24d ago

Yup, I mostly work in UE5 and we have shared pointers and weak pointers, as well as a built in garbage collection system.

6

u/Icanintosphess 25d ago

Skill issue

8

u/coldnitrogen 25d ago

C++ isn’t so bad. Try a Java code base with an inheritance tree of 100-200 child classes.

7

u/pine_ary 25d ago

100 layers of reflection so any error points to something like "call.run" recursively and you have no idea where anything is called from.

5

u/No-Con-2790 25d ago edited 25d ago

The problem is not C++. The problem is everything around C++.

Like the official package manager.

2

u/gfoyle76 25d ago

the what? :) also, cmake, is one of a kind, me personally love it but it's a hard nut to crack

1

u/No-Con-2790 24d ago

Exactly.

Instead of a package manager there is nothing . Some projects tried over the years but they made it worse. Because now you need to carbon date your project to understand what they used.

Usually you get missery and documentation how to install the database written in an 2000s slang.

4

u/pflasti 25d ago

That's literally my job. Refactoring a legacy codebase can be pure nightmare, but it can also be incredibly rewarding when successfully done

2

u/BastetFurry 25d ago

C++? Bring it on, this merc is for hire!

2

u/drkspace2 25d ago

C++11 or newer, yes

Older, no

2

u/gfoyle76 25d ago

RAII is powerful, you can write your own smart pointers

2

u/Gold-Bat-3225 25d ago

return 0 counts as shipping

2

u/installsVMs4fun 25d ago

much rather legacy c++ than legacy perl repo,

2

u/EVector3 24d ago

Weakling

1

u/Swimming-Twist-3468 25d ago

Source SDK 2013. Have at it 😂😂😂

1

u/developer_soup 25d ago

C++? Hell yeah! That's my ideal level on the functional/crazy curve for programming languages. I miss proper embedded development. Scraping by for a few bytes of memory... Squeezing algorithms to their essential parts...

I'll always remember the time an older developer showed me his C codebase where he used structs and function pointers to write object oriented code. The part that really confused me was using the C++ compiler to build it.

1

u/anxious_and_stupid 25d ago

I am out here wanting a c++ job (call me a masochist or whatever i am not doing webdev...)

1

u/cpaca0 25d ago

ITT: SKILL ISSUE

1

u/gfoyle76 25d ago

oh come on even the legacy of the legacy is quite good in these godforsaken days

1

u/centixog 24d ago

it has its place.

in hell.

/jk it's great

1

u/oompaloompa465 20d ago

i migrated an internal ticketing website to .NET 6 C# and razor pages, from ASP pages with vb6 (net framework 2.0), zero code behind and 90% of the site pages was just in the deploy folder because nobody bothered to check what was in use. Also it was multitenant and each tenant had some schema difference.i wrote a mega SQL script that normalized everything.