Oracle PL/SQL declare, begin, end from Ant

Ant again. We had a file with Oracle PL/SQL statements using declare, begin and end. When using the sql task in Ant, it complained about reaching end-of-file on the line with “declare”. The problem is that Ant assumes that one line is one SQL statement, but it’s not that simple when using declare, begin and end. The solution is to set slash (‘/’) as a statement delimiter. The excellent blog article Executing Oracle PL/SQL from Ant describes the problem and solution in more depth.

Happy 50th Birthday, LEGO!

In order to celebrate I’m a little tempted to start building something with my already old LEGO Mindstorms, or even buy something new, but I will attend to other projects today!

Printing “Things” in The Project

The Project will allow users to create and edit something I call “Things” in this article. One feature that is quite high on the priority list is to be able to print Things. I found the article “Print this page” with Ruby on Rails but I wanted a separate page for printing a Thing. I have created a layout called “print” and my ThingsController contains a method like this:

  def print
    @thing = current_user.things.find(params[:id])
    render :layout => "print"
  end

My routes.rb contains something like:

  map.print_thing '/things/:id/print',
    :controller => 'things', :action => 'print'

The print layout is currently bare-bone HTML with this script snippet right before </body>:

<script type="text/javascript">javascript:print()</script>

Is required in or not?

In an XSLT script I didn’t use <xsl:text> inside of <xsl:message>. It worked fine in xsltproc, but the Java XSLT implementation we use complained. What was wrong then? The text in an <xsl:message> was not inside an <xsl:text> element.

Bad code:

<xsl:message>Don't do like this</xsl:message>

Good code:

<xsl:message><xsl:text>Do like this</xsl:text></xsl:message>

To avoid making the same mistake (or another) I wanted to validate my XSL. Searching for “xslt.xsd” turned up something that seems out-of-date. Some further searching revealed the Validating XSLT 2.0 article that include a link to xslt10.rnc. For some reason Jing didn’t recognize this file until I converted it to XML syntax with Trang. Unfortunately the above mistake was not caught by the RELAX NG schema either!

Actually, the <xsl:message> example at w3schools.com does not use <xsl:text> in their example, so maybe it is simply an implementation issue.

Sneak-peak at HTML 5 – no frames!

The page HTML 5 differences from HTML 4 (W3C Working Draft 22 January 2008) contains a long list of changes. The removal of frames was probably to be expected. Multiple elements and many attributes that only have a presentational function in HTML 4 are removed. There are also some elements that have slightly changed meaning, for example <i> and <b> are given a semantic rather than presentational function. Quote:

The b element now represents a span of text to be stylistically offset from the normal prose without conveying any extra importance, such as key words in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is emboldened.

Coding, not blogging

During the afternoon today I attended the first part of a mostly in-house course Scrum for team members led by Arne Åhlander. I’ll hopefully write more about it later, but now I’m going to work on The Project. Before I forget; I was recommended Virtual Private Server (VPS) hosting at GleSYS. Anyone else who can share their experiences with them?

Project prioritization – Inspect and Adapt!

I try to avoid telling myself that I don’t have time for this or that. The truth is that it comes down to how I prioritize those things. I naturally try to put family and work first, but I also make room for my own projects and ideas. Some projects only take a few hours, others linger for a long time.

For example, I would like to register the really neat domain name and aggregate blogs on a certain topic connected to the domain name. I have promised myself (and my visitors!) to make a price database for my energy drink site. I have barely started working on my so called Holiday Project. I have not finished the support for tags on my site Folkmun. I would need to polish my Instant Messaging to RSS system Esagila a bit. There are other projects that are postponed indefinitely. All in all, I really shouldn’t bother thinking of new projects right now.

This blog is another project. I could have been working on any of the above instead of writing this blog post! It’s all about what I give priority to, and I’m not always good at choosing. I probably need to Inspect and Adapt, as done in Scrum. Speaking of Scrum, maybe I should create a product backlog for my projects?