Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Kashmir I don't quite know what the function does, but it's called filterList(); and spans ~300 lines.of if's and loops.
The system is a customer system that keeps tracks of customers and orders and data about customers.
Made in a hella old version of codeigniter
(It's a client system, not our own, and one we inherited from a previous dev) -
cho-uc18845yI once write a function with 19 parameters. Can do it better using structs but currently doesn't have time to refactor it.
Anyway, my work is scientific computing so maybe I still can get away with it. But I agree with you, in real-world programming, I would frown upon it. -
I eventually spend some time looking at it, and it looks like something that is relatively easy could be replaced by a SQL query.
But that function is so engrained in the system that my fear of doing so is overwhelming,. due to the number os possible bugs i'd introduce -
Meanwhile the method to generate an explosion in the Rimworld Modding API accepts 28 parameters
Opening up a view file, and first thing I see is a function accepting 13 parameters.
I don't know where to start, so much wrong..
Kill me.
rant