I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence (I suspect this level of confidence is high compared to industry standards, but that could just be hubris). If I don't typically make a kind of mistake (like setting the wrong variables in a constructor), I don't test for itFrom http://stackoverflow.com/questions/153234/how-deep-are-your-unit-tests/153565#153565
Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts
Thursday, July 5, 2012
I get paid for code that works, not for tests ... - Kent Beck
This quote by Kent Beck is just popping up all around articles I have read these days. Want to keep it here.
Thursday, March 25, 2010
Singleton vs Class method
I want to tell you before go on through the detail that following article is based on Java. Different implemented language might not have the similar behavior.
Singleton or Class method ?
This topic might too old for some of you but I always was reminded to this issue when I was going to write some method just do some algorithms - take inputs, processing, return output.
We will find many discussions on this issue if we do googling. Below this are what I conclude those discussions for myself.
Singleton or Class method ?
This topic might too old for some of you but I always was reminded to this issue when I was going to write some method just do some algorithms - take inputs, processing, return output.
We will find many discussions on this issue if we do googling. Below this are what I conclude those discussions for myself.
- Singleton provides typing. You can subclassing or passing it around whatever you can do to an object-oriented instance you can do to Singleton object.
- Singleton provides state which a lot of you may think it is disgusting.
- Singleton provides lazy-initialization. You have not to have it on your memory until you are really want it.
- You can have many instances of Singleton-type. Also can limit number of them. While you can not do this with Class method.
Subscribe to:
Posts (Atom)
Collectd PostgreSQL Plugin
I couldn't find this link when searching with google https://www.collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresq...
-
sudo su postgres supply your Mac password modify /Library/PostgreSQL/9.x/data/pg_hba.conf from local all all md5 to local all all ...
-
Put your cursor on the text box of the post/comment you want to indent Go to the menubar at the top of the screen Edit > Emoji & ...
-
I ran to this error the other day when I tried to export a dump file from a slave Postgres database. cpg_dump: Dumping the contents of ta...