October 13, 2003
@ 11:23 PM

Joel Spolsky writes

The reasoning is that I consider exceptions to be no better than "goto's", considered harmful since the 1960s, in that they create an abrupt jump from one point of code to another. In fact they are significantly worse than goto's:

  1. They are invisible in the source code. Looking at a block of code, including functions which may or may not throw exceptions...
  2. They create too many possible exit points for a function. To write correct code, you really have to think about every possible code path through your function...

A better alternative is to have your functions return error values when things go wrong, and to deal with these explicitly

Whoa, this is probably the second post from Joel that I've completely disagreed with. Exceptions may suck (unchecked exceptions especially) but using return values with error codes sucks a lot more.
 

Categories: Ramblings

RSS Bandit is now the most kickass news aggregator for the .NET Framework. However there are features people keep asking for that I haven't seen others working on that I'll try to get into RSS Bandit before the end of the year. In this post I describe the top 3 as I see them.
 

Categories: RSS Bandit

October 12, 2003
@ 10:08 PM

From the Reuter's article Suspected Penis Snatcher Beaten to Death.

BANJUL (Reuters) - A 28-year-old man accused of stealing a man's penis through sorcery was beaten to death in the West African country of Gambia on Thursday, police said. A police spokesman told Reuters that Baba Jallow was killed by about 10 people in the town of Serekunda, nine miles from the capital Banjul.

Reports of penis snatching are not uncommon in West Africa, with purported victims claiming that alleged sorcerers simply touched them to make their genitals shrink or disappear in order to extort cash in the promise of a cure.

The police spokesman said many men in Serekunda were now afraid to shake hands, and he urged people not to believe reports of "vanishing" genitals. Belief in sorcery is widespread in West Africa.

This particular urban legend was quite common back home in Nigeria and every couple of years there'd be "seasons" of mass hysteria where people got beaten up for allegedly snatching penises. There was always some story of "a friend of a friend" who got his penis snatched by some lady/gentleman/witchdoctor who they bumped into in a crowded street but managed to confront the person in time and request their penis back. 

I never realized this urban legend/mass hysteria  was widespread across West Africa. You learn a new thing every day.


 

Categories: Ramblings

Aaron Swarts has an interesting post entitled Shades of Gray where he asks the following questions
  1. What do you do when someone says something obviously false? Do you correct them? Do you ignore them?

  2. What if they continue to repeat it? Are they malicious? Misguided? Simply taking another, but still reasonable, point of view?

  3. What if they get people to agree with them? Are they a conspiracy? Biased? Driven by other motivations? Amoral? Immoral?

  4. What if everyone starts to say it? Do you question your belief? Your sanity? Your life?

Below are some thoughts that surfaced when I read his entry and the followup post
 

Categories: Ramblings

October 11, 2003
@ 07:29 PM

I just made available a download containing a signed assembly (i.e. DLL for the non-.NET savvy) for the EXSLT.NET project. You can download it from here. Here's the elevator speech description of the project.

The EXSLT.NET library is an implementation of EXSLT extensions to XSLT for the .NET platform. EXSLT.NET implements the following EXSLT modules: Dates and Times, Common, Math,Regular Expressions, Sets and Strings. In addition EXSLT.NET provides own set of useful extension functions. See full list of supported extension functions and elements in "Extension Functions and Elements" section.

The project is primarily a merger of the code from my article EXSLT: Enhancing the Power of XSLT and Oleg Tkachenko's article Producing Multiple Outputs from an XSL Transformation with a number of enhancements from folks like Dimitre Novatchev and Paul Reid.

I'll probably write a followup article about this for my Extreme XML column on MSDN. In the meanwhile I assume Oleg will probably send out an announcement to xsl-list & xml-dev about the project in the next few days.


 

Categories: XML

October 10, 2003
@ 04:40 PM
The one where yet another person requests a feature that's been in RSS Bandit for months.
 

Categories: RSS Bandit

October 10, 2003
@ 10:52 AM
An exploration of the term Almost Standard Compliant
 

Categories: Life in the B0rg Cube

October 10, 2003
@ 10:27 AM

Since I moved websites I'd like people to access my dasBlog RSS feed as opposed to my old RSS feeds. However whereas getting a web server to send a 301 (Moved Permanently) result to a client is a piece of cake in Apache (simply edit some config file) it seems to be a bitch and a half in IIS.

If anyone has any tips or tricks as to how to setup IIS 5.1 running ASP.NET to send 301s I'm all ears.


 

Categories: Ramblings

In which I go over the first three features I plan to checkin to the dasBlog work space. Click below for details.
 

Categories: Das Blog

October 8, 2003
@ 06:02 PM

I was at Sam Goody again this past weekend where I picked up the Tenth Anniversary Edition of Ninja Scroll and where'll I'll probably soon be returning to once they get the Ninja Scroll Series. I couldn't help but notice the disparity in the way entertainment media like console games and movies are sold compared to music CDs. Sam Goody had an "under $10" rack where one could buy big budget movies from a few years ago for less than half their original price at the time they were first released. Similarly various video games were being sold at half price because they were "platinum sellers". On the other hand I still have to fork over $20 after taxes if I want to pick up a CD over a decade old like NWA's second album. What seemed quite absurd was that it was possible  to buy a DVD for half the price one would have paid for its accompanying soundtrack on CD. There is clearly a problem here yet the RIAA continues to act like the problem is with music fans and not with them. Being blinded by greed is an unfortunate thing.

Phil Greenspun has a post entitled RIAA, friendship and prostitution where he states

In the bad old days of Napster you kept your MP3 collection on your desktop.  Today, however, an MP3 jukebox with enormous capacity can be purchased for $200.  It won't be long now before average people carry around their entire music collections on their cell phones.

Consider this scenario.  You are sitting at Starbucks and see a friend.  He is not inside your Starbucks but across the street in the other Starbucks.  You walk across the street.  Both of you happen to have your MP3 jukeboxes your pockets.  He says "Have you heard the latest Britney Spears song?  It reminds me so much of the late Beethoven Quartets with some of Stravinsky's innovative tonality."  You haven't?  Just click your MP3 jukeboxes together and sync them up.  Any tracks that he had and you didn't you now have.  You're using a digital audio recorder; the device won't do anything except record music.  You're not paying each other so it is noncommercial.  Under Section 1008 what you're doing is perfectly legal in the United States.

<snip />

What is the point of Internet file sharing when people can, perfectly legally, copy as much music from each other as they could reasonably want?  Only a person with zero friends would want to bother with file sharing.

This is an interesting point and one I've heard expressed before by one of my friends who owns an iPod. It takes about 10-15 minutes to push an  album's worth of songs to an iPod. Nowadays when someone tells him about a good album they just bought, he doesn't even have to borrow it for more than 15 minutes to have all the music on his iPod. The problem for RIAA is that unlike listening to music on your PC which could be considered "try before you buy" since the PC is not the main music device of a large number of the population, an iPod is likely to be the main music player of a lot of people and once music is on it there is little incentive to go out and buy it.

Once the next generation of iPods (and other hard drive based digital music players) show up with wireless file sharing (just beam that song Scotty) this trend will be significantly accelerated.

Personally, I hope the music industry adapts but I definitely hope that during the adaptation process we lose the RIAA.


 

Categories: Ramblings