Ian Stallings: web log

official chicken™

March 2003 - Posts

New Flash Card Reader

This weekend I went to a local computer show and picked up two small flash card readers. Although I needed something in between a CD burner and a floppy disk to bring home my code, pictures, mp3s, etc. So I picked up a 6 in 1 USB card reader made by http://www.dazzle.com and I am very impressed. I also picked up a 128mb CompactFlash card made by http://www.crucial.com/ (known for their high quality memory) as a sort of test. I went home and simply plugged it into the USB slot on the front of my machine and Windows 2000 automatically installed the correct drivers. I then copied a few large files, wiped it and then copied a large number of small xml files and both copies went very quickly, a few seconds max. It's pretty small and very light so I can carry it around with me. It also supports 6 different card formats: CompactFlash, SmartMedia, SecureDigital, MemoryStick, MultiMediaCard, and IBM MicroDrives. The media is relatively cheap, currently around 50 cents/MB but some of the larger cards are still expensive, a 1GB CompactFlash card is around $280 US. They are pretty small too, the CompactFlash 128 mb card I bought is about the size of a half dollar but square.

Coding and Fishing

Lately I have been focusing on adding new features to OpenSmtp.Net (http://sourceforge.net/projects/opensmtp-net/), the project I started two years ago. Right now my partner Jason Kirkpatrick and I are focusing on adding Asynchronous support to the component so a user can call a send method and not have to wait for a response. This will be our first attempt at writing an API that allows Asynchronous calls so we are doing some research into how to structure the API.

Some Async Links:

http://msdn.microsoft.com/msdnmag/issues/01/08/async/default.aspx

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconasynchronousdesignpatternoverview.asp

Although the idea of asynchronous programming is not foreign to me and I have written clients that call methods asynchronously, designing a clean async API is new to me. We want to follow what is used in the .Net as closely as possible but we are finding discrepencies and there are various ways to envoke a method asynchronously. So a little more research is needed before we write any code. But we are finding that our original design, derived from well proven (read:old) async models used in various applications,  fits into the .Net API model very nicely. We can map a lot of our classes used in our models to real world Types in .Net. For instance, we have a completion token that returns completion notification and results. This can be mapped to the IAsyncResult types very easily. So far it's been a fun and educational experience.

Other News:
I am also looking to add CRAM MD5 Authentication mechanism to the next release. This seems to be a well used Authentication mechanism on some SMTP servers that require security of some sort. I will add TLS (SSL), S/MIME, and PGP support in the future to meet stricter security needs but for now this is an improvement over the SMTP Standard AUTH LOGIN mechanism.

Fishing!:
And on the best note of the week - I got to go out and go fishing last weekend. It was around 50-60+ degrees all weekend. On Saturday I was actually going in to work and my arms tookl control and I drove right past work to a nearby trophy bass lake. I didn't catch anything but that's not the point ;-) To me it marks the coming of spring and all that is good. I love getting outside and enjoying nature.

OpenSmtp.Net latest Release

So I released OpenSmtp.Net version 01.09.6 today: http://sourceforge.net/projects/opensmtp-net/. Please feel free to download it and use it in your projects if you wish. I have released it as both a zip file and a msi installer file. The more eyeballs that look at the code the better.

I've been working on a C# app at work that bulkloads records into a SQL server DB using the SQLXML bulkload COM app. Basically I wrapped it using C# because I wanted to process an entire directory of XML files (1500) at once and report the errors to a error log. I have to say this though - the built int SQLXML bulkload error reporting is a joke. It constantly reports incorrect errors. If I have a bad tag at line 1 it will report a problem on line 50. I hope this is fixed in the next SQMLXML release, which is supposed to be a native .Net API. Also I wish that MS would release an app that would generate a schema based on an XML file that fits the MS bulkload schema. I find myself using VS.net to generate a generic schema then hacking it to fit the bulkload schema standard. It would be a small app but totally helpful to developers that use the SQLXML bulkload features.

Latest OpenSmtp.Net Release

So last night I wrapped up the latest version [01.09.6] of OpenSmtp.Net (http://sourceforge.net/projects/opensmtp-net/) and plan to release it sometime tomorrow after I update the help documents and build the installer version. Most of the work on this version was related to bug fixes due to MIME content-type errors, quoted printabe encoding, and email address validation. New features include support for SMTP pipelining and the ability to limit to log file size, to avoid those nasty situations where a log file can kill a machine by using up all available disk space.

Open source development on OpenSmtp.Net is really working out as far as bug fixes and feed back is concerned. I have gotten a lot of support lately from a lot of people around the world. For instance, someone spotted and fixed the MIME content-type error and sent me the changes, I just had to merge the fixes into the current code base, after looking them over. The encoding problem was spotted by a three separate developers from around the world and they all offered feedback and bug fixes. The email address validation was a C# port of Jeffrey Friedl's PERL regex, which is basically the end all be all of email address parsing. Before I implemented the port I contacted Mr. Friedl and asked for his permission, since he was the original copyright owner and my work would simply be a derivative of his. He responded that I could use it and thanked me for asking him first. In my mind that is how open source development is supposed to work. We all work together to achieve a common goal and we all reap the rewards. In this case we get to use a library that is superior to the built in System.Web.Mail classes and can compete with some commercial products in terms of funtionality.

Most of my time from here forth will be focused on not only supporting the current version but beefing up the documentation, help files, and examples. I find that our lack of docs and help might leave some developers out and I have never subscribed to the "it should be hard" mentality that the open source community is notorious for. I want everyone to use this library, plain and simple. Not just those that know how to compile from source or debug a C# error.

After that we have some big changes planned. Jason Kirkpatrick is currently working on a design to incorporate POP3 into the current code base. I think this will make our component more attractive to developers, allowing both sending and receiving of mail and a local mail store. This project will be called Arrowana. An Arrowana, also called a Dragon Fish, represents power and is supposed to bring people good fortune. The main reasons for the name change are:

A. This means a drastic change to the code base and the new version will be a serious split from the original. Basically it's a new project. 
B. The name OpenSmtp was causing confusion with another project named OpenSmtp associated with Qmail.

And that''s it for this week. I hope to write later about my ordeal with quoted printable encoding and show some good use of bit shifting and bitwise operations.

First Post

Hello, This is my first blog tracking my development experiences using .Net, usually using C# but sometimes VB.Net. So let me tell a little about myself:

One of my current projects is OpenSmtp.Net (http://sourceforge.net/projects/opensmtp-net/), an open source C# mail component that extends the .Net framework. Starting the project in Feb 2001, it has allowed me to learn C# and the .Net framework while also contributing to the development community. Many people have contributed suggestions, enhancements, and bug fixes and I have recently added a new team member, Jason Kirkpatrick, another C# programmer and close friend. It has gained popularity over time with total downloads currently around the 5500 mark. If you find the framework mail classes lacking, feel free to download OpenSmtp.Net.

I have also written a few articles on the web, most are at: http://www.4guysfromrolla.com/webtech/ian.shtml.

I have 6 years of programming experience and currently contract for a large IT corporation doing both QA and Software Development in government and health care industries.

 

More Posts