Thursday, February 19, 2004

Blog Blog fun for boys and girls

So I was listening to dontNetRocks and Robert Scoble was the guest for their November 04, 03 show.<warning>This is a geek radio show put on my computer nerds and geeks for computer nerds and geeks, yes they wear glasses with tape in the middle and pocket protectors and yes I am sure they can quote every line from the entire Monty Python library. However they are specifically discussing the programming language that I write in more of everyday than I do english, so I have to listen.</warning>

And it was all about blogging. Which was pretty cool. One of the sites them mentioned in the show is a site called feedster.com. Feedster is the google of blogs. Which is very nice. So I thought lets see if my little blog was on it. It was, I was amazed, I did a search on "BBQ and the ZOO" , the title of my blog on Monday, Feb 16th, and it came up, not only did it come up but it came up in the second position. (Whoa!) So I now have search on my blog, and it uses feedster as it's search engine!

It has been fairly quiet here today. Infact it has been almost 24 hrs since I threw my little hissy fit walked away from my desk and threaten not to come back. Everyone was very nice to me today and just wanted to know if I was okay. (IE these are the people that won't be targets when the repeater rifle and belltower scene plays out) Anyhow today is nice and quiet and I am gettings lots of work done!

Wednesday, February 18, 2004

Wednesday and XML

Are we sure that it was a wednesday? It really felt more like a thursday to me. Anyways it was a day and that is good enough. I was about to wake up and take a deep breath. (and cough immediately afterwards) I'm not sure that I was completely ready for the day. But it came anyway and in the end I am glad I was a part of it.
Well on to more constructive things. XML and XSL. XML and XSL are a great way to handle some of the navigation choirs that we have to deal with day in and day out. For example you have a page that some users want links to sites, and other users want links to blogs. Why not keep all that data in one place.


<?xml-stylesheet type="text/xsl" href="links.xsl"?>
<navroot>
<link id="1" name="google" navlevel="1">http://www.google.com</link>
<ink id="2" name="builder" navlevel="1">http://www.builder.com</link>
<link id="3" name="tech republic" navlevel="1">http://www.techrepublic.com</link>
<link id="4" name="lockheed" navlevel="1">http://www.lockheedfcu.org</link>

<link id="5" name="Computer Zen" navlevel="2">http://www.computerzen.com</link>
<link id="6" name="Chardy" navlevel="2">http://chardy101.blogspot.com</link>
<link id="7" name="Adventures in Real Life" navlevel="2">http://o2bjang.blogspot.com</link>
<link id="8" name="Pixie Stitch" navlevel="2>http://pixiesitch.blogspot.com</link>
</navroot>
As you can see the site links have a navlevel of 1 and blog links have a navlevel of 2. Easy enough right. So how are we going to show these links to our users? This is where XSL comes in. What we are going to do is write an XSL that will show only the navlevel we specify, lets say navlevel 2. It would look something like this:

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="/navroot/link[@navlevel='2']">
<a>
<xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
<xsl:value-of select="@name" />
</a>
<br />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>


What we see in this example is that the XSL is looping through all of the <link> elements and looking for the attribute navlevel='2' when if finds it, it writes and a href from the <link> element and the name attribute with in the link tag. So in the browser it looks something like this:
Computer Zen
Chardy
Adventures in Real Life
Pixie Stitch


Let's go over the xsl in a little more detail of what the XSL is doing. First we are have the XSL loop through all of the link elements in the XML document and take an action when it finds a navlevel='2'. This is handled in the <xsl:for-each select="/navroot/link[@navlevel='2']">. Think of this as XSL's for loop. This was a fairly simple example of what can be done with XML and XSL but I hope that you find it helpful.

Monday, February 16, 2004

BBQ and the Zoo

Today is president's day, so as many people do, I had the day off. Being that my wonderful Wife was away at a seminar all weekend this was our day to spend sometime together. And of course the little boy had the day off too! So we planned to go have some serious (Yet not to expensive) fun. So we decided on the Zoo, it was close and fairly cheap. (we thought that before we got there) On the way to the LA Zoo we decided to stop and have lunch at the "Black Cow Cafe" in montrose. It is someplace that we used to eat at all of the time when we lived in pasadena and montrose. Of course we get there and they are closed for presidents day.

<sidenote>It's amazing how irritating it is when a restaurant closes for a holiday. But that it's fine for you to have it off.</sidenote>

So we walked around downtown montrose and found this little place called Zeke's Smokehouse.It looked great and had things on the menu I can eat. (It's amazing how limiting being allergic to wheat is in your food choices) So we thought we would give it a try. It was fantastic! This is just hardcore food, no apologize, no tree hugging vegan entrees! Ribs, Beef Brisket, Meatloaf, Beef and Pork links! It's the first time that I have seen real hushpuppies in southern california. The meal was great! My wonderful wife had the BBQ chicken sandwich, the little boy had the chicken and I had the Beef and Pork links. It was all so good that I kept eating long after I was full.

So now that we are all fed, and in need of a walk. We were off to the Zoo. There was an issue with this, that we didn't know of before we left the house. Everyone else was off to the Zoo too! I haven't ever seen so many people their. You would of thought that they were giving money away. There was a 20 minute line to get tickets. There was a line for everything. Don't get me wrong it was a lot of fun. The little boy was nothing but a kick. He is such a ball of energy. Zooming from here to there to here again. Keep up! He would cry dragging My Wife and I behind him. After a little bit we need a little treat. We weren't really hungry just needed something sweet. So I went to the little Zoo cafeteria there to get some Ice Cream. Now here is where they get you, by the time you have stood in the line long enough to get up to where you can see the prices on the sign you aren't going to leave. So with credit report in hand I was able to finance three small ice cream cones with a fairly good interest rate for the next 36 months. (They told me that my credit score wasn't good enough for three large cones.)

We got to see some skunks, monkeys, deer, elephants, weasels, camels, flamingos, pimps and hoes. (funny enough not all of the creatures listed above where in cages some where walking around the park looking for mates). The hours of the Zoo are officially 10am - 5pm. However I feel these are a little inaccurate. True enough that it opens at 10am. However the closing at 5pm is a little deceiving. What they really mean is that if you are in the park at 5pm find a safe place to sleep because they have closed the gates and left for the evening. Really and truly leaving at 4:50pm is pushing it.

In the end we had fun and it was a good day off. However there were two lessons learned. One never go to the Zoo on a holiday. Two, don't even eat breakfast before you go to Zeke's for lunch.