Blogs

Using XML in Tcl

Posted on December 7th, 2009 by David Luhman and tagged , .

I used to do quite a bit of Tcl programming back in the mid to late 1990s. I've since largely dropped it, but Tcl still is used quite a bit in specialized use cases.

To use Tcl with XML, it seems like the most popular solution is the TclXML package :
http://tclxml.sourceforge.net

From what I can tell, it's the best / only package for XML in Tcl, although here's a 11-year old article by Steve Ball which seems to reference other approaches :
http://www.usenix.org/events/tcl98/tcl98/full_papers/ball/ball.pdf

How to apply (export/import) a patch in BitKeeper

Posted on December 4th, 2009 by David Luhman and tagged .

Let's say you need to backport a fix from one BitKeeper repository to another. Here's one way to do it. I suppose there are other or better ways to apply a patch, especially if you have a lot of changesets to backport. But if you're limited to a few changesetd, this seems to work for me.

The following documentation is useful :
http://www.bitkeeper.com/Documentation.FAQS.Linux.html

1. Create personal clone of target repository :

 
$ pwd
/usr/me 
$ mkdir target
$ cd target
$ bk clone /share/source/code code

Dokan - sshfs for Windows

Posted on December 2nd, 2009 by David Luhman and tagged , .

jEdit has a nice SFTP plugin which allows you to edit remote files as if they're on your local machine.

I've been working with the Netbeans IDE lately. It's nice, but lacking a decent SFTP plugin.

A little searching revealed Dokan which allows you to build a ssh file system on your Windows machine.

Setup is a bit awkward. You need two downloads. One is the needed libraries, the other is a simple app/GUI which allows you to mount the remote file system as Windows drive letters N:, T: etc.

So far it seems to work as advertised. And free!

http://dokan-dev.net/en/download/

PHP client-side GUI programming - PHP-GTK

Posted on November 17th, 2009 by David Luhman and tagged .

I've been running CLI-based PHP scripts for scripting and more complex "applications" since the CLI was introduced back in PHP 4.3. As time has gone along, the applications have become more complex and varied. I only use some of these applications every few months, so it's easy to forget how to run the application without the guidance provided by a GUI.

For quite some time I've been looking for something along the lines of HyperCard whereby I can put together a simple GUI without too much work; however, this would be in the context of my existing PHP scripts.

Installing PHP-GTK on Windows

Posted on November 14th, 2009 by David Luhman and tagged , .

Installing PHP-GTK

Installing recent (as of Nov 2009) versions of PHP-GTK seems to be a little tricky. If you want to have PHP-GTK, Glade support, and MySQL support, it looks like you need to download and merge THREE different downloads.

SOAP vs. REST, POX, JSON

Posted on October 29th, 2009 by David Luhman and tagged , .

I've been in a bit of a debate regarding SOAP vs. REST web service interfaces. I found this post on why Google is dropping their SOAP search API. Here's an excerpt :

http://blogoscoped.com/archive/2009-03-03-n84.html

Web front-end test frameworks or test methods

Posted on October 21st, 2009 by David Luhman and tagged , .

A while back I spent some time evaluating unit test frameworks from front-end web testing. A key driver is the need to handle JavaScript forms.

Here are some thoughts on those test frameworks :

- PHPUnit : Good for back-end work, but weak with front-end (browser) work

- SimpleTest : Same as PHPUnit

- Watir : Very mature and popular browser test app, but requires knowledge of Ruby scripting language

- IeUnit : Not quite as popular as Watir, but mature IE test framework. Scriptable in JavaScript

Improving performance with multi-threading on a multi-core CPU

Posted on October 20th, 2009 by David Luhman and tagged , .

The other day I was downloading several podcasts from the net, while doing an expensive rsync across my slow home network. My dual core CPU was showing 50% on one CPU, about 0% on the other, and my network was shown at about 1%.

My iTunes had a "download multiple streams" checkbox that was unchecked. I thought running multiple streams might actually slow things down due to thrashing/context switching, but I checked it to give me multiple streams.

Investing in commodities

Posted on October 11th, 2009 by David Luhman and tagged , .

I had an earlier article about how diversifying into commodities can give higher total returns with lower volatility.

But now the question is, how should one invest in commodities? Do like my high school physics professor who bought a bunch of copper tubing during the Jimmy Carter memorial inflation of the early 1980s?

Diversification with long-term bonds and commodities

Posted on October 11th, 2009 by David Luhman and tagged , .

Lately, I've been looking to increase the diversification in my retirement portfolio by investing in both commodities AND long-term bonds.

Crazy? Aren't these diametrically opposed views? Commodities love inflation, just like long-term bonds hate inflation.

It's hard to say where inflation is headed, although at least relative to now it seems likely to go up. But how much more inflation can we expect, and more importantly, now much of that is already priced in long-term bond prices.