Thursday, December 27, 2007

bellasante of boston


I tried to make a booking for my wife and a friend's wife yesterday for a spa treatment. So, I called the concierge to book it in for friday afternoon. The problem was they seemed very busy and I didn't know what to order or which location would be best. I didn't mind either Lexington or Wellesley but the concierge seemed in a rush so made me pick one right away. Then I was told after picking Wellesley there was nothing on the day I wanted.
I really felt like they were too busy to deal with me and decided the best way was to get off the phone as quickly as possible and try again with another concierge or spa. After replying to a few "contact us" forms for a site I am working on, I thought I should at least let them know the feedback to see if indeed they are too busy or if it was just a bad time and I got the wrong concierge. In any case, I filled out their web form only to find it was a "post" action to "#" and didn't actually go anywhere.
They seem to have a lot of "best of boston" awards so the spa part might be nice - it just seems that half the challenge is to get to that part.

Wednesday, December 05, 2007

Jack Cards on the WSJ.

One of the startup web sites we have been working on and hosting at ProjectLounge, was reviewed by the Wall Street Journal. I am looking forward to taking the site to the next level - but a review like this is certainly a good start for the site. It is full of good suggestions and a positive conclusion.
"I think its system would be welcomed by many people looking for good-quality, well-designed cards that catch the eye. It saves users the hassle of last-minute trips to the card store, and still lets greeting cards keep their personal touch, which is what makes them such a permanent fixture in our lives."

Monday, November 19, 2007

Fire Truck Photos

This morning we saw a Fire Truck visit our street - no fire or anything exciting. However, I did capture some photos.

Tuesday, August 28, 2007

Commando Crawl


This our friends commando Teddy.

Friday, August 24, 2007

Sunday, July 29, 2007

Mount ssh/sftp drives into OSX

Dealing with a server that is hosted requires a stronger level of security. This typically means no ftp or file sharing is allowed. However, ssh is secure and you can even prevent passwords and use rsa keys.
However, all this security does not mean you cannot mount a drive using OSX. Using the MacFuse at google, you can mount a remote ssh/sftp drive with a hostname, username, password (or rsa key) and path.
Steps:
1. Download and install MacFuse from the link
2. Restart your OSX (it does some low level magic that makes writing mounted disks easier)
3. Download and copy the sshfs into your Applications from the link.
Now that you have it download, you can run the sshfs application and connect to your disk.
If you do use an RSA key or the like, you will need to first connect via the command line so that the host gets to be trusted and then it will work fine from there on.

Tuesday, July 17, 2007

DIIOP NotesException: Server access denied

The R5 settings in the server document still play a part in how DIIOP handles permissions in 7.0.2. The getFirstDatabase function in DbDirectory, will return "Server access denied" if the "Allow HTTP clients to browse databases" is not set to "Yes" on the R5 Basics tab under HTTP Internet Protocols in your Domino server document.

Saturday, July 14, 2007

Customized iPhone ringtone

One the the missing features of the iPhone is not being able to select our own ringtone. Well, thanks to this web site, I was able to upload my own mp3 file as a ringtone and it worked.
It is not as easy as other phones but still possible with a little instructions.

Monday, July 02, 2007

Outlook Permissions for ICS files

A user recently got the error: "Can't create file: calendarevent.ics. Right-click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder."

After some serching, it is not really a permission problem but rather when you install certain Microsoft Small Business products, the OutlookSecureTempFolder key in the registry is changed from "..\Temp\..." to "...\Temporary Internet Files\...".

To fix this, have your system administrator, go into the registry and change the HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security registry key OutlookSecureTempFolder value from "...\Temporary Internet Files\..." to "...\Temp\..." and you should be able to open ICS events from QuickPlace or any other service again.

Thursday, June 28, 2007

Christmas come early?

Quickr has shipped early and after installing it and the latest fixes from "fix central", I have started the process of picking through the new features.
I have tested our existing themes and they all seem to work just fine so far and with a little more testing, I think we will be safe to upgrade some servers.
I have to say well done to Satwik and his team for getting QuickPlace team buzzing like it was 1999.

Saturday, June 23, 2007

It is all happening on the 29th

On the 29th of June, there will be so many things to do, I won't know what to do with myself.
1. Quickr 8 Launches;
2. iPhone is released; and
3. Sicko comes out.
I am sure there will be lots more happening that day, but these are things I have actually been waiting for and anticipating.
This week, I have been very busy sorting out some Windows Vista issues with QuickPlace 7 as well as a ruby on rails development project for jackcards. I am also in the process of installing a NAS for domino which so far indicates 2 to 4 times increase in our current IO performance.
So, if I have been a little quiet lately, I apologize and will be a little more sociable soon (even if it is just to show off an iPhone if I get the courage to buy one).

Monday, June 11, 2007

Rational Climate Change Argument

Rational Climate Change Argument

This is basically the same as Pascal's Wager with some key differences. These are that Pascal was based on religion where this is actually based on science. However, it is a very good use of a truth table

Friday, June 01, 2007

Ruby on Rails Domino Active Record

I have been using this class for a while that allows some ActiveRecord like features for IBM Lotus Domino databases.

An example use would be:


class Contact < DominoRecord
attr_accessor :email_address, :first_name, :last_name

validates_presence_of :first_name, :last_name, :email_address

validates_format_of :email_address, :with =>

/^\s*(?:(?:[^,@\s]+)@(?:(?:[-a-z0-9]+\.)+[a-z]{2,}\s*(,\s*|\z)))+$/i,

:message => "must be a valid email address",

:on => :create

@@database_name = "contacts.nsf" #your database here

@@server_name = 'www/projectlounge' #your server here

end


It currently uses the OLE/COM bridge to get to domino so only will work on windows at this stage. The next step would be to compile it with the NotesAPI to allow it to work on all platforms.

The model source code is here (I do not maintain this anymore but happy for others to take it on under LGPL):


require 'win32ole'

class DominoRecord



attr_accessor :form



def save

@document = @@database.CreateDocument

form = self.class.to_s.downcase

@document.ReplaceItemValue "form", form

self.instance_variables.each do |inst|

field_name = inst.sub(/[@]/, '')

field_value = self.instance_variable_get(inst)

@document.ReplaceItemValue field_name, field_value.to_s

end

@document.Save(true, false)

end



def save!;

save

end

def update_attribute; end

def new_record?; end

include ActiveRecord::Validations



@@session = nil

@@database = nil

@@database_name = nil

@@server_name = nil



def [](key)

instance_variable_get(key)

end



def self.find(*args)

options = extract_options_from_args!(args)

validate_find_options(options)



case args.first

when :first then

@document = find_initial(options)

when :all then find_every(options)

else

@document = find_from_ids(args, options)

end



record = self.new

@document.Items.each do |item|

record.send(item.Name.downcase + "=", item.Text) unless ["document", "errors"].include?(item.Name)

end

record

end



def DominoRecord.human_attribute_name(attribute_key_name)

ActiveRecord::Base.human_attribute_name(attribute_key_name)

end



def initialize(attributes=nil)

unless @@session

@@session = WIN32OLE.new('Lotus.NotesSession')

@@session.Initialize

end

@@database = @@session.GetDatabase(@@server_name,@@database_name) unless @@database



unless form == nil

fields = @@database.GetForm(form).Fields

else

fields = @@database.GetForm(self.class.to_s).Fields

end



fields.each { |field| self.class.__send__(:attr_accessor, field) }



return if attributes.nil?

attributes.each do |k, v|

send(k + "=", v)

end

end



def finalize

@@session.Finalize

end



def session

@@session

end



def database

@@database

end



def document

@document

end



def attributes=(attributes)

return if attributes.nil?

attributes.stringify_keys!

multi_parameter_attributes = []

attributes.each do |k, v|

send(k + "=", v)

end

end



def self.method_missing(method_id, *arguments)



unless @@session

@@session = WIN32OLE.new('Lotus.NotesSession')

@@session.Initialize

end

@@database = @@session.GetDatabase(@@server_name,@@database_name) unless @@database



if match = /find_by_([_a-zA-Z]\w*)/.match(method_id.to_s)



@view = @@database.GetView($1)

puts arguments

@document = @view.GetDocumentByKey(arguments[0])



record = self.new

@document.Items.each do |item|

record.send(item.Name.downcase + "=", item.Text) unless ["document", "errors"].include?(item.Name)

end

record

else

super

end

end



private

def self.find_initial(options)

#not working

end



def self.find_every(options)

#not working

end



def self.find_from_ids(ids, options)

#not working

end



def self.find_one(id, options)



if result = @@database.GetDocumentByUNID( id )

result

else

raise RecordNotFound, "Couldn't find #{name} with ID=#{id}#{conditions}"

end

end



def self.find_some(ids, options)



result = find_every(options)



if result.size == ids.size

result

else

raise RecordNotFound, "Couldn't find all #{name.pluralize} with IDs (#{ids_list})#{conditions}"

end

end





def self.extract_options_from_args!(args) #:nodoc:

args.last.is_a?(Hash) ? args.pop : {}

end



VALID_FIND_OPTIONS = [ :conditions, :include, :joins, :limit, :offset,

:order, :select, :readonly, :group, :from ]



def self.validate_find_options(options) #:nodoc:

options.assert_valid_keys(VALID_FIND_OPTIONS)

end

end

Monday, May 14, 2007

Allow selections not in list (for the web)

One of the neat options with drop down selections in Notes, is the ability to let people type an option that is not in the list. This helps build dynamic lists.

Here is some javascript to use to get this working on the web:


function changed(el, cmp, pmt){
if(el.options[el.selectedIndex].value==cmp) {addoption(el, pmt);}
}
function addoption(el, pmt){
var txt=prompt(pmt,'');
if(txt==null) {return;}
var o=new Option( txt, txt, false, true);
el.options[el.options.length]=o;
}


You can either put this in an included javascript file or wrap it directly inline.

Then you can call it using the onchange event for your selection field:

onchange="changed(this, 'New Group', 'Please enter new group:')"

Where "New Group" is the text you want to trigger the prompt for the text and "Please enter new group" is the prompt you want to display.

Monday, April 23, 2007

A week into Linked In

A customer recently sent me an email to join linked in, a social networking "business" site. It seems myspace is more for music fans, facebook for college or recent graduates where linked in is more for professionals.
The differences are certainly there in the UI. For instance, in facebook, you can say if a linked friend "hooked up" with you whereas there is no option for this in linked in. I guess it still goes on, but it is not something you would publish as it has little business benefit and does not make you look very professional.
I was surprised how many IBM'ers were already on the network and thank those who have linked to me. The purpose is to find connections, so I thought I would give it a little test.
The test worked. I have managed to find one lost friend through our xhtml developer. I worked with David Wyss for a while around the QuickPlace redbook and he had seemingly vanished. I had asked a few common contacts (IBM) what happened to him but they didn't know. When I searched through linked in, it found a connection through Australia (where I was looking in Switzerland) and it came through a non-IBM source (where I looked through IBM'ers). So, it seems we were not very far from each other after all - there was always 2 degrees of separation all this time and we just didn't know.

Sunday, April 08, 2007

Change custom field names in QuickPlace

If you have a custom form in quickplace and then change a field name, it will not go through and update all the pages that have been created by this form.
So, for instance, if you create a form that has a field called "categories" and want to change it to "category", here is an agent that will loop through all the documents in this room and all its inner rooms using recursion.

'category correction:

Option Public
Option Declare

Dim server As String
Dim placename As String
Dim s As notessession
Sub fixcategory(roompath)
Dim roomdb As NotesDatabase
Dim roomview As notesview

Set roomdb = s.GetDatabase(server, roompath)
If roomdb.IsOpen = False Then
Call roomdb.Open(server, roompath)
End If


Dim roomindex As notesview
Set roomindex = roomdb.GetView("System\Index")
Dim page As notesdocument

Set page = roomindex.GetFirstDocument

While Not(page Is Nothing)
'Work through all documents
page.c_category = page.GetItemValue("c_categories")

Call page.Save(True,False)
Set page = roomindex.GetNextDocument(page)
Wend

Set roomview = roomdb.GetView("System\Subrooms")
Dim doc As NotesDocument
Set doc = roomview.GetFirstDocument
While Not (doc Is Nothing)
Dim iroomtitle As String
Dim iroomfile As String

iroomtitle = doc.GetItemValue("h_Name")(0)
iroomfile = doc.GetItemValue("h_LocDbName")(0)

Print "Working on: " + iroomfile
Call fixcategory("quickplace/"+placename+"/" + iroomfile)

Set doc = roomview.GetNextDocument(doc)
Wend
End Sub
Sub Initialize
Set s = New notessession
placename = "test_place" 'Your place name
server = "www/projectlounge" 'Your server name

Print "Starting in a room"
'you can change this to main.nsf if you need
Call fixcategory("quickplace/"+placename+"/PageLibrary85257279005D300B.nsf")
End Sub


Tuesday, April 03, 2007

Rediscovering an ibm.com treasure

While digging up an old email from 2004 for someone, I found that my signature once contained a link to the IBM culture clash web site.
It does have some good information and for those that have traveled to some of these countries, it certainly can bring back some memories.

Monday, March 26, 2007

AJAX state_select

After downloading the state_select plugin for rails.
I put in a little extra work to make the state select AJAX updated.
The address form looks like:

<%= state_select 'address', 'state', country='US' %>

...
<%= country_select 'address', 'country' %>
<%= observe_field :address_country, :frequency=>0.5,
:update=>"state_select",
:url=> {:action=>'state_select', :only_path=>false},
with=>"'country=' + encodeURIComponent(value)" %>

Where the AJAX calls into a partial form:

<% if params[:country] == "United States" %>
<%= state_select 'address', 'state', country='US' %>
<% elsif params[:country] == "India" %>
<%= state_select 'address', 'state', country='INDIA' %>
<% elsif params[:country] == "Canada" %>
<%= state_select 'address', 'state', country='CANADA' %>
<% elsif params[:country] == "Australia" %>
<%= state_select 'address', 'state', country='AUSTRALIA' %>
<% elsif params[:country] == "Spain" %>
<%= state_select 'address', 'state', country='SPAIN' %>
<% elsif params[:country] == "Uganda" %>
<%= state_select 'address', 'state', country='UGANDA' %>
<% elsif params[:country] == "France" %>
<%= state_select 'address', 'state', country='FRANCE' %>
<% elsif params[:country] == "Germany" %>
<%= state_select 'address', 'state', country='GERMAN' %>
<% else %>
<%= text_field 'address', 'state', :class=>"text" %>
<% end %>

I have posted to their blog to see if the state_select could be updated so there was no translation needed between the "country" from select_country and the "country" parameter passed into the state_select. It would be also nice to return a text field if there is no state list for the given country.
This would mean the partial code would just be:

<%= state_select 'address', 'state', params[:country].uppercase %>

Thursday, March 22, 2007

Importing zip codes

This entry will show you how to quickly import zip codes into your database. From there, they can be used with AJAX lookups or verification.

Step 1: Download the zips.txt into your RoR (rails) db directory or some other place.
http://www.census.gov/tiger/tms/gazetteer/zips.txt

Step 2: Generate the table in MySQL

CREATE TABLE zip_codes (
id INTEGER NOT NULL AUTO_INCREMENT
, zip CHAR(5)
, state CHAR(2)
, town VARCHAR(50)
, population INTEGER
, PRIMARY KEY (id)
);


Step 3: Generate the model

ruby script\generator scaffold zip_code


Step 4: Run this import code

require 'csv'
CSV.open("#{RAILS_ROOT}/db/zips.txt", "r") do |row|
zip = ZipCode.new
zip.zip = row[1]
zip.state = row[2]
zip.town = row[3]
zip.population = row[6]
zip.save!
end


You can then monitor the table size and wait for it to grow to 29k+.

Tuesday, February 13, 2007

4th Grade Math Problem

A friend's 4Th grade child was given this problem a few days ago as homework. I found it really hard - not sure how it could be solved without a computer (but maybe someone knows the answer).

Where the letters are numbers from 0 to 9 excluding 3. Find the values for each letter that would make this true:
show + tight = coach

I have an answer and my working in the comments and welcome other solutions people might have.
So, if you want a tease, don't click on the comments until you have a go. I don't want to taint your thinking with my brute force attack.

Saturday, February 10, 2007

I just watched the secret

I just watched the secret today. It is a motivational movie that talks about positive thinking. I was really into motivational tapes/books and talks when I was in high school and early university. After that, I focused more on technology and computers than my personal mental state.
I like the idea that positive thinking can bring you anything you want but I tend to be more pessimistic these days. Having said that, I do believe that you can achieve more with positive thinking than you can with negative thinking - so I am happy that I watched the movie and I am going to be a little more positive in my day to day life.
So in that light, I wanted to list some of the items I am grateful for:
* my loving wife;
* good health;
* close friends and family;
* successful internet business;
* experience and friends at IBM/IRIS;
* ability to travel;
* cognitive skills; and
* the Irish (what's not to love about the Irish)

This list is far from inclusive - but it certainly covers the major topics.
Part of the positive thinking aspect is to also be grateful for what is going to happen in the future and believe it will happen. For me this would include:
* the above list 100 times over;
* brilliant solution to global warming
* peace through humanity towards others
* faster than light speed engines to travel to other worlds
* teleportation
* dramatic improvements in medicines that allows anyone to live as long as they like (this is a good one for all the agnostics)

Enjoy! .. and now back to the technology and computers :)

Thursday, February 08, 2007

QuickPlace 8/Quickr Screenshots

Satwik has posted a blog entry with a link to the Quickr screenshots. These were shown at LotusSphere 2007 and should be available mid year as part of the product. It looks really nice and will allow people to do a lot more within a Quickr.
PDF link with screenshots

Friday, January 26, 2007

Very positive LotusSphere 2007

I am traveling back from LotusSphere 2007 and am very excited about Notes 8, Quickr (QuickPlace 8), and Lotus Connections (Ventura/Activities). I have been to a few LotusSpheres over the years and this was my first that I was not there from IBM or Iris. The positive energy around Notes 8, Quickr and Portal Express reminded me of when I did my first QuickPlace talk. The Notes developers and my old team were getting beaten up in the meet the developers lab about all the bugs and feature requests - where I was in the QuickPlace lab soaking up all the positive energy and excitement from the business partners and guests. This year, the positive energy was there for the Notes 8 client developers to enjoy.
The Ask the Developers section at the end was the most telling for me. Although there was a fair share of difficult questions, it was so positive to hear everyone preface their questions with admiration for the work and effort the development teams had put into Notes 8, Quickr and Connections.
The proof will be when the code is shipped and people start to adopt the composite application model for delivering applications. It will give IBM customers and partners a really powerful way to extend and deliver value.

Wednesday, January 10, 2007

Running Domino on an Amazon Elastic Cloud

I was recently accepted into the Amazon EC2 limited beta and was able to create my first instance following the getting started tutorial.
As they currently have no support operating systems for Domino, I asked Daniel Nashed which he thought was most like the supported system. He suggested the CentOS as he has run 4.3 but not 4.4.
I then loaded up that instance using the Amazon tools. It is a very raw image without a web server but came up very quickly. After that I downloaded and installed Domino for Linux to the machine.
I had to authorize the domino port and remote setup port for my machines:

ec2-authorize default -p 1352
ec2-authorize default -p 8585

Then, I created the notes user:

useradd notes

Uploaded the latest rc_domino script and then ran the server in listen mode:

server -listen

The server complained about a missing library (/opt/ibm/lotus/notes/latest/linux/tunekrnl: error while loading shared libraries : libstdc++.so.5: cannot open shared object file: No such file or directory), so I had to install this via yum:

yum install compat-libstdc++-33

This resolved the startup problem, and the Domino setup ran as normal.
I have the server up at:
http://domu-12-31-33-00-03-6c.usma1.compute.amazonaws.com/
(I will probably take the server down after LS2007).
It seems to run as you would expect from 1.7GHz with 1.75Gb RAM. When I pull the statistics through the admin client, it looks perfectly healthy and I can create databases as you would normally.
For the money, it works out at about $73/month (10c/hour) for a small server plus bandwidth and storage. It is in a totally different league to AIX LPARs (you scale by adding more instances rather than making your current instance larger) but for a small business is it a really good alternative to running your own domino server. Looking after a rack in a colocation facility is a lot of work and Amazon gives the technical users a cheap alternative here.

Monday, January 01, 2007

QuickPlace Clustering over a Wide Area

I have started to experiment with wide area clustering of QuickPlace 7.0. In QuickPlace 8, it will use more Web 2.0 technologies and libraries such as Dojo. The impact of this will mean the QuickPlaces will become more chatty (more smaller and lighter requests). As a result, any latency issues might become more noticeable. To make the most of this, having your QuickPlace server as close as possible, will make the place much faster.
Once I can sort out any clustering issues, the next stage is to use directional dns from Neustar. This will direct the user to the closest server to the users location. For Australian users, this will be Sydney (latency of 20ms instead of the current 300ms), West Coast USA will be San Francisco (10ms instead of 80ms) and East Coast will keep hitting our main servers in Somerville, MA (10ms or less from New York). So far the Australian server is keeping up with the load and the West Coast should be online soon. I hope to have the world wide cluster working before LotusSphere 2007.