Archive for the 'Tips' Category

'Smart and Gets Things Done' vs 'Done and Gets Things Smart'

In this article I link to two excellent articles on the subject of hiring coders. They’re not new by any means, but if you haven’t read one or both of them, I thoroughly recommend them. (If you’re familiar with both these writers, then skip this article.)

Quick Tip: Avoid Enums If Possible

One of the “anti-patterns” I come across from time to time is over-use of enumerations for control flow. This article describes why I consider it an anti-pattern, and how to counteract it.

Resizing Single-Image-Rollovers Using jQuery

In this article I describe how to create shaped buttons in HTML/CSS that size to their content, have roll-over state, and require only a single image, using jQuery.

HOWTO: Fix Windows Explorer After Installing Internet Explorer 8

I wrote an article about this problem a while back – but it seems that the fix is relevant to more than just 64-bit installs of Vista, so I thought I’d re-release it in the hope that it reaches and helps a few more people.

Debug.Assert Considered Pointless

One thing I was told as a young programmer was to make good use of assertions for checking code. As time goes by however, I can see less and less use for assertions. I’m starting to think they’re pretty useless.

Forcing The Browser To Cache Dynamic Content In ASP.NET

Usually, you don’t want the browser doing any kind of caching on dynamic content served from a generic handler (.ASHX) in ASP.NET – afterall, the content is usually changing (dynamic). Sometimes however, it’s handy to use a handler to serve content that effectively never changes. Here’s how.

Consolas: Visual Studio's Hidden Gem

Out of the box, Visual Studio uses the Courier New font for displaying code. While that’s an acceptable font for programming, it’s hardly modern or easy on the eye. Did you know that Microsoft supply a much more readable alternative, for free?

Using WPF To Generate Web Images

Recently I needed to display rotated graphics within a web-page. Since there’s no way to do that cross-browser using CSS, I needed to auto-generate a collection of pre-rotated images that could be displayed as CSS sprites. I’ve found that WPF (Windows Presentation Foundation) is great for generating batches of images suitable for use in web [...]

HOWTO: Repair Your Vista 64-bit System After Internet Explorer 8

Internet Explorer 8 (IE8) has now been released to the public, and while it’s not enough to shift me from Firefox, I’m happy that it offers standards-compliant rendering and a useful “compatibility view”, meaning that web developers can essentially test on IE7 and IE8 without needing virtual machines. Unfortunately, when installed on 64-bit Vista (x64), [...]

Closures: Simplify Event Handling Code

Closures are a really useful programming construct, but as they’re only just appearing in the C-family languages, they’re relatively new to me. In this article I show how they can be used to vastly simplify event-handler code in web development.