jlaine.net

MapQuestioning

Dave Winer reports about a News.com article which describes how Norwegians wanting to go from Haugesund to Trondheim are routed through England, Belgium, Germany, Denmark and Sweden. Well, according to MapQuest you wouldn’t want to live in Finland, either, because we have no friggin’ roads!

!/images/28.gif (MapQuest Route from Turku to Vaasa)!:http://mappoint.msn.com/(mrhnz1ixqxpjzei3tudrwinr)/directions.aspx?&EndName=Vaasa%2c+Länsi%2c+Finland&EndLocation=63.09568%2c21.61061&StartName=Turku%2c+Länsi%2c+Finland&StartLocation=60.45269%2c22.25119&DataSetLangID=EUR,409&RouteType=Quickest&RouteUnit=Miles

And you still wondered, why msn.fi is the most popular net site in Finland (you didn’t think it’s got something to do with the fact that it’s the default start page for Finnish Internet Explorer, did you?)…

More Rails Goodness

Rails version 0.9.4.1 is out and ohmigod. The framework is going forward so fast I have trouble following up with all the new stuff. Here’s the greatest of the latest: Caching.

Well, yeah, caching is no news as such. It’s the way David implemented it (just like other things) in Rails that can’t stop astounding me. It’s so simple it almost makes me cry. Want to cache some whole pages your controller is serving? Just do this:


  class WeblogController < ActionController::Base
    caches_page :show, :new
  end

Phew, that was all good and well. But what if you have some personalized content? You can’t cache whole pages then, can you? That’s right, dear Watson. But you can cache the actions. Using action caching means that the request will go trough Action Pack so all the filters are processed before the page gets served. That way you can use authentication and other magic in your pages without having to give up the glory of caching. Here’s an example of controller that uses both page and action caching, stolen straight from the api docs:


  class ListsController < ApplicationController
    before_filter :authenticate, :except => :public
    caches_page   :public
    caches_action :show, :feed
  end

This controller has a public action and two private actions that need authentication — and thus action-level caching.

The most granular way to do caching in Rails is fragment caching. It’s what the two higher-level caching schemes use internally. Using fragment caching is a gem when you have pages that have both highly dynamic and pretty static parts. The downside is that it’s a bit more work and you have to do it in templates. Here’s an example of fragment caching:


  <b>Hello <%= @name %></b>
  <% cache(binding) do %>
    All the topics in the system:
    <%= render_collection_of_partials "topic", Topic.find_all %>
  <% end %>

There. But, wait! What if the content changes in between. Will the users be served old stinkin’ cheese ever after. Glad you asked. It turns out David did notice this possibility. That’s why controllers now have methods like expire_page, expire_action and expire_fragment, for all you busy bees who can’t settle with the content you once created. Here’s an action where the cache for page show is flushed:


  class WeblogController < ActionController::Base
    def update
      List.update(@params["list"]["id"], @params["list"])
      expire_page :action => "show", :id => @params["list"]["id"]
      redirect_to :action => "show", :id => @params["list"]["id"]
    end
  end

OK, enough rambling. Now, go create some apps swift as an arrow.

Oh, one more thing. Rails can use a bunch of different methods to store the cache. But that’s another story.

Back

Sunset

Sorry for my absence from here. I spent last week in Vuokatti, an XC skiing paradise in Northeastern Finland. With no internet connection. That can be a relaxing experience, mind you. Well, ok, I checked my email every now and then with my cellphone, but with no serious job-related thoughts involved.

Skiing track

Anyway, the week was pretty productive. 26,5 hours and 359 kilometers of training in 8 days is pretty near my training record. And two of those days were travel days. The weather was excellent, most of the week between 0 and -10 °C and sunny.

Integrating Simulation With .LRN — an OpenACS Microgrant Proposal

Background

Simulation is an OpenACS package originally developed by Collaboraid for project RechtenOnline, a consortium of Dutch law faculties. As Collaboraid was having a lack of resources last fall, I was hired to finish the system. Version 1.0 of system was released in the end of November and a revised version 1.0.1 just before Christmas.

Simulation is a package which can be used to simulate virtually any common workflows and processes. The most common example used by the original clients is the setting of a new law, with multiple students playing different roles in the process. Simulation is based on the newer, Finite State Machine Workflow package of OpenACS.

The Proposal

My proposal is to integrate the Simulation package with .LRN because the target audience of the two is clearly orthogonal.

Why would .LRN benefit

Integrating Simulation with .LRN would give it another member in its already extensive set of collaborative tools.

The Deliverable

Simulation package will be possible to be installed as a part of .LRN and they will work seamlessly together. I will also create all the needed portlet packages for both normal users and simulation administrators. All the code will be committed to the OpenACS codebase (as simulation already is). As a part of this project I will also take care that the end-user documentation of Simulation will be taken to a level expected from a .LRN package.

Tampere, January 6th 2005,
Jarkko Laine

Integrating S5 With OpenACS/Wimpypoint — an OpenACS Microgrant Proposal

Background

S^5^ is a standards-based slide-show presentation system developed by CSS guru Eric Meyer. It’s fully based on XHTML, CSS and W3C DOM, thus making it work in virtually all modern web browsers. An S^5^ presentation consists of a single XHTML file, so for users of browsers that don’t support standards the presentation is presented as a plain web page, without losing anything of the content. S^5^ is licensed under a Creative Commons Attribution-ShareAlike 2.0 License

So where’s the benefit?

Wimpypoint is a great tool in conjunction to .LRN. It makes it possible to integrate lecture slides to other course material. However, as it presents every slide as an individual html page, using it for presenting is kind of clunky. An S^5^ presentation, on the other hand, consists of a single page and supports all the usual slide-navigating keys (see the introductory slide show for examples), making it responsive to the point where it competes head-to-head with desktop products like Apple Keynote and Microsoft Powerpoint. Additionally, because of the single-file paradigm S^5^ makes it a whole lot easier to export a presentation for offline situations.

The Deliverable

The Wimpypoint package will use S^5^ as its primary presentation mechanism. The old mechanism can be kept as an alternative method for backwards-compatibility if needed. Wimpypoint will also sport an export function which will export the presentation and all related files as a zip (or equiv.) package for offline presenting. Also the templating system of Wimpypoint will be integrated with S^5^. I will also do everything that is needed for fully integrating the revised package with .LRN.

Tampere, January 6th 2005,
Jarkko Laine

Improving the Contingency Design of OpenACS — an OpenACS Microgrant Proposal

Background

The admin backend is a major part of a web framework like OpenACS. As Philip Greenspun once noted, roughly half of all the pages in a dynamic website are more or less admin pages. Making administrating a system a pleasure is vital for any system, including OpenACS.

37signals published a book called Defensive Design for the Web last spring. The book was lately selected as the best web design book of 2004. Defensive Design for the Web is about improving the contingency design of a website, including e.g. error messages, help and forms. The book also provides a heuristics to analyze the contingency level of a service.

The Proposal

I will go through all the major OpenACS components, including core and .LRN, and analyze their contingency design level with the help of heuristics developed by 37signals. As a result of this analysis, I will improve the administrative and end-user visible interfaces to the point where they will score at least 80% of the applicable parts of the test.

The deliverable

A system that is slicker and more pleasurable to use out-of-the-box. The UI of OpenACS has gotten a lot better lately, but has still room for improvement.

Concrete improvements include e.g.:

  • Real double-click protection. Adding functions to ad_form that disable buttons when one is clicked and give a visual clue that the process has started. Current double-click protection protects from duplicate entries but results often in user-visible errors.
  • Improved error pages.
  • Improved “inter-page” notification/error message delivery and display system.

Tampere, January 6th 2005,
Jarkko Laine

Call for Aid

Airbag -Greg wrote a thought-provoking article about the aid for the victims of the tsunami disaster in South-East Asia. As he also deliberately shared his help icons, I’m going to put two on this page, too.

!/images/24.gif (Help your local Red Cross)!:http://www.ifrc.org/address/rclinks.asp

Here’s what we’re going to do with Maria: As one commenter in Greg’s post proposed, we’re not going to buy any drinks for the New Year’s eve. On top of that, we leave firecrackers in the store shelves, a common gesture in Finland. Instead, we donate 70 euros to Finnish Red Cross catastroph aid. That’s not a whole lot, but we’re both still students.

And to all (two) Finnish orienteers who are reading this blog, there’s a campaign in Suunnistus.net to raise more aid for the Finnish catastroph fund. Please consider mobilizing your club for the effort.

Evolution? What’s That Again?

One thing that was widely accepted as a potential explanation for the result of US presidential elections was that almost half of Americans believe that God created human beings in their present form about 10,000 years ago. The same research revealed that only a third of Americans believe in Darwin’s evolution theory.

Fair enough, but that was just a gallup, right? Dream on, pal. Now a school district in Georgia has ordered these stickers applied to science textbooks teaching Darwinism:

!/images/22.gif (Evolution sticker)!

Scary, huh? I thought so, too. And what’s really horrifying is that the mentioned school district is probably not alone. But now the scientists are striking back. Some guys at Swarthmore have prepared a page of stickers, ready for you to print out and consume. Take a look, they’re hilarious (in a sad clown way). This is one of my favorites:

This book discusses evolution. President George W. Bush said, On the issue of evolution, the verdict is still out on how God created the Earth. Therefore, until 2008 this material shood be aproched with an open mind, studeed carefuly, and critcly consid’rd.

(via Joel)

Open Letter to European Ministers of Agriculture on Software Patents

UPDATE 2 There’s now a site up dedicated for thanking Poland for their extraordinary courage. Please, go ahead and express your gratitude. It’s well worth it.

UPDATE The final vote was postponed because Poland was against the directive. According to the Polish Minister of Science and IT, Wlodzimierz Marcinski, the directive would weaken the position of small and middle-sized businesses. So true. Hurray to Poland! More at el Reg.

Software Patent Directive on Agricultural Council List of A-Items

Dear EU Minister of Agriculture and Fisheries,

At the Agricultural Council’s meeting on Tuesday and Wednesday, the Directive’ COM 2002/0047 (COD) “On the Patentability of Computer-Implemented Inventions” (Software Patent Directive) is likely to be inserted into the list of A-items in the last minute.

This list should not be accepted.

Please object when the Council President asks for confirmation of the agenda (at the beginning), and demand the removal of the software patent directive from the list of A items.

The Council’s rules of procedure demand that the provisional agenda be sent 14 days in advance. In this case, the software patent directive was set on the agenda no earlier than 2 working days in advance.

According to Article 3 Items 7-8 of the Council’s Rules of Procedure, it is enough if one country objects to this late tabling, but support for removal may be expected from several countries.

The proposed text does not enjoy a qualified majority. It has been inserted into the agenda on the basis of questionable interpretations if not violations of the Council’s Rules of Procedure.

  1. The Dutch government has been obliged by its parliament to withdraw support. A proposal can not be adopted without a vote, and if it is voted, the Dutch presidency must abstain. If the Dutch presidency does not abstain, minister Brinkhorst may face a motion of distrust and be dismissed. This means that, given the continued opposition from Spain, Italy, Belgium and Austria, even without Poland’s abstention, the current Council Proposal no longer enjoys a qualified majority.
  2. On 19th of May and on 16th of November the Polish government has stated that it can not support the Council proposal. However the Polish EU minister, who is not in charge of the dossier, has so far, under pressure from the Council presidency, been reluctant to execute the decisions of the Polish government.
  3. The Council proposal has been criticized by all groups of the German Federal Parliament (Bundestag) as being deficient. As the inter-group resolution of the 30th of November 2004 points out, it does not satisfy the demands for clarity and balance that a proposal with such significance must fulfill.
  4. The Latvian Government has made it clear in a unilateral statement that it does not support the proposed text. The French and Hungarian governments have also expressed reservations. In Slovenia, Slovakia, Portugal and Hungary there is practically no support for software patents anywhere in the industry or government, except in the narrow circles who dominate the Council’s patent working party.
  5. The new vote is needed because the Rules of Procedure of the Council demand a qualified majority at the time of the formal adoption of a Common Position. A political agreement can only be adopted, if it is supported by a qualified majority of governments at the time of the vote. “Adoption as an A-item” means “adoption without discussion”, not “without vote”. There can be no adoption without vote.
  6. The change in voting weights on 1 November means that the Council proposal now lacks a qualified majority if either the Netherlands or Poland abstain.
  7. The explanatory documents for the Council draft were made available only very recently so that at the time of this Council meeting only half of the six-week period reserved for the consultation of national institutions will have elapsed. The urgent scheduling of a parliamentary special session in the Netherlands after the COREPER meeting on December 15 shows the importance of this consultation period. This text rejects essential amendments by the European Parliament, arguing that they are “incompatible with the TRIPs treaty” or that they would not reflect “established practice”. These arguments are new, not covered by any “political agreement” and in clear contradiction to the resolution of the German Parliament and can not be adopted without a vote.
  8. The Protocol on the Role of National Parliaments in the Treaty of Amsterdam explicitly encourages participation by national parliaments in the EU legislative process. It does not exempt the Council of Ministers. Accordingly, attempts to thwart the integration of the positions of several national parliaments (NL and DE) at this stage would be illegitimate.

The software patent directive is creating great difficulties for the Council because the Council has been nominating the goats to be the gardeners. The “Intellectual Property (Patent) Working Party” consists of the very national patent administrators who in personal union also run the European Patent Office. They have been unwilling to deal constructively with the questions at hand. They have ignored the substantial amendments of the European Parliament without justification and without addressing the problems of economic policy which the Parliament tried to address. They have in fact merely restated their previous agreement of November 2002, in which they had recited recent doctrines of the European Patent Office. These doctrines, in effect, authorise the monopolisation of business methods, algorithms, data structures and process descriptions in the same way as in the USA, without any effective limitation. The gap between these doctrines and the Parliament’s proposal is so wide that it will be impossible to overcome it within the procedure of a second reading. The Council has yet to begin a real first reading and to deliver a text which at least shows some willingness to face the issues. Now is the opportunity to take this first step. If it it is not taken in the Council’s first reading, then the directive is unlikely to get anywhere in the next steps of the co-decision procedure.

In Summary:

  • The current Council Proposal can not be passed as an A-item, and there is no need for any minister in the Agriculture Council to accept it.
  • Any attempt to pass the proposal as it stands is higly hazardous for information society and democracy in the EU and incompatible with the Rules of Procedure of the EU Council.

Yours sincerely,
Jarkko Laine

Ruby Breakfast, Anyone?

My other programming language of choice, TCL, has had its own merchandise for a long time, so I guess it was about the time to find something for Ruby, too. So, here you go, folks, enjoy my new breakfast juice of choice (With juicy bits, of course!):

Ruby Breakfast Juice