SiteCrafting Blah Blah Blog

Mar. 31, 2008 at 11:40am

Got 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

Comments (1) | Posted in ASP.NET 2.0, CSS, From the Workbench, Javascript, MS SQL Server, MySQL, PHP, Review, Software Engineering, XHTML by Nick Williams


Mar. 26, 2008 at 12:41pm

Make 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

Comments (8) | Posted in PHP, Review, Software Engineering by Nick Williams


Mar. 12, 2008 at 4:34pm

PHP 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

Comments (0) | Posted in PHP, Software Engineering by Nick Williams


Jan. 29, 2008 at 3:15pm

PHP 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

Comments (0) | Posted in Coding Techniques, From the Workbench, PHP, Software Engineering by Nick Williams


Dec. 21, 2007 at 10:19am

Technical 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

Comments (3) | Posted in Deep Thoughts, Software Engineering by Nick Williams


Nov. 14, 2007 at 3:48pm

PHP 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 <insert clever combination here>.

Excited? Let's dig deeper...

Read more

Comments (4) | Posted in Coding Techniques, From the Workbench, MySQL, PHP, Software Engineering by Nick Williams


Nov. 14, 2007 at 12:01am

Android: 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

Comments (1) | Posted in Critiques, Odds 'n Ends, Software Engineering by Joe Izenman


Sep. 27, 2007 at 3:17pm

PHP 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

Comments (7) | Posted in Coding Techniques, PHP, Software Engineering by Nick Williams


Sep. 13, 2007 at 11:45am

if (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

Comments (1) | Posted in Deep Thoughts, Software Engineering by Nick Williams


Feb. 2, 2007 at 10:11am

Script 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

Comments (2) | Posted in CSS, PHP, Software Engineering by Dave Poole


Jan. 26, 2007 at 4:14pm

Making 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

Comments (0) | Posted in PHP, Software Engineering by Dave Poole


Jan. 16, 2007 at 11:23am

Diary 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

Comments (2) | Posted in Deep Thoughts, Odds 'n Ends, Software Engineering by Reena Hensley


Dec. 1, 2006 at 8:41am

Use 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

Comments (1) | Posted in Coding Techniques, PHP, Software Engineering by Dave Poole


Nov. 20, 2006 at 11:55am

Two 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

Comments (0) | Posted in Software Engineering by Dave Poole


Nov. 15, 2006 at 10:39am

Two 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

Comments (0) | Posted in Deep Thoughts, Design, Software Engineering, Testimonials by Dave Poole