In chapter 4 Martin brought up many great ideas about the environment and attitude you have while coding. Early on in college I would often have music playing and have my phone next to me. I thought that it never distracted me until reading this chapter. I slowly have pulled away from listening to music or having distractions but after reading this chapter I realize that maybe it is not the best idea to have distractions on in the background that put you into a “zone” that allows you to just blow through code and problems. This leads to poor and sloppy work. While it is nice to breeze through something, more likely than not finishing a chunk of code or a problem is not as easy as taking one look and making a change. It takes time to create it and ensure that it is functioning and done in an efficient manner rather than spaghetti code. Often when things are running in the background or you are distracted because of an event that happened or is going to happen the bad code comes into play. This is because your mind isn’t giving full attention to what you are trying to get done. Doing so results in more problems down the road. The books explanation of 3am code and when to walk away reminds me of the casino. When you are there and winning(focused state) you are good you are having a good time and excited. Good code should do the same but once you start losing money and are down(unfocused/distracted) you start to play risky to try to win your money back. This is when you need to learn to step away, go outside and take a walk or just step away from everything and clear your mind. I think this is a huge thing that I myself should learn as I find the best work I do is after a few hours after I wake up. Myself working or thinking too much about something can stress me out and make me frustrated only hunting and thinking about the correct answer. Luckily being in college still with other classmates it is easy to practice and work together with others. Many times something I am just missing that is not obvious to me is obvious to someone else and we can help each other and vice versa. I think that programming with someone else and getting and receiving help is the best way to learn more. There is just so much to know about programming and given where we are in our careers it is very hard to know every little detail so some students know more about certain things and can help. I have heard that this is also true in the industry and I hope to continue having people around to program with to help and be helped by. I think in the end it comes down to practice. The more you practice the better you will become allowing times where you are stuck to recognize similar situations which when you were stuck before. It may not always be the same scenario but knowing similar problems can solve endless hours of stress and problem solving just by practicing.
From the blog CS@worcester – Greg Tzikas by Greg Tzikas and used with permission of the author. All other rights reserved by the author.