Clouseau 0.5 released

Clouseau 0.5 features a load and save ability. You can take your session that you've spent 10 minutes and click "Save" to save it to your local file system. They can then they be loaded back in, returning you to your original state. Just to make any security hole in Clouseau bigger, it can now load sessions from URL's. Meaning you can have code on plone.org, or say paste.plone.org and automatically pull it into Clouseau. Look for recipes about to appear soon. Download: Clouseau.0.5.zip

Offline / online web applications

Looks like we are finally getting to offline / online web applications. Scrybe a new start up is trying this with yet another office suite (link). The offline / online problem is something that's starting to get a lot of attention and something I've wanted to solve myself one day, albeit I was thinking of purely open source solutions. The problem domain is relatively straightforward, I posit that the reason many web applications will not make it is that:

  • For many, many people online access is a problem. My friend Laurence was in Peru for a month or two. Gmail was brutal.
  • Most people don't trust data stored remotely, having it local gives warm fuzzies.
  • Many people like an application that is local, it gives you lots more control, for example a nice icon in the dock.
At Enfold I got bored of building wxPython programs and the suggestions of pyQt and all the other options drove me nuts. So I built applications using a spats, its a crazily simple local, Page Template server. But it allows us to write applications using Python, Page Templates, Ajax locally. So we ended up with Plone Controllers and Installers written in spats. The result:
  • Faster development, since they are familiar technologies.
  • Prettier and feature rich.
  • Cheaper and more flexible.
So for me they rock. But this sort of approach allows you to do more. What if you could run Writely locally and just edit your data locally. What if Plone could be run locally, would you use it more? Would you trust it more? The problem then becomes a matter of data sharing and collaboration, which is when you syncrhonise up to a remote server. What if you could write once, and run anywhere? I believe using things like Python, Page Templates and Ajax, you've got a very good start. Zope 3 and all that could give you more, but remember your client has to be light and have a good upgrade path. I'm focusing more on server-less applications, but that's another story... OO.org, the new company specialising in a framework for write once and run anywhere. Coming to a web page near you. Maybe. If I can think of a name that doesn't confuse everyone with Open Office :)

PloneSilverCity 2.0

Almost 3 years ago I wrote that thing for the book, PloneSilverCity. I've started to rewrite that for 2006 and update it a bit. From the readme:

This is a complete rewrite of PloneSilverCity from the original version of Definitive Guide to Plone. Thats about three years old, so I wanted to rewrite it to ensure that - we use best practices including unit and functional tests - we use archetypes as opposed to CMF types I'm retaining the name, although we'll no longer use SilverCity, instead we'll use dpSyntaxHighligher, a javascript solution. This allows for zero dependencies. If you have Zelenium installed, when you install this product it will create a set of Zelenium tests that you can run pointing at the tests/selenium directory. To run those tests go to http://yoursite/zelenium/silvercity, but note you must have a user name and password admin/admin.
Got to fix up that Zelenium stuff. When it's done I'll plonk on plone.org, for now... SVN: http://svn.clearwind.ca/public/plone/PloneSilverCity (svn co http://svn.clearwind.ca/public/PloneSilverCity)

What to learn?

Almost got into an interesting argument the other day on irc, but managed to get back to work and avoid the distraction. Somebody made the comment that they weren't too keen on Python because they'd learnt most of it in a day and there wasn't much more to learn. This is, of course, not true. But it is true that if you are familiar with other languages, you can become productive in Python in about a day. You just have to hop over to the Ruby irc channel to see the opposite.


 I've been learning Ruby and yes got productive and wrote a few teeny scripts in about a day. I've been progressing from this 10 liners into the world of a reasonably complicated Ruby on Rails application. That's taking it to the next level in terms of complexity. 

When you hit that you hit the usual problems: its more than 10 lines, its probably not documented and tends to be disjointed to someone who new to it, there's syntax in there you don't understand. So I got help from the Ruby channel. And started a few arguments about what things meant. One was:
dict["key"] |= ["list item a",]
That's a bitwise or followed by an assignment. Usually except when the operators have been overloaded, which apparently they had. So no idea what that did. Fortunately I found out it wasn't involved in the problem and moved you. And then you notice people asking "What does X mean?". Followed later by "Thank you, just learnt something today.". 

But is learning wierd syntax really useful learning? There's so much I need to learn, including, but not limited to: agile development, project management, xpath and xslt, javascript scoping and closures, threading details, Squid, carpentry, surfing... I'm betting 90% of programmers out there can at least learn things in communication, economics, project management and training. Learning wierdo syntax in a language is learning, but it's not productive learning. Incrementally learning things about $! does in that line of Perl, does not make you a better programmer. It's unlikely to get you better paid. Instead its a poor tool that obfuscates things and confuses your life. 
A more appropriate refrain would be "Thank you for wasting the time and making life complicated for me". Things that we develop aren't simple every day, but don't confuse learning language and tool quirks with learning. Focus on the things that will help again and again, long after Python has gone because Perl 6 has come out running 10x faster under Parrot and we all switch to Perl.

 Life is short, code in Python. Life is short, learn the right things.

Clouseau 0.4 released

Featuring improved tooltips if you have DocFinderTab, improved UI features, retrieve as text and a few other features and fixes. The photo shows the improved tool tip (to answer my earlier post). I wonder if Clouseau is the first Plone product that includes instructions in the help file on how to delete your Plone site?

Q: Can I delete my plone site with this? A: Sure try: app.manage_delObjects(["Plone",]); utils.commit(). Woohoo.
Download: Clouseau.0.4.zip Upgrades: do an install and uninstall from the add/remove products section of the Plone control panel to the new icons and fixed virtual hosting for context prompts.

Inserting target="_blank"

A client asked us to change the external links on their website. There were links to external url's and the links had target="_blank" on them, inserted by the authors of the content. So the client asked us to remove that target and instead add it by JavaScript, in this case the JavaScript relied upon the link having a rel="external". For those of you who don't know by the way, this is possible by uncommenting one line of JavaScript in Plone. All well and good, but being the sort of person I am, I have to ask why. The reason? Accessibility. 


And that's when I got confused. Why does inserting that target through JavaScript improve accessibility for anyone? I can see it maybe being more valid. The only reason on #plone that anyone could think of was that if screenreaders ignore the JavaScript, they won't have new windows opening and that's more helpful. Googling for this case only pointed me to lots of sites where people said target="_blank" should be present in the HTML and not added in JavaScript to ensure it works for users with scripting disabled. Which is the opposite of what is being done.

 Please send you answers on a post card and preferably they shouldn't be blank. I'll add that in later.