08-Jul-2007 19:06 | Comparison : Java and K

OK, I know nothing about the programming language K. So I won’t criticize K itself. What I want to talk about is the comparison of Java and K.

I don’t get it why people always think that if they need fewer lines to write a program in one language than in another that the said language is better than the other one. The comparison shows fairly clearly that this is no good metric for comparing programming languages. While the Java program takes up 37 lines of code and the K program only one, the K program is far worse to understand since it’s one line of curly parenthesis, other special characters and some variables. I can learn all those special characters for all those special functions I need only rarely. Do I want to do that? No! I prefer to know that a class contains a specific kind of functionality and that I can find those functions with the autocompletion support of my IDE if I need them.

I’d also surmise that refactoring the K program would be somewhat more difficult than refactoring the Java program. I prefer the Java program because of its better readability and extendability.

K has probably its fields of use where it’s far better suitable than Java. Definition of mathematical algorithms is probably one of them, but that’s not the point here. I have no need for a comparison of two languages that have totally different uses.

Please stop those “I can express this in X in 1 line of code where Y needs 100 lines of code, so X is the better language”. It’s boring.

06-Jul-2007 09:46 | TiddlyWiki

TiddlyWiki is a wiki contained in one page. You can download an empty TiddlyWiki and put it anywhere you want — on a USB stick for example. It doesn’t need any database. It’s only one HTML page with lots of JavaScript and CSS. You simply add and edit tiddlers (that’s what the parts of a TiddlyWiki are called). You can even change the layout and the colors of the wiki by editing specialized tiddlers. Once you press the save button, TiddlyWiki writes itself back into the file from which it was loaded.

TiddlyWiki makes use of AJAX. So there are no flickering reloads. It all looks nice and works smooth. You can also install plugins to extend TiddlyWiki.

TiddlyWiki is a useful application when you just need some scrapbook and don’t want to use a server side wiki. From a technical viewpoint the fact that it writes and changes itself is also quite interesting.