Caching values at startup with a thread-safe lazy load
January 20th, 2005Often 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.
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.
When programming for Internet Explorer, you can greatly improve the usability of textareas by using the style overflow: visible;
Bottom line: when you need to save both @@ERROR and @@ROWCOUNT, be sure to set them in one line:
select @MyRowCount = @@ROWCOUNT, @MyError = @@ERROR
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.
I really love this design site:
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.
This is handy for people using cpanel from locations where non-standard ports are blocked:
Scary as it sounds, I used the autoinstaller, and it worked great.
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.
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.
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.
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.