Archive for November, 2007

Coding Languages, a developer’s new girlfriend

Thursday, November 29th, 2007

Why all this fascination with Ruby on Rails?

The success of 37signals...these guys have built some cool stuff in very small teams.

But in general I believe that a lot of the coding developers (as opposed to user interface developers such as myself) like trying new languages like some men like trying fresh girlfriends.

Each time a new language comes along they think this might be the one.

For those of us just trying to produce working applications efficiently for clients, switching languages is a waste of time and money.

i.e. we will switch but only if the incentives are enormous or our current technology has badly dated.

Many developers are choosing to remain in PHP. CakePHP is PHP's answer to the Rails framework on Ruby.

Dominican developer Kevin Lloyd has written a succinct list of the reasons to choose CakePHP over RoR:

  1. laziness
  2. speed
  3. shared host support
  4. cost

The big debate about Ruby on Rails versus PHP was set off by Alex Payne of Twitter's complaint about the speed of RoR in an interview:

All the convenience methods and syntactical sugar that makes Rails such a pleasure for coders ends up being absolutely punishing, performance-wise....there shouldn’t be doubt in anybody’s mind at this point that Ruby itself is slow. It’s great that people are hard at work on faster implementations of the language, but right now, it’s tough. If you’re looking to deploy a big web application and you’re language-agnostic, realize that the same operation in Ruby will take less time in Python. All of us working on Twitter are big Ruby fans, but I think it’s worth being frank that this isn’t one of those relativistic language issues. Ruby is slow.

Kevin adds:

I don’t do Web Development for my health or for fun. I design web applications for clients. A lot of my work involves redesign of already existing sites. How do I say to a client: Hey, although your current web host that you’ve prepaid a year for is sufficient for 90% or the stuff you can throw at it, I’m using this new technology and you need to shell out some more $$$ for a host that can handle it.

That's our situation as well. We love web development but it is a means to an end. User interface, front end, user convenience. Of course reliability and security are very important to us as well, but that is more a question of coding practice than coding language.

WordPress | 3 comments

PHP Speed and Security: The Code Optimization Phase

Wednesday, November 7th, 2007

We've been having quite a few issues with speed and server load, something which we'd never had to worry about in the past. We've been building more and more web apps and fewer and fewer simple websites.

We are also facing mod security restrictions on our webhost. Cartika (no longer recommended) are strapped down pretty tightly, but that makes sense. They also let us know right away if a website of ours is facing security attacks or if it is being scraped every day.

Apparently not all PHP is created equal and it is time to batten down the hatches.

Once we get to functionality we will have to put a full-fledged optimisation phase in the development cycle: the Code Optimization Phase.

In that phase we will specifically target PHP speed and security (as functionality will already be completely in place).

I will start by asking all Foliovision developers to read the article 40 Tips for optimizing your php Code. The top twenty or so are below.

WordPress | 5 comments

Firefox Quickfind: Hard to Type an Apostrophe

Tuesday, November 6th, 2007

Firefox has a great search feature based on Command-F (Mac) or Control-F (Windows).

You get a cute little text box at the bottom of the screen which allows you to search the whole page.

Firefox Find
Firefox Find - Command-F

Subsequently Command-G works just fine to take you down through the page.

Just ' (apostrophe) alone will bring up the Quick Find box. It looks almost the same but isn't. Quick Find only searches URLs (a nice extra almost undocumented feature).

IT | 76 comments

Great Handy Tool for Escaping HTML

Monday, November 5th, 2007

For this weblog, I am often obliged to escape HTML, i.e. so that you can read my HTML examples like this one:

<h3>WEB AND SEARCH SERVICES</h3> <ul> <li><a href="http://google.ca">Canadian Google</a>: http://google.ca</li> <li><a href="http://siteexplorer.search.yahoo.com/">Yahoo siteexplorer</a>: http://siteexplorer.search.yahoo.com/</li> <li><a href="http://ipinfo.info/netrenderer/">IE Preview</a>: http://ipinfo.info/netrenderer/</li> <li><a href="http://dan.hersam.com/tools/escape-html.html">Escape HTML brackets</a></li> </ul>

From here it's just a matter of copy and paste.

It's reall pain to do by hand, but Dan Hersam's escape HTML tool makes it a piece of cake. Normally I do it with BBEdit (actually with a plugin called TextSoap, but the function is easily created in BBEdit itself). But this looks simpler and is a lot more portable. Highly recommended. There for all Foliovision staff as well.

WordPress | 2 comments

AdWords Expanded Broad Match: How to Combat Google’s Cash Grab

Monday, November 5th, 2007

Switch to Phrase and Exact Match and Bring Down Your Cost Per Click and Cost Per Sale

Yesterday, I got an email from my acquaintance Andrew Goodman over at PageZero (author of the excellent Winning Results with Google AdWords Winning Results with Google AdWords) discussing issues with broad match in Google PPC management.

In August one of my clients had a horrible surprise (well we both did) where PPC costs skyrocketed - almost tripling for one week, with only about a 25% improvement in leads.

I got on it right away and called Google. The Google AdWords representative told me that thanks to our great quality score we'd qualified for "expanded broad match". Although Google says that they are against get rich quick schemes and fake sweepstakes in AdWords, this move is straight out of that shady playbook.

Sure, we'd "qualified". Qualified to pay three times as much for just a fraction more business.

"So how do we turn it off?" I asked.

"You can't," she answered.

Internet Marketing | 15 comments