Would suck if half your update is December 31st 23:59, and the other half January 1st, 00:00.
http://www.postgresql.org/docs/current/static/functions-date...
Note: I base this on how often I've swapped out the database for a project in the past 15 years (maybe twice?) of writing mostly database backed software.
I particularly like the example he gives near the end of always thinking they need to add the database and finally, after shipping to a bunch of customers, figuring out that they didn't actually need it.
In terms of test performance, I frequently see blog posts about reducing the time for a couple of hundred tests from half an hour to 15 minutes.
marcel@localhost[~]time testlogger -a MPWFoundation ObjectiveSmalltalk ObjectiveXML EGOS EGOS_Cocoa MPWSideWeb
tests:1: warning: 1055 tests (of 1055) executed, 0 failures (100 % success rate)
real 0m2.939s
user 0m1.607s
sys 0m0.438sNewspeak solves this by eliminating the global scope and eliminating "import". Every module is parametrized with everything it needs.
Timecop.freeze(Date.today + 30) do
assert joe.mortgage_due?
end
vs assert joe.mortgage_due?(Date.today + 30)- it lets you put your dependencies all at the same place
- it lets you define clearly what the dependencies of a piece of code are, without having to look at internals which may change tomorrow without warning
One thing I find aggravating with dynamic languages is that metaprogramming is a crutch people tend to rely on because they can't be bothered to write clean APIs. In my experience, it's particularly prevalent in Ruby.
Of course, the lack of dynamism can be a problem in statically typed languages, giving Spring's or Hibernate's stacktraces of hell with piles of proxy objects.