Top 5 Reasons Developers Don't Use Drupal

Jeff Whatcott ponders why Drupal isn't dominating the job postings for social app PHP developers.  He guesses the main problem is lack of awareness and understanding of drupal among the greater developer community. With this line of thinking, the obvious fix would be outreach and education. Personally, I'm skeptical that the developers who choose systems other than drupal do so because of lack knowledge, or awareness. I think its something far less rational

Drupal 6 AHAH forms: Making New Fields Work

Today, I was working with drupal 6's AHAH form elements. Initially, I was delighted at how well they worked. That delight turned to confusion once I realized that the form elements I had put in the menu callback of the #ahah['path'] was missing its name attribute. After doing a bit of research in how the poll module handled the formapi voodoo, I created a generalized function to aid in building AHAH callbacks. If there is a better way to do this, I wasn't able to find it. <?php

Drupal CSS Coding Standards

On the #drupal IRC channel, Excallibur points out that there are no coding standards for CSS. I'd like to propose some straightforward ones.

Note that I am not intentionally omitting indentation within rules, but am having trouble with my code filter.

The Keyboard: Perhaps this Contraption Might be of Use to Drupal

Imagine this: you are viewing a node, and hit alt-e. That keystroke brings up a node edit form. Or instead of dragging blocks, taxonomy terms, and menu items, you merely hit the "down" key. I wonder, may this strange device called a "keyboard" be of use to us? Well, regardless, there's a freestanding jquery plugin that's done most of the work already. The question is: are the Drupalites FOR or AGAINST the keyboard?*

See Mike Hostetler's keynav plugin for jQuery

With Obama, History Repeats itself

The phrase "history repeats itself" deserves a place of prominence in the book of cliches. Like most cliches, it describes a big idea, but leaves out a crucial detail. The truth is that history repeats itself, but the effects are magnified at every iteration. Another way you could put it, is that "each time, it costs more and more." But clearly, these effects could be good, bad or neutral.

The phrase certainly rings true with the rise of Barack Obama. Consider this New York Times Article from over 3 years ago.

Stupid Simple Web Scraping with SimpleXML


The other day, I was tasked with building a data scraper. Having never built such a contraption, I naturally turned to the Internets for preexisting code. I was horrified with what I found.

The “free” PHP scripts (that’s “free” as in “free baby vomit”) were all infested with the worst sorts of newfangled regex, and PHP 4 era DOM traversing.

Super Tuesday

"Leaked" exit polls suggest Obama will have a very good night. Not quite celebrating yet, as the last 8 years have conditioned me to expect heartbreak everytime I feel a glimmer of hope in the political arena. Who knows, though: maybe the exit polls are right, and there might be a glimmer of hope for the USA. Or, perhaps the democrats will do what they've always done, and shoot themselves in the foot by nominating HRC. Lord knows the Dems do nothing better than sabotage theirselves. THey are perhaps the only party in the world that could lose even THIS presidential election.

WWYUIGD? Two Guidelines for Writing Hell's Best CSS

WWYUIGD (What would Yahoo User Interface Grids Do?)  is defined as two things:

  1. Exaggerating a good idea to such ridiculous proportions that it becomes a bad idea.
  2. The duel guidelines that anyone can use to write hell's best CSS

Guideline One: Meaningless numbers are great

The .yui-t(x) set of classes offer powerful control over sidebar widths, and positions. Indeed, so powerful that the classes themselves offer neither clue, nor an understandable pattern. 

  1. .yui-t1: 160 on left
  2. .yui-t2: 180 on left
  3. .yui-t3: 300 on left
  4. .yui-t4: 180 on right
  5. .yui-t5: 240 on right
  6. .yui-t6: 300 on right
  7. .yui-t7: One full width column 

If Yahoo was full of sissies, they would have made this system semi easy to remember by using this pattern:

Enabling/Installing New Modules via Update.php: The Complete Solution

In our last episode of enabling new modules via update.php, Steve McKenzie pointed me to a better method: module_enable(). A quick test found, however, that it didn't run the install files, and didn't rebuild the module files cache. So after spending 5 minutes in system.module, I found all the missing pieces. The example update function below will install and enable the new module, as well as rebuild all the css, node type, and menu caches.


Subscribe to Nick Lewis: The Blog RSS