Coding

Installing Hudson, Phing, PHPUnit and Git on Ubuntu

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

In this post, I'm just trying to get the simplest setup. I'll try to post details in a subsequent post.

Here are three posts, in descending order, on this that I found useful :

http://toptopic.wordpress.com/2009/02/26/php-and-hudson/

http://blog.jepamedia.org/2009/10/28/continuous-integration-for-php-with...

http://www.davegardner.me.uk/blog/2009/11/09/continuous-integration-for-...

First, I had to install java :

    $ sudo aptitude install sun-java6-jre  

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/

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.

Spell checking source code

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

I'm not sure of the cost/benefit of spell checking of source code, but there seem to be a couple cheap/free utilities that can help with this.

Free Python package :
http://pypi.python.org/pypi/scspell/0.1.0

Commercial shareware - $59.99 (Windows)
http://www.brothersoft.com/source-code-spell-checker-48748.html

Another commercial shareware version - $39.99 (Windows)
http://download.cnet.com/Source-Code-Spell-Checker/3000-2352_4-10341753....

Here's one man's experience checking Java source code with a "generic plain English" spell checker :

Finding duplicate code with CCFinder

Posted on August 5th, 2009 by David Luhman and tagged , .

If you're attempting to refactor a large code base, give CCFinder a try.

I checked out the following tools suggested by the Wikipedia entry on duplicate code :
- Simian
- CCFinder
- PMD Target