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
-
retoor26621dI do not care much about big single files at all (and that's good in the C world I guess :P) but a function of 1000 lines.. Is it a huge lexer / parser? :P
-
@retoor It initializes a bunch of resources, and it contains a lambda that captures those resources, takes an incoming message as an argument, and responds to each of the 20 or so possible message kinds.
-
retoor266220h@lorentz ah, yh, you could make a seperate function for all those things but i do not really see a need if a function is only used once. It sound like a quite valid case tbh. Refactoring this has no value in progress probably so i would leave it like that I guess. You got two kinds of people: people who write clean code and people who get shit done.
-
lorentz1541719h@retoor I have many plans on how to refactor it by breaking out recurring patterns that always must look the same (lock shared repo, find relevasnt records, clone them out, drop shared repo guard) into functions that take callbacks, but I don't think I'll be breaking out any of the actual functionality.
-
retoor266219h@lorentz yeah, you can. But after all that work your project is still at the same % of completion. Put on backlog and move on to something new. Meters meters meters :) How further you get in the project, the more gets clear what is worth to refactor in the end. Refactoring up front pure for beauty of code is just a waste imho. A project killer :P
what the fuck what the fuck what the fuck what the fuck what the fuck what the fuck
rant
nearly all of them max width
1000 line function
i made this why did i make this