Wednesday, October 21, 2009

Tuesday, October 20, 2009

The Hidden Costs of C++

Over at Rachels Lab Notes, Rachel Blum has a nice post about the hidden costs of C++ that pretty accurately captures one of my main complaints about the language. When I code in C I have a pretty accurate model in my head of what the generated code is going to look like and I can even evaluate the effectiveness of alternative expressions based on my understanding of what code (approximately) the compiler will generate. With C++, not so much. As Rachel points out, it's easy to imagine the code that

a = func( b, c );

will generate in C just by looking that the statement. With C++ we really have no idea. Is func a simple function? A class member function? A constructor? What about b and c? Will they invoke copy constructors? These and other questions can not be answered except by having detailed knowledge of the rest of the code, and even then it's not always clear to me what the resulting object code will look like. This makes it hard to generate efficient code with C++. For me, at least, dealing with that takes more effort than dealing with the code complexity of C that C++ claims to ameliorate.

Friday, October 16, 2009


A little while ago I posted about an iPhone app for Org mode. At that point, the project wasn't even in beta mode but now they have a website and are projecting that they will submit the app to Apple by October 18. This really closes the circle for me as far as Org mode is concerned: now I can take my notes and TODOs with me, update, and add to them and then sync everything up when I get back to my desk.

Saturday, October 10, 2009

Virtual Keyboards

Mike Elgan has an interesting post about the coming age of virtual keyboards. Elgan predicts that virtual keyboards will, in the near future, replace the traditional mechanical keyboard. My iPhone has a virtual keyboard, of course, and it's hard to imagine being able to use one efficiently. To be sure, the iPhone keyboard is too small for touch typing, but even with a full size keyboard I can't visualize myself using an iPhone-like virtual keyboard. The problem is the lack of tactile feedback and keeping fingers resting on the home row from registering a key hit.

Elgan says that these problems will be solved with haptics: the user will “feel” the keys and will receive tactile feedback when a key is “pressed.” I like the idea of getting rid of one more mechanical component but I'm a bit skeptical about ease of use issues. What do you think?

Saturday, October 3, 2009

A Scheme Bookshelf

Over at Programming Musings jao has an old post entitled A Scheme bookshelf that I just stumbled across. If you're looking for some great books on Scheme, I can't recommend his list enough. Go take a look.