* The name of the test should describe the requirement of the code* There should be at least one test for each requirement of the code. Each possible path through of the code is a different requirement#* Test the goal of the code, not the implementation

As outlined by recent research, it all seems as though confidence doesn't necessarily breed success. Interestingly, the self-reported writing skills of college freshmen has been going up over decades, while actual writing ability has dropped. Students rate themselves much higher in drive to succeed now than two or three decades ago, but the average time they spend studying has dropped meaningfully. - http://traderfeed.blogspot.hk[..]k/2014/03/the-limits-of-self-belief.html

If you write the test after you've written the code, it's much more likely that you'll write the tests that will pass what you've written.

That's just how our brains work.

If you determine the criteria for whether a decision is good after you've already made the decision, it's much more likely that you'll create criteria that justifies the decision that was just made.

That's just how our brains work.

Determine how to assess whether something is good before you implement it and/or before you make a decision. Otherwise, you will tend to be emotionally attached to what you just did, what you just decided.

The file size of command "df" return is compressed data, raw disk usage If we want compress amount, we need to get the compressratio using /usr/sbin/zfs We can get more system detail via perl package Sun::Solaris::Kstat , we can google "arc_summary.pl" as an example

where column1 = 'a' and column2 = 'b' -> where column2 = 'b' and column1 = 'a' if column2 'b' is less likely

2) <> is more expensive than =

3) Can force to use index if SELECT * FROM table WHERE indexed_column > 0

4) UPPER(column) might lose information, use LOWER is better

5) WHERE column = 'WORD' or column = 'word' is always faster than WHERE LOWER(column) = 'word' , even faster version is test if database if case-insensitive: WHERE column = 'WORD' or ('WORD' <> 'word' AND column = 'word')

6) 32bit integer is the fastest datatype for 32bit OS

7) column in (?, ?) is faster than column =? or column = ? for some database, and don't slow in any database

8) For aggregate functions, prevent using having, try to use fewer columns in group by and use subquery if possible