Tuesday, February 10, 2009

Wrong MTU symptoms

The first time I  heard about MTU was back in BBS days. And I knew that lowering MTU can be used to fight with collisions on half-duplex networks. But half-duplex are long gone now and usually I'm not aware of current MTU. 

Last time I had to change MTU settings was when I setup VPN server at the university, I worked for. I still vividly remember this problem: PPP interface is up,  I can ping and ssh into the host on remote side, but scp stucks after 1Kb. Luckily for me, there are whole bunch of VPN manuals/faqs and howtos on the net, and almost every one of them advices to lower MTU in case of a problem.

Today I run into another problem, that can be fixed by lowering MTU, though I'm still  not sure what is causing it. My ISP provides me with IPv6 connectivity, as well as IPv4, and some of the features ( like IPTV ) are available only thru v6. So, I configured v6 tunnel on my router, and watched dancing turtle logo  on kame.net and dancing Google on ipv6.google.com. But after that I noticed, that some of the sites I frequent before became unavailable. One of them is doc.python.org.  That was even more weird, because ping6 worked, and it replied to malformed request, but curl -6 http://doc.python.org never returned.

And to my surprise lowering MTU helped.... Does anyone have an idea why? ( I guess that it's due to wrong MTU settings on one of the v6 routers. )

Sunday, January 18, 2009

Bibliophilic

Though I'm following BibliOdyssey for almost a year now,  with every new post I'm still amazed by vast variety of subjects people wanted to write books about and how many of them became obsolete with invention of mass production,  (digital) photography and internet. 

From another book oriented blog BookNerd I found out about weird but fascinating online exhibition Making Visible Embryos, which shows how people imagined embryo would look like and how it was used to educate viewers or teach them a moral lesson. 

P.S. Until today I wasn't aware of that "absolete" is rather modern adjective which, according to urbandictionary.com, is defined as  mix of obsolete and absolute.

Wednesday, January 7, 2009

Debugging dynamic languages

I think CLI debugger is a must-have tool ( though best and simplest debugging tool in existence are debug prints and  asserts ) To my shame I don't have much experience with CLI debuggers for dynamic languages. Moreover, I'm not sure if any debuggers exists for an early scripting languages like sed or shell scripts. The only CLI scripting language debugger I know about is a very convenient python's pdb
If anyone knows any CLI debugging tools for languages like Java PHP, Caml or Lisp - please post a link in comments. 

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 )