Caching values at startup with a thread-safe lazy load

January 20th, 2005

Often I want to cache some shared values in a class at application startup time. Now I use the simple, thread-safe “lazy load” approach described here.

Read the rest of this entry »

Improving textarea usability in Internet Explorer with overflow: visible;

January 20th, 2005

When programming for Internet Explorer, you can greatly improve the usability of textareas by using the style overflow: visible;

Read the rest of this entry »

Saving @@ROWCOUNT and @@ERROR in SQL Server stored procedures

January 14th, 2005

Bottom line: when you need to save both @@ERROR and @@ROWCOUNT, be sure to set them in one line:

select @MyRowCount = @@ROWCOUNT, @MyError = @@ERROR

Read the rest of this entry »

Passing arrays to SQL Server stored procedures

January 14th, 2005

Passing arrays to SQL Server stored procedures should be easier than it is. Here is an article that lays out the options.

You wouldn’t think there would be security implications to doing something so basic. Shows that you have to be ever vigilant about security.

Cool site: CSS Zen Garden

January 12th, 2005

I really love this design site:

http://www.csszengarden.com

It shows how creative you can be with a website while still making it XHTML/CSS compliant. The resource guide it references is very useful for getting better at css.

Using cpanel behind firewall

January 11th, 2005

This is handy for people using cpanel from locations where non-standard ports are blocked:

http://cpanelproxy.net/

Scary as it sounds, I used the autoinstaller, and it worked great.

Great site: Joel on Software

January 9th, 2005

One of my favorite sites these days is joelonsoftware.com. Joel Spolsky is a Microsoft veteran and an outstanding writer who began blogging before it was called blogging. Joel also started his own company, Fog Creek Software, and he writes about it extensively on his site. His take on microeconomics is pretty darn funny and surprisingly helpful.

I don’t know Joel personally. I first heard about him when I couldn’t put down his UI book, User Interface Design for Programmers. His more recent book, Joel on Software is awesome as well.

Joel is a unique and important voice in our industry. For example, how many people recommend NOT using a template for software specs? After reading why, you might not agree, but you’ll have to admit he makes a powerful point.

To get a broad view of his site, start at his archives.

Thumbs up, Joel.

Other feeds and formats

January 8th, 2005

This site uses WordPress for blog software. WordPress offers many feed options and additional formats, but I presume most users will prefer the standard RSS 2.0 feed. In case you are interested, though, here are some additional feeds and formats.

Read the rest of this entry »

display: block;

December 31st, 2004

The CSS tag “display: block” is incredibly useful. Most web designers know about if for showing and hiding text using script (switching between display:none and display:block). It turns out, you also can’t set the width or height of an anchor without it.

Read the rest of this entry »

Talking to Myself

December 31st, 2004

When a friend of mine, Kevin Koehne, started his blog, I noticed how useful it was for him to record and remember development issues he figured out (example). A blog isn’t just for other people – it’s quite useful for the blog author as a knowledgebase. It’s extremely easy to enter notes, and built-in searching makes it easy to find relevant information later. As an added bonus, the public nature of a blog forces the author to write approximately well enough that the content might actually be usable later. And of course, the fact that a blog actually is public means that other people can share in the benefit of ones own discoveries.

So with that spirit, I strike out to use my blog in much the same way – as a knowledgebase for myself and my company as much as for sharing my views with the world.