Installing PDT 2.0 on Eclipse 3.4.1 Ganymede

I haven’t had much luck installing PDT on Eclipse lately.   I’ve been getting an error when I try to install from the PDT site on Zend:

Cannot complete the request.  See the details.
PDT SDK Feature will be ignored because it is already installed.
Cannot find a solution satisfying the following requirements Match[requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.swt/[3.4.0.v3448f,3.4.0.v3448f]].

Here’ s the original links from eclipse and zend:

And here’s the zend update site:

This seems to only have the debugger?

Here’s a few links that seem to be helpful:

The above has out of date links, since the DLTK, there is out of date, and the current one is installed in 3.4.1

This page helps, with a link (again) to an old DLTK:

but it has a vital link to the actual PDT update site:

Also note the clue in the screenshot to only check the SDK, not the Runtime

It also has a link to the supposed correct dependencies:

The debugger still won’t install, and my guess is that it should have a dependency on




I also tried downloading the all in one and copying everything from features and plugins that started with org.zend.* to my eclipse install.

pretty URLs in twiki

TWiki normally has long (somewhat ugly) urls like this:

In order to make them look like this:

change your twiki.conf file to look like the following:

ScriptAlias /wiki/bin/         "/var/www/twiki/bin/"

RewriteEngine on
RedirectMatch ^/wiki/bin/view/(.*) /wiki/$1 [L]

Alias /wiki/pub "/var/www/twiki/pub"
Alias /wiki "/var/www/twiki/bin/view"

Note that the paths used above (such as /var/www/twiki) are dependant on your own installation path.  Also note that this is not the whole twiki.conf file (which itself might be named something else like ‘twiki_http_conf’.  One more note, using a url path /twiki (instead of /wiki) won’t work for reasons explained here:

And another note.  Configure is accessed like so:

Bellevue Technology Entrepreneurs Club

I’m thinking of starting a tech entrepeneurship club.  There are already some tech groups in Seattle, but I’d like to start an informal group on the eastside, heavy on the tech.   The focus being that tech entrepreneurs can get together and talk about what works for them and what doesn’t.  I’d hope to attract three groups:

  1. Techies who are interested in entrepreneurship
  2. Business people looking for techies
  3. Investors looking for tech businesses to invest in

I don’t want to make it a schmooze meeting, and not a recruiting meeting either.  People getting together discussing their ideas, trying them out on each other.

A typical meeting would have a short presentation (maybe 15 minutes) on some topic prepared by some member, then a few “elevator pitches” where people talk about their ideas, for 1 to 5 minutes, then a few status updates where people talk about their progress or pitfalls for 1 to 5 minutes.   Preferably only 1/2 hour of listening.  Then if people want to talk more with each other about their ideas or problems, or about the topic of the night, or about anything else — they break up and do it.

open source social networking applications

Ning is hosted, not really open source

Dolphin seems to be popular and featureful

Elgg has a loyal and dedicated userbase

lovdbyless claims it’s built using Ruby on Rails

javascript spam prevention

Here’s a basic javascript-only spam prevention technique. The only thing fancy is breaking up the words so, for example ‘mailto’ isn’t a keyword. One thing it lacks is updating the status bar on mouseover.

    .m2 { color: blue; text-decoration: underline }
    function m2(element, user, host, subject, body)
        var addr = user + "@" + host;
        var mail2 = "ma" + "ilt" + "o";
        var subj = "su" + "bje" + "ct=" + subject;
        var body = "bo" + "dy=" + body;

        loc = mail2 + ":" + addr + "?" + subj + "&" + body;
        alert("loc: " + loc);

        window.location = loc;

    function build_addr(elemid, user, host)
        var elem = document.getElementById(elemid);
        var addr = user + "@" + host;


    <span id="ema" class="m2" onclick="m2(this, 'aarone', '', 'MYSUB', 'YOURBOD')";>
    <script> build_addr("ema", "aarone", "");</script>

Silverstripe spam prevention

Anyone who’s ever done it knows:  don’t post your email address on the web.

It’s a sad state, but the internet is so innundated with spam, that if you post an email address virtually anywhere, no matter how remote, the spambots will probably find it. Just like google, spammers search the internet, but they’re not looking for interesting content, they’re looking solely for your email address.  Though I could see a future where spambots collect contextual information and tie it to the email addresses they harvest, to target spam more effectively.

The following strategies offer some help:

  1. remove any mailto: links  — this is the easiest target.
  2. remove any email addressses — the @ symbol is like the smell of blood to these sharks.  But spambots are even getting clever enough to figure out things like  user AT or user @
  3. use an image instead of text — either the whole email address or just the @ symbol.
  4. use javascript to generate the text — however, spambots may start being able to parse javascript.
  5. use a contact form, possibly with a captcha.

But what do you do for your users’ sake?  If they can’t click on your email address, they might not go to the effort of finding your form, or deciphering your obfuscated email: aarone (AT) NOSPAM one-shore (DOT) com.

While javascript based email links or captcha based forms might be the best solution at present, it takes a programmer to implement them.  Thankfully, Silverstripe has a module that helps out, and actually makes it easy and (fairly) secure to allow users to click on a link that is not a mailto link, but will act like one.

It’s called hidemailto and here’s how it works:

Hidemailto uses an ordinary link to the HideEmail_Controller class, which then opens a page that redirects to  a javascript generated mailto link.  In effect, you click on the link, which you make to look something like this:


Here’s an example I set up:

Which has the following link:

A few things could be done to make it a bit more secure.

  1. don’t use the word ‘mailto’ in the link
  2. obfuscate the javascript a bit more — but if a spambot becomes able to  parse javascript it won’t matter.
  3. before the redirect there could be a captcha

It’s a nice touch to make it wait for the redirect, because spambots are so successful precisely because it’s so computationally cheap.

Okay, now that you know the techical details (or have skimmed to this point) here’s how you install it.

I assume you have a working installation of Silverstripe, download the hidemailto controller from here:

The module should be a compressed tarball, and look something like this:


To unzip it, type something like this.

tar -xvzf hidemailto-trunk-r62511.tar.gz

Some versions of tar don’t have the ‘z’ flag to decompress gzip.  If that command doesn’t work, try it in two steps:

gunzip hidemailto-trunk-r62511.tar.gz

tar -xvf hidemailto-trunk-r62511.tar

Then rename the extracted folder from hidemailto-trunk-r62511 to hidemailto:

mv hidemailto-trunk-r62511 hidemailto

and finally copy it to your silverstripe installation directory.

cp hidemailto /your/path/to/silverstripe/

for example, if silverstripe was installed in /var/www/silverstripe you’d type:

cp hidemailto /var/www/silverstripe/

You may also need to do the same with another module called gallery.  The Hidemailto documentation mentions a  dependency on gallery.  Follow the same steps:

  1. download
  2. unzip
  3. rename
  4. copy it to the silverstripe directory

If you don’t have shell access, do the first three steps locally, and then use FTP to copy the hidemailto (and gallery) folders to the silverstripe directory on your server.

There’s one more step you need to do before it will work.  Add the domain part of the email address (such as to the file named _config.php in the hidemailto directory (/your/path/to/silverstripe/hidemailto/_.config.php):

HideEmail_Controller::set_allowed_domains(array('', ''));

You might want to remove from that list, since you probably won’t be receiving any email for that domain.

I can also implement a plain javascript solution that will work without silverstripe in basically the same way, or point the more ambitious to some examples on the internet to help them do it themselves.

Feel free to email me (with the link above)  or comment here if you have questions or corrections.

two page-based testing frameworks for watir

My last post started with this title, but since the exposition at the start started to get long, I broke it off.  So here’s the rest, in a significantly sillier vein:

Watir is written in Ruby, and everyone except Matz  discovered Ruby because of a Danish graphic designer named Why, commonly known by his street name ‘Rails’ (or DHH for short — it’s the Danish abbreviation for something vulgar.)  Rails didn’t invent code generation, but he made it cool again.  He also made DSL more popular than Cable, but I don’t know Why personally.

Anyway, I found a couple (ok, several) interesting page-based frameworks for watir, designed to make testing easier.

The first one is called watirloo, after a famous aquatic fun center discovered by a time-travelling midget originally from 1988.  His relation to Michael J. Fox (of the Rails comic strip) is uncertain.  Now watirloo seems like a nice framework, but I can’t get over the choice of names for some of the objects.  While sticks and stones may not smell as sweet as a rose by any other name, I have no intention of spraying anything all over my face.

The next is called taza, named for it’s infamous pythonic sidekick, who is in fact a monkey, not a snake.  It uses the common script/generate formula so dear to the hearts of Rubistas everywhere.

The two hundred twenty-five pound chimpanzee hanging around the watir cooler is Cucumber, but only kooks would like it because it’s based on rspec, which while a nice idea, you wouldn’t want to use it for testing (or marmalade), because it’s not that fun.

And so I lied, that’s five frameworks, and I didn’t even give any useful information on either.  Since my two reader (hi mom & dad) prefer selenium to watir (it goes down smoother), I’ll mention one other:  tellurium, which I think actually tries to assist in the building of those page objects via the IDE.

Page Based Testing

If you’ve used selenium, watir or some other web automation framework you’re probably familiar with the record and playback style of test automation:

  • type this
  • click that
  • verify something

It isn’t very context aware, and you can get lost in the details.  You practically have to execute it (or read the comments) to find out where you are.

Page-based testing is a term I made up (I’m sure I’m not the first to use it) to describe a way of organizing automated tests, that groups components into pages, so you get a little more information, and can do a bit more context validation.  Essentially, you create a bunch of objects that represent the pages on a web site and group elements and actions under them.  Pages can inherit common functionality from a base class, and attributes from a site.  So you have a bit more descriptive code such as this:

  • type ‘bob’  on  mysite.loginpage.username
  • click on mysite.loginpage.submit
  • verify mysite.homepage.title is “Welcome home, Robert”

However, as any good tester can see, this is more work.  On the one hand, it’s great because you can point to how many lines of code you had to write, and thus couldn’t possibly have time to check every possible exception case.  On the other hand, it means more typing.

But with the proper level of abstraction, and some helpers to make generating the code easier.  Unfortunately, it might also make improving coverage easier, but thankfully through automation.

Falsely Responsible

Here’s a great blog post about testers being falsely responsible for a software release.

It’s a situation I’ve seen countless times.  Everyone is breathing down QA’s neck — “Is it ready to ship?”

Is it really our decision to make?  If I am to be held responsible for the product’s possible failure, shouldn’t I be rewarded for it’s success?

Test first development isn’t testing

Test first development isn’t testing.  It’s development.  It’s prep work for a developer.  It doesn’t test anything.  And as a matter of fact, if you could write tests first that work without testing before running them, you’re probably a perfect coder, and writing tests would be superfluous.

Now, running a test after the code is written is testing, but in the simplest possible sense.  In about the same way that spell-checking is editing.   Or rather, you could consider the spell checker the compiler, and the notoriously bad grammar checker equivalent to the also notoriously bad warnings a compiler gives.  But no one considers a document even “proof-read” because Microsoft Word didn’t underline anything.  Actually, a document of any length –say half a page or more– is probably unreadable if there are no squiggly underlines in it.

What would be your own unit tests (or even automated functional tests) that could be done to a document?  Pretty difficult to come up with something useful, isn’t it?

But code is structured, you complain?  Stop complaining, so is English.  As a matter of fact, supposedly your code is just a much longer description of a specification written in English (or Swahili).  It’s longer because computers aren’t as smart as people, and because of that, you have to talk down to them and use lots of little words and a lot more punctuation.

Let me help you out.  There are some things that can be automated.g  Such a word count.  Formatting guidelines.  Header style.  Beginning middle and end.  You could come up with run-on sentence algorithms or text analysis. But the real trick is turning a document into an executable, because that’s what code does.

How are documents executed?  By modifying them.  The aforementioned word count can make sure the document length doesn’t change — or if it does, that the changes occur in an expected area.  Or that formatting changes (margins, fonts, etc.) are changed across the board.

Fairly useless stuff, right?  But that’s all automated tests can do for software.  Granted, there are a lot of variables in software that aren’t in documents, and code changes happen even more.  So there is value in REGRESSION tests being automated.  Because a code change is like a document edit.  You don’t want to edit one paragraph and expect the format (or word count) of another paragraph to change.

Now, I’m not arguing against automated testing (it’s what I do for a living), but I’m arguing in favor of knowing what it can do, so it can do it well.  The biggest travesty in quality assurance is the so called “test first” methodology.  It’s really just a cop out that says you’re not going to test.

Supposedly, the idea is to do the things first that you never have time to finish.  You know, like washing the dishes.  By the time you’ve fixed dinner and eaten it, it’s time for your favorite television show (or online chat game, for you WoWers), and there just isn’t time to do the dishes.

Here’s a novel idea — why not do them before cooking?  Cooking is what takes up all the time, and the cutting and mixing and associated tasks.  Cooking is Very Important.  After all, without the cooks, there’d be nothing to eat.  Therefore, of course, cooks are the most important people in the cooking process, right?  As such, they don’t have time to do the dishes, so you need to find someone else (less important) to do them.  And do them before you start cooking.  Makes sense, right?

Okay, you could test (I mean wash dishes) while cooking.  Every time a cook dirties a dish, a tester (I mean dishwasher) could wash it. Then, everyone could sit down to dinner and all the dishes would be done, and no one would miss Wipeout (or another quest to chop wood or fight squirrels).

Except of course the dishwasher, who’d also miss dinner.  Because while a spoon can get washed after every use, that big pot of goulash can’t get cleaned until after everyone has been served (and served seconds, if the cook is any good.)

And of course, there’s the little problem the cook never though about of all the dinner plates, silverware, and glasses.  Those need washed too.  If only they could be washed first, or iteratively.