Dec. 20, 2015
Start to read the book "Head first design pattern" - 600 pages book. Plan to spend 10 hours to read the book first.
Head first series books are my favorite ones. This time, I will document how I learn, what my favorite parts through the book. Encourage myself reading more of this book, I like to enforce myself to read first 200 pages first.
Dec. 20, 2 hours
Read page 1 - Page 38, reviewed strategy pattern, example:
client:
duck
Encapsulated fly behavior
FlyBehavior Interface -> 1. FlyWithWings class 2. FlyNoWay class
Encapsulated quack behavior
QuackBehavior -> 1. Quack class 2. Squeak class 3. MuteQuack class
Duck has-a feature, not is-a since HAS-A can be better than IS-A
Design Principle: Favor composition over inheritance
So, Duck client class is designed:
Duck
---------
FlyBehavior flyBehavior
QuackBehavior quackBehavior
--
setFlyBehavior()
setQuackBehavior()
Dec. 27, 2015
Spent 2 hours to read the book, went through the 300 pages quickly.
Motivation to read more pages of the book (Dec. 28, 2015):
1. The book is well written, Julia, you will not forget the examples in each pattern.
2. The reading takes your some time, but later, when you develop the software, you will save the time.
3. Just relax, and have some reading, you will not get lost, cannot understand, or get bored easily, the learning is fun.
4. If you cannot understand the book, then, you will have a lot of trouble down the road. OO design is a must skill to have your career as a programmer.
5. Find some videos - courses in pluralsight, watch first, and then, get other people's help first; come back to read the book slowly.
https://www.youtube.com/watch?v=acjvKJiOvXw&feature=share&fb_ref=share
From January 2015, she started to practice leetcode questions; she trains herself to stay focus, develops "muscle" memory when she practices those questions one by one. 2015年初, Julia开始参与做Leetcode, 开通自己第一个博客. 刷Leet code的题目, 她看了很多的代码, 每个人那学一点, 也开通Github, 发表自己的代码, 尝试写自己的一些体会. She learns from her favorite sports – tennis, 10,000 serves practice builds up good memory for a great serve. Just keep going. Hard work beats talent when talent fails to work hard.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment