Category Archives: Software


Ok, so apparently the following is valid JavaScript:

var undefined = "blah";

Yes, you’ve read that right. What I’m doing there is redefining the undefined symbol to “blah”.

I learned from Angus Croll that this is something ECMA added to ECMA 3. Presumably, in earlier versions you could not do something as pants-on-head stupid as this but someone someone thought that adding this capability would be an improvement. How did that work exactly? “Hey! JavaScript is not sucky enough. Let’s allow undefined to be redefined to arbitrary values.”

Here’s how an intelligently designed language handles this kind of nonsense:

$ python
Python 2.7.4 (default, Jul  5 2013, 08:21:57) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> None = "blah"
  File "", line 1
SyntaxError: cannot assign to None

Angus points out that ECMA 5 disallows assignments to undefined so I guess one of the ECMA luminaries had an epiphany.

A note about security in the cloud

People who know me well know that I do not easily entrust my data to the cloud. I find that even with the best of intentions, the risk of accidental data leakage is just to great. There has been a recent case proving that my fears are founded.

A bug in Gmail allowed students at some schools to read each other’s emails. I don’t know about you but I’d rather not have other people read my emails. (Yes, I know the vast majority of emails are transfered in plain text. I does not entail that it is okay for my colleagues to be able to access my mail folders.)

Coders without shame

I’ve been running into a good deal of bad computer code lately.  Here’s an example from an actual tutorial.  I’ve renamed the variable to protect the shameless:

if (count == 0) return false;
return true;

Why not this:

return (count != 0);

There are some god-forsaken languages in which returning the evaluation of a boolean expression is not valid (e.g. the creeping horror which goes by the name Open Office Basic).  C and C++ are not among these.   Yet, I’ve been running across a good dozen cases where the coders did not realize that.

In case someone would like to object: I know it is possible to just return count and let the compiler do an implicit conversion to bool but an explicit test makes the code clearer.  The additional “if … then” does not.

OOHanzi 0.7 released

OOHanzi 0.7 has been released.

As usual please refer to the documentation to know how to use it.

I have not been able to work on getting OOHanzi to work on OS X so I presume it still does not work.

List of changes:

* Updated packaging dependencies for Ubuntu 9.04.

* Performance improvements in “Mark Words Present In…”.

* Added support for variant readings when using “Mark Words Present In…/DDB”.

OOHanzi 0.6 released

Warning: OOHanzi 0.6 does not seem to be installable on Mac OS X. I have tried this week to install it on a Mac without success. I do not know whether previous versions would work or not.

OOHanzi 0.6 has been released.

Of all the releases of OOHanzi so far this is the one which has required the most work and which contains the most substantial changes. There are significant visible improvements but the bulk of the work happened under the hood and is invisible to regular users.
Continue reading

Open Office 3.0: Meh…

Be warned that this is not a thorough evaluation of Open Office. I use it mainly during the initial phases of translating from Chinese or Tibetan. (I still use Emacs for Sanskrit.) I produce all my final documents in LaTeX. So there is a lot of the functionality of Open Office I do not use. I’m putting my impressions here mainly because I told some people I would tell them what I think of Open Office 3.0 and I figured I might as well post my impression to my blog. It is likely that I am going to ignore features that other people would find crucial. So there you have it.
Continue reading

Intrepid: Growing Pains

Updated again Nov 1st 9:00pm, Taiwan time.

I’ve upgraded from Hardy to Intrepid and found a slew of problems. First the problems which are not fixed:

  1. Gnome does not want to start the gnome-terminal which is saved in the session configuration. After further investigation I found that session saving in gnome 2.24.1 does not work at all. This is a regression bug and a major one at that.

  2. Update: I can’t sync to my cell phone using bluetooth. The bluetooth driver is there and working but to be able to sync there need to be some configuration performed. The configuration of the bluetooth tools has significantly changed since Hardy so this is not a trivial thing to fix. And the documentation seems nonexistent. One step forward, two steps back.

  3. Evolution displays negative total number of emails.

Then the problems which I have been able to fix:

  1. The guys working on compiz have decided to go from 0-based indexing of viewports to 1-based indexing. Of course, user settings are not automatically upgraded so I had to go into my configuration and fix that manually. I think the change is good because 0-based indexing makes sense only to programmers. However, not providing for an automatic upgrade of the configuration data is asinine.

  2. scim initially refused to start. It turns out that skim was preventing it to run. Not skim directly but there was a session script which checked whether skim is present or not and if present would refuse to run scim.

  3. Evolution at first did not want to connect to my mail server. I fixed this by switching from TLS to SSL for the connection protocol.

  4. Update: Hardy and Intrepid run different versions of rsync. Unfortunately, the two versions do not speak the exact same protocol. There is some degree of compatibility so not all uses of rsync between an Intrepid and Hardy machine are doomed to fail. However, I use rsync in such a way that Intrepid’s rsync cannot talk to Hardy’s rsync. I’ve backported Intrepid’s rsync to Hardy to take care of that problem.

  5. Update: Skype initially was not able to produce audio. Changing my sound out and ringing devices in the “Sound Device” tab of the “Options” dialog to the value “pulse” fixed the problem.

  6. Update: Spamassassin’s cron job fails. A workaround exists.

  7. Update: The Eclipse version bundled with Intrepid is both ancient and buggy. To be fair that is also a problem with Hardy. The problem has been reported and a newer version of Eclipse exists in one of the PPAs.

  8. Update: Evolution displays a huge “Show:” button. I fixed this by going into the gconf registry and removing the key at /apps/evolution/mail/labels.

I will update this page as I find more.