More editing in chapter 06
[themediocreprogrammer.git] / chapter06.md
index 395731b6f3116d3de076756edea8393aaf982c41..1a4ca36a33dc693cef1e77b14c2e1134e76c82e7 100644 (file)
@@ -6,56 +6,58 @@ The one constant in the field of programming is that it is always in flux. Progr
 
 When I graduated from college we learned Pascal, Modula2 and Ada. Unfortunately those languages were starting to decline in popularity in favor of C. When I started my first "professional" programming position Perl was the language of choice (partially because Perl could be easily transformed into the ubiquitous CGI scripts of the era, and was considered superior to scripting tools like `awk` and traditional shell scripts). As of this writing I'm using Python as my main development language, and I foresee that I'll have to look into other languages to expand my programming career.
 
-Programming requires flexibility. It's difficult to learn only one way of doing things and have that remain relevant for over 20 years. Think back to what was current technology 20 years ago and you'll no doubt notice that things are quite different now. (If you would like a fun exercise search for articles describing the state-of-the-art technology from 20 years ago and notice how much of it you recognize.)
+Programming requires flexibility. It's difficult to learn only one way of doing things and have that remain relevant for over 20 years. Think back to what was current technology 20 years ago and you'll no doubt notice that things are quite different now. If you would like a fun exercise, search for articles describing the state-of-the-art technology from 20 years ago and notice how much of it you recognize.
 
 ## Learning to learn
 
-Learning specific methodologies and technologies is not a good long-term strategy for programmers. We're better served by learning how to learn, and more importantly how we ourselves learn. That sounds simple: once we've cracked how to learn effectively then we'll be effective programmers. Unfortunately there isn't a foolproof way to learn that works for all people. Different folks learn in different ways. All of us have learning styles that work better when certain things are emphasized. Some learn better in a classroom while others learn best with self-directed study (books, video recordings, etc.). Some can read a book and be perfectly fine with understanding the material while others may need more visual approaches. If you have the luxury of trying several different methodologies for learning I'd encourage you to use as many as you can to figure out what works best for you. Understanding what works for you will be key to helping you progress and grow.
+Learning specific methodologies and technologies is not a good long-term strategy for programmers. We're better served by learning how to learn, and more importantly, how we ourselves learn. That sounds simple: once we've cracked how to learn effectively then we'll be effective programmers. Unfortunately there isn't a foolproof way to learn that works for all people. Different folks learn in different ways. All of us have learning styles that work better when certain things are emphasized. Some learn better in a classroom while others learn best with self-directed study (books, video recordings, etc.). Some can read a book and be perfectly fine with understanding the material, while others may need more visual approaches. If you have the luxury of trying several different methodologies for learning I'd encourage you to use as many as you can to figure out what works best for you. Understanding what works for you will be key to helping you progress and grow.
 
-I've found that some simple principles work best for me. The first is repetition. I learn better when I do something daily, over and over again, in small chunks. The second is having a small goal that I can achieve. So for me having a daily practice time on a project where I can work toward an end goal works best for me. When I was learning Python I enrolled in PyWeek, a one week game programming sprint where the theme is announced near the beginning and all programming happens during the week. For that entire week I made time to complete my game, and by the end of the week I'd learned more about Pygame (the library that I'd used) and Python than I had in the weeks leading up to PyWeek. Doing a one-week "game jam" (as they're currently called) is a bit extreme but it gave me a clear goal (a working, finished game) and a time-frame to accomplish it (one week). Over the years I've learned more about Python with various projects (both professionally and for myself) that had daily practice and clear end goals.
+I've found that some simple principles work best for me. The first is repetition. I learn better when I do something daily, over and over again, in small chunks. The second is having a small goal that I can achieve. So for me having a daily practice time on a project where I can work toward an end goal works best. When I was learning Python I enrolled in PyWeek, a one week game programming sprint where the theme is announced near the beginning and all programming happens during the week. For that entire week I made time to complete my game, and by the end of the week I'd learned more about Pygame (the library I used for my game) and Python than I had in the weeks leading up to PyWeek. Doing a one-week "game jam" (as they're currently called) is a bit extreme, but it gave me a clear goal (a completed, working game) and a time-frame to accomplish it (one week). Over the years I've learned more about Python with various projects (both professionally and for myself) that had daily practice and clear end goals.
 
 You'll need to experiment to see what works best for you. The underlying principle is that your learning process should be something that you can use for any language or concept in programming. It should also offer the least amount of resistance to your learning. Your ability to learn and adapt will be vital to your experience as a programmer, so understanding your learning process and what works best for you will help you in this process.
 
-At the very least set aside 10 minutes per day as a container (see previous chapter) for focused reading and learning. There is a lot to learn in programming and creating a habit of learning will help you keep up. Remember, though, to keep your learning contained in small chunks. A lot of information can overwhelm you into thinking that you can't possibly learn it all. You're right -- you can't learn it all in one sitting. If someone told you to drink one of the Great Lakes in one sitting you'd be hard pressed to complete the task (note: please don't attempt this!). If, however, you filled a glass of water several times a day from one of the Great Lakes and drank it (10 minutes at a time) you'd start to make an appreciable dent in the reduction of that lake over your life-time. (Sure, it might not look like much on the outside, but that's the junction where reality and metaphors break down).
+At the very least, set aside 10 minutes per day as a container (see previous chapter) for focused reading and learning. There is a lot to learn in programming and creating a habit of learning will help you keep up. Remember, though, to keep your learning contained in small chunks. A lot of information can overwhelm you into thinking that you can't possibly learn it all. You're right -- you can't learn it all in one sitting. If someone told you to drink one of the Great Lakes in one sitting you'd be hard pressed to complete the task (note: please don't attempt this!). If, however, you filled a glass of water several times a day from one of the Great Lakes and drank it (10 minutes at a time) you'd start to make an appreciable dent in the reduction of that lake over your life-time. (Sure, it might not look like much on the outside, but that's the junction where reality and metaphors break down).
 
 Each day you have an opportunity to learn more about the realm of computers and computer programming. Taking a small part of every day to learn a little bit more will help you on your journey.
 
 ## How to choose what to learn
 
-There are many opportunities to learn, whether it be via books, tutorials, videos, or computer-based training. There's also a myriad of different topics to learn. How do you decide which one is most important to learn? How do you manage what you're learning? How do you keep from getting overwhelmed with the options available?
+There are many opportunities to learn, whether it be via books, tutorials, videos, or computer-based training. There are also a myriad of different topics to learn. How do you decide which one is most important to learn? How do you manage what you're learning? How do you keep from getting overwhelmed with the options available?
 
-This gets us back to focusing on one thing at a time and understanding how you learn best. This feedback will help you decide what to learn next. One approach is to think about the things that you're most passionate about right now; what excites you at this moment. If there's something that you're eager to learn then start there. If you have multiple things that are exciting or interesting to you then write them down on a list and notice if you are more drawn to one of the topics than the others. If you're still having trouble deciding from this list then pick one at random (roll some dice or create a random-number generator to select one --- that could be a project).
+This brings us back to focusing on one thing at a time and understanding how you learn best. This feedback will help you decide what to learn next. One approach is to think about the things that you're most passionate about right now; what excites you at this moment? If there's something that you're eager to learn then start there. If you have multiple things that are exciting or interesting to you then write them down on a list and notice if you are more drawn to one of the topics than the others. If you're still having trouble deciding from this list then pick one at random (roll some dice or create a random-number generator to select one --- that could be a project).
 
 If you have trouble thinking of something to learn and are struggling to come up with one item that is exciting to you then give yourself permission to browse and find what is out there. Observe the conversations of other programmers and find out what they are discussing. Head to a programmer meeting to follow the discussions of what they're talking about. Or, if you're really stuck, browse some job listings to find out what employers are searching for and notice if that sparks some interest.
 
-This isn't about picking the most important thing or the most useful thing (though your current situation may add some urgency to certain topics over others) it is about figuring out what has your attention and where to place your focus. Don't be concerned with making the perfect choice that will get you your next job or bolster your career. This exercise is about making a choice to learn something interesting and sticking with it long enough to learn more about it.
+This isn't about picking the most useful thing or the most important thing, though your current situation may add some urgency to certain topics over others, it is about figuring out what has your attention and where to place your focus. Don't be concerned with making the perfect choice that will get you your next job or bolster your career. This exercise is about making a choice to learn something interesting and sticking with it long enough to learn more about it.
 
-Once you have chosen the topic you want to learn then it's time to focus on learning it. If you have a preferred methodology (books, videos, tutorials, classes, etc.) then spend some time (no more than an hour or so) researching what resources are available. Some topics have beginner-friendly resources available that list off things that the community believes are helpful for programmers just getting started. Others may require asking questions of the community about where to start. Often something as simple as a tutorial can be a good way to get started with this exercise.
+Once you have chosen what you want to learn then it's time to focus on learning it. If you have a preferred methodology (books, videos, tutorials, classes, etc.) then spend some time (no more than an hour or so) researching what resources are available. Some topics have beginner-friendly resources available that list things that the community believes are helpful for programmers just getting started, while others may require asking the community where to start. Often something as simple as a tutorial can be a good way to get started with this exercise.
 
 If you can find some resources in a short amount of time that's great! Start your learning process with those resources. Don't worry if they're the right resources or worry that they might lead you down the wrong path, just get started with them; you'll come back and evaluate them later. For now we're more interested in just getting started.
 
-One trap that I'm guilty of falling into is trying to find the best resources for learning a topic. I'll spend hours looking for the right book, the right videos, the right courses; whatever it is I want to find the best materials available. I want to reduce the amount of false-starts while learning a topic. This seems like a noble pursuit (after all, why wouldn't you want the best materials available?). It's also a trap and can lead you into spending more time thinking about how you're learning rather than actually learning. Worse, if the material starts to confuse you (which is highly likely when you are learning something new) you'll spend your learning-time wondering if you made the right decision picking this material. You'll wonder if you chose the right material and continue searching for the best material (perhaps those good and great reviews really didn't know what they were talking about after all?) This diminishes your ability to learn the topic because you're more focused on discerning the quality of instruction and not spending time on the actual instruction.
+One trap that I'm guilty of falling into is trying to find the best resources for learning a topic. I'll spend hours looking for the right book, the right videos, the right courses; whatever it is, I want to find the best materials available. I want to reduce the amount of false-starts while learning a topic. This seems like a noble pursuit (after all, why wouldn't you want the best materials available?). It's also a trap and can lead you into spending more time thinking about how you're learning rather than actually learning. Worse, if the material starts to confuse you (which is highly likely when you are learning something new) you'll spend your learning-time wondering if you made the right decision picking this material. You'll wonder if you chose the right material and continue searching for the best material (perhaps those good and great reviews really didn't know what they were talking about after all). This diminishes your ability to learn the topic because you're more focused on discerning the quality of instruction and not spending time on the actual instruction.
 
-After a few days of practice sessions give yourself the opportunity to check in and see how you're learning. Are you feeling engaged or are you not enjoying this? If you're not feeling engaged (the material is loosely organized, the instructor is confusing, the examples don't work, this material assumes you're already familiar with another topic, etc.) then give yourself permission to see if there is better material or a different topic that interests you more. Even if your learning-experience wasn't great you'll have a better idea of what to look for when choosing something new. You'll have a sense of where your gaps are in the topic and will have a better feel for what you're looking for in learning materials.
+After a few days of practice sessions give yourself the opportunity to check in and see how you're learning. Are you feeling engaged or are you not enjoying this? If you're not feeling engaged (the material is loosely organized, the instructor is confusing, the examples don't work, this material assumes you're already familiar with another topic, etc.) then give yourself permission to search for better material or a different topic that interests you more. Even if your learning-experience wasn't great you'll have a better idea of what to look for when choosing something new. You'll have a sense of where your gaps are in the topic and will have a better feel for what you're looking for in learning materials.
 
-If you're finding that the topic you're trying to learn is no longer interesting to you then give yourself some moments to reflect on why that is. Is it a difficult topic? Do you feel ready for the topic? Are you currently overwhelmed with other projects and are feeling tired when you approach this topic? Sometimes when we think we're ready to learn a topic we realize that there's something else we need to know before we can fully understand the topic. It's OK to find additional resources and focus on those before we tackle this topic. Just be aware of your struggles and your internal dialog. Be honest with yourself about why you want to move to something different. See yourself in the difficulty and notice if you're wanting to run because it is difficult or if you are truly unprepared for or uninterested in this topic. See if you can engage more with the difficulty and notice when you start to feel overwhelmed by it. Give yourself permission to stick with the difficulty as long as you can and notice your feelings and urges as you practice with it.
+If you're finding that the topic you're trying to learn is no longer interesting to you then give yourself a few moments to reflect on why that is. Is it a difficult topic? Do you feel ready for the topic? Are you currently overwhelmed with other projects and are feeling tired when you approach this topic? Sometimes we think we're ready to learn a topic, only to realize that there's something else we need to know before we can fully understand the topic. It's OK to find additional resources and focus on those before we tackle this topic. Just be aware of your struggles and your internal dialog. Be honest with yourself about why you want to move to something different. See yourself in the difficulty and notice if you're wanting to run because it is difficult or if you are truly unprepared for or uninterested in this topic. See if you can engage more with the difficulty and notice when you start to feel overwhelmed by it. Give yourself permission to stick with the difficulty as long as you can and notice your feelings and urges as you practice with it.
 
-Treat your learning as an iterative process, with regular check-in periods to note your progress. Think about how you feel when you're learning. Are you excited and engaged or do you feel tired and withdrawn? Do you procrastinate when you think about this topic? When you focus on your learning does your mind wander? Note these feelings as they occur during your focus sessions and reflect on them when you think about your overall learning process. Later you can reflect on those feelings and see the patterns in your learning process. If you feel tired while learning you may want to try adjusting when you do your learning session. You may need more sleep or need to find other materials that are more stimulating. If you feel overwhelmed perhaps you need to start with something more basic before tackling this difficult project. If you're confused perhaps there is someone of whom you can ask questions to gain clarity. These answers may not be apparent while you're in the moment (you may be too busy feeling frustrated to understand where that frustration is coming from) but with practice you'll be better equipped to notice your feelings. When you notice these feelings you can use them to learn how your mind works and understand what it needs in order to keep engaged with your learning.
+Treat your learning as an iterative process, with regular check-in periods to note your progress. Think about how you feel when you're learning. Are you excited and engaged or do you feel tired and withdrawn? Do you procrastinate when you think about this topic? When you focus on your learning does your mind wander? Note these feelings as they occur during your focus sessions and reflect on them when you think about your overall learning process. Later you can reflect on those feelings and see the patterns in your learning process. If you feel tired while learning you may want to try adjusting when you do your learning session. You may need more sleep or need to find other materials that are more stimulating. If you feel overwhelmed perhaps you need to start with something more basic before tackling this difficult project. If you're confused perhaps there is someone you can ask questions to gain clarity. These answers may not be apparent while you're in the moment (you may be too busy feeling frustrated to understand where that frustration is coming from), but with practice you'll be better equipped to notice your feelings. When you notice these feelings you can use them to learn how your mind works and understand what it needs in order to keep engaged with your learning.
 
 ## Resistance and The Container
 
 Any time we learn new things we put ourselves into a vulnerable and uncomfortable place. We take the things we are familiar with and try to apply them as we push into new territory. We become uncertain of the outcome; will it be successful or will it be a failure? Will this topic be too difficult for us to grasp? Will it help us or hurt us? Will we choose the wrong thing to learn and will that cost us opportunities in the long run? 
 
-Discomfort and uncertainty are certainly a part of learning, but rather than think of them as something to be avoided we should instead think of them as a beacon. A beacon gives us direction and illumination when we're in uncertain territory. When we feel uncertain about what we're doing that feeling means we're pushing into new territory. Instead of trying to avoid it or wishing for comfort, we can instead relish that we're in uncertain territory and feel those brief twinges of fear and doubt. We can say "I'm about to learn something new. I'm frightened, and don't know where this will lead, but that's OK. I'm willing to see where this goes and enjoy the journey."
+Discomfort and uncertainty are certainly a part of learning, but instead of thinking of them as something to be avoided we should instead think of them as beacons. A beacon gives us direction and illumination when we're in uncertain territory. When we feel uncertain about what we're doing that feeling means we're pushing into new territory. Instead of trying to avoid it or wishing for comfort, we can instead relish that we're in uncertain territory and feel those brief twinges of fear and doubt. We can say "I'm about to learn something new. I'm frightened, and don't know where this will lead, but that's OK. I'm willing to see where this goes and enjoy the journey."
 
-We've been conditioned over our human existence to think of the unknown as something to be feared. These emotions have served us well. They've kept us from venturing too far out of our comfort zone and exploring the unknown. When you're living in forests and caves the unknown can house all sorts of dangers. It makes sense not to provoke those dangers by showing up on their doorstep. But programming is not the same as venturing into a dark forest or peeking into a damp cave; programming hardly warrants the amount of fear we give it. Instead we need to realize that we're not in any mortal danger.  Our fears are merely letting us know that we're venturing into the uncharted territories of ignorance. It's up to us to let our fears know that this is OK and that by exploring these realms we will only find understanding.
+We've been conditioned to think of the unknown as something to be feared. These emotions have served us well. They've kept us from venturing too far out of our comfort zone and exploring the unknown. When you're living in forests and caves the unknown can house all sorts of dangers. It makes sense not to provoke those dangers by showing up on their doorstep. But programming is not the same as venturing into a dark forest or peeking into a damp cave; programming hardly warrants the amount of fear we give it. Instead we need to realize that we're not in any mortal danger.  Our fears are merely letting us know that we're venturing into the uncharted territories of ignorance. It's up to us to let our fears know that this is OK and that by exploring these realms we will only find understanding.
 
-Steven Pressfield in _The War of Art_ nicknamed these feelings "Resistance". He considers Resistance as a sort of mythological being who lives in each of us to thwart creative acts. As the work progresses Resistance ratchets up the pressure to stop by introducing the feelings of fear and anxiety that we mentioned above. I think of The Resistance as something that also happens whenever we are learning, especially if we're learning tools that help us in our creative pursuits. Pressfield limited his definition to creative folks who were working to complete creative work (books, paintings, games, etc.) but I'm expanding his definition to the learning process itself. In our case Resistance shows up when we're learning the tools to help us be more creative. Resistance is what tells us we're not good enough to learn these things, or we're unworthy of the benefits they'll bring us. It tries to keep us safe in what we already know.
+Steven Pressfield in _The War of Art_ nicknamed these feelings "Resistance". He considers Resistance as a sort of mythological being who lives in each of us to thwart creative acts. As the work progresses Resistance ratchets up the pressure to stop by introducing the feelings of fear and anxiety that we mentioned above. I think of Resistance as something that also happens whenever we are learning, especially if we're learning tools that help us in our creative pursuits. Pressfield limited his definition to creative folks who were working to complete creative work (books, paintings, games, etc.), but I'm expanding his definition to the learning process itself. In our case Resistance shows up when we're learning the tools to help us be more creative. Resistance is what tells us we're not good enough to learn these things, or we're unworthy of the benefits they'll bring us. It tries to keep us safe in what we already know.
 
-This is why the "focus container" that we mentioned before is so important: it gives us small doses of discomfort and difficulty in manageable chunks. We can guide ourselves through small amounts of daily discomfort and keep learning through our discomfort. It helps us work through our tendency to avoid and hide from difficult situations. If we focus on one thing at a time we can keep ourselves from the distracting thoughts about whether or not this is the thing we should be working on. Whatever we're working on in this moment is exactly what we should be working on. Whatever learning material is in front of us is what we should be learning. We can be secure in knowing that everything we are doing for the duration of this container is exactly as it should be. When we finish the container we can reassess how it went and what challenges lay ahead.
+This is why the "focus container" is so important: it gives us small doses of discomfort and difficulty in manageable chunks. We can guide ourselves through small amounts of daily discomfort and keep learning through our discomfort. It helps us work through our tendency to avoid and hide from difficult situations. If we focus on one thing at a time we can keep ourselves from the distracting thoughts about whether or not this is the thing we should be working on. Whatever we're working on in this moment is exactly what we should be working on. Whatever learning material is in front of us is what we should be learning. We can be secure in knowing that everything we are doing for the duration of this container is exactly as it should be. When we finish the container we can reassess how it went and what challenges lay ahead.
 
 ## Mapping out longer-term goals
 
+### FIXME
+
 As you progress with learning you'll start to see that a lot of what we call programming is interconnected. Languages borrow heavily from each other and ideas that seem new and innovative have their roots in concepts dating back to the genesis of computing. Rather than dissuade us it should encourage us. We can open the doors of programming by learning simple, transferable concepts. The question is, which ones?
 
 The simplest answer is "all of them", but that's hardly satisfactory or possible. A less cheeky answer would be "enough of them to start seeing the patterns emerge" but that sounds more like a truism than something we can use to start making our longer term goals for learning.
@@ -74,6 +76,18 @@ The approach I'm outlining is designed to help you learn how to learn. The best
 
 Longer-term goals are just goals that have been broken down into shorter-term goals. Focus on the short-term goals and allow yourself to course-correct as needed (and follow a few connections as you desire.)
 
+## Failure and learning
+
+One thing that we are afraid of while learning is failure. We worry that we won't learn the topic quickly or completely. We pick up material that starts off simply but later on becomes very complex, and we struggle to keep up. We try examples and find ourselves needing help in order to complete them. We fail to grasp the material and wonder if we'll ever learn what we're trying to learn.
+
+Failure is a part of learning. If you knew the material you wouldn't be learning.
+
+One of the reasons for practicing learning using containers is because we give ourselves those brief moments of failure and repetition. Repetition is how you get better at whatever you're learning. Failure allows you to course-correct your learning so you can determine how best to approach this the next time you make an attempt.
+
+We often feel that failure is something to be avoided, but while we're learning it is unavoidable. Our learning process requires us to fail in order to get better at what we're learning. That's the whole point of learning: reworking your brain so that it can finally understand the concepts you're trying to learn.
+
+Part of learning is having the right mindset for learning. Instead of feeling like you're constantly failing and struggling to keep up you may want to approach it with a different perspective. Instead of "I can't do this. It's too hard." approach it with a more curious "This is all new to me. This is why I'm practicing learning this." Giving yourself a more positive mindset will help keep you from giving up when you struggle with the material.
+
 ## Dead ends and changing topography
 
 Sometimes we'll find ourselves learning something that's a dead end. We look at our progress and see no real improvement. We don't find the topic as engaging or as exciting as we'd imagined. We realize that what we're learning is an evolutionary dead-end in the realm of programming. What then?