Head First Design Patterns


‘Head first’ series is designed for intuition. This one is especially useful in that it tries to pick the most frequently used patterns, and explain those in a fun way.

Not only that, it also emphasizes on the principles of object-oriented code, namely:

  • Encapsulate what varies
  • Favor composition over inheritance
  • Program to interface, not implementation
  • Strive for loosely coupled modules
Share Comments

Design Patterns: Elements of Reusable Object Oriented Software


‘Design Patterns’ is a classic that still manages to be super practical even for today. The book abstracts out the reusable patterns from proven large code project organizations.

And these patterns are described to be easily portable and adaptive to various scenarios as fit.

Class Patterns vs. Object Patterns

One thing I noticed is that the authors are fully aware of the contrast between object-based and class-based code programming models. This opened my eyes a lot, as I always thought object-based OOP is relatively new, at lease as new as the new developments of the Javascript language. However it turns out to be a super old idea. Maybe as old as the time that C++ is invented.

This further explained that at lease a huge group of hackers intentionally chose the class-based model.

Creational, Structural, and Behavioral Patterns

Patterns are classfield in the three general categories.

Creational patterns are super important in object patterns, as composition is dominating inheritance.

Structural patterns are useful as codebase scales to involve a huge number of correlating structures, and we need consistent principles to navigate around.

Behavioral patterns are designed for adjusting and implementing functonalities attached to structural components.

Share Comments

Zero to One - Peter Thiel


This book describes the ideology behind Silicon Valley start-ups, more generally, what makes a fresh hi-tech company really valuable.

Business growth

Before doing that, there’s clear contrast about how business growth happens:

  • ‘zero to one’, or ‘technology innovation’, this means creating new technology several times better than status quo.
  • ‘one to many’, or ‘globalization’, which means proliferation of technology

‘All happy companies are different.’

The most memorable part is the discussion about monopoly, however it’s not the every day monopoly we know about control of resources. For a tech company, achieving monopoly is equal to creating a product/service so good that it owns the entire market.

In the dynamic world we live, this can be achieved by both approaches above. However much it’s much more doable from zero to one.

Share Comments

Anki Essentials: the Complete Guide to Remembering Anything with Anki

Original: Anki Essentials


‘Anki’ is, so far, my favorite app for spaced-repetition memorization. I’ve used it for 3 years straight, almost every single day, both on laptop and my purchased iPhone app. It’s the best time investment I’ve made in my knowledge life. Wondered a million times before: what if I had it in college, life would be insanely easy…. ;)
Although a big fan, there are many corners of the software I still don’t know about, and ‘Anki Essentials’ came to rescue.

User guide rather than App documentation

This 120 pages long pdf is by far the best comprehensive user guide I’ve found for Anki. We sure get a decent document for the app itself, well maintained here. However it doesn’t serve the purpose for explaining the power of Anki to a beginner. And I think this is where the best value comes. As a frequent user, I also find various tips about making Notes and Cards; as well as various ideas about getting Anki study sessions more effective.

Background and ‘the 20 rules’

A lot of pitfalls for using flash cards boil down to poorly made notes. As for me, the biggest take-home points are:

  • Customize the notes at the sweet spot, Anki decks are extensions of building personal knowledge.
  • Follow the best practices in authoring flash cards, best resource on Internet is ‘the 20 rules’ developed in the 90s.


Currently experimenting with image cloze deletion notes making. Hopefully this will help in understanding design patterns and learning patter diagrams.

Share Comments

Structure and Interpretation of Computer Programs (SICP) - Ableson & Sussman


SICP is a must-read on computation theory. I encountered this book 2 years ago, not really knowing much about the evolution of computer languages, hardward architecture, or anything in between. Back then, I took it up, read a few pages, and threw it away, thought it’s totally worthless for a developer career.

The longer I’ve been a developer, the more I understand: real growth comes from the deepened understanding of fundamentals. Master hackers can as productive as they can handle the depth of the knowledge. Over tiem, the experience and theories boil down to craftsmanship.

This book allows me to gain a huge leap into that.

What I learned

  • Functional method of computation, stateless
  • Substitution model for evalutaing expressions, relationship between computer time and assignment
  • Environment model for interpreter working mechanism
  • Stream method to model concurrency


  • Programming with macros (metaprogramming)
Share Comments

Hackers and Painters - Paul Graham


As the preface of the book says, ‘This book is an attempt to explain to the world at large what goes on in the world of computers.’ Hackers and Painters really tries to answer a lot of non-technical questions in a technical way.

Hackers are Makers

  • Hackers are not cold and precise, they are messy. Hackers need taste.
  • The ‘computer science’ terminology is mostly a hodge-podge.

Measurement and Leverage

  • Measurement is needed for transforming work into impact
  • Technology is leverage

The Hundred Year Language

  • Modern languages are adopting more and more layers of in-directions
  • Newer languages will be easier for human to reason about
  • More of future CPU cycles are going to be used for building abstractions
Share Comments

Clean Code - Robert C. Martin

God is in the details. - Architect Ludwig mies van der Rohe.


Martin is mostly known for Agile development, as he is one of the major contributor of the Agile manifesto. However ‘Clean Code’ is, in my opinion, his best work. Because he clearly explained that clean code means to craftsmanship and professionalism.

Code is People first

Many works have defined code as the ‘media of communication’ between IT systems and people. And it’s meant equally for people and machines, if not more for people. Because the only code that survives would be those utilized and understood by human. Extending that, for something to be understandable, it must be ‘clean’. One of my favorite quote in the book: “Clean code is more of a story to be told to people, than instructions for machines”.

Clean Code is Craftsmanship

Clean code is also crucial for professional survival, as the authors pointed out. Software systems constructed are living entities, and constantly evolve. The only possible way for a system to evolve is to keep the code ‘clean’, so both seasoned developers and novices can work on it.

Share Comments

Programming in Standard ML - Robert Harper


Following lecture notes of Carnegie Mellon University’s class notes on ‘Principles of Programming’, I came to know about ML through this book. The book is intended to be a beginner’s tutorial, and ate the same time, a small handbook for implementation.

Being a mostly ‘academic’ language, standard ML has not been popular outside colleges. However, SML possesses a great benefit – convenience to teach about mathematically proof of program correctness. Most programs in ML comes in the form of induction-generated proofs.

ML also cleans up all loopholes of mutability and cleanly hides all form of lower-level machine operations. The result is a ‘pure’ functional language, bursting with atomicity (parallel safety) and very convenient strict typing.


This book might not be useful in a practical job and generate impact in product. However it works for deepening the understanding of various computation concepts. In time, this makes one a better developer.

Share Comments

The Little Schemer - Daniel P. Friedman & Matthias Felleisen


Aiming at changing my perspectives about programming, I decided to start learning Lisp, the very first functional language. ‘The Little Schemer’, all references I’ve found highly suggested this as the starter book. And this is great for learning the functional way of thinking about computing.

What’s Good

Very delightful and light-weighted, in both the writing style and the length of the book. The entire book is organized as dialogues. With authors motivating active thinking in every single step, the very complicated ideas are unveiled. To my opinion this is the most effective way of learning, as it gives readers the illusion of inventing Lisp themselves. This work is also extremely short 200 pages, considering Lisp/Scheme is such a vast language. Authors managed to deliver the power fundamentals of s-expressions and lists.

The Five Rules

  • The primitive car is defined only for non-empty lists.
  • The primitive cdr is defined only for non- empty lists. The cdr of any non-empty list is always another list.
  • The primitive cons takes two arguments. The second argument to cons must be a list. The result is a list.
  • The primitive null? is defined only for lists.
  • The primitive eq’l takes two arguments. Each must be a non-numeric atom.

Follow-up Thoughts

Though Lisp is currently very much a research language, and of little production use. The real value it provides is a way of thinking about computing. And the recursive nature of s-exp is the very best descriptor of recursive data structure and algorithms.

The beauty of Lisp is that it can be entirely derived from a tiny, compact core of a short list of axioms:

Share Comments

‘Be so good they can’t ignore you’ - Steve Martin

Craftsman mindset: Stop worrying about what your job offers you, and instead worry about what you’re offering the world.

The Passion Hypothesis

To simplify things, I’ll use the “passion hypothesis” to refer to the popular belief that the way to end up loving your career is to first figure out what you’re passionate about, and then pursue it (a strategy often summarized with the pithy phrase, “follow your passion.”) The more I studied this hypothesis, the more I noticed its danger. This idea convinces people that there’s a magic “right” job waiting for them, and that if they find it, they’ll immediately recognize that this is the work they were meant to do. The problem, of course, is when they fail to find this certainty, bad things follow, such as chronic job-hopping and crippling self-doubt.

But without the passion hypothesis to guide us, what should we do instead? How do people really end up loving what they do? To answer this question we need to turn our attention to an unexpected career adviser.

Becoming a Craftsman

In a 2007 episode of the Charlie Rose show, Rose was interviewing the actor and comedian Steve Martin about his memoir Born Standing Up. They talked about the realities of Martin’s rise. In the last five minutes of the interview, Rose asks Martin his advice for aspiring performers.

“Nobody ever takes note of [my advice], because it’s not the answer they wanted to hear,” Martin said. “What they want to hear is ‘Here’s how you get an agent, here’s how you write a script,’ . . . but I always say, ‘Be so good they can’t ignore you.’ “

In response to Rose’s trademark ambiguous grunt, Martin defended his advice: “If somebody’s thinking, ‘How can I be really good?’ people are going to come to you.”

If you’re not focusing on becoming so good they can’t ignore you, you’re going to be left behind. This clarity is refreshing. It tells you to stop worrying about what your job offers you, and instead worry about what you’re offering the world. This mindset–which I call the craftsman mindset-allows you to sidestep the anxious questions generated by the passion hypothesis—“Who am I?”, “What do I truly love?”—and instead put your head down and focus on becoming valuable.

Martin’s advice, however, offers more than just a strategy for avoiding job uncertainty. The more I studied it, the more convinced I became that it’s a powerful tactic for building a working life that you eventually grow to love. As I’ll explain below, regardless of how you feel about your job right now, adopting the craftsman mindset can be the foundation on which you build a compelling career.

Career Capital Theory

Research shows that the traits that lead people to love their work are general, and can be found in many different career paths. They include things like autonomy, a sense of impact and mastery, creativity, and respect and recognition for your abilities. Once you recognize that these traits have little to do with following a pre-existing passion, and can be cultivated in many different fields, you can safely abandon the myth that there’s a single right job waiting out there for you.

Of course, this still leaves open the question of how you gain these factors in your working life. One of the first things I noticed when I began to study this question is that these traits are rare. Most jobs, for example, don’t offer their employees great autonomy and the ability to make a big impact. If you’re a recent college graduate in an entry-level job, you’re much more likely to hear “go change the water cooler” than you are “go change the world.”

By definition, we also know that these traits are valuable—as they’re the key to making a job great. But now we’re moving into well-trod territory. Basic economic theory tells us that if you want something that’s both rare and valuable, you need something rare and valuable to offer in return—this is Supply and Demand 101.

When you hear the stories of people who ended up loving what they do, this same pattern comes up again and again. They start by painstakingly developing rare and valuable skills—which we can call career capital. They then leverage this capital to gain rare and valuable traits in their career. These traits lead to a feeling of passion about their working life. If career capital is the key to developing passion, then this explains the importance of Steve Martin’s craftsman mindset. By focusing on becoming so good they can’t ignore you, you’re maximizing the rate at which you acquire the capital you need to take control of your livelihood.

Passion 2.0

“Follow your passion” is an appealing idea because it’s simple and immediate. If you can figure out what you’re meant to do, it promises, a deep love for your career is just around the corner. The reality I’m proposing is less glamorous. It argues that passion takes time and hard work—harder work than most people naturally invest in their jobs. It’s also less certain in the sense that you cannot predict in advance the details of the compelling career you’re cultivating. But it compensates with clarity.

Stop worrying about what the world owes you, it says, and instead, put your head down, like Steve Martin developing his act, and strive to become so good you can’t be ignored. It’s this straightforward goal—not some fairy tale about dropping everything to pursue a dream job—that will lead you toward a working life you love.

Original article: http://lifehacker.com/5947649/steve-martins-advice-for-building-a-career-you-love

Share Comments