2007-03-16

Another look on climate change

"This has been the warmest winter ever", "We must reduce CO2 at all costs", etc. You can hear such things pretty often today. But take another perspective: the global warming, which caused the warmest winter 'ever' (highly doubtful), also saved huge amounts of energy that would otherwise be spent on heating. Less energy used on heating means less generated CO2 this winter. Why doesn't anyone mention that?

2007-03-10

Hungarian notation

You have probably heard that hungarian notation is awful and that it should be avoided. However, in most of the Windows APIs, the notation has been misused. The intention behind Simonyi's notation is akin to dimensional analysis. I recommend you to read this article as well as Simonyi's original paper.

While having a good intention behind it, the idea is actually just a fix for a defficient language, namely C and C++. If typedef were not a mere type alias, but a true new type, this convention would be (almost) unneccessary as the compiler could catch all errors. For example:

typedef int Temperature;
typedef int Volume;

int f(Temperature a, Volume b)
{
return a+b;
}

Although it is meaningless to add temperature and volume quantities, this is perfectly legal C and C++ code, because Temperature and Volume are mere aliases for int.

C++ templates have strict compile-time type-checking, but the syntax is unfortunately just horrendous.

2007-02-15

Giants meet

I am actually not surprised about this. I'm just wondering why didn't it happen sooner.

2007-02-10

A thought on neural networks

Neural networks are a (currently not very successful) attempt to programmatically mimic the learning behaviour of a human brain. Research in neural networks has mostly focused on topologies and transfer functions in the nodes. However, the aspect of time has been neglected. Human nerves transport signals with (relatively slow) speed between 0.5 and 120 m/s (quoting a random reference from the web).

Could it be that our learning capability depends not only on particular signal values (the part that artificial neural networks are simulating), but also on propagation time between neurons in the brain? A signal might have different effect on a neuron in the brain, depending on the time of signal's arrival.

This would add another dimension to artificial neural networks: temporally changing transfer functions in the nodes. This is just an idea for further research, maybe someone has already looked into it.

2007-02-03

x86-64 ISA oddity

New processors have FXSAVE and FXRSTOR to save/restore the floating point state of both x87 and SSE units. In 64-bit mode, PUSHAD and POPAD instructions generate undefined operation exception, there is no new instruction to save/restore all general-purpose registers, and the hardware task switching is disabled. I'm wondering why did the AMD designers decide to cripple the CPU in such a way (along the side of disabling segmentation, but that's a story for another post).