Detecting mobile devices with JavaScript
While I understand and value the concept of feature detection over browser detection, sometimes the need for knowing whether or not we're dealing with a mobile device arises. For in-depth device checking, you can rely on a complex library such as The MobileESP Project. But for simpler applications, the following snippet can be useful.
Redirecting to and from the www subdomain with .htaccess
Here are a few snippets that will come in handy if you ever need to redirect www.example.com to example.com or vice versa. There are a number of similar methods out there, but I prefer these as you don't need to modify anything between development and production.
The SimpleImage library for PHP
If you love working with PHP but hate the GD library, you'll love the Simple Image PHP class I'm releasing today. This class takes the headache out of dealing with images and features over 25 useful methods.
How to delete a tag on GitHub
In the world of Git, tags are very useful for keeping track of your project's version history. A lot of folks will argue that you shouldn't delete tags, but there are real-world examples in which tags need to be deleted. That said, it's both a good and a bad thing that GitHub hasn't built the ability to delete tags into it's web app.
Office 2007 files downloading as ZIP files in Internet Explorer
Today I learned that Microsoft Office 2007 files (you know, the new ones that end in DOCX, XLSX, and PPTX) don't always download properly in Internet Explorer. In fact, IE tends to see them as ZIP files and forces their extension to change to .zip when you select download. This is because IE is checking for the MIME type instead of blindly going by file extensions. Ironically, since it doesn't recognize the new Office 2007 files for what they are, IE renames their extensions to .zip upon downloading.
Smoothly scroll to an element without a jQuery plugin
You know that special effect where you click on a link and your browser smoothly scrolls down to the appropriate section of the page? Pretty slick, right? Here are a couple snippets so you can do the same thing on your own website.
The difference between web designers and web developers
If you've ever worked in, on, with, or around the Internet, you've undoubtedly heard the terms "Web Designer" and "Web Developer". Oftentimes, the two phrases are used interchangeably by someone who is not familiar with the industry. Perhaps the concept is irrelevant to a client who just wants to get their website up and running. Or to a server administrator who has his concerns in the silicon, steel and software that power your website. And what about the nice lady over in Human Resources who blotches up the job posting during the hiring process? I mean — designer and developer — they're the same thing, right?
Let's face it, if you have the word "Web" in your euphemism, you've probably been hammered with questions from both sides of the playing field. Designers will hear things like "how can we add a database to the website?", while developers struggle to answer questions about layout, color selection, image placement, and font styles.
New shortcut keys in Windows 7
I was happy to learn that Windows 7 has some new shortcut keys that let you control certain aspects of window management right out of the box. They're pretty easy to remember too:
Icon Finder: an awesome search engine for icons
I came across a really awesome icon resource awhile back, but never got a chance to write anything about it. If you're a web designer or developer who always has use for quality icons — especially ones with GPL or similar licenses — this is the website for you. It's essentially a search engine for icons. Everything about this website rocks, especially their logo.
JSNES: a Nintendo emulator built in JavaScript
I remember, not too long ago, arguing with people who said that JavaScript would never be as good as Flash. Granted, at the time many people were afraid of JavaScript and, thus, it wasn't used as widely as it is today. With the introduction of popular libraries such as jQuery, Prototype, MooTools and many, many, many others, JavaScript has been on the forefront of the Web 2.0 movement. In fact, it's rare today to visit a webpage that doesn't use JavaScript for at least something. Sure, Flash is still pretty popular, but trends seem to indicate that people are moving further away from it for design and reserving it for videos, file uploaders, online games, and high level web-based applications.