14

Worst code I ever had to touch: a React application, createClass era, before redux was a thing, that had everything in one fucking component.

Every fucking thing.

This was a simple video chat application, but still. The component's code included:

- Views (contact list and video call screen) and logic to switch between them;
- All application state;
- API calls;
- Websocket message handling;
- WebRTC logic (getUserMedia and p2p streaming).

This app was built by one person in one month for a demo. That person left the company after the demo and I had to maintain that mess without zero React knowledge (I was doing angular at that time). On his last day he gave me a crash course and an overview of how the app worked.

Around that time I attended a few meetups and a conference with talks about React. That, my curiosity and ability to learn by refactoring helped me a lot when I had to add new features and fix bugs in that app.

Comments
  • 3
    Fuck 😰 how the hell did you stay sane after that?
  • 3
    @Condor dunno. I remember having fun with it even. I may have never been sane to begin with. 🙃
  • 3
    Oh! This was also an Electron app, so the component also had some Electron stuff in it I think...
  • 2
    @shellbug that makes a lot of sense 🙃 join the club!
  • 0
    Sounds just like that site builder built I PHP I got to take over. Finished it Monday, publishing next Monday...
Add Comment