r/AskProgrammers • • Apr 22 '26

Are most programmers bad?

I have seen multiple projects with people doing sw dev for 10+ years. In most cases the qulity of the code range from horrendous to bad. Usually the code is kind of just one big lump without any kind of structure or design idea. There are global variables in multiple places, functions that take 15+ arguments, with pointers input and out, and updating global state. No documentation. Zero consideration for any useful naming conventions, or consistency in naming or commenting. Literal values everywhere without any explanation. The list goes on. Yet the people working there seems to not find it a problem, and project managers or team leaders are completely oblivious. Are most programmers bad, is this just the inevitable state that any project end up in after some time?

104 Upvotes

139 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Apr 22 '26

[deleted]

1

u/NeonQuixote Apr 22 '26

First, I said “maybe.”

Secondly the more things a single method does, the more possible it becomes for a change to one part of what that method does to create an unintended side effect in another part of the method.

If the method does multiple things, you can’t leverage that method from somewhere else without invoking all the other things that method does. And that can lead to a lot of cut and paste code duplication.

There’s a difference between saying “no more than three arguments and no more than ten lines” and keeping to a general practice to keep methods small and focused. That’s where the art and judgement come in.

0

u/[deleted] Apr 23 '26

[deleted]

1

u/NeonQuixote Apr 23 '26

"If you have a bunch of isolated sections, you can easily hide them under a block or inline lambda call."

Or you could just make them sub methods and not have to do "hiding" in a block.

1

u/KaleidoscopePlusPlus Apr 23 '26

I'm 100% with you here. If that standalone function only needs those specific params once, why are making a struct just for that. It makes no sense.

If anything its personal preference. there is no 'smell'.

I sometimes watch more, seasoned programmers code like J Blow and they totally avoid needless shit like that . If the function needs 6 params so be it