The book is extremely well-written–short and to the point. I particularly didn't like first couple of parts, though the parts thereafter are the best written piece of work on the subjects they talk about. Keeping this book in hand means that I can always go back, see if I am missing something. Great book, highly recommended.
The brain is not programmable, it can’t even perform the same action twice exactly the same way. For example, brain plans every motion differently each and every time, Movement Variability.
CPU1’s job is to to linear, logical thought, and language processing. It’s programmed with an idle loop, one that works when nothing else is being processed or thought. This idle loop will simply generate an internal stream of verbal chatter.
CPU2 is different. It’s a brain answer’s to Google, a super regular expression search engine. It can go off searching while you’re thinking on something else. It results asynchronously; sometimes, days later. It’s results are not verbal.
Both CPUs access the memory through a shared bus. Meaning both can’t access the memory at a single time. They interfere with each other.
Linear processing style of CPU1 Linear Mode, or just L-mode.
Asynchronous style of CPU2 as Rich mode, or R-mode.
R-mode is responsible for creativity, intuition and problem-solving while L-mode works in details and make them happen. For best performance, both should work together.
The images, feelings, and overall experience are R-mode things.
If your brain stops running it forgets everything.
“R-mode isn’t directly controllable.”
Always have something to take note of an idea, because R-mode works asynchronously and can give results anytime, anywhere.
“Capture all ideas to get more of them.”
Everyone—no matter their education, economic status, day job, or age—has good
ideas. But of this large number of people with good ideas, far fewer bother to keep track of them. Of those, even fewer ever bother to act on those ideas. Fewer still then have the resources to make it a success. To make it into the top of this pyramid, you have to at least keep track of good ideas.
Linear mode’s characteristics
Using words to name, describe, define
Figuring things out step by step, and part by part
Using a symbol to stand for something
Taking out a small bit of information and using it to represent
the whole thing
Keeping track of time, sequencing one thing after another
Drawing conclusions based on reason and facts
Using numbers as in counting
Drawing conclusions based on logic (theorems, well-stated
Thinking in terms of linked ideas, one thought directly following
another, often leading to a convergent conclusion
“Learn by Synthesis as well as Analysis.”
Commoditization means you compete on aesthetics.
“Attractive things actually do work better.”
“Positive emotions are essential to learning and creative thinking.”
Being “happy” broadens your thought processes, and brings more of the brain’s hardware online.
Aesthetics make a difference, whether it’s in a user interface, the layout of your code and comments, choices of variable names, arrangement of your desk top, or whatever.
“Strive for good design; it really works better.”
“Design is not making beauty, beauty emerges from selection, affinities, integration, love.”
Creativity, comes from the selection and assembly of just the right components in just the right presentation to create the work. Selection in turn, comes from pattern matching.
If you’re looking global patterns, you require R-mode while L-mode is good for parts and working in detail.
“Rewire your brain with belief and constant practice.”
The do-it-yourself brain surgery is to “think” that your brain can learn indefinitely, that there is no limit to its capabilities.
“Use it or lose it.” If you use a skill set, you gain its experience resulting in learning more about it. In contrary, if you don’t practice, you’ll lose it. Want to better at something? Practice it more.
There are five stages to skill development per the Dryfus Model:
Novices need recipes, i.e., clear rules and sets of instructions to follow. Since instructions are limited to whatever context even if described carefully, there is always room for questions… Infinite Regression.
Advanced Beginners start to see beyond a rule but don’t want to see the big picture.
Competent can troubleshoot and can also solve bigger problems on their own.
Proficient can self correct previous poor task performance. They can learn from others and apply. They also use maxims affectively.
Experts are the peek of any skill and they are the source of information and knowledge. Experts work from creativity and intuition. Give them a set of rules, and their performance will degrade.
Use rules for novices, intuition for experts.
Maxims: proverbial, fundamental truths that can be applied to the situation at hand.
Know what you don’t know
We need to make programmers Competent so that they can take the responsibility and solve the problems at hand rather than...
“I was just following orders!” doesn’t work
Learn by watching and imitating
To become an expert in any skill, you need to practice. Deliberate Practice, comes from four conditions:
you need a well-defined task
the task needs to be appropriately difficult; challenging but doable
the environment needs to supply informative feedback that you can act on
it should also provide opportunities for repetition and correction of errors
Keep practicing in order to stay expert.
Don’t succumb to the false authority of a tool or a model. There is no substitute for thinking.
One of the most important lessons from the Dreyfus model is the realization that while the novice needs context-free rules, the expert uses context-dependent intuition.
Context matters. “It depends”, is the answer you’ll hear from an expert. If you ask how to open a locked door from an expert, he will have to say according the context. On one hand, the door might be locked with a baby inside the room and the house burning, and on the other hand, you have to leave no traces of door being opened of a Hotel.
So, beware of decontextualized objectivity (trying to be objective about something after taking it out of its context).
“Understanding the Dreyfus model and skills acquisition is a skill itself; learning to learn is subject to the Dreyfus model.”
Learn the skill of learning.
Second-order incompetence: Now knowing just how much it is that you don’t know.
“The human brain starts working the moment you are born and never stops until you stand up to speak in public.” - Sir George Jessel
If you have ever developed against a specification written as a Word document, you'll know what we're talking about. The specification starts out as the best ideas about the software to be written, and it's only during the development that you find it contains wrong assumptions, which must be fixed in code. In a matter of days, the code starts to diverge from the document, and the document turns into a work of fiction.
1) Initialize an object of a class to be tested in setup as:
@my_reporter = PayrollReporter.new('test.xml') # all-to-be-written methods are called to this variable such as @my_reporter.employees.
2) Write a test for each method, specifying their outcome. For example, the department method retrieves a hash for all employees along with subsequent data. The get_hours_for retrieves total number of hours and takes the name of an employee as an argument.
def test_department # that tests the department method
assert_equal nil, @myreporter.department(1234) # something that's not there
Unit tests are concentrated and test the smallest unit possible: a single class at a time, a single module and so on. These tests are the core of all testing, because they test your code at its lowest level and verify its basic behaviors.
Integration tests are like compound unit tests. They test the integration of your application's pieces. Rails' integration tests allow you to test an entire application flow, from logging in, through a filling form, to getting a page with search results.
Other types of testing: functional, acceptance, regression etc.