Performance Is Green

Posted: August 31, 2010 In / 2 Comments

49226298_da8ecc7ad6_m.jpgAre you writing and using environmentally friendly software? Have you ever thought of the impact on the environment for the software you've written? Working in front of a computer it can be easy to overlook the impact on the environment due to what were creating. It's not like drinking a beverage out of a styrofoam cup (they don't break down). But, there is an impact. As Internet usage grows in leaps and bounds we need to start taking a closer look at that impact and doing something about it.

Why Performance Is Green

Why did Facebook start using Hip-Hop? According to their blog,

With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead.

When we have less servers we use less power, we need less space in buildings, less servers need to be built for our tasks and our overall footprint is smaller.

Think about it like this. We buy energy efficient appliances, we talk about turning lights off when we aren't using them, we look at energy efficient cars, and we think about being environmentally conscious. So, why not extend this to what powers our websites. Read more »

Accessing Libraries, Whether In Drupal or Elsewhere

Posted: June 10, 2010 In / 4 Comments

One of the assumptions regularly made is that libraries, like getid3 or Zend, live within the Drupal directory structure. The popular pattern is to put them in the libraries directory alongside the modules and themes directories. This is very limited both in workflow and accessibility to libraries. What if a developer wants to have a library in the PHP include path so multiple sites, not all of which are Drupal, can share it? What if someone wants to use Pear to manage that library? Let's take a look at a quick pattern for providing for a wide variety of possible locations for libraries. Read more »

Safari Reader: An Example Of An Accessibility Failure

Posted: June 9, 2010 In / 5 Comments

The recent release of Safari 5 brought with it the reader, a new feature designed to simplify articles and posts for users to read. Many modern web pages are cluttered with other images, ads (that pay the bills), and elements that distract from the main piece of content. The reader jumps in to help us with that by simplifying the page and focusing us on the content.

The idea of focusing us is not new. Many applications provide a full screen mode that blocks out the rest of the desktop. WYSIWYG editors, like CKEditor, include an option to take it full screen. The clears out the other clutter and lets you write without being distracted.

The problem is the new reader is not accessible because you can barely see the links. Read more »

Installing and Using The Zend Framework Via Pear

Posted: June 8, 2010 In / 3 Comments

pear.pngWhen I use the same library or framework on many sites being able to manage and reuse the code for it across the different projects and tinkerings makes development that much faster and easier. Instead of dealing with the code management I can work with using the code. This is the case when I use the Zend Framework. So, instead of downloading and installing it each time I use it I installed it one time and use it everywhere with PearRead more »

The Time To Embrace PHP 5.3 Is Here

Posted: June 3, 2010 In / 11 Comments

PHP-logo.pngI am amazed at the number of Drupal modules that do not work under PHP 5.3. Until recently it had been acceptable to write code that didn't work in PHP 5.3. There was a small market share and the initial release of 5.3 had some bugs that made it worthwhile to rely on PHP 5.2. But, with the upcoming release of Drupal 7, which requires at a minimum PHP 5.2, and with PHP 5.3 starting to ship on some of the popular linux versions it's time to make sure Drupal sites run under 5.3 without any problems. Read more »

Debugging in Drupal 7

Posted: June 1, 2010 In / 6 Comments

I can't count the number of times I've seen print_r or var_export used while debugging code within Drupal. For those who use the devel module I see regular use of the dsm and dpm functions. In Drupal 7 this all changes for the better with the introduction of the debug function. Read more »

3 Tips For Using External Libraries With Drupal

Posted: May 17, 2010 In

There are more and more cases to use external libraries with Drupal. They may be jQuery plugins, CSS libraries, or PHP libraries already providing some form or function we want to use. But, so often we can't include then on drupal.org because of policy issues or there may be multiple modules wanting to use the same libraries which can cause collisions. Here are 3 tips for easily working with outside libraries. Read more »

The New Way To Generate Hashes In Drupal 7

Posted: May 13, 2010 In / 6 Comments

When we write Drupal modules generating hashes is a common task. They are usually generated as a md5 hash. Because of some new regulations for a large group of Drupal users it's time to migrate away from md5 to the SHA-2 family of hashes. Drupal 7 core has already migrated away from md5 and it's time for contrib modules to follow. Read more »

Why H.264 Has Won And What It Will Take To Change

Posted: May 10, 2010 In

H.264 has become the dominant codec for video on the Internet, according to recent data. It has won the browser race with IE9, Safari, and Chrome throwing their weight behind it. The lone major browser hold out is Firefox. H.264 is a proprietary codec and Mozilla is putting their weight behind Theora, an open codec.

There are a lot of people who want to switch to an open codec. Beyond the fact that H.264 is proprietary, the free use for end users on the Internet is only set to run until December 31, 2015 (This could change). But, changing to something other than H.264 is not a simple task. It is not as easy as deciding on a new codec and then having software make updates. Let's take a look why. Read more »

Architect Using Diagrams

Posted: April 29, 2010 In / 6 Comments

If you can't describe a system with simple diagrams the system is flawed. I've seen diagrams for cars, military vehicles, computer chips, and other very complex systems. Block and flow diagrams that simplify and explain in just the right amount of detail. Yet, when it comes to software applications, even complex ones, I am finding diagrams difficult to find. To make matters worse, when some systems that were architected in code do have diagrams put to them you find the picture is not so pretty.

theme-layer.pdf (page 2 of 4)

One of the best techniques I've learned for architecting a system is to start with diagrams. Read more »