Skip to content

Debugging XmlSerializer

This is pretty much the reason why I started this blog. I regularly find an article to help with a particular coding problem I’m having. The really frustrating thing is having the problem (or a similar one) a second time and not being able to google up the article again!

Which is what happened last night when I recieved a “Input string was not in a correct format” when deserializing the response from a flickr method call. Something had changed in the XML I was receiving from flickr, which caused a problem when attempting to deserialize the XML into a class. Here is a handy article that explains what is exactly going on when you deserialize an object:
Troubleshooting Common Problems with the XmlSerializer.

The last section ‘Debugging Serialization Code’ shows how you can grab the dynamically generated serialization classes, and step into them to find where an error is occurring.

Google Video Highlights

It took someone as smart as Google to realise the current multitude of video clients and codecs isn’t good for the web. The Google video site uses Flash for video playback. No need to download Quicktime, Real, or the latest Windows Media. I can actually send someone a link to a streamed video reasonably confident they’ll be able to play it!

Here’s some highlights I’ve discovered from the most popular page:

  1. Tom Kills Oprah
  2. Shingo Mama No Oha!
  3. Cup stacking world record
  4. Smart car

Quick way to find space used by each table in a database

Found this very handy:

sp_msforeachtable 'sp_spaceused "?"'

Produces a kind of ugly output (returns a table for each table). The original article includes a query to get all the results into one table: Quick way to find space used by each table in a database

Reverse IP Lookup

Whois Source has a pretty cool feature: Reverse IP Lookup. Enter an IP or domain and find out how many other sites are sharing the same IP. Requires ‘silver membership’ to see all the matching sites, but the free membership will tell you the number of sites that match. Good way to check if your hosting company is being honest about their semi-dedicated hosting!

Turns out the cheap (and reasonably good) hosting that I’m using for a project of mine, has managed to squeeze 183 sites onto the one box (for the cheap hosting – NOT the semi-dedicated one)!