With just 15 minutes of 2003 remaining, I would like to thank everyone on blogosphere. May the year 2004, Year of the Monkey, bring you much love, joy, happyness, wealth, and health.
The new server was inaccessible for at least half an hour just now. The domain's primary nameserver was inaccessible too and my local nameserver was acting weird too (it was pointing to the old server). Anyway, everything is working again mysteriously. Server itself was running so it must have been some network problem. Weird.
BTW, you can send me e-mail by click on my face. I'll see about restoring the mail icon.
Take a picture on the web, any picture will do as long as its accessible by a URL, and attach a comment to all or parts of the picture which is displayed in a cartoon bubble. The bubble can also be set to pop-up on mouseover or mouseclick.
Start with a large picture or a series of related pictures placed on a wiki page in a row, a column, or a grid. Allow people to change or comment on all or parts of the pictures using tools on the web page. Put four in a row and let people create a toon by filling in the bubbles.
Fill top half of a page with a large image. That's the stage. Fill the bottom half with images of characters and props. Let people play with the characters and props and share the experience with other players and spectators. Record positions in time and let people replay one scene at a time. For kids and adults only.
I am cleaning up my blogroll just now, self-discovering blog feeds one by one. Esther Dyson and Halley Suitt's blogs at Blogspot are apparently gone so I have removed them for now. This feels too much like housecleaning. Urgh.
Just finished N. Choo-choo! Are we there yet? Choo-choo! This is how a highly paid, amazingly creative, and supposedly well-respected consultant/visionary/guru spends the last day of a year. My wife and I are not going anywhere tonight which leaves us wondering what we are going to eat for dinner. I don't really care what I eat — I hardly eat much of anything — but my wife defines her life by what she ate and where she went. So I care by proxy.
If you see this post, then you are looking at the new server. Welcome!
Note that I haven't turned on ASP.NET page caching yet so what you are seeing is raw ASP.NET performance. Not bad, eh?
Although my recent optimization changes improved DasBlog performance drastically, enough for me to defer switching from file-based storage to MySQL or Berkeley DB XML, I had to do something about RSS feeds being generated dynamically.
These feeds don't change unless content changes, so it makes more sense to generate them only when content changes. Besides, I needed to preserve URLs to my feeds so I needed a way to detect change to content automatically and force regeneration of those feeds.
To do this, I used System.IO.FileSystemWatcher to watch DasBlog's content directory and fire ContentChanged events which RSS builders and secondary data structures like CategoryCache and EntryIdCache instances listen to and react accordingly. Now I can make changes directly to files in the content folder and those changes are reflected in both the web pages and the feeds. Nice.
Classes like FileSystemWatcher has to be used carefully because many events firing over a short span of time will force unnecessary updates. For protection, I used delayed update as a cheap event folding mechanism. This technique doesn't protect against recursions which happens when a ContentChanged event listener makes change to the content directory.
Social network is a network where nodes are people and connections are positive relationships — I guess negative relationships can also be used to build social networks but they are not very useful. Current upswelling in the interest about social software can be divided into two:
- Forming new connections and nurturing old connections
- Sending and receiving data through social connections
Companies like Friendster and LinkedIn are focused on the first. Bloggosphere is all about the second. I tend to favor the second because the first reminds me of the sneaker net and because relationships are easy to stress and difficult to create.
Seeing social networks as a data networks like the Internet or intranet helps me see new opportunities. One I recently thought about involves distribution of favors, Favor Network if you will.
Think of what you need, whether its information or something more tangible, turn it into a packet of bits and send it to the immediate nodes in a social network using whatever communication medium you share like e-mail or IM. Each of the receipients can take whatever action on the favor request including ignoring it. Some will choose to forward it to appropriate immediate nodes. In the end, it will get dropped or reach people who have the desired information or objects.
Rising up a level and looking at the Favor Network again at an angle, it's like Google over social network, a search engine that uses people as servers or routers. Interesting.
Accounting of favor giving and receiving will promote such use of social networks. So the sender rates his request in favorpoints which places a value on the favor. The final receiver who fulfills a favor receives majority of the favorpoints. Those who participated in routing of the favor to that person shares the remainder.
To prevent abuse, each node's balance of favorpoints must be recorded somewhere and provided on request or attached to the favor request. If a person asks favors all the time, people will learn not to do any more favors for that person. If a person does a lot of favors for others, others will be more likely to help that person out. Favorpoints received are added to a person's favorpoint balance. Favorpoints spent are subtracted.
Will it work? I'll do you a favor and find the answer if you got a few million dollars. ;-p
Gretchen and Chris's divorce and a recent article in a Korean newspaper made me think about divorces tonight. In 1980, the divorce rate in Korea was 5.9%. In 1990, 11.4%. Last year, 47.5%. Those who keep track of the numbers say Korea will soon bypass America (51%) if it hasn't already. At this rate, the very social fabric of Korea will soon be torn apart.
I doubt the rate will become 100%, but I can't help but wonder what a society with 100% divorce rate will be like. Our divorce rate with cars is 100% so will we treat our spouses like cars? Will 18 year olds become equivalent of new car models? Will used cars get some respect as classics? What about the equivalent of rental cars? Who is driving who?
While I was looking at the data storage portion of DasBlog for improvements, a low hanging fruit hit me on the forehead: XmlSerializer. XmlSerializer is a major feature of .NET Framework that makes it really easy to read and write data structures from and to XML.
To use XmlSerializer, all you have to do is mark some members of the data structures with .NET attributes — .NET attributes are just source code comments for programs instead of people – that provide hints like this member should be an element and the element name should be such and such.
Ease of use encourages ease of abuse.
XmlSerializer is a rather complex beast so the class takes a while to instantiate. What hit me on the forehead was that DasBlog was using it everywhere and XmlSerializer was being instantiated substantial number of times per request: a juicy low hanging fruit indeed.
So I implemented XmlSerializerFactory which maintains a pool (as in car pool) for XmlSerializer instances and rewired DasBlog to use it whenever it needs an XmlSerializer. There are actually multiple pools because XmlSerializer instances are target data structure specific.
All that took no more than 30 minutes but the result was very rewarding. DasBlog with XmlSerializer pooling was noticeably faster. My guestimate is that it's 20%-30% faster depending on the page type being accessed. Woohoo!
It turns out that .NET 1.1 version of XmlSerializer uses an internal cache already although it depends on which constructor is used. So the speed improvement I saw was either a hallucination or due to some other changes I made.
An irony of the blogosphere is that permalinks are not permanent. Whenever a blog changes service or software, its permalinks breaks. While breaking of permalinks is not worth crying over, it's pretty annoying because internal links break as well.
Unless you are prepared to get your hands dirty, changing blog service or software means you are better off leaving your old posts where they are.
Having your own domain name doesn't protect you either if you decide to switch blogging software. This is why bloggers are leaving a trail of blogs behind them like a breadcrumbs. Nice huh? This is the situation I am in and I did get my hands dirty by writing an ASP.NET HttpModule to redirect date-based Radio URLs to DasBlog's URL format.
It's working pretty well except for the anchor part of URLs which is used by Radio to pinpoint a post in a page containing multiple posts. Since those anchors are not sent to the server, I can't map a Radio URL to a page dedicated to a single post. Oh, well. At least my permalinks are permalinks.
My next task in the blog transition is building a flexible RSS feed service framework while preserving old feed URLs.