this post was submitted on 27 Oct 2026
154 points (98.7% liked)

Programmer Humor

33823 readers
1574 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 3 years ago
MODERATORS
 

I got the first prototype version of the code for the project I'm currently working on. It is an Arduino Sketch, that contains 1k lines, stores every single Value needed as a global Variable and every function reads and writes to these global variables, instead of taking them in as parameters. This code is so bad, that I refuse to even look at it. The effort to take the existing codebase and transform it into something useable is as high as rewriting it from scratch.

When telling my colleague that his code is absolute garbage, he just told me "its not my code, Claude did it". I am constantly pushing towards implementing the project in a proper way, but it has been nothing but fights against people who don't know how to code and who refuse to acknowledge that ignoring any standards of maintainable code does not turn out in the end and it makes sense to rewrite the project sooner than later.

you are viewing a single comment's thread
view the rest of the comments
[–] squaresinger@lemmy.world 15 points 16 hours ago* (last edited 16 hours ago)

Arduino is a toy/prototyping platform that you really shouldn't use for productive solutions (it's got terribly bad code quality, bugs that have been open for over a decade, it's basically unmaintained by now).

1k lines is a micro project. It's really small.

All that's on a level where if this is just an internal solution that isn't sold to customers it's ok if the code is shit as long as it works.

If you are actually selling it to customers or you rely on it performing a critical function, you should urgently move away from Arduino anyway.

Remember: code quality is not an end to itself, but instead a means to an end. It gives you a more maintainable, less buggy project. If you don't care about maintainability and stability, it really isn't worth the time to optimize code quality here.