Blog

  • IBM DB2 patch for MediaWIki

    MediaWiki is the software that powers sites like Wikipedia, Ubuntu Help Wiki, and many others.

    In my spare time, I’ve written a patch to add IBM DB2 support to the development trunk. Hopefully, it will be added to the official source soon.

    In the meantime:

    There is a very good reason for the filenames.

    This is all under GPL, so don’t look at it if you work on closed-source wikis.;-)

  • Make tickets by milestone useful in trac

    Trac is a great bug tracking, work ticket, action item management environment. It integrates well with SVN and other source control repositories.

    Its Roadmap view conveniently order milestones by due date. However, the custom report queries it comes with order milestones by their name. Frankly, that’s much less useful. I understand that they are replacing the SQL-driven custom reports with a customizable GUI interface, but in the meantime here’s how you can fix the issue:

    1. Go to Edit Report
    2. Insert this clause after any FROMs and before any ORDER BYs:
      LEFT JOIN milestone m ON m.name = t.milestone
      
    3. Prefix any ambiguous column names with a t.
    4. Insert due as the first column in the ORDER BY list

    The report will now sort by milestone due date while allowing for empty milestones.

    See Also

  • Install DB2 via the command line

    Links download screenI installed DB2 on an Ubuntu Linux server via SSH and the command line installer this morning. This is not particularly exotic, but is different from using the GUI installer on either platform. Still, I should jot down my steps:

    1. SSH to your server. On Windows, use Putty or the OpenSSL package in Cygwin.
    2. Open up a text mode browser like lynx or links
    3. Go to http://www.ibm.com/db2/express/
    4. Download Express-C. Get some tea and snacks while that happens.
    5. tar xzvvf the file and cd into the directory
    6. If the next step fails, you may need to install some libraries. I had to sudo apt-get install libstdc++5
    7. sudo ./db2setup
    8. You now need to manually configure the DB2 server
      1. Set up users and groups
      2. Create a DB2 Administration Server
      3. Create a DB2 instance
      4. Create links to DB2 files
      5. Configure TCP/IP communication
        1. Configure services file
        2. Update database manager
        3. Set communications protocols
      6. Apply license (already done, verifiable by db2licm -l)

    Extra notes just in case:

    • sudo is the usual way to escalate privileges on Ubuntu.
    • sudo su - db2inst1 is the way to switch users to, in this case, user db2inst1.
    • Default settings in the steps above make db2inst1 the user with SYSADM permissions for DB2.
    • For SFTP file transfer, you can use WinSCP or Filezilla with the same credentials as for SSH.
  • pureXML in DB2

    pureXML is the native XML storage capability in IBM DB2. It allows for whole XML documents to be stored in a DB2 table column, and for them to be easily queried via either SQL or XQuery or some combination of the two.DB2 pureXML book Getting Started with DB2 has a decent introduction to both . There’s also schema validation, versioning, and other esoteric features.

    I’ve played with it a fair bit and found it quite performant in my admittedly limited scenario of a couple thousand xml docs.

    Conor O’Mahony blogs extensively on the topic. In terms of community, there’s an official site, a comprehensive wiki, a forum.

  • Community

    Battle of Gaugamela

    October 1st is not just the anniversary of Alexander the Great’s triumph at Gaugamela. It’s not just the birthday of Jimmy Carter. It’s not just the National Day of the PRC.

    It’s also the online community action day. It is the day when we comment, we respond, we link, and we blog. It is the day when we go on a forum, like the DB2 Express forum, and answer just one question. It is the day when we pass on the urls of good sites, perhaps PlanetDB2 or ChannelDB2, to our friends and colleagues. It is the day when we find the blog posts that helped us solve an intractable question and say “Thanks! Gracias! Paldies! Spasibo!”

  • Back

    A month ago, Lisa and I returned from Germany. Along with Poland, Latvia, and Estonia, it was the site of our honeymoon. Germany was, of course, beautiful, but I was fascinated to see Latvia again. I hadn’t been back since I had left with my parents in 1995, and it has changed innumerably for the better.

    Lisa and Leo Berlin Haupstbahnhof Old Warsaw at Night Riga Meat Market

    But I digress. Not only have I learned to say “danke schön”, but so has the free DB2 book. Getting Started with DB2 Express-C is now available in Deutsch.

    Getting Started with IBM DB2

    I find that it is a good introduction to DB2 Express-C. The latter is the free database server in connection with which I am employed, but whose opinions I do not necessarily represent.

  • Firebug

    There’s now a version of Firebug that runs in IE, Safari, and Opera. It works as a bookmarklet or a javascript file. The profiling, debugging, and network sniffing features that make the full version of Firebug invaluable in Firefox aren’t there, but the DOM browsing feature alone makes the bookmarklet worth it.

    Firebug Lite

    Opera Dragonfly and Safari Web Inspector are the more full-featured, browser-specific alternatives.

  • Write to be read

    In 1997, Jakob Nielsen wrote How Users Read on the Web. His organization conducted a formal study of usability and found:

    • Concise text (half the words) is 58% more readable than rambling text.
    • Scannable text (bullets) is 47% more readable than wall of text.
    • Neutral language (facts) is 27% more readable than marketese.

    Nielsen added specific recommendations:

    • Mark keywords
    • Use descriptive headings (not puns or references)
    • Use bullets
    • Limit one paragraph to one idea
    • Start with the conclusion
    • Halve the wordcount

    Concise text

    Blaise Pascal: I have only made this letter long because I have not had the time to make it short.

    Maintaining high information density is hard. You need to edit and cut the dead text. It takes up your time, but it saves readers time; it is respectful.

    Scannable text

    I think that Jakob Nielsen and Jeff Atwood overuse bolding. Nevertheless, they remain widely read because their postings are clear and readable. I can see at a glance their topics, their reasoning, and their conclusions.

    Neutral Language

    Being positive and writing empty boasts is different. Don’t blather about awesomeness, or people will ignore even the facts.

    Inverted pyramid style

    Observe:

    • Newspaper stories start with the most important fact and work down.
    • Essays start with the thesis and then prove it.
    • Reports start with an executive summary.
  • ERROR: Failed to build gem native extension.

    I ran into a tiny pickle while installing the ibm_db gem on Ubuntu:

    Select which gem to install for your platform (i486-linux)
     1. ibm_db 0.9.5 (ruby)
     2. ibm_db 0.9.5 (mswin32)
     3. ibm_db 0.9.4 (ruby)
     4. ibm_db 0.9.4 (mswin32)
     5. Skip this gem
     6. Cancel installation
    > 1
    Building native extensions.  This could take a while...
    ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
        ERROR: Failed to build gem native extension.
    
    ruby extconf.rb install ibm_db
    extconf.rb:9:in `require': no such file to load -- mkmf (LoadError)
    	from extconf.rb:9
    

    The problem is that mkmf isn’t included in the base Ruby package on Ubuntu. You need need the full development package to install gems from source. Installing it solves the problem.

    sudo apt-get install ruby1.8-dev
    
  • Daily digest

    I am looking for an online tool that takes a feed and then republishes in digest format — one entry per day. Feed Informer just does a straight, entry-for-entry republishing. Ditto for Feedburner.

    This is for a Twitter feed, and Twitter Digest claims to do what I want, but it appears defective and unprofessional overall.

    Any ideas?

    Update: I found a Yahoo Pipes-based solution.