Recent Blog Posts
Blogs ยป Archive for January, 2005
Mixing friends and business
Catching up on old questions/posts. One good one had to do with how to handle friends who become clients to make sure friendship stays solid and yet have the client relationship remain businesslike. This issue applies with business partners (e.g. one of my business partners is a long-time friend; another is a cousin), vendors, etc.
For me, the issue is clear:
Be explicit about when you are being a friend/family member and when you are being a business partner/client/vendor. Avoid mixing the two by being explicit:
“I’m your friend, but right now I’m talking to you as your web designer….”
There is a great saying I read on a bus in Kenya, posted by the bus driver (in a country where family ties and friendships run deep):
You are my friend, yes.
You are my cousin, yes.
But in my business, I do not know you.
Procedural PHP leads to slower apps
After reading OOP and Performance, Christopher Thompson rightly called my bluff (see the comments), triggering further discussion and forcing me to think harder.
In “OOP and Performance” I wasn’t trying to say anything absolute but rather describe a general hunch I’ve got. Although I singled out two personal examples, where the effect can, and was, written off as implementation detail, the hunch actually comes from general impressions and memories of trawling the source code of Open Source PHP apps, over the years, where they were written primarily with procedural code. And it’s not to say there aren’t any dog-slow OO apps out there - there most definately are.
Anyway, rather than waffle on further, I’m going to stick my neck out and say procedural PHP leads to slower apps (so I can get it chopped off ;)). The reason I’m feeling confident is that I think I’ve got a challenge which will help make things self-evident. Side note to any Perl / Python / whatever programmers - to an extent think this is specific to PHP, where a script itself does not define a separate variable scope and where classes are the only clean way to build abstractions.
So here goes. …
Revisiting Tidy
I was in a situation recently where I was working remotely with none of my own equipment and had to edit a rather lengthy article supplied in Microsoft Word HTML.
While Word is easily considered one of the best in the word processing field, the majority agree it aboslutely stinks as an HTML generator. Being required to post this article in as standards-compliant format as possible, I strained at the the thought of manually removing several hundred lines worth of code.
Tidy comes to the rescue! Many of us may have used Tidy individually in the beginning — however it and variations on its function have now been built into so many web development tools we take code cleanup for granted.
I was quickly able to drop the HTML source from the article in question into Tidy and output pristine HTML — saving time and reminding me why I like to keep it simple. Tidy is an excellent example of the KISS theory and why it works for many open source software solutions - keep it simple, focus on a niche and do what you do well.
I happen to keep Mac Tidy, managed by Terry Teague, around on my own …
OOP and Performance
Object oriented programming, compared to procedural is typically seen as a trade off: increased “developer performance” through better modularity / re-use vs. slower processing, based on the extra runtime lookup overhead objects introduce (compared to the equivalent collection of functions + variables).
Search Google for “php oop” and this is the first result, which is fairly well balanced but comes to the safe conclusion;
the next time you are developing PHP code, you should consider whether you want faster execution times / less CPU load, or easier to maintain code
The argument is based on benchmarking code. What it ignores though is the human aspect of writing code and that’s where a side-effect of OOP can result in improved performance.
Bearing in mind I’m talking only in a general sense, I think the tendency with procedural code is to use “brute force” - the actual meaning and behaviour of the logic being masked by the spaghetti. If what the code was actually doing was transparent to the developer, they might see some of the “blinding” inefficiencies they’ve introduced.
By way of anecdote, a while back I was asked to help with a statistical analysis tool, written in PHP, that performed calculations on a …
Shopping Carts and Madness
I stumbled across a really useful article by Barbara Chaparro covering the ‘Top Ten Mistakes of Shopping Cart Design‘ this morning.
The article was published more than three years ago, but I think it’s still very much ‘on the money’.
I recommend reading the whole article, but to paraphrase her, the 10 biggest mistakes are:
- Calling a Shopping Cart anything but a Shopping Cart.
- Requiring users to click a “BUY” button to add an item to the shopping cart.
- Giving little to no visual feedback that an item has been added to the cart.
- Forcing the user to view the Shopping Cart every time an item is placed there.
- Asking the user to buy other related items before adding an item to the cart.
- Requiring a user to REGISTER before adding an item to the cart.
- Requiring a user to change the quantity to zero to remove an item from the cart.
- Requiring written instructions to update the items in the cart.
- Requiring a user to scroll to find an Update cart button.
- Requiring a user to enter shipping, billing, and all personal information before knowing the final costs including shipping and tax.
Anyone familiar with Steve Krug’s work should certainly recognize some common themes there.
So, when shortly afterwards …
Apple Xserve - An Introduction
My latest column on the Apple Xserve is up. The Xserve has been a bright spot in Apple’s more recent enterprise movements since 2002.
In combination with the anticipated release of Tiger this year (the next iteration of OS X) the combo of hardware and software will certainly keep this solution on competitor radars.
With IBM firmly entrenched on the PowerPC architecture - more and more Linux and UNIX solutions are becoming mainstream on this platform. This will only give more edge to Apple and reduce resistance from potential adopter technicians.
Part Three: Equity vs. Cash
In the last blog (Part II: Equity vs. Cash), a reader who has given a start up reduced fees writes:
I’m in a situation now where the client has engaged me in a startup project at about 1/3 my normal rate. there have been other factors that contributed to my accepting half my rate, but those factors have started to diminish. I recently informed him that my rate would be increasing, and he replied with a message about passion and taking a risk and the project soon being very profitable - and promises of sharing in that profit. is there any acceptable way to demand a contractual share in that phantom profit, or to somehow insure that i will receive a share if/when his project becomes profitable? I can see myself being involved and getting the shaft once the $ rolls in.
Here is my response:
First, it is becoming apparent that many readers of Sitepoint are very generous people. Too many of you don’t seem to mind being the doormats of entrepreneurial ventures. Thank you for keeping capitalism going! Your passion and willingness to take risk (the same risk that the capitalist has shifted to you, so that he no longer has …
2005 - Hand me that grindstone!
After a ’sans-internet’ start to the year, I’ve spent most of the morning catching up.
As the latest ALA article was published just before Christmas, I suspect quite a few people may have missed it in the rush (if you’ve seen it, indulge me) but Daniel Frommelt has come up with a CSS method to allow you to float images between parallel text columns, with the text flowing around it.
This is a very old print layout trick but it actually looks surprisingly fresh in a browser setting IMHO.
On the down-side, the mark-up is just a little convoluted, and from what I’ve seen, it seems like it would be hard to automate the process for a CMS.

Still, this is the first attempt I’ve seen at ‘pull-outs’ like this, so this may not be the ultimate solution. A definite challenge for CSS gurus.
The other kind of.. interesting thing to catch the eye was the launch of
FireFoxIE . The site takes you through the process of making Firefox look and behave almost exactly like IE.
Although at first glance this seems a little like gaffer-taping a housebrick to your nokia to give it that ‘old …
Powerful Open Source Web Editor (IDE)
The emergence and now near dominance of sophisticated WYSIWYG editors has been a source of pleasure and pain for web designers and developers. Tools such as Macromedia Dreamweaver, Adobe GoLive and even Microsoft’s Front Page have saved countless hours utilizing templating and other automation functions.
One central part of the success of these editors has been the integrated development environment (IDE) that includes remote publishing, file and revision management, ties to other applications such as image editors and access to underlying source code.
There are pros and cons for each, and I must admit my own bias toward Dreamweaver, having used it since 1999 on Mac and Windows platforms. One of my main complaints has nothing to do with the editors other than I cannot run them on my primary Linux development workstation. That problem appears to be somewhat resolved courtesy of NVU.
NVU, built off of the Mozilla Composer’s source base, is a new open source solution that spans multiple operating systems (Windows, Macintosh and Linux) — however — its primary goal is a comprehensive IDE for Linux.
Funded by Linspire, the project is led by former AOL/Netscape developer Daniel Glazman and the IDE looks like an excellent starting point. …
Part II: Equity vs. Cash
http://www.sitepoint.com/blog-post-view.php?id=222721
Three addendums to above blog:
1. One reader asks whether to work for free on startups as a loan (cash paid later with interest), if the startup can pay. I’d suggest that you don’t work unless you know you are going to get paid — unless other factors are at work, like you want a chance to get a referral from a cool client, you want to do a really interesting project and increase your skills, etc. This is a basic part of qualifying prospects. Perrsonally, I never accept work unless I know I’ll get paid.
2. Options sound exciting, but are meaningless until you exercise them. You get no dividends or other shareholder benefits until you convert them to real shares of stock. Meanwhile, stock is very real and comes with dividends (a share of any cash/income distributed to shareholders). So don’t get too excited about options until they are “in the money” — that is, worth more than their exercise price — and until you have actually exercised them to get liquid or to become a real stockholder.
3. Think of taking stock/options as a lottery ticket. It is unlikely that one will pay off, but a portfolio of …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Download sample chapters of any of our popular books.




