Hello and welcome back to another week of my blog. This week, I looked through chapter 5 of the book Apprenticeship Patterns by Dave Hoover named “Perpetual Learning.” I was quite interested in the apprenticeship pattern called “Reflect as you work” once I read it. This pattern talks about how important it is to reflect on your own work and what you have learned in order to improve and progress as a computer science apprentice. All computer science apprentices should plan for a time to regularly review their work and see what areas they can improve in. It is also important to see what you accomplished and identify where you succeeded. You should always cherish those successes. “Reflect as you work” recommends you as an aspiring computer science major to draw a personal map for your own working habits and focus on the habits that have not changed in a while. Figure out if changing one habit would make you more productive and adopt that change.
To apply “Reflect as you work” to myself, I am going to make an analogy to playing video games again. No matter what video game I play, I always reflect on my actions, both when I succeed and fail. If one strategy fails, then I look back and try to identify points of failure and see how I can correct those mistakes. If my strategy succeeds, I celebrate that I’ve won (mentally in my head) and then look back and see if I can make the strategy better or make it more efficient. This is just a habit I’ve developed over years and years of playing video games. The same can be applied to being a software apprentice. If I fail to write working code, then I will try to identify the errors and try to correct them. If the code does work, then I will analyze it to see where it can be more efficient. In the future, I will always reflect as I work. As an example, look at this code:
int count;
count = 0;
while (count < 3){
System.out.println(count);
count = count + 1;
}
This code can be condensed down into:
int count = 0;
while (count < 3) {
System.out.println(count++);
}
Which can be further condensed down to:
for (int count = 0; count < 3; count++) {
System.out.println(count);
}
From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.