5/18/2018Time to read: 1 min
I remember in my junior year of college, we needed to make a comic website, in which user can sign up and draw comics online. This is a pretty complicated project because we need to build the app from the ground up. Four of us worked in the same team. We have one UI person, one database person, one person working on the core drawing functionality and a project manager/backend. We spent a lot of time to put together this project. At the end of the semester, we were pulling some all-nighters to get it ready for the final demo.
We had no test at all. No unit test, no integration test. All we did was manual testing while developing the features. An hour before the final presentation, we said
hey, we are ready. Let's have a final run to see if everything works.
Everybody took out their laptop and start testing.
Guess what? no, it didn't crash. It looked pretty good actually. There was just one tiny problem: we don't support two people using our website at the same time!
Oh crap. What went wrong... Hey, backend person, is it because of that
It turned out the server kept one session only with the so-called
GodObject. All client-side request interacts with this object, so we would see that whenever someone finishes a drawing, everybody gets the drawing in their gallery.
Let me fix it
backend person said. He started fixing the code on his local machine, 10 minutes later, it crashed on his local.
We got no time, let's just present and hope for the best
So we presented to our professor, with fears in our eyes. Professor was taking note while we present. The presentation went pretty smoothly, except on the tiny corner of our webpage, it displayed a wrong username (thanks,
GodObject), but we scrolled away pretty fast.
Shh, I guess our professor didn't find out about the bug. We all got a good grade at the end.