As we learn to code, we have probably all experienced the frustration of stumbling over the basics and feeling like we will never get to the more advanced material because we keep forgetting the simplest things. How do we remember that HTML command or learn that CSS protocol to make the magic happen on the page a little faster? How do we, like the pros, keep the basics in the forefront of our minds where we need them so we can become pros, too?
I don’t know about you, fellow classmates, but when I signed up for Writing on the Web, I didn’t read the course description. It simply sounded like a good class to take to be better prepared for the multi-modal-ness that has infused the writing profession.
From the name of the class, I thought we would be learning some design principles concerning texts or visuals that make for interesting websites; you know, as in, Writing FOR the Web. I assumed we would be working with template applications like Word Press, Jigsy, or Weebly. With these apps, we only have to learn how to use a limited set of functions already thought out and laid out for us.
Despite the ease of these and other Web 2.0 features, the learning curve is high for me because I don’t know much about computers or using these programs. Coupled with assignment deadlines and never having enough time in the day to explore and experiment at my leisure, thoughts of the above ventures onto the Web were intimidating enough.
After the first class and a good look at the syllabus, I realized I should have been thinking about the class along the lines of Writing THE Web. We are going into the Web, Dr. Martin informed us, not just onto it! As it sank in that we would be learning to write computer code so we could build our own websites (:-0), truly, I was downright nervous.
As the weeks have progressed in class, though, my interest and fascination for programming languages has become stronger than my intimidation: I want to go into the Web instead of just onto it; I want to thoroughly learn this skill; I want to be able to code my own work. And the faster, the better. But how to do that when there is so little time and so much to know?
How the Pros Do(n’t) It
I chose this topic as one of my three blog articles so I could answer these questions. Because I knew I would have to do tons of research for these articles, I thought it would be a great way to inform and to help us as a class with any “noob” frustrations that were sure to reveal themselves as the class and the code progressed. I couldn’t think of a better way to find the time to study how veteran coders learn and retain all they know than to think of it as a requirement for class.
However, I was not expecting what I have learned about the subject: How the pros memorize code is, mostly, they don’t! Many experienced programmers swear it is not necessary to memorize commands because the more we use them, the more embedded in our long-term memory they will become. Few, if any, of us will ever be able to memorize all the commands associated with a program; even coders of many years still use “cheat sheets.”
The majority claim “. . . [i]t is more important to know how to look it up rather than to know the information itself.” (programmers.stackexchange) They point out that as long as there is a solution to a problem encountered (sometimes there isn’t!) and an accurate programmer resource like Mozilla Developer Network (MDN) or w3schools is referenced, that is enough. In other words, they preach what our parents always preached when they wanted to annoy us: “Look it up!”
They blow off the extra time spent and the ribbing we will surely take when other programmers see us using a ref manual every step of the way. Do it anyway, they say, and be grateful that reference manuals are there to guide us. It is far more productive to understand the concepts behind the function rather than to recall the function itself. If we understand why an attribute, a tag, or a selector is used, knowing what to do to create it will come more intuitively, the experts assure. (blog.treehouse)
Programmers advise against rote memorization for exactly that reason—our goal should be to hone our intuition skills, not memorization skills. Tom, a developer commenting on an article about the subject of code memorization apps at smashingmagazine.com, says, “That’s not a learning program, but a way to memorize facts.” [Emphasis added.]
Another reason this is a best practice is because the programming languages change so rapidly. Again, understanding the underlying connections between computers and programming will always serve us better than knowing many commands in just one or two languages. As we strive to fully understand the concepts of developing, we will save ourselves a lot of new “basics” learning when Ruby goes off her Rails and onto something else. When she does, or when we get those fabulous tech jobs where Python or PHP is used, knowing the principles that all languages share will allow us to apply them regardless of the fact that we may not yet know the syntax or specifics of these languages. (This is also when we will be very thankful for the ingrained habit of reaching for our handy-dandy, accurate, reference manuals!)
Programmers think that memorization might have a limited usefulness, but warn that it makes us lazy and being lazy about really learning or collaborating on new methods poses the risk of us getting stuck in a familiar rut, a comfort zone that lacks creativity or curiosity. It is constantly exposing ourselves to new techniques and then patiently, but consistently, practicing and applying them that pays dividends.
We should be creating something all the time, whether it is a mistake-ridden first attempt at a new trick or a masterpiece of perfection, it makes no difference. Just keep coding because that is the only way. We will notice that our code consequently gets better as we gain more knowledge and hands-on experience.
Getting heavily involved in open source projects and sharing our own creations with others to receive feedback are also critically important ways to properly and truly learn code and understand the deeper complexities of computer science and programming.
But, If You Insist . . .
Programmers have better strategies than memorization for keeping up with code they want to refer to in the future. An expert in her own right, our very own Professor Martin has revealed in class that she practices the following and has strongly advised that we should consider doing so, too. Other seasoned programmers offer the same advice.
Keeping a code journal in an editor like Gistbox, “the beautiful way to organize code snippets,” to copy and paste code for future reference and practice is an invaluable learning tool.
Evernote invites us to use their “workspace for your life’s work.” Do any of us feel like the code we are working so hard to learn is not our life’s work? Using this or a similar app to record detailed notes while learning is another way to regularly study and review code and methods with which we are trying to get familiar.
Much can be learned from looking at the source elements in websites we like to find out how the programmer turned a cool trick we would like to imitate—write it down or copy and paste into a note-taking editor and then go practice it!
Just as valuable as studying on our own, open source spaces like CodePen—they bill themselves as “the developer’s playground,” who can resist?—will get us in the know faster and give us experience working with other programmers. CodePen is also an excellent resource for learning by studying what others are doing and how they are doing it.
The best way to learn something is to repeat it and apply it over and over as quickly after being exposed to it as possible. The more hands-on we are with it and the more we apply the item or information we want to retain in context, and especially, the more we collaborate as we learn, the faster and easier it will happen.
That is not to say that learning, or even memorizing, code is easy, especially when new to a language or trying to learn a few languages at a time. But with practice, patience, and a little self-forgiveness, we will be able to recall the proper command when we need it. If not, we can always do what the pros do and look it up.