Use of ADDRESS Element

01 Jan 2007

After seeing it mentioned in Transcending CSS and then again in Pro CSS Techniques, I think there may be a general misconception as to how the ADDRESS element should be used. In neither case did the authors explain how or why the element should be used. In fact, it seemed implied that it should be used to mark up any postal address that might find its way onto a web page. In the argument of sema...

Read it all »

Advertise on Snook.ca

30 Dec 2006

To launch off the new year, I'm introducing an advertising program for Snook.ca. The program is designed to offer a great deal of flexibility for advertisers to target a particular audience in a practical and effective way. My goal is to ensure that the ads are relevant to the site while not detracting from the usefulness of the site. Why ads and why now? This was not an easy decision to come...

Read it all »

YUI TreePanel

30 Dec 2006

Jack Slocum has updated drag and drop performance and a new TreePanel in 0.40 of yui.ext. The TreePanel stuff is fantastic work....

Read it all »

All Comments

29 Dec 2006

I recently added something a little fun to the site: a way to view all comments by a particular person. I've wanted to do this for awhile because I think it's a great way to get a sense of the vibe and history someone might have on a particular site (in this case, mine). Does someone tend to always be crabby or have they generally been pretty good? On any of the comments on the site, just click ...

Read it all »

Looking Back and Forward

26 Dec 2006

I've been trying to look back a what has happened over the course of this year. Examine what I've done and set up a plan for the future. My apologies if this post is a little long but it must be the holiday feelings of sharing. Freelance Looking Back This year has been fantastic from a professional point of view. I was able to go freelance full-time back in January and really take a chance t...

Read it all »

Review: Beginning JavaScript

22 Dec 2006

Looking for a last minute Christmas gift? Beginning JavaScript with DOM Scripting and Ajax by Christian Heilmann may just be it. I got this book awhile back but it has taken me awhile to get through it. I realized that JavaScript is just more involved to absorb than a CSS book. On the flip side, writing a book on JavaScript can be a complicated matter in its own right (as I've been discovering). ...

Read it all »

Five Questions

21 Dec 2006

Zachary Houle, a writer here in Ottawa, was nice enough to invite me to answer five questions....

Read it all »

Project Checklists

19 Dec 2006

It's time to take a page from the "painfully obvious but never do it" chapter. Project checklists are something that I used to do all the time when working within an agency. Half the time, I felt they were as useless as timesheets. As a freelancer, however, neither could be farther from the truth. In the beginning Normally, checklists are good at the beginning of a project and at the ...

Read it all »

Is this overrated?

18 Dec 2006

In many of the JavaScript tutorials, there's plenty of concern over this. The this keyword is used to reference the current function/object context. The problem is, a function can easily be 'detached' from the object it was originally defined as a method of. As a result, the this keyword no longer references what you thought it should and errors occur. var obj = { myProperty: 5, myMethod:...

Read it all »

Review: Transcending CSS

16 Dec 2006

After discovering that a screenshot of my site appeared in Transcending CSS by Andy Clarke, I decided to order this book. That may seem vain but family is easily impressed by it. Who am I to disappoint? When the book arrived a couple days later, though, I was amazed by the pure style. It's the only book in my entire geeky collection that had my wife give it a second glance. That alone meant it w...

Read it all »

It's not Divitis

14 Dec 2006

Nate Koechley writes eloquently on the appropriate use of DIVs. While he doesn't come out and say it, I feel like he’s speaking about those who quickly wish to label something with a heavy use of DIVs as divitis. “According to the authoritative W3C spec, DIVs are specifically designed “for adding structure to documents.” Reasonable examples include encapsulating dist...

Read it all »

Upcoming MODx Changes

14 Dec 2006

I've been keeping an eye on MODx sometime, based on some chats with Ryan Thrash. The team has been working heavily on the new backend to power everything. Jason Coward describes some of his approach on how the new framework is built. Some of the interesting things include using more of a Page Controller approach over a Front Controller approach that most of the MVC frameworks take today, and...

Read it all »

76design Hiring

13 Dec 2006

The folks over at 76design, based here in Ottawa, are looking to hire a developer....

Read it all »

Review: XHTMLGenius

13 Dec 2006

Awhile back I had a project where I needed to get a design converted over to an HTML template. Knowing how much flexibility I had with scheduling, I decided to try out XHTMLGenius. XHTMLGenius promises a 3 day turnaround for delivery for $250. The template was pretty straightforward so I didn't expect too many surprises. Luckily, Shaun (the man behind the scenes) delivered. Ahead of schedule, in...

Read it all »

Making Elements Focusable with Tabindex

12 Dec 2006

After reading James Edwards' latest article on Sitepoint, Accessible JavaScript: Beyond the Mouse, I was intrigued by one section: "... if we want to capture input from the keyboard, we'll need to use elements that can accept the focus: primarily links and form controls ... " I quickly thought about simply adding the tabindex attribute to an element and after some preliminary t...

Read it all »

How I Design

11 Dec 2006

In many ways, I don't consider myself a designer. I don't have any formal training. I don't have a strong grasp of colour theory. However, I do tend to look at design in a very structured and methodical way that I believe lends itself well to web design. Focus on what is important My approach is actually quite simple: focus on what is important. That may seem like a 'duh' statement and in many...

Read it all »

Determining the Droppable

08 Dec 2006

After covering the basics of a drag and drop, it's time to look at detecting things we're dragging over. When it comes to a drag and drop, you normally want to have something to drop onto. Otherwise, just dragging an item around the screen can get boring. You want to interact with the page somehow. You might want to drag items into a shopping cart, or sort a list of items, or dock some widget on...

Read it all »

Anatomy of a Drag and Drop

17 Nov 2006

The mechanics of a drag and drop are pretty interesting and most library implementations do similar things, albeit to various extents. As I explain the inner workings, I'll touch on Yahoo's, Mootools', and Script.aculo.us' implementations, what to expect, and how they differ. A drag and drop essentially consists of a few events (and by events, I mean, moments in time, not DOM events). There's th...

Read it all »

Safari 2.0, display:none, and getComputedStyle

16 Nov 2006

It almost sounds like the beginning of a joke...("Safari, Display:none and getComputedStyle walk into a bar..."). Anyways, I just ran into this and thought I'd share. In Safari 2.0.4 (419.3), you can't use getComputedStyle on an element that has display set to none. It's like the element doesn't even exist. Luckily, the latest Webkit builds have fixed this little niggle. For a quick test case, c...

Read it all »

The Banner: Unleashed

16 Nov 2006

Ever notice how you buy a new car and then suddenly it seems like everybody else on the road drives the same car. I'm feeling the same way about my little flag tips. First, at Andy Laub's site and now at Indelebile. If I thought I had any originality, I'd think I'm starting a trend....

Read it all »

Review: Beginning CSS Web Development

15 Nov 2006

I get asked quite often which book I'd recommend for learning about CSS and up until now I've been recommending CSS Mastery by Andy Budd, et al. However, after reading Simon Collison's latest, Beginning CSS Web Development, I think I have a new default. The book is — as it described — intended for those looking to go from novice to professional. It is split into two parts with the f...

Read it all »

farfromfearless.com

14 Nov 2006

My buddy Chris Murphy launches his blog farfromfearless.com. I love his design....

Read it all »

List of HTML/CSS Services

13 Nov 2006

This is somewhat of a follow-up to my previous post, Commoditization of HTML. This is a collection (directory?) of services that will provide HTML and CSS development for you (and me). I will continue to update this page as I hear about other services. Service Days Price per Page Incl. Opera/Safari PSD2HTML 1 $117 No 1 $153 ...

Read it all »

Inc.'d

09 Nov 2006

It's official. I have incorporated the business. There's something strangely satisfying about having done so. I felt the same giddyness when I registered for tax numbers (so that one can collect taxes on behalf of the government, something I take no joy in). But this feels better. I own a corporation. Having gone freelance back in January, I probably should have done it sooner but felt that runn...

Read it all »

Micropatronage

09 Nov 2006

Buy me a boob job I swear that's how this all started. Years ago, I remember some woman looking to raise enough money to get breast implants. Completely unnecessary but lo and behold, she managed to raise the money. And countless others have done the same since. The idea, of course, spread to many people asking for whatever they could (and I'm sure many of the lame-ass requests barely got past $...

Read it all »

Is this working?

07 Nov 2006

I updated my comments handling to limit the amount of useless spam that I was getting but I feel that I've inadvertantly managed to make things more difficult for everybody else. I suppose that's one of the problems with custom-developing your own backend: functionality hasn't been tested by hundreds or thousands of people to find bugs. I've added (hopefully) more helpful error messaging and made...

Read it all »

Flickrdrillr

03 Nov 2006

Christian Heilmann put together Flickrdrillr, a way to explore tags and photos from Flickr. JSON-powered, this is....

Read it all »

Frenetic Freelance

01 Nov 2006

Deciding to go freelance full time back in January was a liberating experience. But it's times like these that I miss working in a stable day job. Making the decision It was a both a tough decision and an easy decision to make. Going freelance allowed me the opportunity to work on my own projects and choose the clients that I get to work with. It was tough knowing that I have a wife and son tha...

Read it all »

The Commoditization of HTML

29 Oct 2006

I've been noticing these services cropping up all over the place these days. You send them a PSD or PNG and they build out the HTML and CSS for you. This type of thing existed before and I've certainly received emails from offshore companies willing to do my production work for me. However, they were behind the times and produced inadequate code; at least, inadequate for the 'standardistas' amon...

Read it all »

Use Debug CSS in CakePHP

29 Oct 2006

The default layout that comes with CakePHP has some nice styling, especially for the debug table that appears at the bottom. But once you've created your own default layout, you'd have to come up with your own debug styles or copy over the ones from the Cake default. I've done something in between the two. I've created a new stylesheet called debug.css and include it whenever debug mode is on. I ...

Read it all »

Fall '06 Redesign

27 Oct 2006

The redesign is pretty much done now. I think this will be my last for awhile although I had fun with this. Similar to the May Reboot, I tool a slow-and-steady approach never spending more than an hour at a time on the site. I tweaked and I tinkered. I added, I took away. It won't make the rounds at the CSS galleries but many of those sites are too focused on the eye candy. How much does it pop...

Read it all »

Using Uses in AppController

26 Oct 2006

Don't do it. Or maybe there's a better way to do it. The problem I ran into was that I had some Model code that needed to run on every page. So, I thought that I'd add the model to the uses variable in the AppController. The problem with that, as it turns out, is that none of the controllers overrode this property. This meant they couldn't access their models properly. This made leaving a co...

Read it all »

Firefox 2 is out

24 Oct 2006

Hot on the heels of the IE7 release is Firefox 2. One could technically say that FF is catching up with IE with improved phishing and search integration. And the design of the new Firefox site is very wispy. Again, much like the IE branding. And much of the new functionality in Firefox 2 was functionality that was available via plug-ins already. Any further enhancements to the CSS or DOM support a...

Read it all »

A reason to build sites progressively

24 Oct 2006

Sometimes it's nice to see other developers build sites well enough that it works in your favour. In this particular example, I had to call my dentist to reschedule an appointment but the site was down. Now, I remember the site being Flash-based so I didn't hold out much hope that the Google cache would reveal anything special. Luckily, they used JavaScript to replace real content on the page wi...

Read it all »

View Caching in CakePHP 1.1.8

22 Oct 2006

The view caching in CakePHP 1.1.8 is both good and bad. It's good in that it can dramatically speed up the performance of your site — when you can use it. And that's the downside. There are certain situations when it simply will not work as a practical option. How it works The caching is all handled through the innards of the framework in a combination of global functions, cache() and cl...

Read it all »

WithCake gets bought out

21 Oct 2006

"WithCake gets bought out by young, exciting entreprenuer." Okay, I'm neither young nor exciting but to be a tad cheeky, I've decided to merge the WithCake articles into Snook.ca. I had originally set up the other site as I felt the continuous chatter on all things CakePHP might be annoying but as it turns out, my chatter hasn't been so continuous. A quick survey seemed to say it'd be good to shar...

Read it all »

Still here?

20 Oct 2006

I think there's actually an official delurking day but this isn't it. I'm just curious. I've been running this blog now for a few years and it has been interesting to see people come and go when it comes to commenting — both here and on other blogs. So, if you've never left a comment, or haven't in a while, stop by and say hello. ...

Read it all »

Internet Explorer 7 for XP Released

18 Oct 2006

It's official folks: IE7 for XP has been released. You can also read more about it on the IEBlog. Despite still being behind in overall CSS support compared to other browsers, I think this is a huge gain for us in the trenches. The quicker the rollout, the sooner we can leave a number of frustrations behind. Yes, there will still be continued frustration from bugs that haven't been fixed, bugs ...

Read it all »

Setting Layout for Users Logged In

16 Oct 2006

If you have anything that you want to run or be available for every controller in your application, you'll need to copy the app_controller.php file from the cake folder to the app folder. User authentication, for example, could be in here (there is an authentication example on the wiki that describes this). One of the common things in an application where you have user authentication is that the l...

Read it all »

Add a Logo to your Feed

15 Oct 2006

Many complain that RSS and Atom have taken away the possibility to maintain your personal brand. For the most part, that's true. With so many people consuming content via RSS, I'm surprised anyone even knows who writes this stuff anymore. Many of the feed readers out there will snarf up your favicon, so at the very least, you should try to have one of those in place. You can also add a path to a...

Read it all »

Top of Page

15 Oct 2006

I spent years working on government web sites; a side effect of working in a government town. And if there's one thing the government has it's information. Lots of it. They like to post it to the web in bucketfuls. Of course, with that you'll find long documents. Inevitably, I'd get asked to pop "Top of Page" links liberally throughout the page. Space them out just far enough that you hoped you...

Read it all »

Quick Link: XPATH Injection Attacks

14 Oct 2006

I'm familiar with SQL Injection attacks but was intrigued to hear of XPATH injection attacks. Luckily, the answer for both seem to be the same: validate your data before passing it on....

Read it all »

Upon My Return

11 Oct 2006

Wow, that was a nice vacation. Nothing like spending a week in Disney World. With a two year old. A two year old who thought that napping was overrated and couldn't possibly close one's eyes for a moment while there. Despite the lack of sleep, it was actually a fun trip and one I'd gladly do again. Well, maybe I'll wait a few years until the kid(s) are older. In any case, I'm back and ready to....

Read it all »

On hiatus

26 Sep 2006

I'll be taking a quick break folks. I'm heading on vacation next week (yay!) and between preparing for that and getting last minute work stuff done, I haven't been able to post anything new this week. Therefore, it'll have to wait until I get back. Hope to see you all back mid-October....

Read it all »

Singletons with Functions

20 Sep 2006

Previously, I had asked Which is Better, using var o = new function(){...} or var o = function(){..}();. At the time, it really just seemed to fall on personal preference. Both seemed to create singletons. It's just that some people like to do it one way while others perfer to do it the other way. A commenter on my recent article at Digital Web, Objectifying JavaScript, however, pointed out tha...

Read it all »

Serve HTML instead of XHTML

20 Sep 2006

If there's one thing I don't like about some systems, it's their strict compliance to one standard or the other. Case in point is WordPress that locks you into using XHTML (unless you change it on the fly). I was worried that CakePHP may have done the same but as it turns out, there's a handy file in /cake/config/ called tags.ini.php. Copy that file into /apps/config/ and edit the items in ther...

Read it all »

Top CSS Tips

20 Sep 2006

I thought I'd share some of my habits when it comes to doing CSS work and let me warn you, some of what I have to say is probably a little controversial. But what's life without living it on the edge. (Yeah, I live an exciting life when CSS is considered 'the edge'.) px for font sizes Sacrilege, I know. There are perfectly good ways to get consistent font sizing and I really should use t...

Read it all »

The Ultimate Web Page

19 Sep 2006

Sometimes people hit an idea right on the nose. My wife brought home this comic strip and it's so pertinent to what we do. Sister - "Mom says you're designing a web page for school. Little brother - "Yup." "And not just any web page, but the ultimate web page." "I'm using every tool in the box. HTML... XHTML... CSS... XML... SOAP... AJAX... Flash... Perl... JavaScript... you name it." Sis...

Read it all »

Objectifying JavaScript

19 Sep 2006

My latest column over at Digital Web has gone live. Entitled Objectifying JavaScript, I cover various approaches to creating objects in JavaScript and why you might use one approach over another....

Read it all »

21 Things I learned about CakePHP

19 Sep 2006

Just came across this and thought I'd pass it along: 21 things I learned about CakePHP. It covers some nice introductory tidbits for CakePHP....

Read it all »

SXSW 2007 Panel Picker Round 2

18 Sep 2006

Round 2 of the South by South West Panel Picker for 2007 is now live. This time, I have my own entry in the queue: Rapid JavaScript Development, where I hope to talk about some of the nitty gritty in the JavaScript libraries du jour and how you can use similar techniques in your own projects. If that doesn't interest you much, there's still plenty of cool stuff lined up so be sure to head on ov...

Read it all »

Snook.ca Now Using CakePHP

15 Sep 2006

Things have been pretty busy so I haven't had much time to post about all sorts of cool CakePHP stuff but I did want to take a moment to mention that I relaunched Snook.ca with CakePHP. I had been using Movable Type for about 3 years now but it was limiting my ability to expand on it quickly and easily. Slow rebuilds and server errors pushed me to simply rebuild from scratch. And already I've g...

Read it all »

In Transition

14 Sep 2006

I've finally given up on Movable Type. It's done well for me over the years but I was starting to see its limitations with page builds starting to give errors and taking longer and longer to build a new page. With that, i've moved to a custom-built CakePHP backend. It's nothing fancy at the moment, as I really just wanted to duplicate what I had before but now that its in place, it should give...

Read it all »

iTunes Search API Around the Corner?

13 Sep 2006

Could the Apple iTunes Store soon have a fully public API? On Apple's iTunes page, they have a search widget featured in the sidebar. What's interesting is that this AJAX-powered widget is returning a JSON object. How very API friendly! The script located at http://www.apple.com/itunes/scripts/itmsSearch.php currently accepts two parameters, searchTerm and searchType where the type is one of al...

Read it all »

Mootools Drag and Drop Example

11 Sep 2006

This example is outdated and will not work with Mootools 1.0. So, without an actual demo to play around with, I thought I'd put one together, both to see how easy it'd be to work with and to help demonstrate to others what to expect. What a better example than the drag and drop (especially since I'm finishing up a project that just happened to use drag and drop). Check out the example and check...

Read it all »

Mootools JavaScript Library Released

10 Sep 2006

The folks behind the popular moo.fx have gone and released their own JavaScript library called mootools, attempting to take the best of JQuery and the best of Prototype. The mad4milk team have the announcement on their blog. Probably one of the nicest features so far is the download page. Select the components that you need and dependencies will automatically be calculated for you. You also have ...

Read it all »

Testing for a Value in JavaScript Array

08 Sep 2006

Ever have an IF statement that has a whole bunch of OR (||) statements that keep testing a variable against a bunch of values? if(name == 'bobby' || name == 'sue' || name == 'smith') { ... } In JavaScript, there's an in operator that tests whether a property is in an object. We can actually use this to mimic the PHP function in_array. if(name in {'bobby':'', 'sue':'','smith':''}) { ... } ...

Read it all »

Stackable CSS Columns

07 Sep 2006

Source order is fairly important for me. I like to make sure the the order makes sense and is practical. For a recent project, I ended up using something quite handy. Something I like to call Stackable Columns. The basic layout had a left column with the logo and some sidebar information and then a right column with some main navigation, content, and a footer. A two column layout is standard fare...

Read it all »

Element.extend an Element in Prototype

06 Sep 2006

Here's a quick way to add all the Element methods to a DOM element using Prototype 1.5 (I believe the RC is right around the corner if not already here). var div = document.createElement('div'); Element.extend(div); That's it. Then you can do things like div.show() or div.hide(). Well, you still need to append the DIV to the document but you get the idea. ...

Read it all »

Screencast: Cross Faded Images in Fireworks

05 Sep 2006

Okay, I have to admit, I was a little jealous of Dustin and his recent screencast efforts. So, I thought I'd take a few moments and throw together my own screencast. Since no-one really talks about the cool things you can do in Fireworks, I thought I'd talk about how to do fades on an image. It can be a little difficult to demonstrate these things in a series of images in a blog post so a screenc...

Read it all »

Firefox 2 Beta is out

04 Sep 2006

The Internet Explorer betas have been getting a fair bit of attention and I felt a little remiss if I didn't mention that the Firefox 2 Beta is now available. I suppose many of us aren't very excited by it because it doesn't give us much new to work with. Sure, it has enhanced RSS handling which will be nice; I like how Safari and the current IE7 beta handle it. It has some cool JavaScript enhanc...

Read it all »

How NOT to Work on a Project

01 Sep 2006

Ask a client for content. ...

Read it all »

Handy Image Utility: PNGOUT

31 Aug 2006

I heard about PNGOUT awhile ago but never really bothered to look into it. Sure, it can compress my PNG's but Fireworks does a decent job of that already. But in the comments of my last post, Which Image Format is Best, somebody again made mention of it. The original utility is a command line tool but the guy who made it, Ken Silverman, also started up a company to produce a commercial version of...

Read it all »

Which Image Format is Best

29 Aug 2006

This was originally posted on YourTotalSite on June 10, 2005 When developing a web site you may not think much about what image format you use but you could end up saving yourself or your organization a chunk of change in bandwidth costs by making your choice more wisely. On the web today there are three main image format types to choose from and all have their advantages and disadvanta...

Read it all »

Quick Link: String functions in Prototype 1.5

29 Aug 2006

Cory Hudson covers some of the new string functions in Prototype 1.5. The template class looks nice. ...

Read it all »

Which is Better?

29 Aug 2006

Just thought I'd throw this question out to the crowd. var obj = new function(){ ... }; // OR var obj = function(){...}(); I prefer the former to the latter because I can assign properties to the object without explicitly having to return an object but I noticed Dustin Diaz did the latter in his latest screencast. Hands up if this kind of JavaScript minutia just put you to sleep. ...

Read it all »

Quick Link: Memory Leaks Reduced in IE7

28 Aug 2006

Microsoft is indicating that they've improved on the garbage collection in IE7. Some testing I was doing over the weekend seems to support this. ...

Read it all »

Minimize Lookups to Speed up JavaScript

28 Aug 2006

A new post on the IEBlog has some decent tips on optimizing the performance of your scripts. Although written specifically addressing performance issues as they relate to Internet Explorer, I suspect most of the suggestions would appy to other browsers as well. The summary of the article, the first of a three part series, is to: Declare var for variables that are meant to have local scope Cache...

Read it all »

Quick Link: Go Pink for October

28 Aug 2006

Still early stages yet but Matthew Oliphant is setting up a new site called Pink for October for Breast Cancer Awareness Month. ...

Read it all »

Web Developer Found

28 Aug 2006

Suffice it to say, hiring is never easy (oh, but believe me, a whole heck of a lot better than firing someone). I was pleasantly surprised by the number of truly qualified individuals, especially considering how risky it is and also surprised by the number of people who had actually used CakePHP before. Anyways, without further adieu, I'd like to introduce Adam Thody. He's been running his own de...

Read it all »

CakePHP as a Blog Platform

27 Aug 2006

Building a blog using CakePHP is pretty easy. Heck, there's even a basic tutorial to do such on the CakePHP web site. This blog runs off CakePHP and was slammed together pretty quickly. My site over at Snook.ca will one day soon also get switched over to CakePHP. It's really quite flexible and handy for a developer like myself to get something up and running quickly. But can an application be b...

Read it all »

Self Censorship

26 Aug 2006

It's funny. When I hopped into doing freelance full time, I thought to myself — and said to others — "this'll be great! I can now talk freely about all the stuff I've been working on. My blog will be updated constantly, my readership will grow, and I'll have adoring fans from around the world!" And yet here I am, back down on earth in reality. Turns out, there's no freedom i...

Read it all »

Should Components populate the view?

24 Aug 2006

CakePHP is great with how much flexibility it can give you to approach a given situation. But I'm on the fence about whether components should be able to populate the view (like mini-controllers) or if they should be used only by the controller to pull out required data. Here is two quick examples explaining the difference. The first, I use startup to gain access to the controller and use it to...

Read it all »

Web Developer Needed

23 Aug 2006

Update: This position has been filled. Thank you for your interest. If you've been reading this blog for some time, this subject title might seem familiar. Back then, my client was looking for a developer to work on his application. Through a series of events, I ended up becoming that developer (I had originally only planned to do the design and front-end). Things have been moving along and now I'...

Read it all »

Quick Link: Strip HTML in SQL Server

23 Aug 2006

A custom MS SQL Server (2005 or 2000) that strips HTML. You can go right to the code in case you can't find your way through all the ads. ...

Read it all »

Understanding CSS Specificity

23 Aug 2006

Specificity can be tricky. Well, tricky to say the word, anyways. There's a quick approach that I use that can hopefully help you out. Types of selectors There's a whole bunch of selectors but for our purposes, we can break it down into three types, of increasing importance: Element selectors (and pseudo-element selectors) Eg. p {color:red;} Class selectors (and attribute selectors) Eg. .myclass...

Read it all »

Quick Merge in MySQL

22 Aug 2006

This is just a quick tip. If you have a bunch of data that you need to concatenate, take a look at MySQL's GROUP_CONCAT function. For example, way back when, I wrote about how to add tagging (and subsequently weighting those tags) to an application. It was a very simple approach with each record having a tags field. It was just a simple text field and I stored all the tags with spaces. However, t...

Read it all »

An email from Shaun Inman

21 Aug 2006

It's not every day you get an email from Mr. Inman. Okay, it's not everyday I get an email from him. Well, today is that day. The subject line was a little cut off so I clicked on the message. Turns out it says, "Everything in you will improve with growth hormone." Hmmm, intriguing. "Human Growth Hormone is produced naturally by your body with the purpose of keeping your system fine and fit. Wi...

Read it all »

Cross Domain Ajax: a Quick Summary

18 Aug 2006

Here are a few of the most popular ways to do cross domain calls via JavaScript: proxies, JSON, and Flash. Cross domain proxy This is one of the most common approaches. Your script calls your server, your server makes the call to the remote server and then returns the result back to the client. There are some definite advantages to this approach: you have more control over the entire lifecycle. Yo...

Read it all »

Run Your Set Calls as a Batch

18 Aug 2006

This one comes from Nate. Instead of repetitive $this->set calls, you can set all your variables in one go using the PHP compact function. $var1 = 'text'; $var2 = 'text'; $var3 = 'text'; $this->set( compact('var1','var2','var3') ); Thanks, Nate....

Read it all »

Quick Link: Remote JSON

17 Aug 2006

A couple links on remote JSON: Dump Your Proxy and JSON and the Dynamic Script Tag. ...

Read it all »

Data Always There

17 Aug 2006

Need data to be available at all times and on all pages? Make use of the beforeRender controller callback to include common data. If you need it in all pages in your application, add it to /app/app_controller.php. If you just need it for all pages within a specific controller then you can add it to the callbacks on that specific controller. The beforeRender callback is called after your contro...

Read it all »

Aren't people tired of arguing?

16 Aug 2006

I don't get it. You run across these discussions like "my Mac never crashes" or "IE sucks" and reading through you see mean comments, one after the next. The vast majority simply use personal experience as their measuring stick of current and future expectations but that level of experience is so small as to paint a completely inaccurate picture. One bad apple I used to do tech support. It was m...

Read it all »

Displaying Percentages in a Progress Bar

15 Aug 2006

David Stone over at Bare Naked App talks of using a background image to display percentages in a progress bar. The technique could also be used for bar charts or poll results. What I've traditionally done for these kinds of things, since the image can stretch left to right with no degradation (in other words, there's no horizontal pattern, just a vertical one), I usually just use an image that is...

Read it all »

Quick Link: Creation of the AP Logo

15 Aug 2006

Anton Peck goes into detail on how he put together his AP logo. A lot of subtle details that I'd never think about. ...

Read it all »

Minimize Your Database Connection Time

15 Aug 2006

One of the techniques that I learned and used way back when I did mostly ASP development was to: connect to the database only when I needed to, retreive only (and all of) what I needed, and then disconnect from the database as soon as possible. In working with ASP and MS SQL Server, following the three steps was easy. I'd open my connection and then build my query to return one or more records...

Read it all »

Temp Page

15 Aug 2006

I'm sure you've found yourself building a site for a client and you have a temp page for regular users to see and then another URL for your client to go to until the site is ready for launch. In chatting with Yoeri, we thought of just reconfiguring routes. $Route->connect('/', array('controller' => 'pages', 'action' => 'underconstruction')); $Route->connect('/temp', array('controller' =&...

Read it all »

Quick Links: PHP UTF-8 Tips and XML to JSON

10 Aug 2006

Double header in this quick link: PHP UTF-8 Tips and Converting between XML and JSON. ...

Read it all »

How to Pixelize in Fireworks

05 Aug 2006

I figured I'd share this little tidbit in the hopes it's not painfully obvious like, "here's why the sky is blue" but ever wanted a quick way to create those pixellated graphics? Here's how I do it. In this example, I took the 9rules logo and pixelized it. To do so, I take the original image and size it down nice and small. The smaller you go, the more pixellated it'll look when it's resized ba...

Read it all »

Finding a Shortcut

04 Aug 2006

Being a self-taught developer, I haven't often been able to compare myself to other developers. At least not in direct ways like, how do you know what solution to use for a problem, or why your coding style is the way it is. The best I've been able to do is go by the code examples I learn from. One thing I've continually done as a developer, though, is try and find shortcuts. "What's the quickest...

Read it all »

Merging data into $this->data

02 Aug 2006

In CakePHP, $this->data is a good place to store info. It's populated by model information when submitted by the form, it's accessible in the view, and most of the examples show model reads being pushed onto this array. $this->data = $this->Post->read(); I've been changing things up to use array_merge instead. Any new model data will simply overwrite what is currently there and it'll p...

Read it all »

Custom Model Functions

01 Aug 2006

Maybe it's my long time procedural approach to application development but when I jumped into cake, I used much of the functionality to simply replicate my existing development process. For example, the model was used as a database connection class. If it didn't do what I wanted, I'd set up a custom query in the controller, return the results, process, and feed the data to the view. Then I s...

Read it all »

JSON is a subset of the Object Literal

27 Jul 2006

WIth a lot of talk about JSON these days, it's important to understand the syntax and how it differs from the object literal — or rather how it's a subset of it. The object literal is encapsulated by curly brackets with zero or more property and value pairs separated by commas. Each property and value is separated by a colon. Property names can be an identifier, a string, or a number. Synt...

Read it all »

Quick Link: Enumerating JavaScript Objects

27 Jul 2006

Dean Edwards shares his code for enumerating JavaScript objects ...

Read it all »

Watch Your Paths

27 Jul 2006

Wow, after spending four hours on a trivial issue, I finally figured out the problem. It was the most bizarre thing. I'd added some logging to see why a session variable was changing from one page to the next only to discover that my action was being executed numerous times per page request (and each subsequent page request changing a time-sensitive session variable). Digging my way through th...

Read it all »

Incremental Design Update

26 Jul 2006

There had been a few things that were bothering me about the site since the launch of the redesign. The main one was the fact that the Fixed Comments™ were hidden until you scrolled. To eliminate this problem, I've moved the "On Topic" sidebar into the content area and removed the related links. I'd still like to give the article metadata a little extra attention but I'll leave that until s...

Read it all »

Session Object

25 Jul 2006

Reading and writing values out of the session object is pretty straightforward. But what if you want to store an entire object in there? A common example would be to store user information when logged in. One way to pull out just one property would be to assign the user object back into a variable and grab the fields from there. $userinfo = $this->Session->read('User'); echo $userinfo['id']...

Read it all »

Improving Edit in Place

25 Jul 2006

Dan Rubin made comment on an implementation of Edit in Place I had linked to: "I'm stumped about how one would further optimize or improve (Edit in Place), but I'm also curious: would you improve it, and how?" What's interesting is that there are two aspects where improvements can occur: implementation and design. Improving Implementation By implementation, I mean, how has the developer put it...

Read it all »

Rapid DOM Slides from Webvisions 2006

21 Jul 2006

My presentation is done and overall, I was happy with it. I have to admit that this was my first time presenting and it was a great learning experience. I feared I might go through my material too fast (which I did) or just stumble over my words (which I didn't so much). The hardest thing for me when putting this together was knowing what the technical prowess of my audience would be. I didn't wan...

Read it all »

Off to Webvisions 2006

19 Jul 2006

I'm heading off to Webvisions 2006. It should be a fun couple days to catch up with a bunch of people I got to meet at SXSW, get to meet a bunch of new folks, and finally, to get my presentation to the masses. In case you missed it, I'll be presenting Rapid DOM Scripting and Ajax Development where I'll go over some ways to speed up development. And in case you miss the presentation (or heck, even...

Read it all »

Add Value on the Web

17 Jul 2006

How many times have you worked on a project where it was the client's intention of just taking something they have in a Word document or some other print material and just put it on the web? The problem is that there is no added value to this content. It's not taking advantage of the medium. Well, today, I came across a great example of someone who is taking advantage: the For Better or For Wors...

Read it all »

Ease Deployment with Automatic Server Check

16 Jul 2006

Take a peak at the CakePHP manual on configuration and you'll see that you can have two database configurations (and theoretically more, I suppose). Normally you'd have one for your test environment, and one for your live environment. The manual recommends setting the $useDbConfig variable to the configuration of choice in each of your models. Certainly, this isn't very practical when it comes ...

Read it all »

Use Table Aliases in Custom Queries

15 Jul 2006

You've probably noticed that your normal calls to the model return an array that can be referenced through the model name. $data['Post']['id'] When using custom SQL, though, it'll use the table name. Problem is that your table name uses the pluralized and lowercase version of the model name. The easy fix is to define a custom table alias in your query and now your results can be referenced t...

Read it all »

Auto Pluralize

14 Jul 2006

I created a little helper for auto-pluralizing a word using the Inflection class that comes with CakePHP. All I do is pass it the word and the count. The result will be something like, "1 member" or "2 members". class PluralHelper extends Helper { //$s = the string //$c = the count function ize($s, $c) { if($c == 0 || $c > 1) { $inflect = new Inflector(); ...

Read it all »

CakePHP, is it worth it?

14 Jul 2006

After a few weeks of getting into the down and dirty of CakePHP, the question is, "Is it worth using?" The answer to that question is, "it depends". The application does quite well when working with simple models. This is when the application is the funnest to play with. Putting together a blog application, for example, would be really straightforward. What I've discovered, though, is that while ...

Read it all »

Selecting Fields With the Same Name

12 Jul 2006

I had two people ask me the same question today so I thought I'd share this. The dilemma occurs when joining two or more tables where a field name is the same in those tables. For example, you have a blog table with an id field and a comments table with an id field. If you just did a SELECT * while joining those two tables, you can't use the table identifier to grab the field name (E.g: $rs['blog....

Read it all »

S5key: Slideshow Launcher

10 Jul 2006

Some of you may be aware of S5: the Simple Standards-based Slide Show System from Eric Meyer. It's a simple combination of HTML, CSS and JavaScript for creating slideshows. No Powerpoint required. S5key, is a Keynote-inspired addition that offers up some additional functionality. Now, I say "inspired" because to be honest, I've never used Keynote. The screenshots, however, looked neat and felt th...

Read it all »

Gush

02 Jul 2006

Rarely do I find the need to gush over a design but I'm impressed enough to do so now. Back in the reboot, probably my favourite design was James Mathias' leihu. I like the injection of buddhist elements which I felt gave me a greater reflection of James' true character. It helped personalize the site in a way that very few do. So, I was doubly impressed today when he unveiled his "dark side". Li...

Read it all »

Simple Business Workshop

28 Jun 2006

I was intrigued by this when one of the guys behind it emailed me about the Simple Business Workshop. In their words, The Simple Business Workshop is a one-day intensive seminar that will teach finance, marketing and operations skills and methods to creative professionals who wish to develop their freelance careers into a proper business or who have a business they wish to make more effective. It...

Read it all »

CakePHP: Setting Default Values

27 Jun 2006

If you've got a user seeing a form for the first time, normally the fields are blank. But there are times where you want to prefill fields with data or preselect a certain option. Setting a default value turned out to be really straightforward. In my controller, I have a method called create that sets any default values that I might have. class ProjectsController extends AppController { functio...

Read it all »

Quick Link: Page Slugs in CakePHP

21 Jun 2006

Using page slugs instead of page id's for friendlier URL's using CakePHP. ...

Read it all »

CakePHP: Data Validation

19 Jun 2006

Validation is one of the basic and most tedious tasks in application development. If there was ever a reason to use a framework this would be it. There are two ways that appear to be advocated by the CakePHP site and while both have benefits, I'm using a slightly different approach. Auto-validation Probably the easiest thing to use is the built-in auto-validation. This is controlled using a $vali...

Read it all »

JavaScript Namespaces

18 Jun 2006

The idea of creating JavaScript namespaces are coming up more and more. With the expanded use of OPC (Other People's Code &mdash "you down with OPC?"), the idea of using or taking advantage of JavaScript namespaces is coming up more and more. What is a JavaScript namespace? More importantly, "what is a namespace?" A namespace is a container and allows you to bundle up all your functionality usin...

Read it all »

Design Analysis: Comments

15 Jun 2006

If there’s ever been a great way to design something, it’s through iteration from experience. In other words, the more you use something, the more you discover ways to improve upon them. In this, the first (and hopefully not only) instalment of Design Analysis, I wanted to cover the elements of a blog comment and what (in my opinion) makes a good one. The Elements Whenever I do des...

Read it all »

CakePHP: Bake

14 Jun 2006

In my last post, on my initial thoughts on CakePHP I said: "I'd be incredibly impressed if it had a wizard that let me create the shell for all of this automatically; including a wizard for setting up the database table for the model." As it turns out, I wasn't far off. First, there's a file called bake.php which will, given a parameter or two, generate the controller and model and view files fo...

Read it all »

CakePHP: Initial Thoughts

14 Jun 2006

Despite my previous proclamations, I'm not actually against the idea of using a framework (and in case you're actually not sick of hearing about it, I might have another framework post up my sleeve). But let me set that issue aside. This is really about CakePHP. And I've decided to jump in head first for this project I'm working on. For those of you unfamiliar with it, it's yet another MVC framew...

Read it all »

DOM and Ajax Presentation

12 Jun 2006

Webvisions 2006 is just over a month away. For those of you attending (and really, even those of you who are not), what would you expect to hear in a presentation titled "Rapid DOM/AJAX Development"? My plan is to provide a bunch of examples and really just talk about different approaches to web application development using DOM Scripting and Ajax. There's obviously a lot of material that could b...

Read it all »

Quick Link: Ajax Edit in Place using Prototype

10 Jun 2006

Joseph Scott offers up a new version of his Ajax Edit in Place using Prototype script. Comes in at 3.6k uncompressed in addition to the Prototype Library. ...

Read it all »

Quick Link: Comparison of JavaScript Loops

10 Jun 2006

Which loop is fastest? Check out the results of moddular's javascript loop test. Most of it is dry comparison data but the chart at the bottom sums it up extremely well. ...

Read it all »

Quick Link: Interview with Cameron Adams

07 Jun 2006

Cameron Adams, aka The Man in Blue, gets interviewed at Devlounge. ...

Read it all »

Internationalization Primer

06 Jun 2006

Interested in internationalization or localization? For my latest article at Digital Web, I cover a few introductory topics on the subject. Internationalization (often shortened to i18n) is essentially the process of making the application or site available in any language. It's often the framework for localization (L10n). Localization is the process of making an application or site tailored to a ...

Read it all »

Saving a Design for Posterity

30 May 2006

This is more a question than an answer: How do you save a design for posterity? The problem is that site designs change over time but the main content doesn't. Design-specific comments, both in your own site and linked to from other sites, become outdated and irrelevant each time the site design changes. Do we have an obligation to maintain those designs? Should there be a design archive? Screensh...

Read it all »

Egos and Empires

27 May 2006

Ara Pehlivanian gives a wonderful how-to on becoming a blog snob. I fear that I follow a few too many of his "tips". Communication One of the things I like to do is be available to chat. All my info is sitting there on my contact page and a surprising number of people take the time to say hi. I'll even try and help you out if you have a problem (as Vanilla Ice says, "If you've got a problem, yo,...

Read it all »

AJAX vs Ajax and Ajax Effects

25 May 2006

It's happened. I suppose it probably happened the instant the acronym itself was coined but AJAX isn't just AJAX any more. It's Ajax. (No, not the place outside of Toronto. Um, no, not the cleaning stuff, either.) Notice the uppercase A with the all the other lowercase letters. (Through second-hand knowledge, I'm attributing this distinction to Jeremy Keith — He can prove me wrong.) That's ...

Read it all »

Upcoming Carson Workshops

25 May 2006

Looking to brush up on your AJAX or DOM Scripting? Well, if you plan on being in London (UK) or New York you might be interested in the following Carson Workshops. They're quite reasonably priced, too, considering the hands-on knowledge you'll get out of these. Maybe they'll do a session up here in Canada sometime. (or maybe I can convince Derek Featherstone to do one with me here in Ottawa.) Bui...

Read it all »

Quick Link: JavaScript Tetris

16 May 2006

On a dare, Dustin Diaz built Tetris using the Yahoo library. Seriously sweet. And when you're done there, cook up a little Bunny Hunt by the Man in Blue, Cameron Adams. ...

Read it all »

Review: Blog Design Solutions

13 May 2006

Blog Design Solutions is a book by Andy Budd, Simon Collison, Chris J Davis, Michael Heilemann, John Oxton, David Powers, Richard Rutter, and Phil Sherry. Each one contributes a chunk of the book in covering Movable Type, WordPress, Expression Engine, TextPattern and a custom CMS. The book starts off with a nice introduction to the concept of a blog and then dives into setting up Apache, My...

Read it all »

Quick Link: HTML Editor Reviews

10 May 2006

Inaccurately called "Celebrity Interviews" (at least in my case), Eric Barstad had a few questions for me on my HTML editor of choice. ...

Read it all »

Webvisions 2006

10 May 2006

Webvisions 2006 is coming up on July 20th and 21st. It's a web conference in Portland, Oregon and features a decent line-up including the likes of Jeremy Keith, Garrett Dimon and Dan Cederholm (I wonder if he'll bring his ukelele). This year, I get the priviledge of presenting. In fact, I'll be presenting my session, Rapid DOM/Ajax Development, right before Jeremy Keith. I saw Jeremy present at S...

Read it all »

Why Frameworks Suck (redux)

08 May 2006

Last November, I wrote a post entitled "Why Frameworks Suck". The title was meant to be a little over-the-top but people took it at face value and the title alone isn't an accurate reflection of my feelings on the matter. The post was meant to describe why frameworks can suck and in what situations they don't. But that point got lost. Frameworks are, of course, very practical things. So as not to...

Read it all »

Quick Link: Flummoxed by Frameworks

08 May 2006

Eric Meyer is flummoxed by frameworks. It's a fine example of why I think frameworks suck. Let me iterate that I don't actually think that all frameworks suck but rather that frameworks aren't magical bullets, at least not unless you know how to use a gun. ...

Read it all »

Reboot: The CSS

06 May 2006

I've been having more and more fun with CSS these days and the Reboot gave me an opportunity to really have fun with things. Source Order One of the ways I've tried to "optimize" my site is to be fairly strict in source order. Article first, comments second, and then navigation and the rest of it comes last. (It's debatable whether navigation should be so far down as some research has shown that ...

Read it all »

Trimming Long Outlines in Firefox

05 May 2006

Nathan Smith had a post awhile back about those stray outlines in Firefox 1.5 due to using a negative value for text-indent used in image replacement. I initially passed on the article as I like users to still receive the default feedback. Then, in trying to resolve the problem on my own site, I tried using overflow:hidden on the replaced link and suddenly the outline fit into place. In referring...

Read it all »

Reboot: Light vs. Dark

03 May 2006

Obviously, one of the common themes that came out of the Reboot was that dark is in. One of the first sites that I drew inspiration from was Ordered List. It had seemed to take the light on top and dark on bottom look from the previous Niggle design (Flickr) and made it dark on dark. Of course, being grey and green, I felt obligated to like it. Then, Veerle's infamous redesign pushed me into a ful...

Read it all »

Reboot: The JavaScript

02 May 2006

In the redesign, I thought long and hard about how to approach a number of issues. My solution was to implement microwidgets. Yes, I'm even giving them a name. For example, I knew going dark would annoy some people so I did the contrast microwidget (which incidentally has changed slightly from launch to be a little more obvious). The microwidgets are a combination of JavaScript and CSS and were fa...

Read it all »

Rebooted

29 Apr 2006

That's right, I've finally launched the redesign. No more teasers, this is the real thing. There are some minor things that I still need to change over and add, like error pages. I'm hoping to get them done before the actual reboot deadline on Monday. In the meantime, feel free to explore and be sure to point out anything that doesn't seem to be working just right. I'm sure to some of you, this w...

Read it all »

Quick Link: Sessions and Multiple Windows

27 Apr 2006

Although the article is .NET specific, the concept can be applied to any language. The problem is, how to retain certain information from one page to the next. The example really explains it all. ...

Read it all »

Quick Link: Snook.ca Design Revealed

26 Apr 2006

Revealed, sort of. I'm not going live until the weekend but with only 5 days left, I've posted a screenshot on CSS Reboot. ...

Read it all »

Quick Link: Pricing a Project

25 Apr 2006

The folks at Blue Flavor cover the touchy subject of pricing projects. Lots of good info in this one for anyone who does who even does a smidge of freelance contracting. ...

Read it all »

Quick Link: Get the rendered style

24 Apr 2006

Robery Nyman shares some code to get the rendered style of an element. ...

Read it all »

Failed Redesign

20 Apr 2006

Only 10 days left until the design reboot (unless I get antsy and launch early) and I thought I'd share some previous iterations of the design. You can get a sense of the direction I went in with the new design. I can't tell you how much I've been stressing over this redesign. The First Iteration I started this back in March and even showed a few people the first version while at SXSW. People...

Read it all »

What's wrong with innerHTML?

13 Apr 2006

I know Jeremy Keith's position on this but I still don't understand why him and others are so against innerHTML. Sure it's not part of a standard (yet) but neither is the XMLHttpRequest object (yet). When you have something that is faster and easier, why wouldn't you use it? Some have argued that it creates the potential for generating invalid markup but no more or less than creating invalid mar...

Read it all »

Productivity is like a Train

13 Apr 2006

Productivity is like a train. You start off slow and begin to pick up speed until you're just chugging along. Distractions slow you down and result in you having to pick up steam again. Some people are trolleys while others are bullet trains. I just wish I wasn't stuck at the station all the time. ...

Read it all »

Triggering window.onerror

12 Apr 2006

Ajaxian covers a post on logging client-side errors on the server-side using AJAX. A commenter made mention of inconsistent behaviour when using the onerror event as detailed on PPK. In determining the issue, I noticed what appeared to be the issue and left the following comment on Ajaxian: For example, trying to run myfunction() where myfunction doesn't exist will trigger onerror. But running m...

Read it all »

Now, where was I?

12 Apr 2006

Yes, these is technically part of a chain letter but I thought it'd be interesting to reminisce. And like Kyle said, you can blame Bryan Veloso. One Year Ago April of last year I was working at Fuel Industries. I don't remember what projects I was working on but no doubt something interesting. My wife and I started looking for a new house. We were living in a townhouse but in thinking of expandin...

Read it all »

Playing With Fire

02 Apr 2006

Redesigning one's site can be a tricky endeavour. Before any decent readership (read, the majority of the lifetime of this blog), I'd redesign frequently. Every few months (um, weeks) I'd try something new. Then I got to the design you see here. This came about back in May of 2005. I had come up with the fixed comments idea and the whole design was really centered around it. I really wanted to ...

Read it all »

The Money Look

01 Apr 2006

If you've happened to swing by the main page at snook.ca, you'll notice a different look than the one the blog has. It's just a basic site for the freelance business. A few of you who have seen it have wondered how the line effect in the header was done. I call it the money look as it reminds me of those fine lines often found on paper money. This is done fairly easily using the blend tool in I...

Read it all »

Triple Interview at Fadtastic

29 Mar 2006

Johan Van Den Rym over at Fadtastic took the time to interview myself, Robert Nyman, and Dustin Diaz. My answers seem almost curt in comparison to Nyman and Dustin. ...

Read it all »

Targeting IE7 using CSS

27 Mar 2006

IE7 is still in beta but with things apparently being layout complete, this hack may stick around until final launch. It's a variation on the underscore hack. Here's a quick example: p { border:1px solid green; /* works in all */ *border:1px solid red; /* targets IE6 and 7 */ _border:1px solid blue; /* targets IE6 */ } Yes, this is invalid CSS and it might get fixed by the time IE7 hits the...

Read it all »

BarCampOttawa

24 Mar 2006

When I was at SXSW this year, I got to see Tantek Çelik. Not one-on-one, mind you, but his presentation on Creating Building Blocks for Independants. While I knew of him before, I didn't feel passionate about any of his work such as microformats. It was an interesting presentation and it managed to change my opinion of him and the work he does. He seems genuinely interested in building tool...

Read it all »

Quick Link: Handling AJAX Timeouts using Prototype

24 Mar 2006

Althought titled AJAX Timeouts with Prototype (which could be read good or bad), it's about how to handle AJAX timeouts using Prototype. ...

Read it all »

Microformats in Dreamweaver

23 Mar 2006

I'm a fan of Dreamweaver, having used it for years. Drew McLellan (of the WaSP Dreaweaver Task Force and who I met ever so briefly at SXSW) has just released a Microformats Dreamweaver Extension. It allows for the easy insertion of hCalendar, hCard and XFN microformats into any page you may be working on. Since comments are closed on the WaSP site, best to leave your comments on Drew's site. ...

Read it all »

Use Multiple Desktops with Synergy

22 Mar 2006

Somebody at SXSW told me about this but I totally forget who it was now. Whoever you are, thank you! “Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems without special hardware. It's intended for users with multiple computers on their desk since each system uses its own display.” To the left of me is my Mac, to the r...

Read it all »

On Reaching 400 Posts

21 Mar 2006

Just a quick aside. This is actually post 401. Back on September 23, 2003, I set up MovableType. It's the point at which I really decided to jump onto this whole 'blog' thing. Previously, I just used this site as a resume and to post a few things that I had been working on at the time. Most of it was hand-coded but MT was big at the time so I took the plunge and installed it. 400 posts, over 220...

Read it all »

Inheriting Link Colour

20 Mar 2006

Ever do something so glaringly obvious you wondered why you've never done it before? I feel like this is one of things that everybody does because it is so obvious. Here is the scenario: you want your link colour to match the content around it but you have different colours for things like body, navigation and footer. Traditionally, I've set up styles for each area independantly like so: #nav { c...

Read it all »

An Interview with Dean Edwards

19 Mar 2006

Dean Edwards was kind enough to answer a few questions on JavaScript. Tell me a bit of your background and how you got into JavaScript programming? I’ve been a programmer (professionally) for twenty years. Most of that time I’ve been a GUI builder using things like the Windows API and visual tools such as Microsoft’s Visual Studio. Five years ago I saw that The Web was the f...

Read it all »

Excessive Elements

18 Mar 2006

As people expand on their HTML and CSS knowledge, there is a progression. At least for me, there was. It starts off with applying a quick style to an HTML element. "Hey, that was cool." It quickly goes from there to putting declarations in the header or in a stylesheet. Classes litter the page. How many times have you seen this on a project? <p class="paragraphtext">Lorem Ipsum...</p>...

Read it all »

Quick Link: 9charities

17 Mar 2006

The 9rules Network starts up 9charities. Choosing nine charitable organizations per year and provides free web design, consulting, and hosting. ...

Read it all »

SXSW 2006: Lessons Learned

17 Mar 2006

I wanted to take the time to wrap up with what I felt I learned and took away from the five days I spent in Austin. First and foremost, this event is about the people. In retrospect, I feel bad about missing out on a couple of the after parties and things like the Web Awards where 9rules and Avalonstar took home awards. It's during these times where you really get a chance to sit and chat with p...

Read it all »

SXSW 2006: It's over (Part 2 of 2)

16 Mar 2006

I broke this up into two parts, if you haven't read the first part, feel free to do so. With it being a little late the night before, I slept in and rushed in for the first panel of the day. I jumped into a presentation simply titled 'Dirk Knemeyer' but was pleasantly surprised to find him talking about starting a business. I was enjoying everything out of this. It was interesting to look out int...

Read it all »

SXSW 2006: It's over (Part 1 of 2)

16 Mar 2006

Wondering what happened to days 3 and 4? Yeah, so am I. On Day 3, I didn't take too many notes. I just sat back and enjoyed the panels. CSS Problem Solving started off the day but I was heavily disappointed. The first panellist was dull and the next two presented essentially the same material. Dave Shea provided the only topical information by actually taking three questions and providing possib...

Read it all »

SXSW 2006 Day 2

13 Mar 2006

Day two seemed to start off fairly low key. The conference centre didn’t seem to have the buzz it did the previous day. I strolled in, much like the day before, just before the first set of presentations at 10:00am. Sink or Swim: The Five Most Important Startup Decisions I decided to check out Sink or Swim: The Five Most Important Startup Decisions. Michael Lopp (Apple) moderated this pa...

Read it all »

SXSW 2006 Day 1

12 Mar 2006

Saturday is the first day of panels but I already felt like so much had transpired. Friday was a great day to meet a whole lot of people. Turns out I’d meet just as many, if not more, on Saturday. (I’m writing this Sunday morning, mostly because it’s hard to find time during all the events to write but also because I almost finished this post only to lose it before saving any kin...

Read it all »

SXSW Day 0

11 Mar 2006

What a whirlwind of a day that was. The Friday was just registration which left plenty of time for socializing. The day started off at noon going to the convention centre and lining up for "the badge". The badge is your ticket in to everything but also a great way for others to know who you are (and to know who others are). After that, I hooked up with Matthew Oliphant, Mike Rundle, Anton Peck and...

Read it all »

I'm on my way

09 Mar 2006

I'm reminded of that song from the Proclaimers... "I'm on my way, from misery to happiness today". I'm currently on layover in Detroit waiting for my flight to Austin. That's right, I'm on my way to SXSW. I'm going to attempt to post updates over the next few days as well as post some pictures up to Flickr. I'll have my camera with me the whole time and you can bet I'll be taking lots of photos! W...

Read it all »

Podcast Interview with Dustin Diaz

08 Mar 2006

Dustin has a few podcasts under his belt and I've had the pleasure of getting in on Episode 5: The State of JavaScript. I think this podcast should be voted for best intro ever. There's a one second delay between myself and Dustin which may sound a little awkward at times. And it's a little wierd to listen to my own voice. But hopefully you all enjoy it. Maybe I'll have to start up my own podcast...

Read it all »

Quick Link: Forget addEvent, use Yahoo!'s Event

07 Mar 2006

Dustin Diaz goes in depth on Yahoo!'s event handling. The biggest plus is the ability to attach a handler to an object before it exists in the DOM. I suspect we'll see something like this in Prototype soon enough. ...

Read it all »

Element Object in Prototype Revised

07 Mar 2006

One of my biggest peeves of Prototype was the singleton nature of the Element object. Doing Element.hide('myelement') just didn't feel right. Justin of Encytemedia has highlighted the recent updates which now allow for the much more elegant $('myelement').hide(). You'll need to download the latest version of Prototype (currently/still 1.5.0_pre0). Justin also demonstrates the ability to extend th...

Read it all »

SxSWi 2006

06 Mar 2006

For those of you who plan to make the trip down to Austin this week, I hope to see you there. This is my first time in both Austin and south by southwest and I'm looking forward to what should be a highly sociable event. I haven't set my schedule yet for the presentations but I will be at the south by northwest party on Saturday and at the Bowling Extravaganza on Monday. Is it sad that I'm planni...

Read it all »

Gray is the New White

01 Mar 2006

Firstly, before you do anything else, check out Veerle's newly redesigned site. All beefed up on Expression Engine, this site has so many nice touches, I'm flabbergasted. Maybe more so because I wasn't a big fan of her old design. One of the things that I love about it is the typography. The font choice is superb and is used effectively on the site. My concern is that Expression Engine or her s...

Read it all »

Working with Shapes in Fireworks

28 Feb 2006

A number of people who saw the Prototype Dissected pictures seemed awed. "It must have taken forever to put them together." As the case happened to be, my time was really spent on working my way through the JavaScript. Here's some Fireworks tricks that I used on the cheat sheets and that I use on a regular basis. The Assets Panel For the longest time, I never used the assets panel. It seemed fi...

Read it all »

Quick Link: Photoshop Starburst Effect

26 Feb 2006

Sitepoint offers up a nice screencast tutorial of creating a starburst effect in Photoshop. Fun stuff. ...

Read it all »

Is your name "Jonathan Snook"? I'm sorry.

26 Feb 2006

I did a quick ego-search on Google for "Jonathan Snook". I feel bad for any other Jonathan Snook's in the world. In the first 100 links, only about 4 of them didn't apply to me. Is it the power of a 'blog'? Although, if anyone ever needs to track me down, I shouldn't be hard to find. There's my site, my Flickr profile, my Odeo profile, my Blogger profile... If I stopped contributing to the online ...

Read it all »

Quick Link: Yahoo's PHP Developer Center

24 Feb 2006

How did I miss this? Code samples and what not in Yahoo's PHP Developer Center ...

Read it all »

A bunch of links

23 Feb 2006

Playing catch-up on a few links: I love logo design and Be A Design Group covers the common art of placing vowels inside an uppercase C in I Would Like To Buy a Vowel (Inside a C). Robert Nyman put together ASK - AJAX Source Kit. It's designed to create progressive enhancement of a page with AJAX. Don't leave your non-JavaScript (or non-AJAX) users out in the cold. On a similar note, Kyle Kneat...

Read it all »

Prototype Dissected

20 Feb 2006

I have since updated these cheat sheets. In getting to know Prototype a little better, I decided to go through the latest version of the Prototype library (1.5.0_pre0) and detail every method and property that was available. In doing so, I got a much better understanding of how the code works. Here are the files in a 1280x960 and a widescreen 1440x900 version. 1280x960 1440x900 1280x960...

Read it all »

Prototype-powered Popups

18 Feb 2006

Okay, I admit this is a little silly but after seeing Peter Cooper make a Prototype-inspired popup object, I decided to make a Prototype-powered popup object. This requires Prototype's Object.extend() feature to map parameters over default values. var Popup = { open: function(options) { this.options = { url: '#', width: 300, height: 300 } Object.extend(this.optio...

Read it all »

When you know a day is going to hurt

16 Feb 2006

This code hurts: <div class="leftNavLink" id="leftLink3"><a class="main" onmouseover="document.getElementById('leftLink3').className='leftNavLinkSelected'" onmouseout="document.getElementById('leftLink3').className='leftNavLink'" href="http://www.example.com/">Link Location</a></div> Because :hover just isn't supported well enough. ...

Read it all »

Make Your Language Clear

16 Feb 2006

When writing instructions for your users, it's important that the messaging is clear. Here's a quick example when adding a user as a contact on Flickr: When I first read this I thought to myself, "Who's Mark? I'm not adding Mark as a contact." It took me a couple seconds to realize that mark was a verb and not a noun. Including the contact's actual name as in, "Mark John Smith as a friend?" wou...

Read it all »

CSS Mastery by Andy Budd

15 Feb 2006

Andy Budd, along with Simon Collison and Cameron Moll, have put together CSS Mastery covering advanced web standards solutions. If you're curious as to what this book looks like, be sure to check out Andy's set of pics on Flickr. My favourite shot of the book has to be this one. Thanks Andy. ...

Read it all »

Quick Link: Discoverability in Rich Web UI's

15 Feb 2006

Luke W covers some ways to address discoverability in rich web UI's. ...

Read it all »

Quick Link: Yahoo Links

14 Feb 2006

New from Yahoo, we've got the User Interface Blog, the Design Pattern Library, and the UI Library. ...

Read it all »

Microsoft Office and Usability

08 Feb 2006

Jensen Harris is a Lead Program Manager on the Microsoft Office "user experience" team. It's been a pleasure to read his blog and the effort the team has been putting into the new version of Office. He talks about many of the usability issues and new features that will be in Office 12 but also uncovers things that are already within the application. With going solo, I've been using Outlook much m...

Read it all »

Server Switched

04 Feb 2006

If you can see this, that means the DNS for you or your feedreader has worked swimmingly. Now to see what's broken (if anything). This should conclude a successful switch from 1and1 to Dreamhost. ...

Read it all »

IE7 Beta 2 Preview: Send in your bug reports

01 Feb 2006

Originally, I was on the fence about installing the latest beta but now that I have, I'm glad I did. I've already uncovered one rendering bug and there will no doubt be many more. At this point, I'm recommending that everybody install it and report anything that does not render correctly. The only way it'll get fixed is if they know about it. Here is what I've uncovered so far: padding no longer...

Read it all »

Absolute and Relative Paths in MSHTML

31 Jan 2006

After reading of issues that MSHTML (or the DEC, the DHTML Editing Component) has with setting all paths to absolute, I felt I should divulge my solution: set the baseurl of the editor. If using the DEC, where editor is the id of the object try the following: editor.BaseURL = "http://www.example.com/"; In doing so, any calls to an href should now omit the base URL. ...

Read it all »

Internet Explorer 7 Beta 2 Preview is available

31 Jan 2006

Not one to release early, release often, Microsoft has made IE7 Beta 2 Preview publicly available. It will only install on Windows XP SP2 and requires you to complete the "Windows Genuine Advantage" process. You may be able to install side-by-side with IE6 like IE7B1 (which coincidentally, avoids the WGA process. Keep in mind that an install like this will almost likely cause some side-effects; i...

Read it all »

PDF Generation Using Only PHP

25 Jan 2006

PDF Generation Using Only PHP. I'm a fan of people who can pick apart a spec and make a free, scripted API out of it. I once came up with a hackish way of reading SWF files using ASP but ran into trouble when they implemented zlib compression as of Flash 6. ...

Read it all »

Web Presentation Patterns

24 Jan 2006

Another article of mine has made its appearance on Digital Web. In Web Presentation Patterns, I quickly touch on design patterns in general and then touch on MVC, page controller, and front controller has various implementations of design patterns. Best of all are probably the resources at the bottom. Plenty of stuff to get you into and excited about design patterns. ...

Read it all »

Emailing Large Files using DropSend

23 Jan 2006

DropSend is a web-based application for emailing large files. This is the kind of service that I never thought I’d really find a need for. Ryan Carson was kind enough to send me a free subscription a while ago but I never got around to checking it out. Most files that I end up sending are usually less than 5MB and have never been an issue. Sometimes the files might be 10 to 15MB and I’...

Read it all »

Quick Link: Getting Funky With Scopes and Closures

22 Jan 2006

Getting tired of hearing about JavaScript scope? I hope not. Mark Wubben shares his tidbits on scope and closures. ...

Read it all »

Poor Form Design

22 Jan 2006

Here I am in an airport in Detroit looking to sign up for wireless. A two and a half hour layover meant my time would be more enjoyable if spent online. But the sign up form certainly had some deficiencies. Here's a screenshot of a portion of it. The designer probably felt that it just looked nicer if the label appeared under the field. I tabbed through the form (because using the touchpad on a...

Read it all »

Source Order, Skip links and Structural labels

19 Jan 2006

Webusability has published the results of their research on Source Order, Skip links and Structural labels. Our results suggest that: Most screen reader users expect at least the main site navigation to be presented before the informational content of the page. The source order of a web page is likely to be of little relevance to the majority of screen reader users. About half of the scr...

Read it all »

JavaScript: Passing by Value or by Reference

18 Jan 2006

In JavaScript, we have functions and we have arguments that we pass into those functions. But how JavaScript handles what you’re passing in is not always clear. When you start getting into object-oriented development, you may find yourself perplexed over why you have access to values sometimes but not other times. When passing in a primitive type variable like a string or a number, the valu...

Read it all »

What's the best XML editor?

18 Jan 2006

In what is almost becoming a regular series of "What's best", I'm looking to see what the best XML editor is out there. While I am specifically looking for a Windows version, feel free to recommend Mac software as I'm sure other readers might be interested. One of the really nice to have features would be the ability to test XPath expressions. ...

Read it all »

What's the best MySQL admin tool?

13 Jan 2006

I've used a few different ones and as great as phpMySQL is, it's not always the most practical option. Wish list: runs on Windows can run multiple commands at once be able to do schema or data import and export be able to return a table and edit in place code colouring and code completion are nice to have's but definitely not necessary My demands aren't much but I've been disappointed by the s...

Read it all »

Dealing with JavaScript Scope

12 Jan 2006

Over at Ajaxian, they've offered up a useful tip for dealing with code that exists in the global namespace and is conflicting with other scripts: move it into its own function. Example: (function() { // do you stuff here! })(); What's the global namespace? That's the window object. Any time you instantiate a global variable, it is automatically part of the window object. var myvar = 5; alert(...

Read it all »

Quick Link: Using Flash as an Animation Underlayer

09 Jan 2006

From the particletree folks: Using Flash as an Animation Underlayer. My prediction: expect to see some creative flash/html integration in the months to come. ...

Read it all »

Spam Filtering in MovableType 3.2

06 Jan 2006

People seemed to jump off the MovableType bandwagon when the comment spam started getting out of hand. Having stuck with MovableType myself, I’ve come to discover the new spam filtering power that is currently available. Bundled with a standard install of MT are three plugins under the SpamLookup umbrella: Lookups, Link, and Keyword Filter. The settings can be configured for all blogs or...

Read it all »

Which is better: HTML or XHTML?

04 Jan 2006

This is almost an eternal debate but I've rarely seen a solid argument for or against either. So, if a client asked you today, what would you say? To make things a little easier, which is better: HTML 4.01 Strict or XHTML 1.0 Strict? ...

Read it all »

The Value of Graphic Design

03 Jan 2006

Gerry McGovern writes of how graphic design plays a minor role on the web. Whether we choose to believe it or not, design is extremely important when it comes to web design. It communicates and it facilitates. “Nobody would ever be allowed design road sign navigation that moved. However, when you design moving web navigation you win design awards. Why are so many graphic design experts sti...

Read it all »

The Bloggies and the Value of Self Promotion

02 Jan 2006

The sixth year of the Bloggies is here and it's time for everyone to do their little song and dance. Of course, you are going to swing by and nominate snook.ca for best Canadian weblog, aren't you? (or maybe weblog of the year if you're feeling really generous) Some characterize it as a Canadian trait but I've always shied away from self-promotion. I've often hoped that if I just tried hard enoug...

Read it all »

Buzzword Hell

01 Jan 2006

Every industry has its buzzwords and the web industry is no different. Ever sit in a meeting with a salesperson (they're buzzword-friendly) and cringe at the mention of every buzzword you've ever heard? It's no longer about thinking outside the box. It's about being a thought leader or best of breed. If you find yourself needing to vent, make your way over to Buzzword Hell. ...

Read it all »