Monday, October 24, 2016

How to think clearly?

Optimize your life.

Email? Unsubscribe all the emails you don't read. Those that you can't unsubscribe, block them.

Get a email application the can cluster emails from the same source together, and show can show only the "unread" ones. Read them all at once.

Notifications? Turn them off. Most of them are just distractions.

Get an app that you can use to jot down your thoughts. Find one day you are suppose to work. On that day, don't work.

Sleep. Sleep the whole day. Your brain will be reset.

How to be free of bugs?

"A bug is never just a mistake. It represents something bigger. An error of thinking. That makes you who you are." ~Mr. Robot

How to eliminate bugs in code?
Be clearer in your thinking when writing code.

How to be clearer in thinking? 
Think through the Requirements and Design thoroughly BEFORE even starting to code.

According to research, changes in requirements during Design Phase is 5-10x more costly than if the changes were done in Requirements Phase. Changes in requirements during Coding Phase are 10-100x more costly!

See the Big Picture. 
Differentiate what contribute to the main goal and what doesn't. Eliminate clutter and distractions with extreme prejudice.

Learn the concept of "Encapsulation", and how to apply it in code (and outside code).

Don't write large chunks of code. Research shows that the smaller the class or method, the more bug-free it is. Why? There is a limit to human focus / mental cache / mental energy. Human simply cannot focus on a lot of things at one time.