Thursday, April 07, 2005

Standards and Practices

We are looking to adopt some coding standards and best practices. Here are some good resources we found:

The DotNetSpider and MSDN articles both specifically say not to use Hungarian notation. I whole-heartedly agree with that.

April 7th, 2005 Meeting

On deck for the April 7th, 2005 Meeting:

In Design Pattern's Explained:

  • Mike on Chapter 19 - The Template Method
  • Jim on Chapter 20 - Lessons Learned
  • Doug on 21 - Singleton

For our obscure programming language of the month:

  • Steve D. will do a programming language beginning with X
  • Steve R. will share a language beginning with U.

Chris B. also recently finished Delphi for .NET Developer's Guide and will have a few words to say about that and his experiences with Delphi 2005.

I have a box full of nifty swag that INETA sent me in the mail. I be sure to bring it to share.

See you at the Washington Group building at 7 PM.

Rube Goldberg Software Devices

Jeff Atwood over at Coding Horror has an interesting post about Rube Goldberg Software Devices. Check out the video too, sounds like a lot of design sessions I have been sit in on before, although it was usually streamlined out before they were done.

Steve, a co-worker of mine, will often refer to overly complex systems as the Rube Goldberg approach. When I first started working with him we went to see how a system worked that had been put together by someone outside of IT and who was retiring. It involved about 10 steps that the operator was required to run, and relied on no longer supported, proprietary scripting systems. Since the system worked no one was going to mess with it, but if the process ever changes then I imagine it will be rewritten from the ground up.

Wednesday, April 06, 2005

Aspect Orientated Programming in .NET

I was just chatting with David Orriss and he recommended the Spring Framework for doing Aspect Orientated Programming (AOP) in .Net. They also have a Java version. Where AspectJ is a precompiler, Spring uses an AOP proxy objects to direct pointcuts to the aspect classes via XML descriptors. I think this is the same way that RemObjects' Taco works.

AOP looks promising and may be the next software development evolutionary step after Objects. David has been doing a lot with it on the Java side and speaks highly of it. I am glad to see AOP tools showing up for .NET now too.

Update: More links on AOP in .NET

  • Aspect# is an AOP ( Aspect Oriented Programming ) framework for the CLI (.Net and Mono). Open Source ( Apache License v2 ) on SourceForge.net.
  • The LOOM .NET project aims to investigate and promote the usage of AOP in the context of the Microsoft .NET framework. It offers two different weavers.
  • aosd.net is home to the annual Aspect-Oriented Software Development conference and community.
  • A MSDN paper on Aspect-Oriented Programming Enables Better Code Encapsulation and Reuse covers both COM and .NET. Seems like I read this a while ago. For .NET they were advocating using attributes, which is an interesting idea, but requires modifying the original code to add the aspect.

Simpler Main in .NET

Wintellect has an interesting article advocating a simpler main block in your applications. Their main point is that you do not want an unhandled exception to be raised in your main block because you will have no other place to catch it. Basically your main should only have an try / catch block with a call to another method from the same class and a call to an exception handler in the same class. The importance of having them in the same class is it doesn't require loading other types / assemblies. They have some interesting points, but as usual with any proposed best practices there are as many arguments against as for it.

Ridiculously Big Visio File Size

I am guessing this is a bug in Microsoft Visio 2002. I am making these large (34" x 44" on a plotter) diagrams that show the relationships of various screen shots in an application. The file was passing 15 Megabytes in size with 6 pages in the project. The save time was a few (10 or 15 maybe) seconds, and I had more pages to go.

In order make the files smaller and decrease the save times I decided to split each page into its own file. The new file was 30 Megabytes. Twice the size for only one page! At first I thought it was undo data or something along those lines. I went through a few permutations to try and make it smaller, including manually copying and pasting the page into a new instance of Visio. Still no luck.

Visio Properties dialog While looking through the options I was looking at the Summary tab under File / Properties. It was set to draft quality and a preview of the first page. My first thought was that a single preview image couldn't make that big of a difference, but I decided to remove it and see what happened (since I tried everything else). The new file size was under 2 Megabytes.Visio Properties dialog

Hard to imagine that the low resolution preview image could be 28 Megabytes in size. I figure there is some bogus data that got cleared out when I disabled the image. To test my theory I closed and reopened Visio and put the enabled the First Page Preview again. New file size? 30 Megabytes. Changing the Quality (of the preview) from Draft to Detailed made little difference in file size.

I disabled the First Page Preview on the original 15 Megabyte file and it dropped the size to 12 Megabytes.

Out of curiosity I added a blank page as the first page and turned first page preview back on. That made no impact in file size, it was still 2 Megabytes. I looked back at my original 15 Megabyte (now 12 Megabyte) file, and the first page in there was very sparce of screen shots, which would explain why disabling the first page preview made less of a difference.

Moral of the story: Disable Page Preview in Microsoft Visio 2002, especially if you have screen shots and/or are using large paper sizes!

Monday, April 04, 2005

New Tool For Writing Code

From Slashdot:

A group of researchers, led by Carnegie Mellon researchers, have developed a new set of software tools that may revolutionize the way computer code is written. They said they have created a new breed of software called "SPIRAL" that automatically generates code for signal-processing applications - applications that help make computers run faster and cheaper. "What SPIRAL does is permit users to develop high quality code for new and old applications automatically, say in 10 minutes or less, saving time, money and aggravation for end users"

Whenever a new technology relating to software development comes out we see similar claims. Remember OOP, UML, MDA and Windows programming? A lot of programmers run for the hills to find new vocations since they will be put out of work.

The real result is the level of complexity expected in application development just increases by an order of magnitude.

Sunday, April 03, 2005

Delphi Code Profilers

Michael P. on TDAG mailing list was looking for a Delphi code profiler to identify dead code. This is a useful too to have. Used to be I used Turbo Power's suite (which I forget the name of now). With them closing shop I wasn't able to come up with a good answer for him.

Lucky for us all Stephen Q. provided the following list:

Looks like some good choices!

Nick Hodges chimed in later to point out that he is a reseller for AQTime. It is all part of his strategy to corner the market on Delphi tools.

Web Cam Street Shot

My thanks to Rich for the link to the Ada County Highway District's Advanced Traffic Information System with strategic street cams. I decided to take a camera that is placed near where I work and shows part of my view out the window for a web cam image on the side bar. I always assumed that in Boise, Idaho we were fairly immune to having our image captured by camera's without our knowledge. Guess I was wrong!

Friday, April 01, 2005

The Code Commentator

The Commentator uses revolutionary real-time language processing to actually grok your code and add the necessary comments on the fly. No more doco to slow you down. Just install The Commentator and watch as your coding elegance is eloquently decorated with insightful, nuanced commentary ...as you type. What's more, The Commentator's powerful Personality Controls allow you to tweak it's output so completely that it's as if The Commentator is speaking for you. In your voice. Explaining to those that need it, so that you can get on and get busy.