Are all languages leaky?

Dolio wrote an excellent comment on space leaks for the previous post. I’ve read posts on haskell-cafe before that mentions the concept but I’ve never bothered to ask. Thanks for clarifying the term! Dolio’s comment made me think of something I heard during a lecture on OO at university, with the risk of paraphrasing slightly: …

Continue reading ‘Are all languages leaky?’ »


On Windows programming

I always find myself going through the same motions when trying to programming on Windows: excitement, bewilderedness, frustration, relief. It’s exciting to find new libraries and frameworks that seem to deliver exactly the functionality I require. I feel bewildered because I don’t think I’ve ever come across a Windows C/C++ API that immediately makes sense …

Continue reading ‘On Windows programming’ »


My programmer personality

I did the Programmer personality test: Your programmer personality type is:    PHTB You’re a Planner. You may be slow, but you’ll usually find the best solution. If something’s worth doing, it’s worth doing right. You like coding at a High level. The world is made up of objects and components, you should create your programs …

Continue reading ‘My programmer personality’ »


Venting on C++

Lately I’ve used C++ for a tool I’ve been working on at the office. Here are some idiosyncrasies in the standard library that I’ve noticed: I was expecting the following code to compile: std::string f(“hello.txt”); std::ifstream in_file(f); But oh no! For some reason ifstream doesn’t have a constructor that accepts a standard C++ string. Instead …

Continue reading ‘Venting on C++’ »


From the list of idiotic function signatures…

I stumbled on the function QueryWorkingSet today. It seems to be usable for solving a problem I have… What’s really amazing about this function is its totally braindead signature: BOOL QueryWorkingSet( HANDLE hProcess, PVOID pv, DWORD cb ); Please look beyond the weird Microsoft-isms with type names and the idiotic Hungarian notation. What does it …

Continue reading ‘From the list of idiotic function signatures…’ »


Banging my head against sparse files

Lately I’ve had use for sparse files to solve a problem. Simple, yes. Use lseek and write (or read). Even better, at least in this case, use pwrite and pread. Should be simple, right? Yes, should be. I was banging my head against code equivalent to the following for quite a few hours: #define _XOPEN_SOURCE …

Continue reading ‘Banging my head against sparse files’ »