Blogs

I don't think I've ever been disagreed with in Japanese before

The discussion on Assert goes on, this time in Japanese… Google’s language tools lead me to believe that they’re disagreeing with me. They seem to be pretty shocked that I’d take this stance and appear happier when Noel puts me in my place and returns order to the world. ;) If anyone can come up with a better translation, leave it as a comment please.

Quote of the week

“Desire to know why, and how, curiosity; such as is in no living creature but man: so that man is distinguished, not only by his reason, but also by this singular passion from other animals; in whom the appetite of food, and other pleasures of sense, by predominance, take away the care of knowing causes; which is a lust of the mind, that by a perseverance of delight in the continual and indefatigable generation of knowledge, exceedeth the short vehemence of any carnal pleasure.

Throwing the baby out with the bathwater

Richard Hale Shaw writes on and his conclusion is “it’s too confusing” and “I’d suggest not even using using statements”. I think that position is a little harsh, but I think that the main problem is that using tries to provide support for “scoped locals” and it doesn’t do it well enough. Richard refers to this C# idiom for deterministic resource release. using(MyObj obj = new MyObj()) { obj.DoStuff(); } The point being that although the memory that MyObj uses will not be reclaimed until the garbage collector runs other resources that MyObj uses could be released at a precisely defined point via an implementation of IDisposable.

Back in time

I find it quite interesting to have so much information about my past available on the web. I often use my own blog like a database that I can search for past solutions to problems, or for locating some text on my feelings on a subject that I can drop into a report and tweak. When producing code reviews for clients it’s useful to be able to justify your view points (I have a lot of views that need justification ;) ) and, in the interests of reuse, having those views up here means that I can easily reuse them.

More on locking

Jeff Darcy over at “Canned Platypus” writes about “How to add locking to a program”. He laments the lack of a reasonably priced deadlock detection tool. I assume, from his backgrond, that he’s interested in an Linux tool, so my deadlock detection tool wont help him much but it’s good to know that it’s not just me that thinks such a tool would be useful… Jeff links to some expensive static code analysis tools that do deadlock detection.

Walking the call stack

Ned Batchelder has written about the code he uses to get a call stack out of a windows program (thanks for the link Barry). I’ve added a snippet of the code I use as a comment to his post. Note: the deadlock detector mentioned in this blog post is now available for download from www.lockexplorer.com. I started looking into working with windows call stacks a while ago when I was working on my deadlock detection tool.

MT-Blacklist

It seems that Jay Allen has shutdown both MT-Blacklist and the ‘master blacklist’ due to bandwidth problems caused by either a denial of service attack or inconsiderate developers. Jay hosted a regularly updated file of regular expressions that powered the MT-Blacklist comment spam blocking add-in for Movable Type 2.x. He also published a changes feed that made it easy for others to update their own black lists using the master feed.

Serenity

Just back from seeing Serenity. It doesn’t disappoint. We got into Firefly whilst on our ski trip to Megève last season and were really hooked. The film continues the story from the series, answers some of the questions left hanging at the end of the series and allows all the characters to grow a little. Recommended; it’s so much a better Sci-Fi film than then recent Star Wars stuff…

Jeff Darcy on Linus on specifications

Jeff Darcy over at “Canned Platypus” has written a nice piece on specifications and how Linus has got it wrong. Any post that contains the phrase: "… who wouldn’t know good code if it got into a robot and literally bit them …" has to be worth a read, and as Jeff says, there’s a vast difference between a truly good specification and a bad one. Good specs are worth their weight in gold and can be a joy to work from.

Asserts are evil, except when you have no other choice

Noel Llopis over on “Games from Within” has written a nice rebuttal to my Asserts are evil post and the follow up. I think it’s probably about time to wrap this up ;) So, here’s what I’ve learned… [Updated: 24th October - there is an interesting discussion still going on over in the comments on Noel’s post…] The reasons that I stated for disliking the use of assert in C++ were as follows: