Saturday, May 28, 2016

A Super Learning Method for Computer Science

“The reasonable man adapts himself to the world. The unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.” -George Bernard Shaw

Tomorrow I take the first steps on my journey to achieve my Dream to learn Computer Science. Unfortunately, while I've answered the why, what, when, where, and who of my dream, I'm afraid I haven't provided any reasons to support the assertion that I would know how to learn something so different from what I've tackled before. This, ladies and gentlemen, brings me to my true competitive advantage: exploiting learning methods that utilize deliberate practice (pdf download of Ericsson study), in order to carve out a shortcut towards the 10,000 hours of expertise using quality minutes.

Look at me, spilling my secrets to the world. Am I crazy? Besides, entire careers, books, and blogs have been devoted to the subject of learning. But my intention here isn’t to conduct research; it's to provoke enough thought that we can put a few methods into practice quickly and tweak them along the way. Anyone can use these methods and yet hardly anyone does, be it due to ignorance or stubbornness. If that’s the case, you can do it! Don’t feel intimidated! :D This post will synthesize my past experience and writings (as I often use my blog to do) into a Super Learning Method.

In college, I had my study method down pat. I would take extensive notes on my laptop during class and re-write them afterwards until I more or less understood the lecture. As it got closer to tests and papers, I would go back and digitally highlight the hell out of those notes (blue for terms, green for people, grey for dates, etc.), and sometimes even make study sheets from the highlighted information. Weekday work involved assignments done in order of due-date, and weekend work was catch-up and required the occasional all-nighter. It was rough and stressful, but it worked and got me all As except for 2 Bs. The key was simply taking tons of notes; I earned a few bucks through the school by passing them onto other students, and to this day I have two thick binders that would give someone most of a college education. If I used my college study method, I could probably pass the certifications, pass the pre-reqs, and get a Master’s degree. But in the end, all I’ve done is inefficiently rote-memorize for ineffective short-term performance. My dream is a challenge - to exit the other end of the tunnel with viable skills, a deep understanding of the material, and an ability to recall necessary information on cue. In a word, I wanna learn.

After graduating, I turned my sights on learning Japanese. Taking a bunch of notes in classes and from textbooks to pass tests like the JLPT wasn’t going to help me live in Japan and speak to real people. That’s when I found the website that would change my life: All Japanese All The Time (AJATT). Khatzumoto opened my eyes to live not by grit-your-teeth discipline, but by can’t-get-enough fun. It cannot be understated what a profound shift this was for me - life was something to be enjoyed and learning can be prioritized on that scale. I began embracing a Japanese environment of watching movies, hanging with Japanese friends, and reading manga. In order to improve my language skills I collected interesting sentences to remember that were just beyond my competence level, enough to improve without making it intimidating. Khatz even gave us a sentence goal: 10,000 sentences to fluency, mirroring the 10,000 hours to expertise.

You’ve been studying out of boring textbooks for years now,
give yourself a break and learn something. -Syk3

The problem was how to remember all of these sentences. This is how I came to use one of the greatest educational tools of the last century, one that very few people actually know about or use today. That tool? The Spaced Repetition System (SRS), best known (if known at all) from a computer program called Anki. An SRS is a virtual flashcard program, which not only allows you to create cards very quickly but will keep track of your self-ratings when you review them: “Again," “Hard," "Good,” and “Easy." The program utilizes an algorithm that adapts to your memory based on psychological data on the "spacing effect” and the "forgetting curve." For example, if you see the front of the card (for Japanese, the natural sentence) and instantly remember the back (the meaning of the sentence), then you would rate it as “Easy” and the program will show it later and later in your reviews because you already know the fact; on the other hand, if you didn’t get it right and rate it “Again,” then the card will be shown over and over until you have no choice but to remember. The optimal time to review a fact is right before your forget it, which will extend your memory even after reviewing only a handful of times. I used Anki religiously when learning Japanese and reached 8406 cards with different real-world sentences at a pace of around 20 sentences a day. I also combined SRS with mnemonics to great effect in learning over 2,000 kanji in 5 months.

When preparing for the GRE Psychology subject test, I had the opportunity of upgrading my school-based note method by combining it with fun and an SRS. I started with a psychology textbook that I read in order of most interesting chapters first, and focused on taking notes on things that I really wanted to learn, then I formulated the notes into question-answer, fill-in-the-blank (aka cloze deletion), or if-then flashcards. I also picked up some great tips from What Smart Students Know, which I read ironically after ending my career as a student. Rather than type up binders of notes, I burned the information deeper into my brain by hand-writing notes into a composition notebook. After writing the subject or chapter at the top of the page, I’d use a single sheet to capture all related notes, formulated in my own short-hand of lists, arrows, faces, diagrams, graphs, circles, stick figures - anything to link ideas together that follow my quirky thinking process. This was learning-based note taking, not study-based. I included page numbers for reference and wrote questions as they came to mind. Along the way I'd pick out viable SRS facts and review the cards in my deck.

The last resources that I'll share are two books that I've read since my last learning goal: The 80/20 Principle (aka Pareto Principle) and Surely You're Joking, Mr. Feynman! The former book illustrates the idea that 80% of the effects come from 20% of the causes; for example, 80% of a country's wealth is owned by 20% of the population, 80% of what you achieve in your work comes from 20% of the time spent, and 80% of what you learn comes from 20% of your study material. If you do an analysis and see a 20% that’s working well, you want to seize, magnify, and exploit it even if you don’t know exactly why it’s working. The latter book describes the antics of world-renown physicist Richard Feynman. Feynman describes his method of learning through teaching, and gives an example of when he had mathematicians explain their theorems to him by breaking them down to their basic building blocks, such that he could come to the same conclusions they had.

So how can we bring deliberate practice, fun, an SRS, mnemonics, learning-based note-taking, the 80-20 rule, and the Feynman method together in order to learn Computer Science? I’ll explain my Super Learning Method rules in 3 steps.

Step 1: Understand (simplify)
-Experiment with a variety of materials (i.e. textbook chapters, coding websites, coding games) in your sustained programming environment until you find something interesting that you want to learn.
-Choose a new concept/idea to learn that's exciting and would increase your knowledge a mere x+1 (rather than x+15).
-To reiterate, don't try to memorize everything you see on the first go around - if it doesn't make sense now, come back to it once it proves its importance.
-If necessary, look up the concept to obtain more information on it, unless it requires too much research in which case scrap it.
-Brainstorm the concept using a whiteboard or scrap paper, if available.
-Come up with specific analogies, examples, and self-formulated questions.
-If there's something you don’t understand about the concept, refer to the source material and outside resources until it makes sense.
-Talk to mentors or friends in the field who can assist in comprehending the concept.
-When you’re comfortable enough to teach a layman, write your short-hand notes in a composition notebook in ways that link ideas together.
-Think of how you can use this concept in a current or future project.
-Phrase your notes (including analogies, examples, and use cases) into facts in Evernote to be applied and/or memorized.

Step 2: Apply (projects)
-Always be working on or preparing for a fun coding project.
-Expose yourself to group coding challenges to work together or compete on a project.
-Set a timer to record how many minutes of concentration each project took, and estimate before beginning how long it will take to complete.
-Consider which understood concepts/ideas can be applied in the current project.
-Mine for new concepts/ideas that would be useful to learn for this project.
-If the project becomes boring, then make it fun or stop in the middle and start a new project.
-After each project, ask yourself, did I have fun? Did I estimate the required time accurately? Did I choose the right tech or language? Could I have made it simpler?
-Conduct an 80-20 analysis of the project (i.e. Which 20% of the project required 80% of the total time? Which 20% of the code brought on 80% of the bugs?)
-If you come across a cool program, read the code and look at the algorithms, hacks, architectural decisions, etc. in order to verbalize, what’s great about this code?
-During practice exams, check the answer key after each question in order to shorten the learning feedback loop.
-Phrase the examples that you applied into facts in Evernote to be memorized.

Step 3: Memorize (SRS/Anki)
-Create a coding deck, a math deck, and an IT deck in Anki and tag by language and source whenever possible.
-Use Evernote to organize a list of facts you really want to memorize.
-Come up with specific times in your schedule when you can create cards.
-Come up with places to review cards throughout the day (i.e. waiting in line, bathroom, lunch break) as well as how long to Timebox each review (i.e. 5 mins., 3 mins., 2 mins.).
-Create cards in your decks from facts that will keep you coming back to review (consider aiming for a certain number of cards to create daily).
-Aim to create cards that are as easy as possible to get right without being boring.
-Create cards from examples that you learned in context, or come up with your own fun mnemonic (the more personal and emotional, the more likely you'll remember).
-With long sequences, split cards up (ABCD, BCDE, CDEF, etc. until you get to Z).
-If preparing for an exam, create cards as closely as possible to the exam question/answer format.
-While reviewing if a card or series of cards is boring or too difficult, delete them without thinking twice.
-Below are ideas from the Janki SRS method:
--Create cards if the fact is (a) general computer science wisdom, (b) related to major tech (due to the fast pace of minor tech), (c) expected to be used everyday or in the near future.
--Create cards from mistakes or bugs (especially classes of bugs).
--Suspend card reviews for minor tech until needed (by using drill functionality in Anki).
--Experiment with creating cards using code screenshots, images, or cloze deletion rather than plain text.
--Optimize the card question to get your brain to light up immediately, and keep the card answer short to ensure that your brain works the same way at each review.
--After repeated review failures, try applying the code at least twice to increase contextual learning.
-Below are examples from Derek Sivers:

Example 1:
Fact: “The add (+) operator... if only one operand is a string, the other operand is converted to a string and the result is the concatenation of the two strings.”

Front:
var a = 5 + '5';
// what is a?

Back:
'55'
If either side of + is a string, the other is
converted to a string before adding like strings.

Example 2:
Fact: “If the new Array constructor is passed a single number, it creates an empty Array with a length of that number. Any other combination of arguments creates an Array of those arguments.”

Front:
var a = new Array('5');
// what is a?

Back:
An array with one item, the string '5': ['5'];

Hopefully I’ve illustrated why I’m confident not just in learning computer science, but in finding fun and interesting ways of learning just about anything. Let me know if you have any other learning methods to suggest when it comes to picking up code. Tomorrow I’ll begin my journey, and will keep you all posted with progress updates, changes to my plan, and cool things I figure out along the way. Thanks for reading!

No comments:

Post a Comment