Oct. 27, 2008 at 12:01pmHow to use jQuery in a Prototype world

jQuery Namespace Workarounds

Prototype and jQuery conflict over the $ function. In the entry, I will show you how you can start to include jQuery code in the an environment that is already Prototype heavy.  Read more →

Oct. 10, 2008 at 10:43amGoto Code in PHP

It's not as bad as you'd think

Sometimes, you just need a way to GOTO. Here is a little trick that will duck out of a section of code using break

Read more →

Sep. 25, 2008 at 4:43pmJSCommandlet Released

JavaScript Development Made Easier

We're happy to announce a new bookmarklet called JSCommandlet. It is a JavaScript console developed for use within SiteCrafting. If you do any kind of JavaScript development, especially working with Internet Explorer, JSCommandlet is for you.

Read more →

Sep. 16, 2008 at 11:18amStack Overflow: Liftoff!

A handy developer community launched yesterday.

Today marks the first day Stack Overflow opens its doors to the public. In case you're not in the know, Stack Overflow is essentially a Q&A site geared towards developers of all kinds. It takes a language/technology agnostic approach and simply provides a framework within which the community can ask and answer techincal questions. Think of it as ExpertsExchange.com except free and much more community driven.

Read more →

Sep. 5, 2008 at 4:01pmThe New .phar PHP Package

PHP now comes with a carry-on!

Today I discovered a very powerful addition to the PHP world. Phar is an archive extension for PHP that allows an entire PHP application to be packaged into a single file. It's basically PHP's answer to Java's .jar archive format. Don't get excited yet, it gets better...

Read more →

Aug. 15, 2008 at 11:24amWindow.Name experiment

Does anyone use it yet?

I am starting an experiment to see whether the recent blog chatter about window.name is actually being used. Included is some JavaScript that you can put in GreaseMonkey to help me in my search. Read more →

Jul. 22, 2008 at 4:41pmOnload Collisions and How to Fix them

Harry Potter and the Onload Collisions

There is no other variable more fought over then the coveted window.onload. Its job is to run a function after a page has been loaded. The problem is that there is only one variable, and therefore only one function can run. Once you have set this you would think you are in the clear. That is until another script comes in and overwrites onload.

But all can be made well in JavaScript land once one of four choices is made. I give four ways to get around this problem, and suggest a way for modern browsers to be rid of this problem once and for all.
Read more →

Jul. 10, 2008 at 3:36pmCoding Fonts

Not just an endeavor in aesthetics!

Having recently discovered the plethora of coding fonts available online, it occurred to me that quite a bit of thought has been put into something I have always seen as rather trivial. The more I read about it, the more I have come to realize that using a font specifically designed for software development can be extremely beneficial.

Read more →

Jun. 16, 2008 at 8:56amWrite .NET Applications in PHP

Say what?!

That's right, you heard me! It's all thanks to a fantastic project called Phalanger, which adds a super-fast execution environment for a very large portion of the PHP scripting language. Certainly this was only a matter of time, combining one of the most popular open-source languages of the web with one of the most powerful enterprise-grade frameworks.
Read more →

Jun. 5, 2008 at 9:43am'M' is for Model, 'V' is for View . . .

Four hilarious programming videos!

During my morning blog-scan I came across four videos that really set my day off on the right foot. And that song! Oh that song! As much as I can't stand it, I'll be humming it all afternoon today. If you're familiar with the MVC model, then these videos were made for you.

Read more →

Jun. 4, 2008 at 10:50amGoogle's Search Appliance

The Mini in a Nutshell

I recently had the opportunity to work with one of Google's latest search applances, the Mini. Having no previous experience with any of Google's search hardware, this seems an excellent opportunity to offer a newcomer's first impressions.

Read more →

Mar. 31, 2008 at 11:40amGot API?

An API reference does a method's body good...

gotAPI.com is one of the most useful online resources I've come across, primarily because it places resources spread all over the internet into one simple site. I've been using this for quite some time, and have for the most part I have taken its usefulness for granted. Then it occurred to me that I might not be the only one that could find this tool useful (I know, it was a big 'DUH!' moment). So now I will share this gem with others...

Read more →

Mar. 26, 2008 at 12:41pmMake PHP Growl

. . . but in a good way!

I stumbled upon a fantastic PHP class today and felt compelled to comment on it. Originally written by Tyler Hall, this class allows you to send notifications to any system running Growl from a PHP script. For those of you that don't know, Growl is an application written for Mac OS X that is intended to act as a universal notification tool (much like the taskbar notification bubbles we've all come to know and love in Windows XP/Vista).


Read more →

Mar. 12, 2008 at 4:34pmPHP 5.3 - A Heavy Hitter in Training

PHP's next major release is just that, major!

The evolution of PHP into an object-oriented programming language has been a very exciting process to watch. I'll admit its advancement seems to move at a glacial pace at times, but looking back we certainly have come a long way. With the release of 5.0 we saw PHP leave its childhood and enter its awkward adolescent stage. At this point there is evidence of a mature and complex object-oriented language while stilll exhibiting many of its younger habits.

So what's in store for us next? Find out after the jump . . .

Read more →

Jan. 29, 2008 at 3:15pmPHP Patterns, Part III

The TO Pattern

The Template Object (or TO) is a design pattern of my own that I developed to fill the role of the View layer in the MVC model. As you have probably figured out, the purpose of the TO is to handle everything related to the user interface. The idea here is to separate the interface as much as possible from the rest of the application, so that we could do a complete rewrite of an application without ever touching (or accidentally "breaking") the view portion. Read more →

Dec. 21, 2007 at 10:19amTechnical Debt

What the heck am I talking about?

The concept of technical debt (first coined by Ward Cunningham) has been something that has wandered about my head without a name for quite some time. The other day I read an article that finally put it into words. It is what I have always seen as the reason writing beautiful code is not just an endeavor in aesthetics. At this point you're probably wondering what the heck I'm rambling on about. Don't give up on me yet, I'm about to explain . . .

Read more →

Nov. 14, 2007 at 3:48pmPHP Patterns, Part II

The DAO and VO Patterns

In this installment, we will be looking at two patterns that have been 'borrrowed' from Java. If you've had any development experience with J2EE, you are probably well aware of how handy Data Access Objects and Value Objects can be. If you haven't, don't fret! This article was written especially for you!

If you've never heard these terms before, you may be wondering why I have chosen to group them together within one article. The simple explanation is ... well you'll see. For now just accept that they go hand-in-hand, much like salt and pepper or peanut butter and jelly or .

Excited? Let's dig deeper...

Read more →

Nov. 14, 2007 at 12:01amAndroid: The REAL Next Gen of Web Apps

If the iPhone is web apps to go, Google and the Open Handset Alliance's new open source mobile phone API, dubbed Android, is The Joy Of Cooking Webapps. Once again Google has seen a good idea (packing a cell phone full of convenient little apps and widgets that sync with websites and external systems) and figured out a way to make it a great one.

Read more →

Sep. 27, 2007 at 3:17pmPHP Patterns, Part I

The Registry Pattern

This is the first in a planned series of articles discussing the application of various PHP patterns. If you're still getting your feet wet developing in PHP (or programming languages in general), you may be wondering what a "pattern" is in the first place. The best place to find a quick explanation is over in Wikipedia's article (which does a much better job than I could hope to do within the scope of this article).

Now, let's move on to the fun part . . .



Read more →

Sep. 13, 2007 at 11:45amif (date('z') == 256) echo("It's Programmers Day")

Translation: It's Programmers Day!

For those that aren't aware, Programmers' Day is today and marks the 256th day of the year. If you just thought to yourself "wow, that's 1111 1111 in binary!" then consider today to be a day in your honor. In case you're wondering why this particular day was chosen, consider this: 1111 1111 is the last of the 256 possible values of a byte. Read more →

Feb. 2, 2007 at 10:11amScript Timing, v2

Making the timer look better

Last time, I outlined a way to create a simple PHP script timer. I use this timer in many of the projects that I work on, and it's really helpful to nail down trouble spots in scripts. The thing that it lacks, however, is a decent display. When you call the elapsed() function, it only gives you a number. Creating a decent display for each timer call is tedious and boring. So I simplified it. Now, I'm going to extend the existing Timer class and add some new functionality - make it look better and make it easier to call and display the information.

Read more →

Jan. 26, 2007 at 4:14pmMaking a PHP Script Timer

I've been ranting about a lot of things lately, but not many of them are related to my job description. I want to take a bit of time, and go back to good old PHP, CSS, and Javascript. Today, I'm going to go over how to create a execution timer that will let you know how much time has passed since it started. There are a number of benefits to using one of these things, for example to track down why a script would take 77 seconds to complete rather than 3 or less. (It was a bloated SQL query)
Read more →

Jan. 16, 2007 at 11:23amDiary of a Developing Developer

Learning by Doing

I never had any idea how complicated, confusing, and involved the development of web sites and web-based applications can truly be. When I was younger, every once in a while I would look at a web page and click the "view source" option and think, "Wow, that really doesn't look too difficult to learn."

Little did I know there is so much more behind the code than what is seen in that one snapshot of HTML.

Read more →

Dec. 1, 2006 at 8:41amUse Functions for Readable Code

Code Soup versus Short Stories

On my way to meeting with a client, I got into a conversation about using functions in your code. One of the guys learned to write assembly first, and so his stance was that creating functions was only feasible when you used the same code more than (about) three times. That view makes a certain sense - don't deal with the overhead of creating tons of functions for stuff you'll seldom use.

I argue that you should use functions where ever possible, first because it makes code easier to generalize (and thus re-use), but also because it makes code much more readable.

Read more →

Nov. 20, 2006 at 11:55amTwo Dollars - Follow up

In response to my last post, one reader mentioned that sometimes clients take advantage of a developer's generosity, and that it seemed like I wanted the developers to grin and bear it to keep their clients happy. This is actually quite different from what I wanted to say, and so I want to expand on that a little, and why it's very important for both developers and clients to have a written set of guidelines to keep projects on track.

In my last article, I wanted to tell developers that creating something that works perfectly is almost the only acceptable outcome of a job. For example: do you notice how the gas gauge in your car (or someone's car, if you don't have one) changes depending on the angle the car is sitting on? If the car is perfectly level, the gauge reads correctly, but on hills the level may be deceptively low or high, depending on where the sensor is in the tank. This is hardly a problem when it comes to using the car; it'll keep driving as long as there is some amount of gas in the tank, but it bugs me.

Read more →

Nov. 15, 2006 at 10:39amTwo Dollars

Why going the extra mile always pays off

Two dollars is a small amount, but two is a magical number. Despite it's seeming insignificance, two represents the difference between doing a job, and doing it right.

One summer while I was still in college, I worked in a brewery in Colorado waiting tables. I recommend that everyone work in a restaurant at some time in their life. It teaches you a lot about life and service. While I was working there, I began to understand the value of such a small amount, and how much good work is worth.

Read more →