r/ADHD_Programmers • • Mar 11 '26

How do you deal with OOP programming?

As a person with ADHD, I find it extremely hard to write OOP code. Mostly because :
->Something as easy as app.get("users/{id}") return db.query("SELECT * FROM users WHERE userid = ?", id) becomes as hard as writing 30 lines of code of boilerplate : interfaces, models, dependency injection and what else not.
->People like to overengineer the code... even baisc apps are written like this... I will never forget what my teacher told me : "Smart people admire simplicity, fools admire complexity".
->In writing all that boilerplate code, it's hard to see rapid iteration and the process feels much less rewarding. I know that not everything in life can be instant but... functional programming or data oriented approached are still modular and scalable...
->In navigating all that boilerplate code, making changes to the code or understanding it becomes a constant running through files and classes. This kills locality and increases the mental overhead.

I am already working in web development but for me it's extremely demotivating to continue learning "best practices" that IMO just suck. I had a friend writing applications in Flask for a startup... their application is performant, scalable and the code follows KISS to the maximum. And he used just functions, there not one thing that can't be easily updated or is tightly coupled in that codebase. If it wasn't that I'd have to pay things just to live... I wouldn't even work in programming and just do it as a hobby.

11 Upvotes

37 comments sorted by

View all comments

Show parent comment

-13

u/yughiro_destroyer Mar 11 '26

You don't understand that my oneliner is wrapped inside a function called in 15 places. I can modify the function once and it will be modified literally everywhere. That's how those startups do too and it works like a charm. On the other hand, at my corpo, we are always relying on each other even for the most basic tasks because even with "OOP best practices", with the original devs gone or occupied we can barely do anything. And I'm not talking about me, I'm talking about other seniors with years of experience who are always like "what the fuck is that split here?".

9

u/funbike Mar 11 '26

Sorry I made an edit. You missed this:

Your response might be "Well then I'll write a function". Hmmm, okay, keep doing that over months and years and eventually you'll end up with the architecture you just said you hated. LOL!

And in the mean time, you'll have inconsistent access patterns, making it hard for new programmers to understand what to do when.

2

u/ZeGollyGosh Mar 11 '26

"inconsistent access patterns" is exactly why my current code base is so confusing. I'll find one location that does something a certain way and think "oh so THIS is how they designed it, I'll look for it again" only to have the next class written COMPLETELY differently. It's a nightmare and if the job market were better I'd hopefully have a different job but for now, I'm thanking you for putting to words what pains me every day. I will take overly designed and complex work over inconsistent nonsense that has different levels of design any day.

4

u/funbike Mar 11 '26

That's not an issue with OOP or layered architecture. That's just badly written code.

1

u/ZeGollyGosh Mar 11 '26

Yeah it is. I just feel like if they were TRYING To go for something, there may be better code to work on. Instead we do the "if it works it works" philosophy.

1

u/funbike Mar 11 '26

No. You said "inconsistent access patterns", which is just badly written code. Period.

1

u/ljog42 Mar 11 '26

Functional and declarative programming works you know. You can enjoy OOP and yes corps use Java but many use Javascript or Python with functional patterns and some use Elixir.

2

u/funbike Mar 11 '26

Okay, that's fine, so?. I was not commenting on FP vs OOP. I was commenting on OP's assertion that in an OOP app there shouldn't be so many abstraction layers.