Archive for the ‘style’ Category
svn and Google Code sometimes bork on my commits, saying:
Transmitting file data …..svn: Commit failed (details follow):
svn: Commit failed unexpectedly — please try again later
The first line tells me that the transmission failed and that details follow. The second line tells me that the commit failed unexpectedly, which is essentially what the first line told me. Where are the details? Why did it fail? What was being attempted that failed? Why is the failure “unexpected”? Are there “expected” failures?
Here’s a nice error from the drizzle build process:
configure: error: Couldn’t find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.
When a program fails I want details and I don’t need to be told “try again.” Of course I’m going to try again. In fact, I’m not going to stop trying until it succeeds.
In formal logic
¬¬ok is ok (pun intended) but in code
!not_ok is confusing. This is also wildly confusing to me:
cache = 1 unless defined cache. So caching is enabled if
cache is not defined, which means both
cache = 0 and
cache = 1 disable caching. This is a case of double meaning which is the evil twin of double negative.
Here’s another gem of my own doing:
--[no]buffer-to-client default: yes Fetch rows one-by-one from MySQL while comparing. This is disabled by default. If enabled, all rows will be fetched into memory for comparing. This may result in the results "cursor" being held open for a shorter time on the server, but if the tables are large, it could take a long time anyway, and eat all your memory. For most non-trivial data sizes, you want to leave this disabled.
So is it enabled or disabled by default? I should know but sadly I don’t.