22.12.14

"Side effect" of unit tests

Sometimes the test itself doesn't do much. It maybe simply tests something very minor. However, implementing the unit tests will force us to make sense of the code.

Today I tried to create a unit test for a DAO class. I had to keep on refactoring the code until I can write simple test for it:


  • Simple mock object.
  • Easily definition of the purpose in test.
The test itself turned out to be very trivial, but the source code for the business logic make a lot better sense to me and others.

17.12.14

Somebody help Wikipedia please.

I fully understand that Wikipedia needs money to run the services. But dude, you need to know that the way you are asking money is very much disturbing. More frustratedly, after I donate money, the huge banner will still show up, at least that happened before.

Why don't you just bring in some commercial sponsors? Google AdSense or whatever it is. The way you are asking money is not better than putting a commercial on the website.

5.12.14

Keep Cygwin Applications from setting NTFS security descriptors

http://blag.nullteilerfrei.de/2014/04/07/keep-cygwin-applications-from-setting-ntfs-security-descriptors/

My tip is to avoid this by making cygwin not set any permissions at all. If a cygwin application then creates a file, for instance, this file will only inherit its security settings from the folder it is contained in.

https://cygwin.com/cygwin-ug-net/using.html#mount-table

 noacl     - Cygwin ignores filesystem ACLs and only fakes a subset of
       permission bits based on the DOS readonly attribute.  This
       behaviour is the default on FAT and FAT32.  The flag is
       ignored on NFS filesystems.

Don't mix NFS with NTFS. :-(

2.12.14

Clarify, Simplicity, and Abundance

Like this statement from "Thrift: Scalable Cross-Language Services Implementation"


The type system rests upon a few base types. In considering which types to support, we aimed for clarity and simplicity over abundance.


Similar to less is more