Monday, March 27, 2006

BitKeeper with Services for Unix

For several days, some of the bk commands have been
failing on my machine with the following error message:

Missing filename ("/bin/more - \?" for help)

Today I finally took the time to reseach what was causing
this.  The cause, as it turns out, was that bk was finding /bin/more as
part of SUA but the argument syntax was apparently not compatible. 
However, because bk found it, it tried to use it rather than fall back to it's
own built-in less.exe.  I was not using SUA, so a quick uninstall had me
going again.


Venice - Days 4, 5, and 6

There are lots of cool museums here, or so they tell
me.  We didn't go to a single one.  It was more fun just wandering
through the old city, eating great food, and marveling at a place that has never
seen automobiles.  We had access to a great two-bedroom, two-bath apartment
in the middle of the San Marco sestiere.  We walked or took the waterbus
everywhere we went.

We did manage to make it to Piazza San Marco and feed the birds.  Well,
feed is not quite right.  You hold the food while they attack you which is
actually quite fun!

Here we are in the Dosoduro sestiere.  We were looking for a good place
to eat lunch and a nice passerby offered to take our picture.

Venice is a wonderful city and everyone agreed that they
would have loved a few extra days!

Rome - Day 3

March 22nd
Today we hit the Vatican again to
attempt the dome ascent but discovered a great gathering outside that shutdown
the Basilica  until 1pm.  The Pope was speaking to the people so we
headed to the Sistine Chapel instead.  It would take days to examine
everything in the Vatican Museums but we zipped through in just over 3
hours.  Here's a snap from inside Capella Sistina.  Yes, I know
cameras were not allowed but everyone was doing it .


Rome - Day 2

March 21st
This morning we were hit with the first
real problem of not being in the city.  No access to a local pastry shop
for breakfast.  So we wound up eating in the hotel.  A few eggs,
croissants, and small glasses of orange juice apparently cost more than 50
euro.  Who knew?

We tackled St. Peter's basilica in the morning.  Amazing.  Pictures
simply can not express the magnitude of what you are seeing.  The immense
size, the history, and the architecture are all incredible.  We got in line
for the climb to the dome but Jacob started crying so we left and said we would
come back.  We never made it.  We simply don't build things like this
anymore which is a real shame.

After eating some lunch, we decided to hit the colosseum.  It had been
closed the day before so we wanted to get their well before it closed.  A
taxi ride and four tickets later and we were strolling through the ancient Roman
colosseum.  Magnificent!  Alot of it had been taken apart and use for
other monuments (such as St. Peter's basilica) but you could still see the basic
structure and imagine an immense crowd cheering as gladiators fought in the
arena.  This site just gives you chills!

Katie was anxious to see the Spanish Steps and the Trevi Fountain (both
featured in her favorite movie - Roman Holiday) so we hopped a taxi and went to
both of those.  The steps were covered up with chain smoking teenagers so
that was a downer.  The fountain was crowded too but we tossed a few coins
into the fountain to insure our return.  After a typical Roman dinner it
was back to the hotel for some sleep.

Here I am tossing a coin into the fountain.

Rome - Day 1

March 20th
We grabbed a couple of train rides from Sorrento to Rome
this morning.  The first train was a commuter from Sorrento to
Naples.  Not a fun ride.  Hard plastic seats and very crowded. 
Promply upon reaching Naples, some old man convinced us that he worked for the
station and politely helped us to our Eurostar seats.  About the time I was
thinking what a helpful chap he had been was just moments before he pulled me
aside and came just short of mugging me for 20 euro.  I got away by only
giving him $20 USD and regretted even doing that.  I hate being
taken.  My wife's new phrase, sela, echos through my brain.

Pleasant ride into Rome, 20 euro taxi ride to the hotel, and we are
set!  The hotel is the Crown Plaza over near the Vatican.  I was
originally concerned that using a hotel outside of city center would somehow
diminish our experience but looking back I don't think that was the case. 
We really enjoyed having access to the hotel staff and use of the courtesy
shuttle into and out of the city.

We tried to do some sightseeing on this first day but it was after 4 when we
got into the city and most of the attactions closed at 4:30.  We chose
instead to wander around inside the Trastevere area which is known for it's good
food.  We found a ristorante that we wanted to eat at but it did not open
until  7:30.  This is pretty common for Roman establishments. 
Open early, close from around 2pm to 7pm and then reopen until about 11. 
So we made our way back toward the shuttle pickup and ate at the first little
shop we came to. 

Sorrento Dev Con - Farewell Dinner

I've returned from vacation and will be posting the blog drafts I've got
stuffed in my outbox.  The snaps below are from the farewell dinner at the
end of our Dev Con in Sorrento, Italy.  Great music, great food, and

Tomorrow my family and I are attending the Pompeii excursion (I've already
blogged about the running water there!).  We are going to follow that with
3 days in Rome and 3 days in Venice (blogs to follow).

And, of course, the night would not have been complete without a number from

Pompeii had running water

Not even 50 years ago, you could easily find families here in the US that did
not have running water and would go to a central water source such as a well for
their needs.  The people of Pompeii had run lead water pipes to the various
fountains around the the city to allow for drinking water.  Folks, this is
at least 2000 years ago.  Maybe they were just smarter back then.  But
then they used their own city streets for sewage so there goes the theory of
them being smarter.  Ha!

They also had places that were essentially bars.  Areas that had small,
barrel-like containers of drink that people could walk up to and quench their
thirst.  Made me wonder if each one had their own Cliff Claven (the
know-it-all guy that no one likes) or if there is this one guy who every time he
walks up, they all yell "Claudius, what is vp?". 

Oh, and from all the signs around the city, the men of Pompeii were very
"lucky".  If you don't know what I mean by that, do some research into what
the men of that city thought would bring them luck.  Here's a hint: 
you only need one hand.

Wednesday, March 15, 2006

Pizza and Karaoke

It's Wednesday at DevCon 2006 and the dinner activity tonight was pizza and
karaoke.  The pizza was pretty good but the
entertainment was even better.  Sans alcohol I'm not much of a singer, but
I found out tonight that MySQL has tons of great vocal talent. :-p


Patrick G was the star of the

Patrik B, of course, did it "his way".

Mark (left) and Jim (right) were my non-singer compadres.

And Eric (in the tye dyed shirt) shows us what happens when you apply a
little alcohol.  :-)

I just don't get it

I read alot of blogs.  Some of them agree with me politically and some
of them don't.  Often I find the ones that don't entertaining and I'm
especially fond of the blogs that bash George Bush.  He's certainly not a
great president and I can't vouch for his honesty but, just like with Bill
Clinton, I don't assert to be true what I don't know to be true.

Did the Clinton's have anything to do with Foster's death?  I have no
idea and you'll never hear me say otherwise.  Did he lie under oath about
Monica Lewinsky?  Yup, that I know.  He admitted it.  The war in
Iraq certainly could have been handled better but did  George Bush
*intentionally* mislead Congress and the American people?  I don't know and
they don't either.  Remember, we are talking about facts, not opinions.

Recently I've seen blogs asserting that Bush is borderline racist because he
knew of Katrina 1 day before it hit.  From what I gather, the federal
government is completely responsible for my safety.  I guess when the next
tornado comes ripping by my house I should wait outside for the FEMA bus (wonder
if I should wear something bright so they see me?)  Of course it's
silly.  The folks of New Orleans, including the mayor and governor of
LA, also knew Katrina was coming and chose to stay.  By the way,
parts of Alabama and Missippi were hit much harder than New Orleans but they
didn't seem to have the same problems.  I know this because I went down and
led cleanup crews one weekend and talked to the folks there.

Is the federal government there to help us?  Yes.  However, when
things go south it's very easy to point the finger at the Prez, especially when
you don't happen to agree with anything he stands for.  Could he and our
disaster response teams have done better?  Yes, again.  However the
mayor, governor, and people of New Orleans are the most responsible for not
repairing levees and attempting leave sooner.

Why the Get methods do not convert data

Alot of people ask
me why Connector/Net does not allow converting of field values to various
primitive types simply by calling the appropriate GetXXX methods on the
datareader.  To better understand what they are asking, consider the case
where you have a table with the first column of type int32.  For whatever
reason, you've decided that you want that value to be in a long primitive. 
So you do what seems logical and call GetInt64() on the reader object.  You
are then greeted with an odd InvalidCast exception.  This seems strange
considering that an int32 primitive can easily be cast to an int64 primitive
simply by using the appropriate cast syntax.  Indeed this does seem odd
until you understand what is going on under the hood.


When Connector/Net
reads the resultset values off the wire, it parses that data into the
appropriate primitives based on the field type reported by MySQL.  So INT
columns are parsed to an Int32 primitive, TINY columns are parsed to a byte
primitive, and so on.  When one of the Get methods (such as GetInt32,
GetInt64, GetBool) is called on the MySqlDataReader object, that method takes
the index given, accesses the appropriate field object, and reads the
value.  Here is where it gets interesting.


The first approach
to implementing these Get methods might be to do the


val = fields[index].Value


However, there is a
problem with this code.  It will create a box to hold our value type and
that takes cycles.  In fact, in tests I've run it can be quite significant
and when you think of sites that are doing millions of hits per day, every cycle
counts.  Casting to object is definitely out of the question.  To
avoid the boxing, I've setup a set of classes that map directly to MySQL
primitives with each class having a value property of that primitive


To return to our
original question, to allow someone to convert an int32 column to int64 simply
by calling GetInt64 would require the GetInt64 method to perform a conversion in
every case.  It might only convert to itself (Int64) or it might convert to
the type being requested (Int32).  While this is possible, I believe this
overhead for every call to the Get methods is unwarranted.  First, you can
always cast the returned value to the type you need as


longval = (Int64)reader.GetInt32(index);


The second reason
why I don't believe it's a good idea is that it can hide the real structure of
your database.  If you have an Int32 column and you are needing to retrieve
that value into an Int64 primitive, then perhaps you should reconsider the types
used in your database.

Monday, March 13, 2006

Putty should be flexible, right?

So I'm here in Sorrento, Italy at our dev conference and struggling mightily
to get a good clone of the 5.1 repository on my box.  You see I'm using
BitKeeper with plink (ala Putty) as the SSH tunnel.  The wireless
connection on my Inspiron 6000  keeps going down and coming back up and
this is something that plink simply can't stand. 

So I installed OpenSSH for Windows (yes the abandoned project that is sort of
being maintained).  Worked first time.  Apparently the stock ssh
client that comes with cygwin (and therefore with OpenSSH for Windows) is much
more tolerant of unstable network connections.