SiteCrafting Blah Blah Blog
May. 14, 2008 at 4:15pm
Dumping Duplicates
Deleting all semi-matching rows in MySQL
One of the more recent additions to the SiteCrafting CMS arsenal is a comprehensive error logger, tracking all PHP and MySQL errors (by default... other error types can be created on a case by case basis) that occur in new sites we build. Errors are stored in our own intranet system with a timestamp, error body and a site ID (assigned to each client at a different stage of our project workflow). The table looks something like this:
+----+---------------------+---------------+---------+
| id | logTime | text | project |
+----+---------------------+---------------+---------+
| 2 | 2008-05-14 14:42:15 | A PHP Error | 1 |
| 3 | 2008-05-14 14:42:26 | A PHP Error | 1 |
| 4 | 2008-05-14 14:42:34 | A PHP Error | 1 |
| 5 | 2008-05-14 14:42:47 | A MySQL Error | 1 |
| 6 | 2008-05-14 14:42:56 | A MySQL Error | 1 |
| 7 | 2008-05-14 14:43:05 | A PHP Error | 2 |
| 8 | 2008-05-14 14:43:10 | A PHP Error | 2 |
| 9 | 2008-05-14 14:43:21 | A MySQL Error | 2 |
+----+---------------------+---------------+---------+
8 rows in set (0.00 sec)
Obviously sometimes we get duplicate errors coming through. Aside from being mere mortals who aren't always fast enough to correct an error before it recurs, one of the first stages of debugging is to try and replicate the error. These are often pretty easy to manage. It's pretty trivial to search for all matching errors, check them all, and delete them. Sometimes, though, this just doesn't cut it. Like when there are a few different errors with 10,000 occurrences apiece.
Read moreComments (0) | Posted in Coding Techniques, MySQL by Joe Izenman
Apr. 25, 2008 at 9:25am
Appreciation
An Honor and a Challenge...

What an honor and at the same time, what a challenge. SiteCrafting is thrilled to be named by The Business Examiner as the Top Place to Work in the category of Employee Appreciation, but --- and here's the big but --- it means we have to live up that honor. A challenge I am glad to take on, given the dedication, commitment, and selflessness shown on a daily basis by our people who truly make SiteCrafting a top place to work.
Sure, we have a lot of very smart, technically minded people working here, but what's more important and worthy of recognition is the fact that we have incredible human beings working here. We have individuals committed to our customers, to our vision, to our community and to each other.
So how did this happen? And how do I live up to the challenge?
Read more
Comments (3) | Posted in Awards / Recognition, Deep Thoughts by Brian Forth
Apr. 1, 2008 at 9:48am
SiteCrafting to Expand into New Markets
Find out what's next for the high-growth company...

Seeing the time as ripe for expansion, SiteCrafting has launched a new venture in an effort to expand into prescription eyewear. SightCrafters, LLC will bring to the eyewear world what SiteCrafting has brought to the web development business.
Read moreComments (2) | Posted in Deep Thoughts, Horn Tooting, Latest Hits, Marketing, Testimonials by Nick Williams
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. 28, 2008 at 5:40pm
Change is Good

Normally government websites tend to be pretty dry and information-oriented, so I was expecting more of the same when I checked the Snoqualmie Pass traffic cameras from the WSDOT this morning. All the standard stuff that I've come to expect from years of checking the site before driving across the pass was there. However, there was one part of the site that gave me a good laugh this morning. Camera 2 was wiped out in an avalanche over the winter, but rather than a simple "Camera Unavailable" message that I've seen in the past, I saw this:
Read moreComments (3) | Posted in Deep Thoughts, Odds 'n Ends by Mike Ash
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
Feb. 14, 2008 at 4:29pm
Touch the Vote
Rock it as well, if you must

This time of year you either get hooked or get sick of everything politics. That's right, it's a Presidential election season and the 24-hour news cable channels are firing out tons of info both via your TV and online. Some worthy strides in web development practices have also come about on one news site in particular that may help political junkies get their fix anytime, anywhere.
Read moreComments (0) | Posted in Coding Techniques, Javascript by Kevin Freitas
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
Jan. 22, 2008 at 7:41pm
There is Nothing Small About Everything
So this is a post I've been working on in my mind for a very long time. I only recently realized that it needed to be written. You see, small business is anything but small. The services and products that businesses like SiteCrafting provide add value to their customers in such a way that small business has become, essentially, everything.
Read more
Comments (2) | Posted in Deep Thoughts by Brian Forth
Jan. 18, 2008 at 11:29am
Thoughts On Creating Website Advertising Guidelines
Let's say you've got a website, and you're considering whether or not to advertise on it. Or maybe you've already got a website with advertising, and you're wondering if a particular kind of ad is appropriate to display on your site. The only problem is, you don't have a concrete set of guidelines to filter out what is acceptable, and what isn't. These are the kinds of questions you should ask yourself to resolve this dilemma.
Read more
Comments (0) | Posted in Deep Thoughts, Marketing by Dave Poole
Jan. 9, 2008 at 3:51pm
PHP Passes Homeland Security Test
Use open-source with more confidence

When meeting with prospective new clients, we tell them that SiteCrafting uses PHP and MySQL as the development platform. Invariably this leads some of them to ask us what PHP and MySQL are and if they are safe and fast. Sometimes, this can lead to interesting conversations, where we explain to them why we think PHP and MySQL are safe and fast.
Occasionally, there's a client who remembers reading an article 4 or 5 years ago about PHP 3 having some security issues. We refer them to current articles on PHP and mention our own experiences, but the latter argument can come across as "Because we say so," which isn't a good way to get the point across.
Read more
Comments (0) | Posted in Odds 'n Ends, PHP, Security by Ken Foubert
Jan. 4, 2008 at 3:21pm
Anonymous Recursion with JavaScript
A new way of solving an old problem
A nice feature of JavaScript is that functions are objects. As such, they do not need a name if they are used right away. But what if you need a short anonymous recursive function? arguments.callee becomes your new best friend.
Read moreComments (0) | Posted in Coding Techniques, Javascript by Paul Sayre
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
Dec. 18, 2007 at 11:03am
Understanding Web Design at Alistapart = Holiday Joy
Being very fond of the analogy of web design/development-as-architecture, I was overjoyed with this article, by Jeffrey Zeldman, on Alistapart: Understanding web design.
There isn't much more to say; it's the usual web-design-isn't-just-looks,-guys, but very eloquently and effectively worded. The kind of stuff to put on the wall.
Comments (0) | Posted in Deep Thoughts, Design, Odds 'n Ends by Anna Bjork
Dec. 17, 2007 at 2:56pm
Free Buttons
Depending on how well of a response I get I might be doing this more. Figured since the holidays are right around the corner and you all have been pretty good lately I could give you a free mini button set. :) Enjoy
Download Buttons
Comments (1) | Posted in Design, Odds 'n Ends by Michael Pierce
Dec. 4, 2007 at 11:41am
Facebook Beacon: Social Media Becomes Spyware
Advertising Gone Wrong
I've been a Facebook user for quite some time - even before they had the facebook.com domain. One thing that I absolutely love about it is the control they give you to limit what other people see about you. I've adopted a very serious set of controlls that limits only people I actually know to see anything about me. However, this is a false sense of security. Everything I post online that anyone besides me can access is inherently public. This is what initially drew myself and countless other people to Facebook.
However, their new advertising platform - Beacon - throws all this out the window. Beacon is a system that allows Facebook to track what you do on other websites. Let me reiterate that: Facebook tracks what you do online. They don't just track what you say you like on your profile, for example what movies you like; with Beacon they can track what movies you're actually renting.
Read more
Comments (1) | Posted in Deep Thoughts, Odds 'n Ends, Review, Security by Dave Poole
Nov. 30, 2007 at 1:05pm
Why is AOL denying email?
Try adding a parameter to the mail() function
Email debugging is often frustrating and time consuming. There could be numerous reasons why the email you attempted to send out through your code fails: routing issues, firewalls, company servers blacklisting or blocking incoming emails, spam filters, bad DNS records, and email header requirements. The last one can definetely lead to infinite frustration, as I have experienced in the past, and was recently the cause of why AOL was denying emails generated by the php mail() function.
Read moreComments (1) | Posted in From the Workbench, PHP by Ken Foubert
Nov. 28, 2007 at 4:16pm
Star Wars IV Animated ASCII Art
A blast from the past

In a recent The Code Project Insider email newsletter, there was a link to an animated ASCII art for Star Wars IV, A New Hope. This brought back fond memories of a bygone era, where I cruised the ASCII based bulletin boards on my trusty Color Computer, the CoCo, and played ASCII art games, such as Voyage of the Valkyries (a game written by my Keithley Jr HS teacher Mr. Leo Christopherson*) and Star Trek, on my school's TRS-80 Model 4, trash 80. I also had the experience of entering the code for several ASCII art games from a book, where I learned that the GOTO statement is very dangerous, especially if you put in the wrong line number.
Read moreComments (1) | Posted in Odds 'n Ends by Ken Foubert
Nov. 28, 2007 at 2:02pm
RescueTime: Find out where all your time is going...
(but don't tell your boss!)
Having stumbled upon RescueTime, I feel compelled to share my discovery as this concept is just too useful to keep to myself. The basic idea behind this website is to make it easier to keep track of where you spend your time while at your computer. If you find yourself filling out your timesheet at the end of the week only to realize you can't remember what you were doing all that time, this tool was made for you!
Read more
Comments (0) | Posted in Review by Nick Williams
Nov. 27, 2007 at 7:18am
Office Star Trek: TNG marathon
To nerdly go...

That's what we did a couple Fridays ago here in the office. Brian's wife Julie is an avid Trekker and was excited to plan a Next Generation marathon with us. And we definitely put her complete series DVD collection to good use. From about 5:30pm on we watched episode after favorite episode. After a pile of snacks, some great pizza, sharing Star Trek memories, 7 episodes, it was half past midnight and time to wrap it up.
Thanks to Julie for making the trek (ha!) up and for those killer communicator cookies. We'll definitely have to do it again sometime.
Pics after the break.
Read moreComments (5) | Posted in Getting Out, Odds 'n Ends by Kevin Freitas
Nov. 15, 2007 at 6:50am
DNS propogation explained
There's always plenty of tech-speak flying around among developers in the office. I certainly try to keep such language at a minimum when working with clients but sometimes it just works its way in there. DNS and other domain-related processes can be pretty confusing, period, let alone to someone anxious for their website to go live. So how to explain DNS propogation?
Comments (1) | Posted in Odds 'n Ends, Web Hosting by Kevin Freitas
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 moreComments (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 moreComments (1) | Posted in Critiques, Odds 'n Ends, Software Engineering by Joe Izenman
Nov. 8, 2007 at 5:49pm
Windows Live - The Next Generation of Web Apps?
More like turn back the clock
So, I'm pretty much online all the time. I'm constantly looking for innovative applications and web services. I thought, "I'm going to have a look at what the 'big guys' are doing."
We all know Google is creating some pretty great web applications like their maps or spreadsheet apps. Seems decision makers at the big "G" have squarely set their sites on building innovative tools for web users. Surely, I thought, Microsoft has its plan and it's called Windows Live.
Read moreComments (0) | Posted in Critiques, Odds 'n Ends, Review by Brian Forth
Nov. 1, 2007 at 9:28am
Confessions of a n00b: Part 1
*web developers really like snacks*
Ahh.. where to begin? Greetings everyone. I'm Mandi and I'm wrapping up week 2 at SiteCrafting. I was informed that it might be interesting to get a new hire's perspective posted on the blog, and now that I'm here, Paul is no longer the new guy so it's all on me.
Read more
Comments (3) | Posted in Odds 'n Ends by Mandi Webster-Martin
Oct. 31, 2007 at 2:48pm
Office Halloween costume contest
Fully one-third of the staff at SiteCrafting participated in our office Halloween contest today. Though we dressed up to win today's prize a few of us even wandered about the streets of Tacoma on our way to and from a party at local design and architectural firm BCRA. A software pirate, blogging ninja, head-crab zombie, and "J" blockhead walking down Pacific Ave. certainly drew a bit of attention.
Read moreComments (0) | Posted in Getting Out, Odds 'n Ends by Kevin Freitas
Oct. 29, 2007 at 10:48am
Powered by Coffee
We all know that design and development firms are really run on caffeine. Coffee, energy drinks, tea, and even energy beers now. I usually can be found with 2-3 coffee cups on my desk throughout the week but I will never forget about one developer who I worked with. Each day he would purchase 3-4 drip coffees from Starbucks and then would stack the cups creating a wall about 5 layers high creating his own cubical wall. It was all fine until one day when a few of them turned sour and his office buddy/management put an end to it.
What do you prefer to drink while working? I'm usually a fan of mochas or red bull. Have any ridiculous stories about coworkers caffeine habits?
Comments (9) | Posted in From the Workbench by Michael Pierce
Oct. 26, 2007 at 2:05pm
Apache, MySQL, and PHP on Leopard (Mac OS 10.5)
I just finished installing Leopard on my computer, and my first impressions are that it's very slick and well thought out. One of my necessities as a developer is that I must have a webserver running on my personal computer, so I was dismayed when it wasn't functional after the upgrade. The main reason is that Leopard uses a different version of Apache than 10.4 did, and so some things get wonky. But it's easy to fix. Apache and PHP are included in Leopard, so the only thing missing is MySQL. To install that, go to MySQL's site, and download the latest copy for OS X. It's incredibly simple to install.
After that comes setting up Apache. Open up a terminal window, and type in "sudo pico /etc/apache2/httpd.conf". (Note that you must be a computer administrator to access the files in etc/) OS X 10.4 had Apache in /etc/httpd/, and that's part of why it didn't work after the upgrade. Find the line in httpd.conf that looks like "#LoadModule php5_module libexec/apache2/libphp5.so", and remove the # sign at the beginning. Then search for AddType, and put the following somewhere around it.
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Save the file, and exit. Then open up System Preferences in Finder, and click on Sharing. Then turn on Web Sharing. That's all you need do to to setup a webserver on Leopard, or upgrade from OS 10.4. You should be able to open up a browser, and enter http://localhost/YOUR_USERNAME/ and see that the server is running.
Comments (30) | Posted in MySQL, PHP by Dave Poole
Oct. 12, 2007 at 1:23pm
2007 SiteCrafting Company Retreat
No One's Missing the Trust Falls & Human Pyramids

The SiteCrafting team spent the first weekend in October enjoying the Hood Canal area as part of this year's company retreat. Being as we suffer from a distinct lack of petty office politics and other Dilbert-esque characteristics, "company retreat" is not synonymous with "endless torture" for us here.
The getaway was designed to allow the team to take a break from the office routine and gain capacity to review and offer input on company strategy, successes and our roadmap for sustaining growth. As usual, our collective wit, insight and sarcastic humor made these discussions interesting, informative, motivating and memorable.
Read moreComments (0) | Posted in Getting Out, Odds 'n Ends by Sarah Freitas
Oct. 12, 2007 at 11:38am
SiteCrafting Culture Very Similar to Flickr
Two weeks ago I had a chance to fly down to San Francisco and check out the Flickr HQ. What I found was a team and office culture that was extremely similar to what we have at SiteCrafting. If you have ever had a chance to visit our office I'm sure the first thing you noticed was how quiet it is. Just as in our office the flickr team rocks out with their headphones on too.
Here is a quick little Venn diagram comparing the two companies:
It was really cool seeing that all of the perks which make our company what it is comparable to the Yahoo funded Flickr group.
Comments (2) | Posted in Horn Tooting by Michael Pierce
Oct. 10, 2007 at 10:28am
Lions and Tigers and Blogs! Oh My!
Are You Sure You Really Need That?

For the last 3 years I've worked on less and less "Brochure Sites" and more and more web applications. Clients have really taken it for granted as to what features a website should now have. Tag Clouds, CMS, Social Bookmarking, Send to Friend, Add as Friend, Digg It, Wiki and Blog are all things constantly being chanted by clients.
Don't get me wrong, there is a place for these features, but why do you need it all? How will a feature like this affect your company? What's the value add? Luckily, I've worked for ethical companies that have helped mentor clients through the process to help determine what a client really needs.
We could charge a client an arm and a leg for things they don't need, but what good is that? We are not in the business to have our clients fall. In no way is that beneficial to our Partnership. Read more
Comments (2) | Posted in Deep Thoughts by Michael Pierce
Oct. 8, 2007 at 9:52am
Pirates != Web Developers
Unless they work here

Unless there's a Seahawks, Huskies, or Mariners game going on, it's pretty rare that I listen to the radio in my car, let alone anything on the AM band. Saturday was the exception as I was driving toward Seattle right after the Atlas Foundry explosion. I kept flipping between the local AM news stations, hoping to hear of any updates as I was just down the street visiting some friends about 10 minutes before the explosion. Hearing any updates required sitting through weather and traffic reports, as well as what seemed like an endless parade of commercials. One of those commercials hit upon one of my pet peeves.
Read moreComments (4) | Posted in Odds 'n Ends by Mike Ash
Oct. 3, 2007 at 3:59pm
A GUI Mess, or a Productivity Booster?
What's your take on the database admin debate?

While writing up a review on a database tool I discovered today, I was inspired to spark a discussion about database GUIs in general. The value of GUI tools for administering database systems like MySQL has been a topic of much debate.
Read more
Comments (6) | Posted in Deep Thoughts, MS SQL Server, MySQL by Nick Williams
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. 24, 2007 at 1:43pm
SiteCrafting outed for being awesome
Current clients not surprised

Dan Voelpel begs the following question in yesterday's Tacoma News Tribune: "If I asked you to name the most underrated business in Tacoma, what would you say?"
First on Voelpel's list was SiteCrafting. The article defined "underrated" by those local firms that are either well-known but who's contributions are deeper than at first glance or others, like us, who fly somewhat under the radar but do great business.
Read more
Comments (2) | Posted in Awards / Recognition, Horn Tooting, Marketing by Kevin Freitas
Sep. 20, 2007 at 9:32pm
Interact
What's the big deal?

We want to stay connected with our customers. We want customers to meet other customers. We want our potential customers to see just how easy it is to take control of their website and make it more successful. We want to give you the chance to meet others that are using our tools, that is why we have created "Interact".
We realize that people are busy. In fact, most people, when they get to the office, don't have time to even think about much of anything other than the hottest potato that has been thrown in their lap on that particular day. Rarely do they have time to get a few minutes to update their websites, even more rare, the time to strategize ways to make their website make their lives easier. That is why we believe Interact is so important.
Comments (0) | Posted in Deep Thoughts, Getting Out by Brian Forth
Sep. 18, 2007 at 4:02pm
Friday office creativity gets out of hand
Maybe next we'll break into song

Who knew a seemingly innocuous internal email would make for some good laughs and groans? I sure didn't when I invited folks from the office to join in a Friday after work pseudo-tradition.
Read moreComments (0) | Posted in Getting Out, Odds 'n Ends by Kevin Freitas
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
Sep. 12, 2007 at 4:52pm
AJAX & IE Caching Issues
I've been working on a project that involves using the jQuery javascript library and the Ajax methods. I've been happily using the Ajax jQuery.get() method to handle simple calls, such as a link that allows a user to view a list of words based on their selection, getting the contents of a tab when the user selects a tab, and finally getting the current weather after the person enters a new zip code, which is then saved to the database.
For the last operation, I got the JavaScript working great on Firefox and I thought it was working in Internet Explorer. However, after some testing, I noticed that the same weather data was being returned, even after a new zip code on the opposite coast was selected. Mmmm, I was rather baffled, especially since I've been using this jQuery.get() on the other functions, and encountered no problems like this.
Read moreComments (0) | Posted in From the Workbench, Javascript by Ken Foubert
Sep. 6, 2007 at 4:45pm
Adventures in Database Migration Pt. I
Fie on commas! Fie!

SiteCrafting is in the process of phasing out some of our older servers, and as an added bonus, the clients hosted on those servers are getting a MySQL jumpstart, leapfrogging over 4.1 to go straight from 4.0.24 to 5.0.32. Tragically, it's not quite as simple as dump | import. This is what I get for bothering my bosses for a few weeks not long after coming aboard about how nice stored procedures, updatable views, and triggers could be.
"The wonderful thing about standards," a wiser person than me once said, "is that there are so many of them." That's not the whole of it, though. One good thing about standards is that there are certain features one can generally rely upon to work, translate, port, etc. Assuming one works within them, rather than taking advantage of loopholes allowed by their not-entirely-compliant-but-we're-getting-there-and-anyway-isn't-this-way- easier-and-faster software. When people don't (and I'm not entirely innocent here), you run the risk of turning your simple upgrade into a serious project when your favorite software decides it's time to comply a bit more.
Read moreComments (5) | Posted in MySQL, Web Hosting by Joe Izenman
Aug. 10, 2007 at 2:19pm
Long URLs create interesting wrap-effect in Firefox

In the process of trying to figure out what in the world was wrong with my stylesheet, I went to W3 to validate it (and, although it is irrelevant to this post, I found my problem in a typo. Isn't it always a typo?) Since I am lazy about these kinds of things, I did the validation by direct input rather than finding and uploading the actual file, and something entirely odd happened: the URL bar contained something that looked like a solid black mess. After one forced shutdown due to being worried that something had gone wrong, I copied and pasted the content of the bar into a text document and lo and behold! It was the URL (a 34 000 word one, no less, due to the direct-input validation's method of incorporating all the CSS into the URL) and because of its length, it had wrapped over itself.
Read moreComments (0) | Posted in CSS, Deep Thoughts, Odds 'n Ends by Anna Bjork
Aug. 9, 2007 at 4:14pm
Getting the Client’s IP Address
There are a number of reasons why you may want to capture a web user's IP address. You may want to only allow certain IP addresses to view your website, to allow only one vote per IP address, track unique clicks on links and buttons, a location of web users on Google Maps using MASHUP, and whatever else you can think of.
Below are a couple of examples to get the client's IP address in PHP and ASP.net, along with a couple of things to watch for.
Read moreComments (0) | Posted in ASP.NET 2.0, Coding Techniques, From the Workbench, PHP by Ken Foubert
Aug. 7, 2007 at 8:03pm
Answer: Adaptability, Belief, Connectedness, Ideation, Activator
Question: What are my strengths?

So I mentioned earlier that I was reading the book Now Discover Your Strengths, and I have discovered mine, or at least mine as are determined by a 30 minute profile. What's strange is I never do well on these tests, I always find myself answering the questions the way I think they want me to and I wonder what that says about me...
Anyway, this is what my profile tells me. I am adaptable, have strong beliefs, believe everything is connected, thrive on coming up with ideas, and value action. My strengths are below:
Read moreComments (0) | Posted in Deep Thoughts by Brian Forth
Jul. 27, 2007 at 2:56pm
PHP Code in The Background Part 2
Passing Arguments To Command Line
The blog entry How To Run PHP Code In The Background discussed how to run a php file through the command line using php's exec() command. Recently, I needed to pass a querystring to the php file, but this is not possible through the command line. If you try to pass a querystring, the exec() command will fail.
Fortunately, after some googling, I came across a forum post that mentioned how the global array $_SERVER["argv"] can be used to get arguments being passed through php. I then followed the link on that page to Chapter 43. Using PHP from the command line on the php.net website. Under the user contributed notes, I found a nice little function for getting the arguments and placing them into an array, similar to $_GET, $_POST, and $_REQUEST.
Read more
Comments (0) | Posted in From the Workbench, PHP by Ken Foubert
Jul. 23, 2007 at 5:29pm
ASP.net 2.0 Gridview vs. Custom Coding
A balance of needs and time
I recently decided to try the Gridview control in asp.net 2.0. I read some documentation and decided that it would be very easy to implement. I started by following a step-by-step tutorial on creating a table using the Gridview control, which uses the SqlDataSource control. This step-by-step tutorial included details on how to add paging, column sorting, updating a record, and deleting a record. The tutorial can be found here.
I was actually excited when I got this to work and how easy it was to do. It would only take a few minutes to create a simple, paged, sortable table where a user can delete and update records right on the page. Please note that simple is the operative word here.
Read more
Comments (2) | Posted in ASP.NET 2.0, Coding Techniques, From the Workbench by Ken Foubert
Jul. 19, 2007 at 12:03pm
One iPhone = Web Apps to Go!
Feeding the Hype

OK, so I promised myself that I would wait until the second generation iPhone so I could let them work out the bugs and lower the price. Then I played with one and realized I had to retire my RAZR for one of these. Aesthetically, it is a knock out, but I can assure you it's beauty is way more than skin deep.
I have a hectic life, kids, business, and homebrew. All add up to a lot of demands and juggling. I've tried organizational tricks, Palm Pilot, Windows CE, Blackberry, and nothing, I mean nothing is even close to this. I'll stop gushing so that I can give you some practical examples.
Comments (5) | Posted in Testimonials by Brian Forth
Jul. 17, 2007 at 8:06pm
What I'm Reading
So, some people are interested in what others are reading at the current moment. So I thought I'd give you a view into the sorts of things that I focus on when I'm not working on conquering the web universe.
The fact is, I am always looking for new books and new things to learn. I recently finished a book that was recommended by a client called Indomitable Spirit by Chuck Ferguson which calls itself "The essential guidebook for a lifelong journey of leadership and the rewards of meeting them".
Read moreComments (1) | Posted in Critiques, Deep Thoughts, Testimonials by Brian Forth
Jun. 20, 2007 at 9:56am
Our clients on the road

With all the different companies and organizations we work with, I'm bound to run into them in the "real world". Seeing people around is one thing. Seeing ads is another pretty common one. Lately, however, the signs of our clients I've been seeing are mobile ones.
Read more
Comments (0) | Posted in Getting Out, Horn Tooting by Kevin Freitas
Jun. 14, 2007 at 5:26pm
The Usual [browser] Suspects

My search for the perfect web app testing environment yielded what I though would be a pretty ingenious setup. Stack up a couple Mac Mini's with a KVM and we could cover everything from XP to Vista and IE 6 to 7. The perfect solution, however, ended up being one Mini cheaper.
Read more
Comments (6) | Posted in Odds 'n Ends by Kevin Freitas
Jun. 13, 2007 at 11:49am
SiteCrafting'er burns it up at Hell's Kitchen

SiteCrafting'er Joe and his band This Shirt Is Pants had a gig last Friday here in Tacoma at Hell's Kitchen. A gaggle of co-workers and friends showed up and had a great time playing some pool and listening to the band.
Read moreComments (0) | Posted in Getting Out by Kevin Freitas
Jun. 4, 2007 at 11:31am
ASP.NET 2.0 Tips - Shared Functions
Visual Basic for ASP.NET 2.0
When developing a recent project for ASP.NET, there was a need to migrate a large number of generic functions that were created in PHP into the .net web project. For .net 1.0, you were able to add a code page that could be used for creating a bunch of functions. However, in .net 2.0, you still had the ability to add a code page, but it had to be a class. This meant placing all of our migrated functions as methods inside a class. To use a generic function, such as generateNewPassword(), you would have to first create a new object for the class and then call the method. Read more
Comments (0) | Posted in ASP.NET 2.0, Coding Techniques, From the Workbench by Ken Foubert
May. 24, 2007 at 5:32pm
Exceptional Service Personified
Why Les Schwab will never go out of business
I know, I know. We all know how great Les Schwab is (which is ultimately the point of this entry). Where else do you pull into a parking lot and have a guy (or girl) throw their tools down and sprint to your car to see how they can help you?
Before I begin, I should set the stage. I get home from work Wednesday, and my wife tells me that the check tire pressure light is still on in the car. I've been "solving" this problem by continually adding air to the tire - not a great long term solution, I'll admit. It's kinda like adding water to a lake with a leaking dam. Anyway, we are scheduled for a vacation tomorrow that involves driving, so I decide it's better to take care of it for real at this point.
Read more
Comments (3) | Posted in Deep Thoughts, Testimonials by Brian Forth
May. 14, 2007 at 8:02am
Centering Content with CSS
It's been quiet on the SiteCrafting blog lately, mostly because we've been very busy making websites for out great clients. I've been swamped for the last two weeks with one project, and I know Kevin, Ken, Reena, and... well, everyone has a full load.
My latest few projects have all been sites that have a defined content width, say 850px, but centered in the browser window. The usual way to accomplish centering with CSS is to make the margins of the content to automatically adjust to the window (margin: 0 auto;). Usually, that happens on the specific areas, so if you have three content areas to center, you either need a container for all of those areas, or set margins three times. The first option has problems with backgrounds, and the second results in more code than is needed.
Read moreComments (2) | Posted in CSS by Dave Poole
Apr. 18, 2007 at 1:08pm
PHP PEAR and include_path
When attempting to use the SMTP library from PEAR for a project, I was having problems with including the file. I kept getting a file stream error for this code:
require 'Net/SMTP.php';I figured the problem had to be related to the include_path setting in the configuration file.
Comments (0) | Posted in Coding Techniques, From the Workbench, PHP by Ken Foubert
Apr. 13, 2007 at 2:19pm
How To Run PHP Code In The Background
PHP Asynchronous Programming
If you have php code that would take longer than 5 minutes to run, what would you do?
You could update the configuration file for apache, or whatever web server you're running, to increase the amount of time a script page is allowed to run and then use php's ini_set("max_execution_time", seconds) to increase the amount of time php will allow a script to run.
Or you could use a session variable to mark the last position of the script and then use meta-refresh to start the script at the last position.
Or you could try an asynchronous call by using php's exec command.
Read more
Comments (9) | Posted in From the Workbench, Odds 'n Ends, PHP by Ken Foubert
Apr. 9, 2007 at 4:36pm
Printing without the Dialog
One day, one of our clients came to us with a very unusual request - they wanted to be able to print something directly from the browser, but without displaying the usual print dialog box. I don't have much time in the webdev business, but I've never heard of this kind of request, and neither had anyone else in the office.
Read more
Comments (0) | Posted in From the Workbench, Javascript, Odds 'n Ends, PHP by Dave Poole
Apr. 2, 2007 at 2:36pm
PHP cURL and SSL Connection Timeout
I've been working on a web site that uses cURL for request/response transactions and I was encountering a number of problems with empty responses from the server. This caused some frustrations, since these empty responses caused entire sections of a web page to be empty, especially on searches. Well, I couldn't have that, since people using the website would be confused on why a search for an item only worked occasionally. Trust in the web application would drop dramatically. Read more
Comments (2) | Posted in From the Workbench, PHP by Ken Foubert
Mar. 28, 2007 at 3:24pm
Back in the USSR
It's not a huge secret that I'm a rugby fan. There's a mystique about the rugby culture here in America. It's a lesser known sport in the US, and so when one rugby fan bumps into another fan, as they are prone to do, they usually spend a few moments swooning over the fact that someone else likes their sport. Just last night, I was out at JazzBones in my All Blacks jersey, and someone who I'd never met before started talking about rubgy with me. It was fantastic.
Read more
Comments (0) | Posted in Odds 'n Ends by Dave Poole
Mar. 20, 2007 at 4:55pm
Character Set Troubleshooting
Over the past few weeks, Reena has been building a new website off and on for a local Jesuit parish. Everything was going along smoothly until we hit a bump in the road when dealing with a particular page with some Vietnamese text. After some small (but not obvious) changes in configuration and more research than I cared to do on the subject of character sets, it's all working properly.
Read moreComments (1) | Posted in PHP by Mike Ash
Mar. 16, 2007 at 10:48am
Safari and PNG Headaches
I just finished coding a new photography contest application for a client, and our graphic designer alerted me to some weirdness that Safari has with PNG images. To make a long story quite short, Safari doesn't translate PNG colors to match CSS colors reliably; it darkens them just a bit. The details are beyond me, so instead check out this article for those, and you can see an example in this image. The example labeled "Your Version" is the Safari rendering, and the box labeled "Our Version" is the Firefox rendering.
For you, this means that you shouldn't use PNG images where color matching is important, use GIF instead. However, if PNG use becomes more widespread, hopefully the treatment of PNG images by browsers and OSs will become more standard and can replace GIFs - which have fewer colors and larger filesizes.
Comments (4) | Posted in Browser Bugs, CSS, Design by Dave Poole
Mar. 12, 2007 at 10:27am
Cleaner forms through collapsible textareas
More form, less space
Some really large forms can be a bit of an eyesore especially to the people filling them out. One thing that always bothered me was how bulbous most textareas had to be just to make enough room for a user to feel they could type what they needed. So I set out to figure a good way to clean up my forms a bit while still allowing the multi-line input of textareas.
Read moreComments (3) | Posted in Coding Techniques, CSS, XHTML by Kevin Freitas
Feb. 28, 2007 at 1:25pm
PHP Strings - Gotcha!
Yesterday I was working with a script that saves an uploaded image to a database. If you've ever seen a binary file as a string, there's a ton of gobbelty-gook that is unreadable to people. For some very odd and inexplicible reason, my script only saved the first four character's worth of data to the database, and that's not very helpful. I did some digging, and revealed a weird gotcha in the way PHP treats strings.
Read more
Comments (0) | Posted in Coding Techniques, PHP by Dave Poole
Feb. 20, 2007 at 2:53pm
Optimizing GROUP BY with Multiple LEFT JOINS
Creative use of temporary tables
At SiteCrafting, I enjoy working with a large number of different projects, each with their own requirements, technology, and problems to be solved, unfortunately, I sometimes forget about past solutions, until after I have finished writing a piece of code. Such is the case with a query that was eating up some serious processing time.
The problem was with a GROUP BY query with LEFT JOINs to several other tables and summing up totals from those joined tables. This query was taking about 4 minutes 45 seconds to run, and worse yet, it was affecting searches which had nothing to do with that query, and probably also eating up precious memory and cpu resources.
Read moreComments (0) | Posted in From the Workbench, MySQL, PHP by Ken Foubert
Feb. 16, 2007 at 11:02am
A little thought goes a long way
Why it's important to listen

Here at SiteCrafting, we are quite busy with new projects. As such, we have realized that additional staff is necessary to meet the demands for our services. With the addition of new staff members comes the need for more furniture. We also decided that this would be a great time to rearrange the office, and create 3-4 person "pods" for team collaborative purposes. So, we headed off to the furniture store that supplied us with our current desks and chairs, hoping to place an order for 14 new tables.
Read moreComments (0) | Posted in Critiques, Deep Thoughts by Mark Neidlinger
Feb. 15, 2007 at 4:15pm
Design is Not Art
and neither is your website
When I was back in school, I would often tell people how my combined Art and Computer Science majors did not mean that I was doing graphic design, web design, or any other kind of mix of computers and art. To them, it was obvious that I would combine two usually separate majors into the usual combination. To me, however, art and computer science are totally separate. The purpose of art is in my mind to either 1) evoke an emotional response in your viewer or 2) create something beautiful. Computers are a communication medium, and the purpose of communication is to deliver information.
You can see examples of this every day - in websites of art schools that are impossible to divine information out of, or in strictly information websites that have no graphical content whatsoever. In the case of these two ideas, the graphic-less sites win out in function and usability, but the art school sites look better. The problem is, that the art school sites are impossible to use, and so it doesn't matter how good they look. The clear winner here is the plain, yet content centric site. And the lesson to learn is that content is king, and communicating that information well and effectively is the key to building a good website.
Read more
Comments (4) | Posted in Critiques, Deep Thoughts, Design by Dave Poole
Feb. 2, 2007 at 10:53am
Query conservationist
The fewer the queries the better
I always enjoy trying to do my work creating web applications using the fewest number of database queries possible. It's kind of a pride thing, I guess. That and I suppose it makes to improve an app's performance and reduce the load on a server. If you're into that kind of thing. ;)
A technique I use subtitutes the temptation of using queries whose results call queries and instead uses only two.
Read moreComments (3) | Posted in Coding Techniques, MySQL, PHP by Kevin Freitas
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.
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. 19, 2007 at 4:52pm
Emulating Form POST in PHP
There's small choice in rotten apples.
Recently, I had a need to POST a form, using PHP script, to a remote url. As I started to research a solution, I soon realized there were very few limited options.
Read moreComments (4) | Posted in Coding Techniques, From the Workbench, PHP by Ken Foubert
Jan. 19, 2007 at 10:03am
Prototype Documentation
Finally...
One of the most popular javascript libraries, Prototype, has finally released a decent set of documentation. I'm really pleased, because it was a little difficult to work with not knowing what was available, and how to use all the tools.
Their website is very simple and easy to use, and will quickly become one of my most visited sites. If you haven't used Prototype, I highly reccomend taking a look at its features. It makes javascript development very fast and simple, even for complex problems. I've used it to great success. I don't know how it matches up with some other javascript libraries yet, but I'm planning on reviewing all of them.
Comments (2) | Posted in Critiques, Javascript by Dave Poole
Jan. 18, 2007 at 12:03pm
Email newsletters in Outlook 2007

One thing that we frequently build in conjunction with new websites is a tool for sending out email newsletters. For the most part, we stick to XHTML/CSS and try to stay away from using "old" layout techniques (i.e. tables) for the newsletters. This allows the greatest flexibility between the large number of email clients (e.g. Outlook, AOL, Yahoo!, Eudora, Thunderbird, Pine, etc.). Businesses love being able to quickly communicate with their customers, and email newsletters are a great way to do this. But things are changing, and if you use HTML newsletters, you'll need to make some changes too.
Read moreComments (0) | Posted in CSS, Marketing, XHTML by Mike Ash
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 moreComments (2) | Posted in Deep Thoughts, Odds 'n Ends, Software Engineering by Reena Hensley
Jan. 11, 2007 at 9:35am
Flexibility in foul weather

I'm working from home today mostly because Ma Nature dumped about six inches of snow on my house. In an area where an inch will shut down the city, this is a bit more serious. It really pays, however, to have a flexible employer so I don't have to brave the hills around town. The beauty of the web and digital communication is that it allows for these kinds of opportunities whether the weather, saving some fossil fuels, or even emergencies are concerned.
Read moreComments (0) | Posted in Deep Thoughts, Odds 'n Ends by Kevin Freitas
Jan. 10, 2007 at 10:22am
The Dependability Challenge
Striving to be Exceptional
The gauntlet has been thrown down. We can't hide now...we must be exceptional.
While it is nice that we were recently recognized for dependabilty, I see it as more of a challenge. A challenge for us to do more, perform better, and have more satisfied customers.
Read more
Comments (2) | Posted in Awards / Recognition, Deep Thoughts, Odds 'n Ends by Brian Forth
Jan. 8, 2007 at 2:44pm
Let me know you care
One of my biggest soapboxes is the communication soapbox. Everyone has had times when communication broke down, and something went horribly wrong as a result. I don't mind saying I've had more than a few, but each time I took the effort to figure out why the breakdown occurrred so that I can fix it in the future.
One of the biggest, most beneficial means of communication is meeting with people face to face. There is mountains of data, information, and communication that goes on with facial gestures alone, and body language and tone of voice are equally important. Unfortunately working in a consulting agency, I don't get to meet many of the people that I'm building software for.
As a result, I have to fall back on more technical, yet less personal means of communication such as phone calls, email, and instant messaging. Here's some tips I've compiled about effectively communicating with out seeing the person you're talking to.
Read more
Comments (3) | Posted in Deep Thoughts by Dave Poole
Jan. 4, 2007 at 3:35pm
Why the Best Advertising Just Might Be Free
or how you too can find a reliable professional who doesn't advertise
Last month, I was doing some major work on a house when I ran into a problem I couldn't handle. I needed a plumber, so I did what a lot of people do -- I turned to the nearest telephone directory. At the top of the PLUMBING section, I saw the name AAA++ Plumbing*, and promptly skipped right over it. (More about why I did that later). Read more
Comments (2) | Posted in Deep Thoughts, Marketing, Odds 'n Ends by Scott Nelson
Dec. 18, 2006 at 10:37am
The Right People For Your Job

I'm in a band. Well, two of them, but only one that matters for this discussion. I've noticed that the progression of a musical group that wants to be professional on some scale in many ways closely mirrors that of any product-based business. You start out spending a certain amount of time in development. You come up with ideas, assemble the best team available to execute those ideas, and then do your level best to refine and perfect your product before you release it to the public.
Read moreComments (1) | Posted in Deep Thoughts, Marketing by Joe Izenman
Dec. 15, 2006 at 3:15pm
Service in the storm
With all the storm-induced power problems in the Puget Sound area a few of us were able to make it into the office today. The area is a patch work of service availability -- I know of houses with power and phone but no internet access, some with no power but the phones work, and yet others with power but no phones. A stroke of service my co-worker Ken displayed today was brilliant in its simplicity but it probably meant the world to one of our clients.
Read moreComments (0) | Posted in Deep Thoughts, Horn Tooting, Odds 'n Ends by Kevin Freitas
Dec. 13, 2006 at 4:12pm
The <select> Tag and innerHTML
While I was working on a recent project, I ran into a weird bug with IE 6. I was using some AJAX to dynamically fill a <select> tag with options depending on what element was selected from the tag's parent. It worked fine, and quite seamlessly in Firefox, but broke for inexplicable reasons in IE. Read more
Comments (6) | Posted in Browser Bugs, Javascript, PHP by Dave Poole
Dec. 11, 2006 at 4:36pm
Names 1, IDs 0

I never enjoy finding quirks in something so seemingly simple when I'm coding but it certainly happens. The following is a tale of how I ran into trouble with a couple attributes that should be worlds apart.
Read moreComments (1) | Posted in Coding Techniques, Javascript by Kevin Freitas
Dec. 7, 2006 at 11:36am
How My New Car Can Help Your Website
I just got a new car - a Volvo 240 Wagon. I can't wait to take it on a road trip. This is the first time I've gotten my own car, and so I've been dealing with all the licensing, emissions, and insurance paperwork that goes along with buying a car. I've learned two important things from buying the car, and I want to share. Read more
Comments (3) | Posted in Critiques, Testimonials by Dave Poole
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 moreComments (1) | Posted in Coding Techniques, PHP, Software Engineering by Dave Poole
Nov. 30, 2006 at 9:52am
Going Old School
As with most people with an email account, I receive a fair amount of spam each day. Most of it is caught by our spam filters and sent to Never-Never-Land where I won't see it. One piece of spam managed to sneak its way through last week that was just too good to ignore. With all the advancements in technology to filter out spam, how do you get your message out to thousands of email accounts? You go old school.
Read moreComments (1) | Posted in Critiques by Mike Ash
Nov. 29, 2006 at 10:35am
Going to Boise
Do you know why you have a website?
Got up at 3:11 to drive through the ice to Sea-Tac for an early flight to Boise, Idaho. I was asked to present to the Idaho Pest Control Environmental Care Association at their annual conference on the need or non-need of a website for their businesses. The group was welcoming, the bagels fresh and the coffee warm. I think the presentation a success.
Now I'm off to the Boise Airport for my return trip to Seattle. As promised to the group...the pdf of the presentation and a copy of the handout.
Comments (0) | Posted in Deep Thoughts, Getting Out by Brian Forth
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 9:12pm
Master of Your Domain
Take control from domain slammers and scammers
It begins with a letter or maybe even an "invoice". It ends with the transfer of your domain to another registrar and in some cases even the loss of your domain entirely. The term for this is Domain Slamming.
The practice preys upon unsuspecting people who want to pay their bills and keep their domain names current. After all, we have our domain name printed on every invoice, business cards, painted on our trucks, and we advertise with Google Adwords, we don't want our domain to expire. This is exactly what they count on.
Read more
Comments (2) | Posted in Security, Web Hosting by Brian Forth
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 moreComments (0) | Posted in Deep Thoughts, Design, Software Engineering, Testimonials by Dave Poole
Nov. 8, 2006 at 1:36pm
The Joys of Object Oriented PHP
It's pretty common for PHP developers to make complex and difficult to maintain scripts, and I am no exception. I write my code in two distinctly different ways: scripts that do a whole bunch of things depending on input, and classes that do a bunch of things depending on how they are called, but from lots of different scripts. But which is better?
It's a nice ego boost for any prrogrammer to know they created a script/function/class that is really useful, and well designed, but at some point the code stops being well designed, and becomes gross. I think that point is when you have one script that displays an entire (SQL) table of data, views a particular row, edits that row, can delete that row, or can add new row to the table.
If my Software Engineering professor sees me doing that, I imagine that he'll reevalute my grade in his class.
Read more
Comments (2) | Posted in Coding Techniques, Critiques, PHP by Dave Poole
Nov. 3, 2006 at 10:51am
How To Full-Text Search
Inspired by Joe's MySQL Cross Table Content Search
Here's a quick how-to on implementing Full-Text Searching using Microsoft SQL Server 2005. Originally, I planned on just using LIKE statements in the WHERE clause of an sql query, however, this would not be possible since, as I posted earlier in MS SQL Server 2005 text and ntext, that string functions do not work on text and ntext data types.
That's when I remembered Joe's blog entry about Cross Table Content Search, which he also mentioned in the office a couple of times before his entry. After that, I've been wanting to implement the Cross Table Content Search, and did not get the opportunity until developing the search page for the Pierce County Library.
Read more
Comments (0) | Posted in ASP.NET 2.0, From the Workbench, MS SQL Server by Ken Foubert
Nov. 2, 2006 at 1:45pm
Easy to Use Web Tools
Teach them to fish.

Give a man a fish he eats for a day, teach a man to fish he eats for a lifetime. - Chinese Proverb
As a flyfisherman, I can say this proverb does not mean a lot to me. I've been taught, but rarely catch fish, and those I do catch, I release. However, this entry is not so much about fishing or learning to fish, it is about sharing knowledge and giving customers tools for success.
Read more
Comments (1) | Posted in Deep Thoughts by Brian Forth
Nov. 2, 2006 at 10:21am
The Web is not a Field of Dreams.
How to succeed on the Web by really, really trying
With apologies to the fine classic baseball movie…We can build it, but it doesn't mean "they" will come! I was having a conversation about this with a few people from SiteCrafting, who asked that I contribute my thoughts to the Blog.
Read more
Comments (1) | Posted in Deep Thoughts, Marketing by Scott Nelson
Nov. 1, 2006 at 9:16am
Bulletproof HTML Critique
I ran across a neat article from Sitepoint via Stylegala that you all should read on how to make your HTML 'perfect'. In the world of design, the concept of perfect is non-existant. There is no solution that will work for solving every problem, and there are exceptions to every rule. This article is no different. Read the full article, and then check out my comments.
Read more
Comments (3) | Posted in Critiques, CSS, Design, Javascript, XHTML by Dave Poole
Oct. 30, 2006 at 1:04pm
Why We Build Our Stuff from Scratch
It's never the same twice.
I had an interesting conversation with a potential client last Friday and it prompted me to think or at least explain our development rational. He was looking to hire SiteCrafting to assemble a robust application for his client consisting of a design he came up with as well as some "open-source" technologies, and a few custom scripts generated by us. Long and the short of it...it seemed a disaster in the making.
I mentioned to him that SiteCrafting builds our Web applications from the ground up, for each customer as an individual. We do not offer one-size fits all solutions, because just like anything one-size fits all it never fits anyone quite right.
Read more
Comments (1) | Posted in Deep Thoughts, From the Workbench, Horn Tooting by Brian Forth
Oct. 27, 2006 at 11:34am
Cross Table Content Search
One of the more interesting adventures working with data storage is trying to aggregate information meaningfully from multiple very different data structures. Imagine you've got a website filled with content (say, a few hundred pages). All the content is stored and output dynamically - who wants to create and maintain 500 static html pages, anyway? And of course, you need a bit of variety, so all this content is spread across five different page designs, each requiring its own template and data structure.
Now you say you want to search your site? All the content? And you want the results all together in one big happy sorted-by-relevancy list? How on earth am I going to do that?
Well... like this.
Read more
Comments (0) | Posted in MySQL, PHP by Joe Izenman
Oct. 27, 2006 at 11:25am
MS SQL Server 2005 text and ntext
text, ntext, and image data types have been deprecated
How I discovered that text, ntext, and image data types have been deprecated and replaced by varchar(max), ntext(max), and varbinary(max).
Recently, I needed to perform a query to update a number of links for the Pierce Count Library website. I thought I could use a simple REPLACE() string function, unfortunately, this turned out not to be the case. In order to update text and ntext datatypes using a query you're limited to a few functions, in my case I would be forced to use SUBSTRING() or UPDATETEXT().
Read moreComments (1) | Posted in ASP.NET 2.0, Coding Techniques, From the Workbench, MS SQL Server by Ken Foubert
Oct. 24, 2006 at 9:41am
Group By Queries for MS SQL Server
Applying MySQL Wizardry to MS SQL Server
Back in the day, we worked on developing a specialty application that was basically a lead generation system with a database that stored over 200,000 records, with a potential for a lot more. The web application displayed numerous reports that calculated totals from disparate sources. We discovered that once our client began adding all their data that those reports were running slower and slower and slower.
The problem was that we had one primary query to pull the records out, then, as the code looped through each record, several other queries were needed to calculate the disparate totals. That resulted in numerous database calls that slowed the entire web application. That's when Mike discovered MySQL Wizardry, that used the SUM(IF()) and the GROUP BY clause, problem solved.
Read more
Comments (4) | Posted in Coding Techniques, MS SQL Server, MySQL by Ken Foubert
Oct. 23, 2006 at 10:50am
Firefox 2.0
Mozilla releases new browser when it's good and ready.
Hot on the heels of the Internet Explorer 7 release, Mozilla Firefox 2.0 is slated for official release tomorrow, but, as often happens, they have posted the full release version up on the mirrors already, so you can find what you're looking for at ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0
Read moreComments (2) | Posted in Critiques by Joe Izenman
Oct. 20, 2006 at 9:17am
What Customer Service Should be Like
I recently received a gift certificate to a popular online merchant, aka Company. I'm not telling who Company is, because I like them, and I don't want my comments to be taken the wrong way. The entire thing was a fiasco, but I ended up with a nice warm and fuzzy feeling, simply because the merchant actually cared about my experience.
Here's the important parts:
- If something goes wrong, tell the customer why
- Never have an action with out a success or error message
- If you can reasonably accomodate the customer's request, do so
- Respect your customer's schedule
- If the customer isn't happy, ask them why
Comments (2) | Posted in Critiques, Testimonials by Dave Poole
Oct. 18, 2006 at 10:57pm
IE 7 Out and About
Seems like the cat's out of the bag. Well, IE 7 is now available for download, anyway. Good to see Microsoft update their browser software after five years away from the party. Can't say I'm personally looking forward to this install but even if the only thing better about IE 7 is PNG support, I'm all for it.
Download IE 7 and let us know what you think! You can be sure we'll be doing extensive client testing and will post our thoughts as they solidify.
Comments (4) | Posted in Critiques by Kevin Freitas
Oct. 18, 2006 at 10:46am
Navigation Nightmare pt. 1
Something no developer wants to see...
foreach ($left_elements AS $le) {
?>
<table class="leftnav_<?=$le['class']?>">
<tr>
<td class="leftnav_<?=$le['class']?>">
<a href="<?=$le['target']?>" class="<?=$le['theme']?>"><?=$le['name']?></a>
</td>
</tr>
</table>
<?
}
Nobody wants to see that. Especially not seven different times with seven tiny variants covering seven different if conditions.
Each higher 'class' number is a deeper indentation. Apparently it's necessary for this class identification to be repeated for the table, table cell and link. Converting this to a nested list format (part of my current task) is going to be an adventure.
Well... at least it's indented nicely.
Comments (3) | Posted in Coding Techniques, CSS, XHTML by Joe Izenman
Oct. 17, 2006 at 11:33am
Smart Keyword Searching
Earlier this week the brand new Pierce County Library website officially launched. It was a pretty complex build that took a lot of effort between ourselves and the library's staff to make sure that everything worked right for the site's users. One of the more important features on any website with a large amount of content is a solid search function, and this site was no different. With over 300 pages (and still growing), a user could easily have some difficulty tracking down the information that they are looking for. So what can you do to make finding information easier? Read more
Comments (2) | Posted in Coding Techniques, From the Workbench by Mike Ash
Oct. 16, 2006 at 12:57pm
File Extensions
I've been using a fairly complicated function to grab the extension of an uploaded file. I have run across many instances where I have wanted to split up the file name from the file extension, or just find the file type. Since MIME types are not reliable enough for grabbing a true extension, I have been using this aforementioned function.
Read more
Comments (5) | Posted in Coding Techniques, PHP by Mark Neidlinger
Oct. 13, 2006 at 4:56pm
Into the Nested Table Abyss
At least it's clean code!
While I was taking some time to evaluate a 3rd-party application for a customer I took a peak at their site's HTML. I was pretty shocked when I found some very strictly organized code that contained gobs of nested tables. At one count I found a structure that was 10 tables deep! I suppose since enjoying creating clean mark-up and mostly table-less designs for the last few years I've forgotten my roots.
Read more
Comments (2) | Posted in Coding Techniques, CSS, XHTML by Kevin Freitas
Oct. 13, 2006 at 10:59am
A Piece of Query Cake
Making Inserts Sucks
If you've ever created SQL queries with PHP, you probably know what a pain it can be to create insert and update statements. I really, really (really) don't like it. As I was working on my personal site, and exploring possible frameworks to use, I came across CodeIgniter. They have a great database interaction library, especially the function for creating the insert queries.
Today, armed with only the descriptions of CodeIgniter's query helper functions, I spent 20 minutes trying to duplicate some the effect of the insert and update functions. I've never seen the code, or even used it, but I didn't have to see the code to write a similar function. Both functions take a table name and an associative array of column names and values. The update function also requires a WHERE statement, and it can't be blank. This is different from CodeIgniter, and that's so you don't accidentally reset all of the passwords in the mysql users table, or any table for that matter. And then, *poof*, the function gives you a nice sql statement.
I'll never have to write another "INSERT blah blah blah" again. Yay!
Read more
Comments (2) | Posted in Coding Techniques, MySQL, PHP by Dave Poole
Oct. 12, 2006 at 11:13pm
Using What We Build
AKA Avoiding Lines at the Health Department
It's not often that I use the stuff we build. It's not that I don't support the businesses we do business with, it's more that I spend so much time online thinking of how we build things for our customers that I don't generally get a chance to actually use the websites we build in the way a customer would.
Read more
Comments (0) | Posted in From the Workbench by Brian Forth
Oct. 11, 2006 at 7:29pm
The Three 'M'-igos
Why butter fingers break apps
Happens all the time, right? One minute you're cranking out line after line of quality code then the next it all comes to a screeching halt for no apparent reason. I immediately go into troubleshooting mode. A quick and simple redirect using a header("Location: ...") function should pose no danger of messing up my app -- but today it did.
Read more
Comments (3) | Posted in Coding Techniques, PHP by Kevin Freitas
Oct. 11, 2006 at 12:24pm
Welcome to Our Blog!
Welcome, and thanks for coming to the long-anticipated Blah Blah Blog! What you're going to find here is a rare peek behind the curtain at the inner workings of a leading Website and Web Application Development company. Our aim is to make this Blog different than the billions of other Blogs you could be reading. So start by expecting the unexpected.
For starters, we won't be afraid to reveal secrets or point out how we've learned from our mistakes. The main focus will be technology – but we'll also include proprietary Web tips & tricks, relevant business news, stories from the workbench, and more. Use the navigation on the right to get around, and check back regularly. Your category choices will grow as we add posts. And you never know what you'll find from day to day.
Comments (0) | Posted in Horn Tooting, Odds 'n Ends by Scott Nelson
Oct. 9, 2006 at 11:31am
Strange Behavior with Opera 9 and Safari
While I was working on the latest site for Airstream, I came on some extremely weird behavior concerning the navigation. First off, the designers did an extremely good job with the visuals. On the other hand, I had to be really creative to figure out how to make various parts of the site work.
Here's some background for how the navigation was supposed to work: there are five sections to the site, and each section has sub sections that show up in the navigation bar, depending on what your current location is. Navigation and sub-navigation. Also, the navigation area has a graphical background that can't change. Since the PNG spec isn't fully supported by IE yet, we had to go with GIF or JPG graphics.
Here's what it is supposed to look like (and what we ended up with):
Read more
Comments (0) | Posted in Browser Bugs, CSS by Dave Poole
Oct. 9, 2006 at 9:51am
Baby Congrats Lunch and Bowling
Hey bowler, bowler!

So last Friday was a great afternoon. After visiting our customer Primo Grill for a celebration lunch, we proceeded to Chalet Bowl for a couple games of bowling.
It was good to get out of the office for a bit to celebrate the upcoming birth of Hiromi's baby (no, we don't know if it is a boy or a girl yet, but will soon). We all pitched in and purchased a Baby Bjorn and a baby wipe warmer. Kevin claims that a happy baby is a baby with warm wipes. Speaking from experience, I'm not so sure. Sometimes nothing, not even promises of hundred dollar bills will silence a crying newborn.
We had a fantastic time, complete with an out of body bowling experience by SiteCrafting's own David Poole. Dave's penchant for turkeys (three strikes in a row) allowed our team to coast to victory in both games.
To view more pics, have a look at Kevin's blog
Comments (0) | Posted in Getting Out by Brian Forth