Baby Steps to Code Generation

Write code snippets today and you can roll them into more robust code generation templates later.

Goal: get to the point where you click one button and the code for your whole app is written for you automatically.

Reality: Most business problems are more complex than just performing CRUD operations on a single table at a time, and I haven’t found a solution that can autogenerate such complex logic.

In the mean time, I’m finding the Code Snippets feature in VS 2005 to be a step in the right direction. The best part is that there is little to no effort lost in creating snippets as you go. If you later decide to go with a template-based code generator like CodeSmith.  When that time comes, you can use a little regEx magic to roll up those snippets into more robust templates.

Terra Nova Pools Site Launched!

My most recent project has been to create the first web site for Terra Nova Pools

My most recent project has been to create the first web site for Terra Nova Pools, a swimming pool design and construction company based in Orange County (CA). I launched the site a few days before the client’s deadline of Oct 1st, 2006.

I’ve been really excited about this project for a lot of reasons. Firstly, it’s the only project outside of this site that I have done without partnering with a design team (“Damn it Jim, I’m a programmer not a designer”). It’s also the first time that I’ve been responsible for the search engine optimization, and the result is that it is some of the cleanest XHTML and CSS code I’ve ever written. I’ll add the site to my portfolio soon and include details about the technologies I chose while implenting the site.

CSS Tabs Made Easy

There’s a lot of web standards-based css tab menus out there, but I have to say I’m pleased with this one by Ian Andolina because it dropped into my application and worked right away. It took me just a couple of minutes to change the font and coloring, but other than that, it was a breeze.

Though I had a little trouble with Adam Kalsey’s own tabbed menu, his page lists several alternatives (which is where I found Ian’s above).

Web-Based Productivity Tools

This post goes out to my friends Brian and Jeremy who endured a lengthy discussion with me last night about web-based productivity tools. It’s also a follow up to my earlier post on Web-Based Project Management Tools.

First thanks to Jeremy who told me about Google Notebook, which allows you to copy text and images from any web site to a “note” that lives on Google’s servers and is accessible via your Google login. So far I can see using this like an extension of my backpack account which doesn’t allow me to upload images.

It just so happens that after last night’s discussion, this morning I listened to a Hanselminutes podcast about micro-increases in productivity (like when it takes too long for the start menu to come up) and he mentioned the TiddlyWiki. This has been blowing my mind all day. Essentially it’s a wiki that you can run anywhere (at home, at the office, on your web site if you have one) because it’s just an HTML page with embeded javascript code that does all the work. I’ve been tiddlyWiking all day and comparing it side by side with my backpack pages to see which is better at managing my project data.

Some TiddlyPros:

Some TiddlyCons:

  • There’s no database – and you know javascript is going to bail while trying to save a file on your local machine at least once (esp. as those files get large).
  • It’s not a great tool for more than one user, or for publishing data publicly.
  • It’s best suited for tech savvy folks who can handle any issues that come when, say, you want to upgrade or extend your page and all of your data, business logic, and presentation settings are stored in a single file.

So far, I’m impressed though. The TiddlyWiki is truely a software revolution.

The Ultimate SEO Checklist

An excellent article on search engine optimization: The Ultimate SEO Checklist.

Search Engine Optimization (SEO) is something I generally don’t worry about too much since most of my projects have been intranet-only, or someone else on the project worried about that “soft” marketing stuff. However, now I’m working on a site where I am that person (gulp).

That’s how I came to find this excellent article, The Ultimate SEO Checklist, on sitepoint. In addition to giving detailed advice on how to optimize your site for search engines, Shirley Kaiser makes a good point that your SEO strategy should be part of your design from the beginning because it impacts the site’s information architecture and technical implementation – not just the copy text.

Virtual (and Free) Visaul Basic.Net Programmer's Cookbook

This is a very useful reference because of the problem/solution format that it employs to present the Visual Basic.Net language. However, I’m waiting for Microsoft Press to re-publish it for VB.Net 2005 before I buy a copy. Until then, I’ve discovered that you can download the complete source code for all examples in the book from Microsoft Press. After downloading the solutions and source code to your local computer, you can use the online table of contents to find the solutions you are looking for.

Storing Passwords in a Database

We all know that you should take some steps to obsfusicate passwords stored in the database so that they are not exposed to users with read access to the table that they are stored in. This Ask Tom post gives straightforward examples of how to obsfusicate passwords stored in an Oracle database either by encryption or by hashing.

Implementing Dispose()

A best practice when you create a classthat uses unmanaged resources is to implement the Dispose() method of the IDisposable interface. Even if your class is not using unmanaged resources directly but contains members that do (i.e. ADO.Net objects), it’s a good idea to implement Dispose() to call Dispose() on those members.

In order to properly implement Dispose(), you have to follow some rules. You can find an example of how to go about this in this MSDN library article on implementing Dispose() and Finalize().