Tuesday, May 31, 2005

this is an audio post - click to play

Monday, May 30, 2005

Msgr Michel's homily

Feast of Corpus Christi - Body and Blood of Christ

Eucharist - something to worship, but also part of daily life - all people are tabernacles

"Why bother going to the trouble of finding out what went wrong?" [The Seven-Day Weekend, 140]

Sunday, May 29, 2005

"As control wanes, creativity and shared values bloom." [The Seven Day Weekend, 136]

this is an audio post - click to play

this is an audio post - click to play

Saturday, May 28, 2005

Rant on design of online registration forms

- Why must I specify a "user name". Why not just let me log in with my email address?
- Why must I type in my password twice? I'll probably get it right, and if I don't, I can just click Forgot Password? and you will email it to me.

First cell phones for me and my mom.

I'm shopping around for the first cell phones for my mom and me. We're probably going to go with Virgin Mobile. Their billing plan is very simple, compared to Telus/Bell/Rogers/Fido whose billing plans are very complex. Plus, prepaid minutes last 120 days instead of the usual 30!!!

Friday, May 27, 2005

"Discovery ... The antithesis is control" [Seven Day 64]

Currently reading "The Seven-Day Weekend" which is about employee empowerment.

Thursday, May 26, 2005

Great idea for starting each day with energy

I have stumbled on a great idea for starting each day with energy - wake up a little bit early and do something you really enjoy. For me that means surfing the net (well, checking my RSS feeds). For others it might be playing video games, watching TV, gardening, sailing, whatever.

"As the control mechanism grows harsher and harsher, what's lost is the central purpose of the busness -- a satisfying,worthwhile life for those involved and a reasonable reward for their investment and hard work." [The Seven Day Weekend, p6]

Monday, May 23, 2005

print_r for Ruby

print_r is a function that PHP developers like to use to display the contents of an object. Here's a version I wrote for Ruby:

def print_r(hash, level=0)
result = " "*level + "{\n"
hash.keys.each do |key|
result += " "*(level+1) + "#{key} => "
if hash[key].instance_of? Hash
result += "\n" + print_r(hash[key], level+2)
else
result += "#{hash[key]}\n"
end
end
result += " "*level + "}\n"
end

It pretty-prints the contents of a nested map; for example, print_r({"A"=>1, "B"=>{"a"=>"@", "s"=>"$"}, "C"=>3}) displays the following:

{
A => 1
B =>
{
a => @
s => $
}
C => 3
}

Ruby script to find duplicate sequences of characters in STDIN

chunk_size = 40
s = STDIN.readlines().join("").gsub(/\s/, "")
chunks = Array.new
0.upto(s.size - chunk_size) {|i|
chunks << s[i..i+chunk_size]
}
chunk_to_count_map = Hash.new
chunks.each {|chunk|
chunk_to_count_map[chunk] = chunk_to_count_map.has_key?(chunk) ? chunk_to_count_map[chunk]+1 : 1
}
chunk_to_count_map.keys.sort{|a,b| chunk_to_count_map[a]<=>chunk_to_count_map[b]}.each {|chunk|
if chunk_to_count_map[chunk] > 1
puts chunk_to_count_map[chunk].to_s + "\t" + chunk
end
}

Sunday, May 22, 2005

Need to relax more

I've been working hard learning Ruby on Rails as I code Meetr.org, but I have been making the mistake of working all the time and not resting. I do work 40 hours a week for Vivid Solutions, and here I am spending all of my leisure time coding. It is a heck of a lot of fun, but my body is taking a beating.

So instead of 70% coding for Vivid, 30% coding for Meetr.org,

I'm going to switch to 70% coding for Vivid, 15% coding for Meetr.org, 15% resting my body.

Father Tony's homily

The Trinity - difficult to explain
- no need to bargain with God - just live as best as you know how. It's the intention that counts. Do your bit and do it well, and God is pleased.

Meetr.org screenshots for Jeff

These screenshots are for Jeff Werner, who has graciously offered to provide some design advice (and maybe even a full design) for Meetr.org.




Saturday, May 21, 2005


x


x

Friday, May 20, 2005

Eclipse vs. Visual Studio.NET 2003

Eclipse advantages over Visual Studio.NET
- refactoring (e.g. rename method)
- quick-fix
- background compilation
- it's free!

Thursday, May 19, 2005

Melody Meme (Musical Baton)

Making the rounds of the blogosphere (thanks Jeff!)

Total volume of music files on my computer:
442 songs

The last CD I bought was:
Listen (music appreciation self-study, 6 CD's)

Song playing right now:
Berlioz's Fantastic Symphony (from the aforementioned Listen)

Five songs I listen to a lot, lately:
Random song from the Listen CD's
Random song from the Listen CD's
Random song from the Listen CD's
Random song from the Listen CD's
Random song from the Listen CD's

Five people to whom I’m passing the baton:
Todd Brill, Victoria BC
Jodie, Victoria BC
Shannon Coleen, Victoria BC
Chris Chan, Victoria BC
Leon, you guessed it, Victoria BC

Today was the best day I have had in a couple of months.

* I made life wonderful for my clients by completing work on a couple of projects (both of them database related). In one case I was encountering a problem that was proving to be quite difficult to track down (NullPointerException inside jsde80.jar), but the problem vanished when Richard from Pacific Geotech refreshed the database. Yay!

* One of my acquaintances was strapped for cash, and I surprised him with a little spur-of-the-moment gift

Awesome!

"a free hand in designing" [Leadership Is An Art xviii]

Wednesday, May 18, 2005

That I did some things extraordinarily well

Monday, May 16, 2005

"implementing class" "cannot be found"

Solved this VB error by importing *all* the libraries available.

I ran the Setup.exe file generated by the VisualStudio.NET install wizard, and it ran without errors. But my component wasn't installed.

So I tried registering the component manually, and in fact an error is occurring:

C:\Program Files\Vivid Solutions Inc\Setup1>regasm MyToolbarVBNET.dll
Microsoft (R) .NET Framework Assembly Registration Utility 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

RegAsm error: File or assembly name ESRI.ArcGIS.Utility, or one of its dependencies, was not found.


I wish the VisualStudio.NET installer would display an error when this kind of error occurs.

Update: Hm. The VS-generated setup file doesn't register the component. I actually had to manually register it with RegAsm.exe. Dang. Will have to figure this one out.

I was getting the following .NET error. It vanished when I put my project on a local drive rather than a network drive:

---------------------------
NotSupportedException
---------------------------
Exception:
The given path's format is not supported.

Stack trace:
at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
at System.Security.Util.StringExpressionSet.AddExpressions(String[] str, Boolean checkForDuplicates, Boolean needFullPath)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.FileInfo..ctor(String fileName)
at ComponentCategoryRegistrar.esriSamples.AddInUtilities.AddInUtilities.create_txt_file(String fn)
at ComponentCategoryRegistrar.Reflect_mod.write_reg_file()
at ComponentCategoryRegistrar.Reflect_mod.write_cat()
at ComponentCategoryRegistrar.Connect.Exec(String cmdName, vsCommandExecOption executeOption, Object& varIn, Object& varOut, Boolean& handled)
---------------------------
OK
---------------------------

Sunday, May 15, 2005

Bishop Richard's homily, Pentecost Sunday

- disciple = follower, copy
- baptism, confirmation, holy communion, confession

Three things I want people to remember about me (revised)

* That I believed in someone when no-one else would.
* To Mom, Dad, and Bro: That I cherished our family.
* That I liked to surprise people. In a good way.

Saturday, May 14, 2005

John McIntosh

Conversed a bit with John McIntosh, a Smalltalk expert in Victoria BC. I was delighted to hear that Smalltalk work is active in BC.

Currently reading: The Art of the Start

Guy Kawasaki asks: What is your personal mantra (informal mission statement)? Mine is: Technologies that make life wonderful.

untitled

"The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" (I found it!) but "that's funny. . . ." [Asimov, quoted in Art of the Start, xi]

"The true measure of a man is how he treats someone who can do him absolutely no good." [Samuel Johnson, quoted in Art of the Start, 211.

"Everyone should carefully observe which way his heart draws him, and then choose that way with all his strength." [Hasidic saying, quoted in Art of the Start, 3]

Three things I want people to remember about me:
- that I made things that make life wonderful
- (to my parents and brother) that we were super-close

What are three things you want people to remember about you?

"Morality arises only because we share a world with others about whom we care ... we recognize that others have interests like ours and that their interests are as important to them as ours are to us." [Small Pieces 191]

"This is the root of the paradox of the public. It is ultimately a reflection of one of the two abiding human mysteries: there are other people and I am going to die." [Small Pieces 118]

I was lost
I was tired
I was searching
But then I read Books
And now my energy is restored.

"The Web works because it's broken." [Small Pieces 83]

Visceral creativity

Homily at St. Andrew's Cathedral

finding time to pray
- God is present where you are, when you are (even when you're computer programming)
- attitude, not words
- slowing dow

untitled

Vb annoyances: vaguerror messages eg Type Mismatch
- casts are verbose - obstructs reading
- the "Dim" keyword -- redundant and unnecessary. I haven't seen a similar keyword in other languages

Wednesday, May 11, 2005

In Visual Studio, don't select Read, ReadWrite or Write permissions for MS-Access databases. Otherwise get error.

Also, make sure that both the exe and mdb are on local drives, not networked drives.

Monday, May 09, 2005

Father John's homily

* Ascension Sunday, Mother's Day, VE Day
* The work of the Christian: spreading the Good News: God of love and mercy

Saturday, May 07, 2005

People who share my philosophy of software development

  • Paul Graham
  • David Heinemeier Hansson
  • Cedric Beust
  • Dave Thomas

Yesss! GTD Weekly Review complete. I'm a free man!

Yee-haw!

Friday, May 06, 2005

Vb gripes

- use of "Set" inconsistent
- "Dim" redundant and unnecessary
- casting is verbose and hampers readability
-

Thursday, May 05, 2005

Ruby source code for descriptious


#!ruby

rss = "http://populicio.us/newlinks.rss"

rss = ARGV[0] if ARGV.length > 0

require "net/http"
def fetch(url)
Net::HTTP.get(URI.parse(url))
end

require "digest/md5"
def extended_descriptions(url)
extended_descriptions = ""
# Wait 1 second between queries, as per http://del.icio.us/doc/api [Jon Aquino 2005-03-06]
sleep 1
delicious_url = "http://del.icio.us/url/#{Digest::MD5.new(url)}"
fetch(delicious_url).split("\n").each { |line|
if line =~ /<div style="font-size: 90%; margin-left: 1em;">(.*)<\/div>/
extended_descriptions += "#{$1}..."
end
}
extended_descriptions = extended_descriptions[0..300]
if extended_descriptions.length > 0
extended_descriptions = "&lt;a href='#{delicious_url}'&gt;[D]&lt;/a&gt; " + extended_descriptions
end
end

in_item_tag = false
title_replaced = false
last_link = ""
fetch(rss).split("\n").each { |line|
# Assume tags are on separate lines [Jon Aquino 2005-03-18]
if line =~ /<item.*>/
in_item_tag = true
end
if line =~ /<\/item>/
in_item_tag = false
end
if line =~ /<title>(.*)<\/title>/ and not title_replaced
line = "<title>Descriptious: #{$1}</title>"
title_replaced = true
end
if line =~ /<link>(.*)<\/link>/
last_link = $1
end
if line =~ /<description>(.*)/ and in_item_tag
description = $1
line = "<description>&lt;i&gt;#{extended_descriptions(last_link)}&lt;/i&gt;&lt;br&gt;#{description}"
end
puts line
}


x


x

More vb notes: the equivalent of JavaDoc in the vb world is the Object Browser.

In VB, a cast requires 2 Lines and a new variable: dim and set.

Wednesday, May 04, 2005

Switching from Java to VB today. First thing I notice is that casting is done in a verbose way -- each cast rquires a new variable and a newline.

Second is that there is no JavaDoc system, so you rely on the vendor's API documentation system -- chances are that it is not as well designed as JavaDoc.

Day 1 is quite painful.

Monday, May 02, 2005

untitled

"When simple things need pictures, labels, or instructions, the design has failed." -- Don Norman

Sunday, May 01, 2005

If you find that Windows XP fails to complete logging out, I found that I needed to move my mouse over the system tray a couple of times. It's almost as if some stale icons are "holding on", and sweeping the mouse over them gets rid of them.

Father Tony's Homily

- Peter: suffering of the Christian
- Gospel: bottom line: love
- community at Sacred Heart - unity in Christ. God working through us.