Friday, 8 May 2009

BC-STV

I am becoming increasingly fed up with the fear-mongering and misleading statistics being used by the campaign against the BC-STV electoral system being voted on next week in British Columbia.

I'm voting yes to STV for one very simple reason: it removes the fear of vote splitting, allowing me to indicate my true preferences. Period.

Have you ever heard any of the following statements?
  • "This is an NDP riding, there's no point even voting for someone else."
  • "This could be a close battle. Voting for the Green party might help the Liberal party get in."
  • "I like this party but I don't like their candidate in my riding."
With STV, you'll never have to hear those again. You can indicate your true first preference and, if they don't get elected, your vote gets counted for your next choice. No more vote splitting. And voting is dead simple: you write a "1" next to your first preference, a "2" next to your second preference, and so on.

Any electoral system is a complex balance between individual and group freedoms, degree of proportionality, cost, and many other factors. There is no "perfect" system. BC-STV may get tweaked over time but, in the meantime, the freedom to vote the way I want is reason enough to support it.

It's a shame that our province doesn't seem able to manage a real debate about this significant and important issue but don't be fooled by the mudslinging from either side. If you find the pro and con sites for STV in BC a little too heated, the Wikipedia articles on STV and FPTP (as well as on other voting systems) at least list both pros and cons for each. I also found the website of the Electoral Reform Society in the UK had useful and interesting reading (including pros and cons) on many different electoral systems. Although their stated preference for STV may bias their assessments of other systems, the site is much more balanced than any of the BC sites.

When to use a Seaside Component?

A recent StackOverflow question asked "When to use Seaside components, and when to use simple render objects?". This is a common challenge for new Seaside users (with the additional wrinkle of whether they should be implement a Brush thrown in for extra confusion).

To some extent these decision end up being subjective design decisions but there are some pretty compelling reasons why you might need to use a Component. I took a crack at answering the question but I encourage you to post or look for alternate answers there if you think mine is wrong in some way. I think the question is an excellent one so I'd also encourage you to upvote the question and/or answer if you think it is appropriate.

While we're on the topic, asking and answering Seaside questions on StackOverflow might help gain us some exposure and legitimacy. I actively monitor the RSS feed for Seaside questions and I'm guessing a few other developers do as well.

The main content of my answer was:

First of all, you are correct that you do not need to use a Component in order to access the Session. Seaside 2.9 moves #session up to a new class WAObject which makes it accessible to almost all Seaside objects (including Components) but you can definitely refer to WACurrentSession yourself for now in 2.8.

Components provide roughly the following functionality in 2.8:

  1. #renderContentOn: is called with an instance of whatever renderer class you specify in #rendererClass (instead of whatever renderer is in use when your object is asked to render itself)
  2. A hook (#updateUrl:) to allow updating the URL used by the renderer to generate links
  3. Hooks (#updateRoot:, #style, #script) to allow updating the HEAD section of the HTML document
  4. The ability to be the root of an Application
  5. Hooks (#updateStates:, #states) to make state backtracking easier
  6. A hook (#initialRequest:) to allow initialization based on the request that caused the Session to be created
  7. A facility (#children) to make sure all components below you will also have the above hooks called on them
  8. The ability to add Decorations
  9. The ability to show/answer/call (uses Decorations)
  10. Some convenience methods (#inform:, #isolate:, etc)

If you don't need any of the above, you don't need a Component. If you need any of the above, you pretty much do need a Component unless you want to implement the equivalent functionality on your own class.

The simplest metric is probably: if you intend to keep the object around between HTTP requests it should be a Component; if you intend to throw the object away and create it on each rendering pass it probably doesn't need to be. If you imagine an application that was displaying blog pages, you'd probably have Components for a menu, a blog roll, the blog body, each comment, and so on. You might want to factor out the reading of the blog's markup and generation of its HTML so that you could support different markups or different renderers and so that the comment Components could support the same markup. This could be done with a non-Component class that implements #renderOn: and could be created and used by other Components as needed.

Seaside 2.9 currently splits up the above functionality by making WAPresenter concrete and introducing WAPainter as its superclass. 1-3 above are implemented on WAPainter and 4-7 on WAPresenter so you have your choice of what to subclass depending on your needs. It also removes a lot of methods from WAPresenter and WAComponent in an effort to make them easier for end users to understand.

Wednesday, 22 April 2009

Cincom starting work on 2.9

It's been a little while coming but it seems Cincom has begun to take a crack at porting Seaside 2.9. This is excellent news and it sounds like the first push hasn't been too painful, which provides some validation for our portability work. Hopefully this means we'll be able to iron out compatibility issues with VW before going to Beta.

Wednesday, 15 April 2009

Seaside Tutorials from GemStone

James Foster announced that he has posted his Seaside tutorial materials online. The tutorial is released under a Creative Commons Attribution Non-Commercial Share-alike license and takes you through the basics of setting up an image, figuring out Smalltalk, and getting started with Seaside, Monticello, and then GLASS.

Seaside documentation is always welcomed by the community. Thanks to James and GemStone for making it available.

Tuesday, 14 April 2009

Inspiring Service

My recent vacation to Portugal demonstrated the universally welcoming and easy going nature of its citizens. The weather was warm, the wind was fresh, the scenery was green and dotted with Spring blooms. The beaches were long and (because it was not yet Summer) uncrowded.

Still, the trip stands out most in my mind not for any of the above reasons but because it was essentially unmarred by lousy service. Depressingly, this seems so novel that I feel compelled to comment on the highlights.

Our flights on EasyJet proved far less stressful than on any other discount airline I have used. Sure, you're still paying for food and drinks and it isn't exactly luxury travel but the only weight restriction on hand luggage is that you be able to comfortably lift it overhead. And while you pay extra for every checked bag, they can weigh up to 32kg. Talk about removing stress from your travel planning. The food was at least fairly reasonably priced, the advertising audio pollution seemed less constant than on RyanAir, and the airplanes didn't look like they were decorated by Fisher Price. Despite being a discount airline, EasyJet seems to take some pride in providing a positive experience for its customers. Now if only they would eliminate the disturbingly animalistic charge for the door by assigning seats on check-in...

For the third time, we again booked our rental car with holidayautos.de. They partner with rental companies in each city to provide all-inclusive rentals: collision damage waiver, no deductible, third party liability, unlimited mileage, a second driver, etc. The only additional thing you pay is fuel and the prices are reasonable; to remove the 3000€ deductible, the couple in front of us were quoted nearly as much as we paid for the entire rental.

There are no more "Would you like to add X for only $Y?" questions and this completely takes the stress out of dealing with the rental companies on arrival. On a previous trip, we were charged some additional fee by the rental company but, upon return, HolidayAutos refunded the money to my credit card within a day or two of sending the receipt. And (!) they answer the call quickly when you phone. Note that the last time I checked the prices on the US (.com) version of the site didn't seem nearly as compelling.

One final example is Restaurante Oriente in Lisbon. This place was recommended in the EasyJet inflight magazine of all places and offered an excellent vegetarian buffet. The service was exceedingly friendly and, when the already-half-empty beer bottle we were pouring foamed over the top of the glass, it was replaced with a new bottle before the spill was even mopped up. This was way beyond necessary and (particularly since we were tourists and obviously unlikely return customers) totally unexpected.

Thanks and congratulations to these companies for providing excellent service and value to their customers.

Monday, 30 March 2009

Russian Continuations

Andrey Larionov just posted a Russian translation of my article on the use of continuations in Seaside. Hopefully it's accurate... I certainly have no idea. :) He says he's going to try to start a series of articles on Seaside so keep an eye out for that if you can read Russian.

In other news, I'll be on vacation in Portugal for the next 10 days, likely without Internet access. I'm hoping the weather will get warmer than currently predicted but as long as the rain holds off I won't complain.

Wednesday, 18 March 2009

Seaside at The Chasm

I've seen two references this week to Geoffrey Moore's Crossing the Chasm. I haven't read it yet but I've added it to my list.

Kent Beck describes the book's theory of market segments like this:

  1. Enthusiasts — will try new things for the sake of novely
  2. Innovators — will try new-ish things for the sake of business improvement in spite of some risks
  3. Early majority — will adopt proven products provided there is no perceived risk
  4. Late majority — will follow in adopting established products
  5. Laggards — the name says it all

He then goes on to highlight these observations of Moore's with regard to high-tech products:

  • The gap between innovators and the early majority is particularly wide (the “chasm” of the book title), stymying many promising innovations
  • Marketing is fundamentally word of mouth, but people in one segment don’t converse with people in other segments. This creates a chicken-and-egg problem in gaining traction in a segment.
  • Messages that work for one segment don’t work for the next. The time to switch is when a product seems to be gaining momentum, because that segment will soon be exhausted.

Eric Sink adds:

One of the ideas in [the] book is that new innovations don't go mainstream until they become a "whole product".

Now Kent is talking about JUnit Max and Eric is talking about Distributed Version Control Systems (like git, Mercurial, and Bazaar) but this got me thinking again about Seaside's positioning and how to grow our user community. I think GLASS, by providing integrated persistence, is a big positive step towards making Seaside seem like a "whole product". But what else is missing? Deployment/admin tools and documentation spring to my mind and I'm hoping to make a start on the latter with some of the posts on this blog. But what else?

Growing support by major Smalltalk vendors helps reduce the apparent risk within a small segment of the market but, for many people, Smalltalk itself is seen as a major risk. So part of making Seaside less appealing would involve either de-emphasizing its use of Smalltalk (not really going to work—people will notice eventually) or reducing the apparent risk of Smalltalk itself. That's no small task and the vendors, I'm certain, have this at the front of their minds. Still if anyone has any thoughts on how Seaside in particular can contribute to that effort, I would love to hear them.

One of the major perceived risks associated with Smalltalk, of course, is the relatively small number of developers using it. Thus we have a feedback loop there: more users means less risk, which means more users, and so on.

So three important questions, I think, are:

  1. What does Seaside need in order to be considered a complete product?
  2. What can Seaside do (other than growing the community) to reduce the perceived risk of adoption?
  3. What can Seaside do (other than reducing perceived risk) to grow the community?

No answers yet; just questions. If you have any thoughts, please share.