Time flies. It’s been over a year since I joined CityView. So far, it’s been one of the best decisions I have made in my life. Unless Microsoft comes up with a too good to resist offer, I don’t see myself ever leaving CityView, which could easily be the only company I ever work for. So far, I have declined fantastic opportunities with companies such as Amazon, in favor of CityView.
My head hurts. It’s 11 pm at night, and I just finished a 3 hour debugging marathon to fix a bug that has been on my to-do for last 2 weeks. What began as a simple list of items not showing up in the browser ended up in an ill-formatted sql caused by mis-match of enumeration in a switch statement in the deep backend. The fix involved changing a single word, but the path I had to take was treacherous and equally fulfilling. The feeling is serene.
The behavior of a complex system is often complicated. When we try to implement a complex behavior in the program, that complexity is generally not recognized at first, so the behavior is represented as a single method. Gradually that method grows and grows, gaining more lines, more parameters, and more temporary variables, until it is a monstrous mess. This post explains a few patterns to refactor complicated methods.