giovedì 17 luglio 2008

Touch the future

The iPhone has a 3,5" touch screen, an accelerometer, a proximity sensor, a light sensor... and a impressive user interface.
In the near future I expect to see some innovations in computer interface devices too; years ago Octopus and I were trying to design a user interface for computer aided software design based on a virtual glove (such as this one) with very poor results, but touch screens at a low cost and multi touch tecnology could be the real great innovation in user experience.
Right now these tecs are focused in daily use PIM apps (and devices) but we'll surely soon see innovations in technical applications too: technical modeling and designing, web navigation, and so on, but the most interesting evolution from my point of view will be in software developement tools: new user interfaces will drastically improve object oriented software design, with the result of better software produced in less time.
It could be an interesting challenge to design some innovative IDE focused on Object Oriented design, design pattern usage, GUI design, all running on a 3D environment with multitouch screen interoperability functions: and IDE focused on the structure of the software with less new and more re-used code, template/pattern based code writing assuring more quality. And far more fun.
Wanna write sw with an iPhone instead of a mouse ;)

mercoledì 2 luglio 2008

Logging enter/exit into/from methods or functions

Just as easy as (and same principle of) Synchronizing in the previous post:

class MyMethodLogger
{

std::string _methodName;

public
:
MyMethodLogger(const char *methodName):
_methodName(methodName)
{

log << "Entering method " << _methodName << std::endl;
}
~
MyMethodLogger()
{

log << "Exiting method " << _methodName << std::endl;
}
};


Very easy to use: just instance a MyMethodLogger as the first instruction in method body:

void method()
{


MyMethodLogger("method()");
...
}


At the end of the method execution (of after an exception throw) the destructor of MyMethodLogger will trace the exit from the method.