Lately, two authors have written a wonderful book about Java namely “Better, Faster, Lighter Java”. I picked it up for the sake of better my programming habits. But then I discovered that this book offered some simple but profound principles that we can follow in almost everything we do.
Keep It Simple
“Good programmers value simplicity.” In my opinion, everyone’s life needs simplicity. The way I do it is to focus on the essence. Discover patterns for repeated problems and provide standard, well-formatted and most effective solutions.
Do One Thing, and Do It Well
“Focus is the second principle, and it builds upon simplicity. This basic premise has two underlying concepts: concentrate on one idea per piece, and decouple your building blocks.” One of the most beautiful ideas I have every known in computer science is “Divide and Conquer”. From the wisdom of the ancient Chinese, this strategy gives us incredible power to overcome complexities and difficulties by focusing our energy on a single aspect of a huge problem and solve it bit by bit.
Strive for Transparency
“When you can separate the primary purpose of a block of code from other issues, you're building transparent code.”
This principle is highly related to the first two. You separate other issues by seeing the repeated pattern and solve the problem only once, which is a way to achieve simplicity. And now you can focus on the primary purpose of the block of code.
Allow for Extension
This seems to have little connection to life but design. But to me, it is. One thing leads to another. It’s about choice. For example, when you choose to study computer science, what are the possible “extensions” of your later career? For every choice we make, have we think about what kind of “extensions” we can have?
You Are What You Eat
“Applications build upon a foundation. Too many developers let external forces easily dictate that foundation. Vendors, religion, and hype can lead you to ruin. You've got to learn to listen to your own instincts and build consensus within your team. Be careful of the concepts you internalize.”
“You've got to challenge conventional thinking. When you don't, bloat happens.”
So think before you swallow. ;)