comments edit

In two earlier posts I presented a couple of SQL stored procedures that I promised to tie together. The first procedure generates a random time of day and the second can be used to FTP a file from within SQL Server.

Well in this post I put these two together to create a stored procedure for creating a database job that will take a nightly backup of a database and FTP it to another location. I hope this isn’t terribly anti-climactic for you.

This script is perfect for a quick and dirty backup plan for a database. If you are dealing with enterprise level (and sized) databases, your DBA will probably scoff at this script, and rightly so. Such a situation really needs a more robust database backup plan probably with differential backups etc…

But for smaller operations, this will save your butt. I use this to backup my blog database and some of our development databases every night.

The parameters are pretty much a combination of the two previous parameters.

Parameter Datatype Description
@databaseName nvarchar(128) Name of the database to backup
@jobName nvarchar(255) The name of this Job as it would be listed in Enterprise Manager under Management | Sql Server Agent | Jobs
@scheduleName nvarchar(255) A descriptive name for the schedule.
@timeOfDay int Time of day as an int (HHMMSS). Default is -1 which indicates a random time of day between midnight and @maxHour
@maxHour int If generating a random time of day, the upper bound for the hour in which the backup job can run. By default 4 am.
@owner nvarchar(128) The database user account that this job runs under. By default the sa account.
@backupDirectory nvarchar(256) The directory on the database server to backup the file.
@ftpServer nvarchar(128) FTP host name.
@ftpUser nvarchar(128) FTP user.
@ftpPassword nvarchar(128) FTP user password.
@ftpPath nvarchar(128) FTP path.

Why the randomness?

Notice that if you set @timeOfDay to -1, this script will create a schedule for the job at a random hour of the day which is constrained by @maxHour. This is really there to help stagger the times at which the database backups run. All too often administrators make the mistake of scheduling the backups of all the backups at the same time. Of course, you can override this randomness by simply specifying a @timeOfDay.

Typical usage of the query looks like

exec CreateBackupJob @databaseName='MCTDb'
    , @ftpServer=''
    , @ftpUser='UserName'
    , @ftpPassword='Supersecret'

When you obtain this script, I recommend modifying the script when you create it on a server to have give the ftp parameters default values, if that makes sense in your environment. That can save you time when creating new backups.

You can download the full script here. This script will drop (if they exist) and recreate all three stored procedures I mentioned. Let me know if you found this useful.

Download it from

sql comments edit

This is another useful Sql Server Stored Procedure I found on the net written by Nigel Rivett.

The procedure uses the xp_cmdshell extended stored procedure to shell out an FTP command. You can use this procedure to ftp a file from one place to another. Of course, you will need to make sure that your command runs in the proper security context.

I made some very slight modifications in my own version of this procedure. I changed some of the parameters to be of type nvarchar instead of varchar for my international friends. I also changed the name to suit my own naming conventions.

It takes in the following parameters.

Parameter Data Type Description Example
@FTPServer varchar(128) The host name.
@FTPUser nvarchar(128) The username for the FTP site. Haacked
@FTPPWD nvarchar(128) The password for the FTP site. Ha!_AsIfIWouldTellYou!
@FTPPath nvarchar(128) The subfolder within the FTP site to place the file. Make sure to use forward slashes and leave a trailing slash. /
@FTPFileName nvarchar(128) The filename to write within FTP. Typically the same as the source file name.
@SourcePath nvarchar(128) The path to the directory that contains the source file. Make sure to have a trailing slash. c:\projects\
@SourceFile nvarchar(128) The source file to ftp.
@workdir nvarchar(128) The working directory. This is where the stored proc will temporarily write a command file containing the FTP commands it will execute. c:\temp\

Here is an example of the usage.

exec FtpPutFile     
    @FTPServer = '' ,
    @FTPUser = n'username' ,
    @FTPPWD = n'password' ,
    @FTPPath = n'/dir1/' ,
    @FTPFileName = n'test2.txt' ,
    @SourcePath = n'c:\vss\mywebsite\' ,
    @SourceFile = n'MyFileName.html' ,
    @workdir = n'c:\temp\'

I will soon combine this and my random time of day generator sql into a very useful stored procedure for you.

sql comments edit

Here is a function that will generate a random time of day. Later I will show why I am posting this particular query and how I am using it. It comes in useful when trying create random scheduled jobs in SQL Server. I made use of a technique for generating random dates via Jon Galloway.

Parameter | DataType | Extra | Description ————|———-|————-|———— @timeOfDay |int |OUTPUT | Represents a time of day using the format HHMMSS. For example, midnight is represented as 0 and 1:52:01 PM is represented as 135201. @maxHour |int |Default = 24 | Upper bound for the hour of the day. So to generate a random time of day between midnight and 3 AM, specify 3.

Here is an example of its usage.

-- Generate time of day between midnight and 3
DECLARE @timeOfDay int
exec GetRandomTimeOfDay @timeOfDay OUTPUT, 24
PRINT @timeOfDay

And here is the stored procedure declaration itself. Notice I am creating this procedure within the master database.

USE [master]

CREATE PROCEDURE [dbo].GetRandomTimeOfDay
    @timeOfDay int = 0 OUTPUT
    , @maxHour int = 24 -- Upper bound for the hour.
    IF @maxHour > 24 OR @maxHour < 1
        RAISERROR ('Choose value between 1 and 24', 16, 1)   
    DECLARE @randomHours int
    SELECT @randomHours = 
        (@maxHour - 1) * 
RAND(CAST(CAST(newid() as binary(8)) as INT))
    DECLARE @randomMinutes int
    SELECT @randomMinutes = 
        60 * RAND(CAST(CAST(newid() as binary(8)) as INT))
    DECLARE @timeOfDayDate DateTime
    SET @timeOfDayDate = '00:00:00'
    SET @timeOfDayDate = 
DATEADD(hh, @randomHours, @timeOfDayDate)
    SET @timeOfDayDate = 
DATEADD(mi, @randomMinutes, @timeOfDayDate)
    DECLARE @timeAsString varchar(8)
    DECLARE @timeWithoutColons varchar(6)
    SET @timeAsString = CONVERT(varchar(8), @timeOfDayDate, 8)
    SET @timeWithoutColons = REPLACE(@timeAsString, ':', '')
    SET @timeOfDay = ( CAST(@timeWithoutColons as int) )

In a later installment, I will show you why this is useful.

You can download the SQL in a zip file

comments edit

Section of Adam's

Adam Kinney recently unveiled a redesign his blog. I posted a snippet there to the left.

Adam is one of those rare developers who has both solid design skills to complement his solid coding chops. In other words, he makes me sick, rubbing our absolute lack of design skills in our faces.

It is overall a pretty sweet design. The layout is clean with a crisp headline. My only niggle is the styling (or lack of) of the Recent Entries list. Just a little more CSS will go a long way there.

Keep up the good work, man.

subtext comments edit

I noticed the following checkin message in the subtext commits mailing list today (this is the mailing list in which we can receive Subversion checkin notifications).

Revision: 999
Author:   simo
Date:     2006-04-21 13:56:27 -0700 (Fri, 21 Apr 2006)

Log Message:
The link to Phil Haack blog was wrong 
( Fixed it.

-- SNIP--

This had me cracking up because I am the one who added the link to my own blog originally. It took someone else to notice the mistake and fix it. An inability to link to oneself correctly. Is that a recognized form of dementia?

Tags: Subtext

comments edit

I recently moved my blog off of WebHost4Life where I have had it hosted for a couple years now. Apparently the traffic on my blog was causing a load on their servers. I never fully believed it was my blog’s fault since they didn’t give me any convincing evidence.

In any case, it is a fitting time to move it to my company’s dedicated server (at 1and1) and my blog is now blazingly fast compared to before. I figure rather than paying WH4L for hosting, I might as well pay my own company for the privilege.

I switched DNS over and so far no problems. In case you are wondering, I use for my DNS servers. They are a free DNS provider and I have not had any problems with them at all. Very simple to set up and use.

The key benefit of having all my DNS over there is that everytime I change hosting provider, I don’t have to change the root DNS servers at my Domain Registrar.

Since I have already paid for a year at WH4L, I will probably set up a Subtext blog for my younger brother and some of his friends there.

comments edit

Chinese Character for
Money Jeff has a great post in which he compares UML to circuit diagrams and then asks, why doesn’t UML enjoy the same currency for software development?

In the comments Scott Hanselman makes a great point…

It’s because, IMHO, UML isn’t freaking obvious. It’s obtuse. What’s the open arrow, open circle mean again?

I think he is spot on. But you could also say that about any programming language, right? What is that colon between the two words mean?

public class Something : IObscurity<-- What the heck is that?

If you are a VB programmer, it might be unfamiliar. But if you are a C# programmer my question is like asking what is that funny curly line and dot at the end of this sentence? Oh that’s an interface implementation silly. Of course!

Don’t get me started on C++ with its double colon craziness and its @variable and variable* which leave the befuddled developer asking what exactly do they mean?

Isn’t UML a Decent Abstraction Layer?

The evolution of software has been a steady stream towards higher level abstractions. We no longer punch holes in cards to represent computer calculations in binary (at least I hope not). As a managed code developer, I don’t even have to worry about allocating memory (malloc anybody?) before I use code…Glory be! So doesn’t it seem natural that UML would be the next evolutionary step in that chain?

Umm…Well no.

The most successful widespread abstractions are those that abstract the underlying computing architecture, which itself is abstract. Memory, for example, is pretty the same thing to everybody, no matter what kind of software you are working on. If the machine can handle allocating and deallocating it for you so you don’t have to think about it all the time, then all the better for everybody.

But that same principle doesn’t work as well when we start raising the abstraction level to cover our real world concepts. The next obvious level of abstraction are domain classes. How many times have you written an Order class? I’ve written one. Great! Since I did the work, I can simply post that baby on SourceForge and save the rest of you suckers a bunch of time. Now anybody can simply just drag the UML representation into their UML diagrams and bam!, their Web 2.0 revolutionary microformatted shopping cart application is complete. Sit back and watch the flood of money flow in.

If only it were that easy.

Make a Wish

Evil Genie It would be nice to be able to work with such high level abstractions and wire them up. Oh, here, I’ll just draw a line from this order to the shopping cart and boom! when the user clicks this button, the item goes into the cart. But what about the various business rules triggered around adding this order to the cart? What about the fact that the cart lives in another process on a separate server and the order needs to serialized? What about the persistence mechanism? How do you express that in UML?

You can’t. Writing code is like asking an evil genie for a wish. No matter how carefully you craft the wish, there is always some pernicious detail left out just waiting to jab you in the eye. I wish I were rich and now I am some poor slob named Rich living in abject poverty. There are just too many moving parts and pitfalls in a piece of software to deal with and worry about.

UML has a bit of trouble capturing the semantics of code. Like snowflakes, no two Order classes are alike. Every client has their peculiar and idiosyncratic ideas on what an order is and how it should work in their environment. So what do we do? We start encumbering UML with all sorts of new symbols and glyphs so that we can work toward a semantically expressive UML (executable UML anyone?)

But this just turns UML into another programming language. The fact that it is in a diagram form doesn’t make it any more expressive than code. In a way, adopting UML is like changing from English to Chinese. Sure a single Chinese character can represent a whole word or even multiple words, but that doesn’t make it any easier to grasp. Now, you have to learn thousands of characters.

Not to mention the fact that you are writing the same code twice. Once by dragging a bunch of diagrams around with a mouse (how slow is that?) and again by writing out the actual compilable code. Granted, that particular issue my be solved by executable UML in which the model is the code. But that suffers from its own range of problems, not the least of which is the huge number of symbols required to make it work.

What is UML Good For?

Now to be fair, my criticism is about formal UML and UML modelling tools such as Rational Rose. If you are prepared to run wild and loose with your UML, it can be useful at a very high level as a planning tool. I sometimes sketch out interaction diagrams to help me think through the interactions of my class objects. That is useful. But I rarely keep these diagrams around because hell will freeze over before I waste a bunch of my time trying to keep all of them up to date with the actual code. The code really is the design. The only diagram potentially worth keeping around is the very high level system architecture diagram outlining the various subsystems.

comments edit

So after a few humiliating losses (in both soccer leagues I play in), we finally have a convincing win last night (5 to 2) in the Olympic league (the more competitive one). I even had a goal off of a dangerous cross that the defender tried to stop, but ended up deflecting it into the goal.

Hey, I’ll take what I can get.

comments edit

DibsI love working with other developers who are really excited about technology and the work we are doing. As is characteristic of such an organization, there is a constant flurry of IM messages and emails with links to interesting new technologies and topics.

This is nothing new of course, except for a recent phenomena of calling dibs to blog these topics. Is this something that happens to you? Let me give you an example.

A little while back, Jon Galloway IMs me a link to this very cool tool to remove source control bindings from a VS.NET 2003 project.

Immediately I start firing up w.Bloggar when his next IM message comes through, Oh, by the way I am going to blog that. He called dibs on blogging it.

This doesn’t mean that he owns this information somehow. Certainly there are others who have blogged about it. But I do feel it is good form to defer, since we probably have a similar readership. To that end, I present the rules for calling blogging dibs, which have their roots in concurrent software development.

  • Dib Contention: In conversation, if the person (the originator) who mentions the interesting link or story (the content) does not call dibs, and another person does, dib rights are lost to the originator.
  • Dib Wait Condition The listener must give the originator a reasonable moment (a pause really) to call dibs. Afterwards all bets are off.
  • Dib Hijacking In IM conversation, the originator has exactly one message (or 30 seconds) after the content to call dibs. If the next IM message is off topic, the other party may call dibs at any time..
  • Dib Deadlock Resolution Tie goes to the originator.
  • Implicit Dib Call In the absense of a dib call, it is assumed the originator has dibs until some point it is taken away by an explicit dib call.
  • Dib Race Condition If the listener can write and post the entire blog post before the originator calls dibs, the originator loses dibs privileges for obvious reasons.
  • Dib Access Violation Violating another person’s dibs right loses the offending party’s dibs rights for a period no less than two weeks.
  • Dib Timeout Condition A dib has a shelf life of one week. If no blog post is forthcoming, dib rights are fair game.
  • Dib Finalization Once the originator has written a post. The listener may follow up. It is good form to link to the originator’s post.
  • Keep dibs in the freezer, or they melt.

So go out there and steal someone else’s thunder. But do it according to the rules.

I violated one of my own rules. Can you figure out which one?

comments edit

CoComment Logo My blog now supports CoComment tracking. Let me know if you run into any problems with posting comments.

As I mentioned earlier, I added CoComment to Subtext as an administrative option. I am running the latest build from our Subversion repository. What better way to hash out bugs than to dogfood your own code. And man, was I eating some chow last night and this morning. I think I teased out most of the pressing bugs and my blog is pretty stable right now. Whew!

I performed a live test of automatically upgrading the schema and stored procs via the new web-based upgrade wizard in Subtext. That was really cool. When I was done, it looked like all my blog posts were gone. I nearly splattered my eyes on the monitors. But that was simply a UI glitch caused by hitting the site while files were still being copied over.

subtext comments edit

Subtext Logo Steve Harman reports that Subtext reached 1000 downloads just recently on SourceForge.

That is pretty sweet news. I sort of wish we added some code that asked permission to ping us when someone installs Subtext, but as you can imagine that would be very low on the totem pole of requirements.

We are getting close to a bug fix release that contains some extra goodies. I will set a release date soon. I have just been overwhelmed with work and other events.

Tags: Subtext

comments edit

Joel Spolsky totally nails it this time with his article on the Developer Abstraction Layer. This is one of his better articles. It is a tad on the long side, but well worth the read. Try to get it in your manager’s hands.

With a software company, the first priority of management needs to be creating that abstraction for the programmers.

If a programmer somewhere is worrying about a broken chair, or waiting on hold with Dell to order a new computer, the abstraction has sprung a leak.

In summary, a development company is a lot more than the developers. In fact, it is a huge support organization designed to remove abstractions for the developers so they can let the magic happen. Beautiful.

comments edit

If you are seeing duplicate posts from my blog in your feed aggregator, my apologies. I am dogfooding the latest development version of Subtext straight from the Subversion repository. Unfortunately, my unit tests did not catch the fact that I changed the link and guid elements from fully qualified to virtual URLs.


I should have a fix soon.

UPDATE: All fixed. Sorry for the brief disruption.

comments edit

Rainbow Eric Ramseur who works on the Rainbow 2.0 Portal project looks like he has made progress inimplementing Subtext as the blogging module for Rainbow. That is pretty sweet.

I have to admit I do not know much about the Rainbow system other than it is a Content Management System written in C# with versions for ASP.NET 1.1 and ASP.NET 2.0. It definitely bears investigation to see how it compares and contrasts with DotNetNuke.

I am definitely interested in seeing how easy (or not) it is to integrate Subtext into another system. One thing I have been working on when I have time is to refactor Subtext to clean up some code and make it easier to understand the source. As a team, we also hope to make the codebase even more modularized. This stuff is fun.

comments edit

Red Paperclip This is one of the most ingenious methods of self promotion I have ever seen. Not to mention an interesting way to obtain a house.

Mr. Galloway sent me this link to a guy who is trying to trade a red paperclip for a house. Well not directly. He is attempting to negotiate a series of trades. In each trade, he attempts to get something of more value than the previous item. In the end, he hopes to trade for a house.

It sort of reminds me of the way you teach people about exponential growth. Start with a penny on day 1. Double it every day. And at the end of the month you are a multi-millionaire (unless it is February).

But of course, this is not exponential growth in the true sense of the word. Really, it is a demonstration in some small part of how wealth is subjective. The value of an item is really dependent on the value the people involved in a transaction see it. In a good trade, both parties are become wealthier because they both received something of more value to them than the item they gave away. Otherwise they wouldn’t have made the trade in the first place.

The other lesson may be a demonstration of how much people will give to be a part of something public. Just like reality television. In some small way, as his site makes the rounds, these people get their 15 minutes of fame.

In the end, when this guy receives his house, it will be remarkable to compare that house to the value of the paperclip. But the value of the publicity and of taking part in this interesting experiment may make the red paperclip quite valuable to the two women who received it. Of course this guy will be the biggest winner of all for his ingenuity.

comments edit

Gorilla Swinging Jayson emailed me to let me know that my PageRank is now

  1. That puts me up in the ranks of the big guys like Scott Hanselman. Woohoo!

You realize what this means dontcha? After all this time and hard work, I moved from a 5 to a 6 on a 10 pt scale. It means I am no longer flunking the blogosphere. I am getting a D baby! Woohoo! I can’t wait for my next highschool reunion so I can shove this back in the face of all the popular kids.

  1. Me

    You thought I was a loser, eh? Well check this out! My PageRank is 6! What’s yours? Who’s the loser now? What!? What!? That’s what I thought!

  2. Popular Kids

    Ummm, who are you again? I don’t think you went to this school.

  3. Me

    Oh. Umm. Right. My next reunion isn’t for another year but I couldn’t wait.

It is great to have another scale of measurement in order to bolster a false sense of superiority and privilege over other people.

  1. Me

    Oh, lookie lookie here. Mr. Atwood’s PageRank is only five. Poor guy. How does he live with himself? Maybe I’ll start a raise Atwood’s PageRank campaign.

Don’t worry, I won’t let it change this blog or myself one bit. Except for the minor detail that in order to contact me, my contact form now sends an email to my publicist. And if you don’t mind, please refer to me as the blogger formerly known as Haacked.

Yes, for you humor (or English) impaired, this is satire. I am really not that infatuated with PageRank. No really.

UPDATE: Ummm so this is kind of awkward, but Mr. Atwood points out in my comments that his PageRank™ is actually a 6 if you put the www. in front of his URL. I am afraid I must end the Raise Atwood’s PageRank™ campaign. Sorry about that Jeff. Heh Heh. No hard feelings, eh?

And I am actually sincerely glad to have a higher PageRank™. So I did not mean this to punk Jayson in any way shape or form. The higher the PageRank™ the more AdSense Revenue people I can reach with interesting technical content.

comments edit

Madness - Image from DC
Comics There are a lot cool javascript libraries floating around the Intarweb these days that add cool behavior to web pages. My favorites are the ones that you simply add to the head section of your website and control via markup. It is a great way to enhance structural html markup with Javascript.

Unfortunately many of these attempt to hijack the window.onload event. Ok, a show of hands (and I have been guilty of this as well). How many of you have written code like this to handle the onload event in javascript within a .js file?

function init()

window.onload = init;

Stop it!

That line of code will completely wipe out any other functions that were attached and ready to handle the onload event. How arrogant of your script to do so. Instead, your script should learn to play nicely.

Unfortunately, Javascript doesn’t support the delegate syntax that C# has. It’d be nice to be able to do this.

function init()

window.onload += init;

But that won’t work. One approach I found on Simon Incutio’s blog (which is used by the original LightboxJS script) involves using a method that safely attaches an event handling method to the onload event without overwriting existing event handlers.

It works by checking to see if there any methods are already attached to the event. If so it attaches a new anonymous method that calls the original method along with the method you are attempting to attach.

Here is a snippet demonstrating this technique.

function highlightXFNLinks()
  // Does stuff...

// Adds event to window.onload without overwriting currently 
// assigned onload functions.
function addLoadEvent(func)
    var oldonload = window.onload;
    if (typeof window.onload != 'function')
        window.onload = func;
        window.onload = function()


This is pretty nifty, but there appears to be a whole new school of script libraries that provide this sort of functionality for attaching to any event, not just the window.onload event.

I am sure you Javascript Gurus will expose how out of date and ignorant I am of this area (it is true) but the few that I have heard of that seem to be catching on like wildfire are the Prototype JavaScript Framework (often just referred to as prototype.js), the Dojo Toolkit, and Behaviour.

I will probably end up rewriting all my libraries to use one of these tooltips so that I stop duplicating code. Since each of my javascript libraries are stand-alone, I make sure to include the addLoadEvent method in each of them. But I think its time to allow a dependency on another script to avoid this duplication.

comments edit

UPDATE: The script now uses regular expressions. This fixes the problem where it translated met to me.

You’ve heard BillG say that we need Microformats. Do you catch yourself asking But Why?

Good question. Right now the Microformats movement is dealing with a bit of a chicken-egg problem due to a lack of tool support. Without tools to make microformat creation simple for content publishers and to make microformats more usable and visible to content consumers, it is difficult to see the point of the effort. The effort / reward scale is currently tipped heavily towards the effort side.

That may soon change as Microformats start taking over the web. In preparation for an article I am writing on the topic, I have been doing some thinking and reading up on Microformats. I won’t spoil the article by discussing Microformats in much detail here, but instead will highlight one microformat and my effort to make it more visible.

Do not reinvent the wheel!

Remember, Microformats are not about trying to reinvent the wheel. In fact, it is a key principle of the Microformat philosophy to build on what already exists. For example, even before microformats there was an initiative called XFN (or XHTML Friends Network). The idea is to add semantic information to web links in the form of the rel attribute to signify relationships.

This existing format has been adopted as a microformat. When linking to a friend’s blog or website, for example, you might add the following rel attribute.

<a href="" rel="friend met">...

This incidentally creates a network that is indexed by XFN crawler. But how does the average visitor to your site even notice this? Unless they view source, they won’t. This sort of goes against the Microformat principle of focusing on humans first and machines second. Better tools are needed to highlight interesting microformats to end users.

So let’s expose our friends

Well that is where my XFN Highlighter script comes in to help in a very small way. This is yet another Markup Based Javascript Effect Libraries in the style of my table mouse over script, and Lightbox JS. As more web publishers start adding microformatted content to their sites, I think we’ll see a proliferation of these type of scripts targetting this content.

Note that this script is a bit rough around the edges (for example, I need to replace indexOf with regular expressions). I slapped it together quickly one evening and there are many improvements that could be made. But the current version works well enough and I figure it is time to share it so I can generate some feedback (hopefully!).

What the script does is look through your html for links using the XFN microformat. It then places a little icon next to links that express a relationship as well as a special tooltip that lists the relationships info. But rather than talking about it, I should give a demo. Again, I will have to ask you to try this out in a browser since most aggregators will not display my javascript and CSS. Here are a list of a few people I know. Go ahead and move your mouse over them. Go on now.

A few friends and acquaintances

How to Use


​1. Add the following Javascript declaration to the header.

<script type="text/javascript" 

​2. Include the XFNHighlighter CSS file (or cut and paste these styles into your own stylesheet).

<link rel="stylesheet" href="css/XFNHighlighter.css" 
    type="text/css" media="screen" />

​3. The CSS references an image friends.png in the images directory. Make sure that image exists or change the CSS to point to an appropriate image. This image is placed next to the link.


​1. Add an appropriate rel="value" when linking to a friend or acquaintance. Check out the list of relationships from the XFN quickstart page.


Grab the files (neatly organized) from here.

code comments edit

Lightbox JS brought a new level of hotness when it came to displaying pictures on your website or blog. Reference the javascript file in your html page, add a rel="lightbox" to a link, and voila! You have a sweet way to display pics. I even implemented it on my blog as evidenced by the image below. Go ahead, click on it (assuming you are not reading this in an aggregator).

Screenshot of Lightbox JS 2.0 In

Pretty cool eh? Well just as I go and get this implemented, the people that brought you Lightbox JS just released Lightbox JS 2.0. New in 2.0 is an easy way to group related images and slickly navigate through them. They also added some fancy schmancy transition effects.

The image above is a screenshot of the image grouping feature in action. Notice the Next link that displays on the upper right when you mouse over the image. Click on the below image to see a larger screenshot. (Oh the irony using Lightbox 1.0 to demonstrate Lightbox 2.0).

This is just one of many cool new toys for the discerning blogger. Good job Lokesh!

subtext comments edit

CoComment Logo Since I was called out, I went ahead and quickly implemented CoComment for Subtext, but I have yet to deploy it to my personal blog. It will be released as part of our upcoming interim release which is focused on bug fixes and a few developer goodies thrown in.

I said before I wasn’t interested in supporting CoComment, hoping to see a cleaner approach come along and surprise everyone. But it seems that adoption of CoComment is going pretty well and I am not one to stand in the way of progress. Besides, it really didn’t take long to implement at all.

CoComment support in the latest build of Subtext is pretty automatic. There is no need to update any skins. Simply go into the admin section under the Comment Settings and click a checkbox to enable CoComments. That’s it!

I wrote a base server control (in Subtext.Web.Controls if you are handy with Subversion and want to get it from our source control repository) for rendering out the CoComment script. This control lets you set the various properties and renders out the appropriate CoComment script. I then inherited from that class to implement a Subtext specific version. That control gets rendered in the head section of the page to maintain as much XHTML compliance as possible. I am seriously anal, aren’t I?

Tags: Subtext