Archive for December, 2007

Count Lines of Code in C#

Tuesday, December 4th, 2007

When I am programming I often wonder how much code I have actually typed. Sometimes when I get in the zone, have a well thought out design and have auto-completion helping, I can generate code pretty quick. Although there are quite a few programs out there that will count the lines of code some are a bit more intelligent than others.

At the most basic level a simple command in DOS can count the lines of code in a file or directory. But, I often want to a little more than just the the number of lines in each file. I want to know things like the lines of code vs empty lines and the number of lines that contain comments. Fortunately, there is a plug-in for Visual Studio that will do just that. Since, I am normally using Visual Studio to write any program in C# this is a very logical place to have this tool.

C# count lines of code

My next mission will be to find a good line counter for Java. Anyone know of any?

What Is the Best Email Client?

Saturday, December 1st, 2007

Determining the best email client is not a clear cut decision as there are quite a few ways one might manage their email. Although, I do think it is interesting that Thunderbird comes up first when searching Google for the phrase What Is the Best Email Client. I have to admit I agree with Google on this one Thunderbird is really good!

The thing I love most about Thunderbird is it’s IMAP support. I believe IMAP is the best way to read email since the email is kept on the server. This allows the email to be accessed from any computer (home, work, friends house, etc). With that definition it doesn’t sound like it is much different than a web based email client (SquirrelMail, GMail, Hotmail, etc) but it is!

The main feature that makes me believe that Thunderbird is better than a web based email client is the way email accounts are accessed. I can have 10 different email accounts that exist on 10 different servers and only need 1 application (Thunderbird) to access them all. Also, since the application is running on my computer it tends to run a little faster than a web site that will need to reload the page anytime I click something.

GMail does have a good user interface and page load time is pretty quick with their use of ajax.  Although, if you are using dial-up Internet you will definitely notice a difference as the first time Google loads it can take quite a while which can be seen in the screenshot below.

GMail slow startup when using dialup

GMail is probably my favorite web based email client but I really like to have more control over my email than what Google gives me. I like to know that if my email starts consuming 100 gigabytes of space that I won’t have a problem. Since I run my own mail server, I like knowing that my email is backed up and where it is backed up. So I don’t have to worry about Google one day saying sorry we lost half of your email. I also like knowing that I have control over my email and Google can’t one day decide to hold my email for ransom (not that I really believe Google would).

Google has recently started offering IMAP support (where they were only offering pop). I have been waiting for that feature for a few years and am very glad that that started supporting it. Now I can access my GMail account in Thunderbird too!

So, what about other email clients like Outlook, Outlook Express, Windows Mail. Although, I do like a lot of the features that Outlook has like managing appointments and contacts. It’s support for IMAP is pretty bad. Since IMAP is what I like using there really is no good competition.

Actually, I can think of one other email client that I have considered moving to in the past due to its speed and quick access keys. That client is Pine developed by the University of Washington. It is a text only email reading client and it supports IMAP. I love how fast I can read my email’s in Pine and I also love that I don’t have to wait for large HTML email’s to load or worry about some hidden link (phishing) or virus that could be hidden in the HTML. Unfortunately, I also like reading some email’s that come in an HTML only format. So, that one reason alone is enough for me to not use it.

That said, I would love to hear what email client you are using and why you have chosen to use it?