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
-
mojo20127833y@jonas-w it wasn‘t exactly one function, moe like a chain of functions: service -> mapper -> transformer -> client.
Various type declarations spread across different files too, like IDownloadFileBase64, IUploadFileBase64, IFileBase64 with the same content, and on some other spots the same content of those interfaces used inline, like:
{
file: { // same as interfaces above
….
}
} -
Voxera113883yThe classic copy paste development.
Instead of refactoring you copy paste and change whats needed.
And end up with multiple almost identical functions.
And when you find a bug you have to go over each of them to see which is affected.
And sometimes only one gets fixed, or some, and the same problem gets fixed over and over in possibly different ways.
I wonder if you inherited code from a former colleague :/ -
mojo20127833y@Voxera he still is a colleague 😅
In his defense, he only has 3y of experience in software development.
Related Rants
So ok, today was a crazy day.
New sprint, new ticket.
Work on the bug tickets first he said ….
Sure can. Oh had I just known that this very first innocent looking ticket is the way to coder‘s hell ….
‚Access of undefined‘ it said. Easy to fix, I thought.
Until I found the very same code twenty-fucking-two times over about 50 files!
Who would guess that exportSingleOperatorBooking, exportSeveralOperatorBookings, exportAllOperatorBookings (… and more) could in practically be the same? Nah, they all use different interfaces.
Oh wait, the alias type of the extended sub-interface of file misc.ts is the same logical content as a differently named interface below another different interface with the same content as in another ts file?
Wait that can‘t be. Riiiiight?? 😳
8h later I have barely scratched the surface of refactoring this shitshow of a project.
But no, I refuse to put the same error handling multiple times in different places.
I could have been done already. I could have saved my soul, my sanity. But I will be brave and strong to save the innocent developer that will cometh after me. For I shall be rewardeth for my sacrifice.
Amen.
rant
hell
duplicate code