Learning Algorithms

Reading Technical Books (From Reddit)

I have dual screens set up (laptop/desktop), one for searching and one for coding.

Read a section of the book.

The most important part is actually coding the examples in the book. This goes a long way for me to actually memorize the concepts being taught, rather than just reading about it.

I mess around with code snippets from the book a lot. I ask myself "what would happen if.." and then code it. If I get an error, I ask myself why. If it works, I ask myself why.

Try to get through every exercise. If its a good book, they are there for a good reason (such as purposely making you encounter an issue with a topic you just learned, which will lead into the next section on how to resolve it).

Also, if you get stuck on an exercise, take out a paper and pencil and write the problem out. This habit can significantly shorten the time you spend on errors when the real issues come. It is the first thing I learned in my first programming class.

A programmer reading a technical book without coding is like a mechanic reading the car manual and never actually touching the car.


Really depends on the nature of the book in question and what you actually want to get out of it. But in general; Notes

Here's a simple process:

I'll use this free book on Operating Systems as an example.

Get some coffee, put on your reading pants, sit down and open the book.

Sip some coffee

Look at the table of contents. Look at each of those main sections, in this book Virtualization, concurrency and persistence. Just think to yourself for a second what those three things are

You done? Sip some more coffee. Now in your head you should have some vague idea about what those three main parts of the book deal with. Doesn't matter how right or wrong your idea is, the key part is that you have an idea.

Now look at the chapters in the book. The virtualization part has Processes, Process API, Direct execution, CPU scheduling, multi-level feedback, lottery scheduling and multi cpu scheduling.

Again as you did with those major parts, think about what these smaller things are. Preferably write them down. What is a process? What is a process API? What's CPU scheduling? Just write out what you think. Again it doesn't really matter how wrong or right you are, though you should still aim to be right.

Now take a chapter and start reading. Don't bother with notes, don't think too much, just read the whole chapter through.

Now when you're done, go back to the beginning and start again, this time make notes. When you come to a part that you think is important, write it down with your own words. Don't just copy it, write it down with your own words. These notes shouldn't be long, you're not trying to copy everything, just grab small important bits, or condense the information down and write it down.

After you're done, use those notes to write a short summary of the entire chapter. Again, keyword is short. You want something that's easy to digest and read

Rinse and repeat for every single chapter.

For added benefit: Teach a rubber duck. Anything really works but rubber ducks are kinda awesome. Sit down with your duck and teach the book to the duck only using your notes, and try to use the notes as little as possible.

At this point you'll probably notice that the coffee is cold and you only had few sips of it. Go get some more.

The idea is to get you to use your head while you read. When you read a boring technical book you usually don't even process what you read, you just consume it and it gets lost in your head, because let's face it; it's probably dull. Here you first figure out what you know by trying to guess what the chapter holds, this also helps to prime you up. This is what you know and you can then easily contrast it against the information in the book. By writing down notes with your own words and writing your own summaries, forces you to process the information on a whole different level than you would by just reading. And finally trying to teach the material to someone helps you even further to understand it


Learning Algorithms

  1. www.learncpp.com (Frankly, the best place to learn imho)These should be enough for learning C++

I would suggest to go through these data structures.

  • Linked lists
  • Stacks
  • Queues
  • Trees
  • Graphs
  • Heaps
  • Hash tables