10/28/2004

A Good Tool for Trimming Your Trees

It wouldn't take long to trim your hedges and trees with one of these.

10/14/2004

Google Desktop Search

I happened to be browsing for Google news when I learned that Google announced the Google Desktop Search today. It's an app that you can use to find stuff on your hard drive. Being the Google nut that I am, I will of course be immediately installing the application and evaluating it.

10/12/2004

Comment Notification Added

I've been looking at some of the Blogger Hacks and I became inspired to write one of my own. Someone requested to some sort of notification to indicate when new comments have been added to a post. I wrote some code to modify the Peek-a-boo comments hack to implement this. The new code will create some cookies to save the comment counts for each post. If the comment count has changed since the comment was last expanded, the page will indicate that new comments have been added.

Of course, the first time you load the page after it has been implemented, all comments on the page will be new. Once you expand each of the comments sections, the cookies will be created. The next time you load the page, it will no longer tell you there are new comments (unless there actually are new comments). It works pretty well, so I'm going to send it to the good folks at Blogger to see if they'll publish it. If they do, I'll be sure to post about it. If you're interested about the implementation details, read on.

Just like with peek-a-boo comments, add the following two lines to your stylesheet:

.commenthidden {display:none}
.commentshown {display:inline}


Next, add the following Javascript between the <head></head> tags:

<script type="text/Javascript">
function togglecomments (postid,commentcount) {
   var whichpost = document.getElementById(postid);
   if (whichpost.className=="commentshown") {
      whichpost.className="commenthidden";
   }
   else {
      whichpost.className="commentshown";
      createCommentCookie(postid,commentcount);
   }
}

function createCommentCookie(postid,commentcount) {
   domain = "<$BlogURL$>";
   domain = domain.split("/");
   domain = domain[2];
   document.cookie = postid + "=" +
      commentcount +
      "; domain=" + domain +
      "; expires=Thu, 01-Jan-40 00:00:01 GMT; ";
}

function getCommentCookie(postid) {
   postid += "=";
   startpos = document.cookie.indexOf(postid);
   if(startpos == -1)
      return 0;
   
   startpos = startpos + postid.length;
   if(document.cookie.indexOf(";", startpos) != -1)
      endpos = document.cookie.indexOf(";", startpos);
   else
      endpos = document.cookie.length;

   return document.cookie.substring(startpos, endpos);
}
</script>


Search for the code between the <blogger></blogger> tags that displays the link to the comments. It should look something like this:

<BlogItemCommentsEnabled>
   <a href="<$BlogItemPermalinkURL$>#comments">
   <$BlogItemCommentCount$> comments</a>
</BlogItemCommentsEnabled>


Replace this section with the following code:

<BlogItemCommentsEnabled>
   <a class="comment-link" href="javascript:togglecomments('c<$BlogItemNumber$>',<$BlogItemCommentCount$>)">
      <script type="text/Javascript">
         numNewComments = <$BlogItemCommentCount$>-getCommentCookie('c<$BlogItemNumber$>');
         if(<$BlogItemCommentCount$> == 0)
            document.write("Be the first to comment!");
         else if(numNewComments == 0)
            document.write(<$BlogItemCommentCount$> + " comments");
         else
            document.write(numNewComments + " new comments added!");
      </script>
   </a>
</BlogItemCommentsEnabled>


This will display the comment notification and create the link to display/hide the comments. Finally, the comments section will need to be properly labeled for hiding and displaying. Search for the following:


<itempage>
<blogitemcommentsenabled>
   [ ... lots of comment code here ... ]
</blogitemcommentsenabled>
</itempage>


And replace it with this:

<span class="commenthidden" id="c<$BlogItemNumber$>">
<blogitemcommentsenabled>
   [ ... lots of comment code here ... ]
</blogitemcommentsenabled>
</span>


Voila! You now have peek-a-boo comments, plus comment notification! This hack is probably more useful if you have a site where people frequently comment on the posts. For a good example of it in action, check out the Stu Crew site.

10/11/2004

New Job!

Well, my start date is official. Two weeks from today, on October 25, I begin my new job as Technology Project Manager for Business Operations. Perhaps my MBA is beginning to pay off. I'm looking forward to the change of pace, not to mention an extra week of vacation and the eligibility for a bonus.

10/07/2004

Acquisition of jsierra.com

Well, I guess the guy that had jsierra.com before decided not to renew it, so I picked it up yesterday. I bought the domain for $8.95 through GoDaddy. They provide pretty decent DNS services along with the domain registration, so I'll use them for now. For now, I'm just going to redirect it to jsierra.net.

The New Domain Howto

The other day I was looking over my old domain howto and realized it was a little out of date. I've rewritten it to include some information about Blogger, ZoneEdit (my current DNS provider), and dynamic DNS updaters. If you're interested in getting your own domain, be sure to check it out.

10/06/2004

George Lucas in Love

Every now and then INHD and INHD2 show some short films, usually 15-20 minutes long. Last night they showed "George Lucas in Love" which is a parody of "Shakespere in Love." Lucas finds inspiration all around him, as he encounters many individuals that bear uncanny resemblance to many of the characters in his Star Wars films. It's quite an amusing short film.

10/04/2004

Google Holiday Logos

Today the Google logo was commemorating the flight of SpaceShipOne. I figured there must be an archive for these, and sure enough there is. I found it here: http://www.google.com/holidaylogos.html

10/03/2004

Juan's Farewell

Well, on Wednesday my brother Juan is leaving for the UK, as it will soon become his new home. We couldn't let him leave without a big sendoff, so we went up to Gainesville to give him a farewell party. He arrived at my place at about 7:20 yesterday morning. From there, we went over to Negroni's place and began the journey to Gainesville. On the way up, we stopped in Orlando to pick up Ed, who was flying in from Washington D.C. Juan made the arrangements to fly him in for the party. The party wouldn't have been complete without him.

We arrived at Jose's place in the early afternoon, where the festivities had already begun. We partied until about 2AM Sunday morning. Sunday afternoon, we played a little football. The game ended a little earlier than anticipated when Miguel cut David's chin with his large and very hard cranium. Fortunately, being a doctor he had the expertise to repair the damage he had done. It was an awesome weekend and everyone had a blast. I've posted some photos in the gallery, so be sure to check them out. I'll have to add the captions to the photos later. I just got home and I need some sleep.