Posts

Showing posts from January, 2008

Notify Icon Text vs BalloonTipText

Ok so I have a small application that shows a users ip address via a tool tip when it sits in their system tray. Everything is going fine until someone sends me a bug that there was a problem. Investigating this I find that the method I was using to display tool tips in the system menu is somewhat flawed. I was using a notify icon control to show the tool tips while in the system tray. This works but I was setting the Text property of the control like this: // old way of setting text, with 64 character limit this.notifyIcon1.Text = "Show me in the toolbar"; This works but only for up to 64 characters. When I was designing the application I was thinking about ip addresses using the v4 format not the v6 format. Sure enough v6 ip addresses kick out more then 64 characters a lot of the time. So the search was on and I found using the balloon text can show more data but is a wee bit harder to use. Balloon tool tips don't show automatically like the text does. You h

Some interesting links

So I found some interesting links on software development programming: How to recognize a good programmer Confessions of a terrible programmer The first one is fairly interesting. I agree with most of his points and I think drive is a good indicator but maligning people who don't code in their spare time and people who learned it in school is not accurate. Some folks just code during the day and don't want to code when they get home. It doesn't mean they're not good programmers. However people who don't want to learn new stuff while not bad coders are doomed to work on the same ol thing forever. Maybe some folks like that but it's not for me. The second one should be required reading for all coders. It's very zen but you have to realize you know nothing before you can learn anything. It offers a lot of very good advice on how to become a better coder. The first step is to realize you're a bad coder to begin with.

Use DataReaders instead of DataSets

Ok so I'm working on a fairly large asp.net application. When we first started we were using DataSets for ease of use. However as the app has gotten large we're finding DataSets are very heavy in memory and filling them from the database takes a lot of time. So after some research I found DataReaders are the best thing to use. We use the data access blocks (3.1) from microsoft and swithing from ExecuteDataSet to ExecuteDataReader saved almost 2 seconds. It was a huge savings. Switching to datareaders isn't without some problems. In some instances we need hierarchical presentation and datasets work very well for that. Also some of our classes expose dataviews as properties and that creates some problems. However most of this can be overcome with some better OOD. And when using datareaders always always always close them! So use the using statement in c# which closes the datareader when done. So using the data acccess blocks with a stored procedure here is some sample code of

New software Directory Sweeper is unleased!!

Image
Ok so I finally finished work on my latest software program Directory Sweeper. This one lets you clean specified directories at a given interval or simply when you want to. It can sit in the system tray or you can run it full screen. You also get a report of what files/directories it was unable to remove after the last sweep. It's version 1.0 and I can think of lots of improvements already but it's pretty good. I think it's actually good enough to charge a small fee for. It's only 9.95 to buy, you can download it over at my website under software. Download it, try it, and if you think it rocks your world just send me the paypal. If you think it stinks let me know why! The screenshots below show the app in action.