Nicholas Clarke

  • rss
  • Home
  • Articles
  • Downloads
  • Contact

Google Reader and Embedded Videos

Nick Clarke | February 19, 2008

I use Google Reader as my main RSS client. For me it has answered all of my problems I had with using a desktop client + it allows me to share posts that I think are interesting without having to write a post myself by just clicking a button. It does however have some oddities itself e.g. phantom posts that I can never find but are in my sidebar folder structure.

Yesterday I noticed another feature, someone shared a post of mine and I noticed that my embedded video was not displaying!

After hunting around and comparing a couple of other RSS feeds I noticed that Google Reader seems to be stripping out YouTube <object> tags. To fix the problem I had to use <embed>. After waiting for Google to refresh their cache it is now working + I also get a nice popout link (something they must add).

If you are also experiencing the same problem be sure to check out what html is being generated by your site and then subsequently removed by Google Reader.

Comments
No Comments »
Categories
Google, WordPress
Comments rss Comments rss
Trackback Trackback

If programmers were to make a plane

Nick Clarke | February 18, 2008

This is a great advert and very true if you develop on the fly (pardon the punt) or conform to Agile development e.g. Scrum.

Defiantly something I can relate to.

Comments
1 Comment »
Categories
Adverts, Development
Comments rss Comments rss
Trackback Trackback

FastSharp - Rapid C# Scripting

Nick Clarke | February 17, 2008

Today I had to update a regular expression that I have not touched in two years!

On first look I got the old hhmm where do I start :)

(?<Protocol>\w+):\/\/(?<Subdomain>\w+)\.(?<Domain>\w+)\.(?<tlDomain>[\w.]+)/(?<File>.*)

This matches:

http://subdomain.url.com/Default.aspx

And breaks it into:

Protocol: http
Subdomain: subdomain
Domain: url
tlDomain: com
File: Default.aspx

But the problem starts when you have a - (dash) in the subdomain:

http://a-subdomain.url.com/Default.aspx

This of course fails as I use \w to break up the subdomain string, which just matches alphanumeric characters. All I need to do is to allow - as well as a-zA-Z0-9 (\w).

The final expression was:

(?<Protocol>\w+):\/\/(?<Subdomain>[\w-]+)\.(?<Domain>\w+)\.(?<tlDomain>[\w.]+)/(?<File>.*)

- Change marked in red

Simple change but testing this takes some time as I either have to run my complete application or write a small test program.

Last week Matt Manela on the msdn blog shared a great application that allows you to test C# code without having to even write a class or create a project.

FastSharp is a great tool for testing out some code. It even goes as far as checking for compilation errors.

FastSharp Compile Error

This was caused by me not adding the correct library for the Regex class.

To fix this all I had to do was click settings and then add the using statement.

using System.Text.RegularExpressions;

FastSharp Success

My little code snippet then ran fine and I was able to test and adapt my change very fast.

Great tool be sure to check it out + for more in depth into why and how it was coded see Matt’s post.

Comments
2 Comments »
Categories
Development, Microsoft
Comments rss Comments rss
Trackback Trackback

Pages

  • Articles
  • Contact
  • Downloads

Categories

  • Adverts (4)
  • Books (2)
  • Business (3)
  • Development (21)
  • Google (4)
  • Microsoft (15)
    • ASP.Net (1)
    • SQL Server (1)
    • Visual Studio (3)
  • Music (3)
  • Personal (16)
  • PHP (2)
  • Software (1)
  • WordPress (3)

Archives

  • February 2008 (3)
  • January 2008 (4)
  • December 2007 (2)
  • November 2007 (13)
  • October 2007 (25)
  • September 2007 (1)

Google Reader Shared Items

    Shared Items
    rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox