The Coolest DHTML Calendar Widget…

Just came across a very cool DHTML Calender control that – guess what – allows you to select dates/times and stick them in an input field! Obviously its client-side, so its nice and fast, customizable, released under LGPL, and best of all works in almost any browser (Internet Explorer, Opera, Mozilla, Safari …).


http://dynarch.com/mishoo/calendar.epl


Definitely worth a look :,,)

New RSS Feed for Developer Fusion

Well, I’ve finally gotten around to publishing an RSS feed for the articles on Developer Fusion . You can get it here – http://www.developerfusion.com/rss/contentrss.aspx?type=articles&language=all .


For anyone who’s interested in the code behind it – I just wrote this simple helper class.

/// <summary>
/// Enables the generation of an RSS feed
/// </summary>
public class RSSFeedGenerator
{
    XmlTextWriter writer;
    public RSSFeedGenerator( System.IO.Stream stream, System.Text.Encoding encoding )
    {
        writer = new XmlTextWriter(stream, encoding);
        writer.Formatting = Formatting.Indented;
    }
    public RSSFeedGenerator( System.IO.TextWriter w )
    {
        writer = new XmlTextWriter(w);
        writer.Formatting = Formatting.Indented;
    }
    /// <summary>
    /// Writes the beginning of the RSS document
    /// </summary>
    public void WriteStartDocument()
    {
        writer.WriteStartDocument();
        //writer.WriteComment(“Generated by Developer Fusion RSS feed at ” + DateTime.Now.ToString(“r”));
        writer.WriteStartElement(“rss”);
        writer.WriteAttributeString(“version”,”2.0″);
    }
    /// <summary>
    /// Writes the end of the RSS document
    /// </summary>
    public void WriteEndDocument()
    {
        writer.WriteEndElement(); //rss
        writer.WriteEndDocument();
    }
    /// <summary>
    /// Closes this stream and the underlying stream
    /// </summary>
    public void Close()
    {
        writer.Flush();
        writer.Close();
    }
    /// <summary>
    /// Begins a new channel in the RSS document
    /// </summary>
    /// <param name=”title”></param>
    /// <param name=”link”></param>
    /// <param name=”description”></param>
    public void WriteStartChannel(string title, string link, string description, string copyright )
    {
        writer.WriteStartElement(“channel”);
        writer.WriteElementString(“title”,title);
        writer.WriteElementString(“link”,link);
        writer.WriteElementString(“description”,description);
        writer.WriteElementString(“language”,”en-gb”);
        writer.WriteElementString(“copyright”,copyright);
        writer.WriteElementString(“generator”,”Developer Fusion RSS Feed Generator v1.0″);
        writer.WriteElementString(“webMaster”,”James Crowley”);
        writer.WriteElementString(“lastBuildDate”,DateTime.Now.ToString(“r”));
        writer.WriteElementString(“ttl”,”20″);
       
    }
    /// <summary>
    /// Writes the end of a channel in the RSS document
    /// </summary>
    public void WriteEndChannel()
    {
        writer.WriteEndElement(); //channel
    }
    /// <summary>
    /// Writes an item to a channel in the RSS document
    /// </summary>
    /// <param name=”title”></param>
    /// <param name=”link”></param>
    /// <param name=”description”></param>
    /// <param name=”author”></param>
    /// <param name=”publishedDate”></param>
    /// <param name=”category”></param>
    public void WriteItem(string title, string link, string description, string author, DateTime publishedDate, string subject)
    {
        writer.WriteStartElement(“item”);
        writer.WriteElementString(“title”,title);
        writer.WriteElementString(“link”,link);
        writer.WriteElementString(“description”,description);
        writer.WriteElementString(“author”,author);
        writer.WriteElementString(“pubDate”,publishedDate.ToString(“r”));
        //writer.WriteElementString(“category”,category);
        writer.WriteElementString(“subject”,subject);
        writer.WriteEndElement();
    }
}


and then it was *really* simple to generate the RSS! 🙂

// set the content type
Page.Response.ContentType = “text/xml”;
// create a RSS feed generator for the output
RSSFeedGenerator gen = new RSSFeedGenerator(Page.Response.Output);
gen.WriteStartDocument();
gen.WriteStartChannel(“Developer Fusion RSS Feed”,
“http://www.developerfusion.com/”,
“Summary of the latest articles published on Developer Fusion”,
“Copyright © Developer Fusion Ltd, 1999-2004”);
// generate the items here
gen.WriteItem(“Some Great Article,”http://www.developerfusion.com/show/10/”,”description”,”James Crowley”,DateTime.Now, “ASP.NET”);
// clear up
gen.WriteEndChannel();
gen.WriteEndDocument();
gen.Close();

Oh – and if anyone can show me how to post this code correctly on these weblogs, then please drop me a line!

Windows IE exploit found after source code leak

I must admit this happened much quicker than I thought it would :- see these articles on the Register and Security tracker – apparently an exploit for a buffer overrun problem in IE *5* has already been released – supposedly discovered by reading the leaked windows source code.

I’m curious as to whether this source code leak will be a “good thing” for windows in the long run, or will end up highlighting so many possible areas for exploits in Windows that MS gets an impossibly hard time…

Performance of C# vs VB.NET

Someone asked me a few days ago whether there were any major differences between C# and VB.NET performance, and my immediate reaction was “certainly not!”…. until I just came across this article on builder.com. In it, the author points out that for the number of program he tried, the C# version consistently generated fewer lines of IL code than its VB.NET partner.

Does anyone have any insight into this?

Yet another blog

I find it incredible just how many great developer blogs are around now. I can’t hope that this blog will be anywhere as interesting as the rest, but this one’s *mine* ;,,)

So, welcome to my blog! I suppose a short introduction is in order….

I’m currently in my 2nd year of a Computer Science degree. Although force-fed an awful lot of Java * in the course, I tend to eat and speak .NET whenever I get the chance! In my spare time, I run Developer Fusion , which has a collection of .NET and VB articles written by a wide range of authors, and a few of my own. Microsoft have also been kind enough to let me review various products like VS.NET/Windows XP, plus invited me to the Office 2003 launch in London last year. Oh, and I’ve also been involved in writing WebZinc .NET.

And that’s about it for now….. Hope you all stick around, and feel free to drop me a line.

* Actually, I have to admit… Java isn’t *that* bad 😉