On the day after the episode Swarley premiered, we got a rather funny entry on Barney's Blog. CBS removes the old entries, but there's this website that collects the backlogs.
In the original pilot script, before they got NPH, there's no mention of the blog. Then again, they did write the character more as a heavy-set Jack Black/John Belushi type. Barney's geekiness didn't come into play such as his tendency to make up words and say things like "BRB" until Neil was cast.
Me, I think Barney's Blog is a tribute to Neil's days as Doogie Howser.