Thursday, December 25, 2008

More things to hate C++ for

Although, all major C++ flaws are  ingeniously classified in  Dark Side of C++ slides, even a minor ones can be very irritating. Here goes my favorite ones:
  • Dependencies - even if one adds a non-virtual method to class definition, all files that includes this header and all files that includes headers that includes this header and so on,  are  better to be rebuild. 
  • Too many keyword combination, which sometimes have no meaning. For example, how virtual inline methods are possible?
  • Template sem-auto instantiation. It takes some time to figure out whether one have to explicitly instantiate a template or compiler does this for you. ( And thank linker throw duplicating instances away, as if it have nothing else to do )

Monday, December 22, 2008

Almost identical kanji

I wonder if there are any public database of most often confused kanjis. 
The first pair I had trouble memorizing difference were 持つ(to hold/carry) and 待つ(to wait)
Today I run into new pair: 猫(cat) and 描く(to draw/paint )
I was told that after memorizing 500+ it would no longer be a problem. 
But right now, I can't believe it ( but only 6 month ago I thought that I would never learn hiragana )
P.S. One more - 島( island ) and 鳥( bird )
P.P.S. And  another one - 便( mail,convenience ) and 使 ( to use )

Sunday, December 21, 2008

Dynamic extensions

While hacking  Eclipse to create a dynamic extension, I  run into following error:
Unauthorized access to the ExtensionRegistry.addContribution() method
I googled for the answer, but to no avail. Fastest way  to find what's causing this was, as usual,  to read sources of  Equinox Registry plugin, where checkReadWriteAcess method returns true only if token equals to master token or it's user token, and contribution is not persistent. ( i.e. third argument of addContribution is set to false )