DEV Community

Discussion on: What's the Worst Code You've Ever Seen or Written?

Collapse
 
sleepyfran profile image
Fran González

Uh, definitely the code that I had to put up with when I was doing a scholarship in one of the biggest company of my country. We were making an Angular application that had a couple of pages, one of which included a map, a table and a lot of buttons with actions that will change the state of the map and the table. So well, the guy who wrote all that decided it was a good idea to have it all in one single component with more than 10k lines of code across several methods named almost the same with a huge list of component variables handling the whole state, with incredible names like "points", "pointss", "pointsss"; basically he added another letter every time he couldn't think of a name.

Also in that project: Angular forced him to use TypeScript but he didn't want to write any interface because what's the point, right? So he annotated everything with any.

Oh, man, I do not miss being there.

Collapse
 
renegadecoder94 profile image
Jeremy Grifski

Oh no... I can see it now:

function zoom() { ... }

function zoomMore() { ... }

function zooming() { ... }

function zoomz() { ... }
Collapse
 
sleepyfran profile image
Fran González

That just brought very very bad memories hahaha.

Collapse
 
itr13 profile image
Mikael Klages

Was pointsss a list of lists of lists of points?

Collapse
 
sleepyfran profile image
Fran González • Edited

Of course not, that'd have made a little tiny bit of sense!