Today I hate being a developer

One of my first projects at my current job (2 years ago) was to rewrite the tables we were using in our SPA. They were fucked. They guy created the tables using javascript, then used jQuery to read the table out of the DOM to manipulate them. fucked. I reimplemented them the right way and all of a sudden the "new" tables weren't buggy, supported drag-and-drop to rearrange the columns, etc... They weren't complete but I had a good base in place to build off of. Then, I was pulled away onto another project leaving the app in a state of some tables still being "old" and some being "new".

A few months later, we needed to support server side pagination in the tables. And, a developer that we'll just call "Bitch Tits" was given the task of adding server side pagination to the tables I had started. He is a "senior" developer and I was psyched that someone was going to go in and clean up my code because, to be honest, I wasn't 100% happy with the base classes I'd created (it was my first Ember project and things weren't super clean).

3 months later, I get a pull request to review the "new new" tables. It was 9,000 lines of code. 4,000 had been copy-pasted from the "new" tables. 2,000 lines had been copy-pasted again (i.e. 3rd generation copy-paste). All of this was done so that the file structure could be app/tables/controller... instead of app/controllers/tables.... Not a terrible decision (I would have preffered upgrading Ember to a version that supported this file structure rather than building it ourselves) but he didn't refactor the existing code. Just forked the codebase, copied all of the base classes, created his own base classes the extended the existing base classes so that the "new new" tables were dependent on the "new" tables and the entire code base was an unmaintainable ball of spaghetti. Of course, we'd promised a client the "new new" tables tomorrow so I merged the change and then went to our CTO to tell him we needed to rewrite the "new new" tables.

Unsurprisingly, that didn't happen. Rewriting the "new new" tables got rolled into an upgrade project (because you should always change functionality when you upgrade your framework). Obviously the upgrade project failed.

2 years later, we launched a new product. Obviously we couldn't just extend the old product because it's a steaming pile of shit. So, we started from scratch with Ember 2.x. This time I implemented tables as an addon so that if when someone decided to fuck up the code base the damage would be isolated. We launch the new product, it helps us turn a corner in terms of sales (MRR had been flat for 9 months) and things start to look up.

Now, we're in the process of launching another new product. And, Bitch Tits is reimplementing tables once again. It turns out Ember isn't trendy enough so all of the work we just did on the product that turned the company around needed to be scrapped so that we could ... wait for it ... rewrite tables (and to be fair, everything else) one again.

/r/webdev Thread