Joined devRant on 12/1/2020
Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
All you manage to do in the end was make a simple function that gets data to populate a dropdown menu into something that is absolutely more awful to look at than the worst callback hell possible.
Refactoring this code base has really questioned my sanity and how much I'm willing to spend on alcohol.4
And for the record, the width and height of the image used are only used in formulas which produce the actual width and height of the mock buttons that get drawn onto the canvas element. And don't worry, the click event handler for these mock buttons is actually the click event handler for the canvas...which checks the coordinates of where the click was made on the canvas. And if the click is over where the button is drawn in, congrats you clicked the button.
I really do wonder at what point the previous developer on this project thought 800 line functions are totally reasonable and standard practice...7
I always thought I suffered from imposter syndrome until I saw what the previous developer on this NodeJS/SailsJS project did.
They put return statements inside of a switch block. He also put in the break statements as well. The return statements were the exact same thing every time it was written.
Fuck shitty JS developers....6
Took over a NodeJS/SailsJS project from a previous developer that is no longer working at the company. There's no documentation or requirement docs and the models need to be rewritten as some have up to 67 attributes in them.
Looked through the source code file by file to see how bad it was and it will more than likely be easier to start over then to try and refactor and cleanup the existing project into a usable state.
As bonus, I was given the option to switch the entire stack if needed as well.5