Always Get Better

Never stop looking for ways to improve

November 4th, 2011

Hopefully when you do web work, you’re not developing code on the same server your users are accessing. Most organizations have at least some kind of separation for their development and production code, but it’s possible to go far further. Separating environments allows you to achieve multiple threads of continuous integration for all kinds of cool.

These normally break down as follows:

Development
Working code copy. Changes made by developers are deployed here so integration and features can be tested. This environment is rapidly updated and contains the most recent version of the application.

Quality Assurance (QA)
Not all companies will have this. Environment for quality assurance; this provides a less frequently changed version of the application which testers can perform checks against. This allows reporting on a common revision so developers know whether particular issues found by testers has already been corrected in the development code.

Staging/Release Candidate
This is the release candidate, and this environment is normally a mirror of the production environment. The staging area contains the “next” version of the application and is used for final stress testing and client/manager approvals before going live.

Production
This is the currently released version of the application, accessible to the client/end users. This version preferably does not change except for during scheduled releases. There may be differences in the production environment but generally it should be the same as the staging environment.

Having separation between the different environments is not tricky, but managing your data environment can be. There are, of course, all kinds of ways to solve the problem.

October 3rd, 2011

Today Adobe announced its acquisition of Typekit, a web font hosting service that allows designers to use any typeface with their sites rather than relying on standard “safe” font families.

This is an interesting development. Adobe’s Flash player already supports proprietary fonts, which suggests that the company is looking at alternate technologies for its future development. Obviously Flash will remain relevant for more time to come, but as competitors increasingly jump onto the HTML5 bandwagon, Adobe is wise to increase its arsenal of standards-compliant technology.

April 10th, 2011

It’s hard not to love memcache. As soon as you manage a web site that has more than a few concurrent visitors, the performance benefit of caching becomes immediately obvious. MySQL is a fast database and can outperform a lot of its competitors, but no matter how quickly it can pull results it can never outperform the retrieval speed of the server’s RAM.

The basic premise is: instead of pulling a model out of the database, see if it has already been loaded into memory by checking a key-value diction (for example: User5677). If the user has not been read from the database yet, the key-value store will be empty and we can fetch the record. Next time we need that data we check the key-value again and avoid querying the database.

This really saves us whenever we have data that changes infrequently. Take, for example, an ecommerce website: since the products and categories on the site will change very rarely, it makes a lot of sense to store them in memory for fast recovery. Even more volatile information (like user data) can be stored in the cache, as long as the application knows to empty that cache key when the data gets changed.

Memcache is an ideal tool for managing these kinds of caches, and provides a lot of flexibility for growth.

History Lesson
Earlier this week I promised to go deeper into memcache’s origins. Memcache was originally developed at Danga as a way to reduce the database load and improve the speed of LiveJournal.

Rather than developing a standalone server application, Danga’s engineers designed memcache to sit on lower-end hardware and on web servers where it would use a small amount of the overal memory. Memcache instances don’t talk to each other: the client machines are aware of all the memcache instances and attempt to write their information evenly to each. This allows memcache to scale almost limitlessly without adding significant overhead to the caching process.

When to Use
Quite simply: if you’re building an application for the LAMP stack, build in memcache support. When treated as a necessary component from the beginning, caching support adds almost zero overhead to development; however it will always pay off as soon as real world traffic is coming to your site.

November 13th, 2009

At last, remote desktop has a practical use!

If you are working on a web design and need to see how it will look on Mac, your only choice up until now has been to buy a low-end Mac. That’s an expensive proposition for occasional use. If you’re a web designer by trade you are probably already using a Mac anyway, but for the rest of us there is finally a better choice.

Head on over to BrowsrCamp – for a pittance ($3 gets you 2 days of access) you get to control a machine running OS X.

You can use VNC to connect to the server; if you don’t have or can’t install VNC, BrowsrCamp offers a web interface so you can access the machine directly from your browser.

It’s such a simple, wonderfully executed concept that should be in any programmer’s bag of tricks.

November 10th, 2009

It seems like correcting Seth Godin is a favourite pastime enjoyed by folks online. Sorry to break from the group, but I happen to think he is a deep well of relevant information.

This week he brought up the idea of upsides versus downsides – how much effort do businesses put into minimizing their downside versus the time they put into offering the best user experience?

One of the primary examples from the post is that of a hospital spending a huge amount of time doing paperwork to prevent litigation and prevent people from getting worse when their primary goal (and reason for existing) should be improving the lives of the patients coming through their doors.

The hospital example was interesting and timely because in “real life” the Jewish General Hospital recently came out and said it has been able to improve patient care (upside) by reducing errors (downside) through its new(ish) full disclosure policy. This ties in nicely with Seth’s article because it proves that it is possible for even large organizations to let go of the status quo and achieve new levels of excellence.

In the case of the Jewish General Hospital, it seems paradoxical but by admitting and dealing with errors, the hospital is actually less likely to be sued and face costly litigation. In essence, they have found a way to improve patient care, cut costs, and foster an open corporate culture. Way to go!

October 11th, 2009

If you’re fortunate enough to be using a dual-screen setup (I suggest that everyone should be using dual screens), check out these 45 wallpapers from the constantly amazing Six Revisions.
Birth of the Moon

April 13th, 2009
European Flag
Creative Commons License photo credit: rockcohen

The EU wants to stop Microsoft from bundling Internet Explorer with its operating system. In today’s day and age, how does this make sense? The charge is led by Opera, who claims that having Internet Explorer ship with Windows unfairly limits competitors from getting through to customers.

Any web designer will tell you that Internet Explorer is one of the most challenging browsers to target since it basically ignores web standards and renders web pages in its own proprietary way. So the design pattern we follow is:

1. Design web site using sane browsers
2. Mutilate our markup so it renders as desired on Internet Explorer

Apologies for the digression, but the point is there is a lot of work needed to make web sites work properly for one web browser. Why do it? Depending on the site, up to 65% of your visitors will be using some version of Internet Explorer – not because it is any “better” but simply because they don’t know about alternatives or haven’t taken the time to try them. Likewise for Safari among Apple users – most people don’t customize their computing experience and simply deal with their default settings.

In that regard, Opera’s proposal makes sense – force vendors to include 3rd party browsers along with Internet Explorer on new machines. But… which browsers should be included? Firefox, Opera, Safari, Netscape? What about the dozens (hundreds?) of others? Who chooses which ones are “mainstream” enough to be included?

The biggest problem I have with this is that Microsoft has done nothing to prevet users from switching web browsers. If you’re a regular reader of this blog, your first move upon booting a new PC is to download Firefox/Chrome and ditch Internet Explorer (that’s one of the main advantages I get from targeting a technical audience).

Suiong Microsoft is not the answer – we need to work on the unwashed masses and teach people to make their own/better choices when it comes to their web browsing experience. While we’re at it, perhaps we can all learn to keep our systems patched as well…