7 Types of Development Articles that Set Kittens on Fire
Everyday, I attempt to read 20 or 30 web development articles, usually via dzone, del.icio.us, and the drupal planet. Its a perverse and masochistic ritual. The articles I scan leave me with a dreadful sense of emptiness -- and a longing for a different career. On the otherhand, it tends to make my development work seem exciting by contrast.
I've identified 7 types of development articles that set kittens on fire. (Disclaimer: I acknowledge my own perverted abuse of blog entries that sets kittens on fire.)
1. The Ultimate List of 83 Untested Plugins, Techniques, or Tools
If I want a huge list of plugins that may or may not work, I can always go to the jquery plugin, or drupal module page and try them myself. Those pages are more useful to me since I can at least see when the last update to them was made. If you inflict such lists on the world, realize we are unimpressed that you can copy and paste interesting sounding plugins, and rewrite a description or two.
If you'd rather offer something useful to your readers, only list plugins you've actually worked with. Simply making sure they "work" isn't really helpful. Copying and pasting them and telling the world to use them is just evil.
NOTE: Smashing Magazine actually reviews the stuff they list, so don't think I'm talking about them.
2. Agile Methodology That Works
Whatever, chief. Unless you're article is titled: "how developers can get clients, senior management, and all powers greater than themselves to accommodate agile development " , I don't care.
Guide to PHP 5 Design Patterns
Stumbled on a really awesome overview of object oriented programming for PHP 5. If you're looking to get out of the php 4 mindset, this is a good place to start.
Drupal Tough Love
Drupal Tough Love is a new site by The Notorious C.H.X. , and Morbus Iff. Want to become a better drupal developer? Get ready for some tough love:
"We all make mistakes; that's how we learn. Sometimes, though, we need someone to point out our mistakes...
And if you don't learn, than Curly on the left will show you some really tough love.
Drupal Tough Love: I'll be watching you like a hawk.
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
I. Our API is Only as Powerful as the Developer's Knowledge of It -- When I developer first starts poking around the hood of drupal, they'll probably be totally unaware of how hook_menu works, what the formapi is, how our template engine overrides, etc... If they took the time to read up on all the documentation, they'd probably become a drupal convert. Unfortunately, developers are lazy, and prone to thinking anything they don't totally understand is "crap".
II. Developers Hold a Deeply Held Believe that *their* tool is the best -- Converting a Rails developer into a drupal developer is about as easy as converting a Muslim to Judaism. Ever tried to convince a Rails developer that drupal's modularity gave it a huge advantage for building complex applications that would have to grow over time? Yeah, I stopped 3 years ago too...
Oh, btw, RoR sux. lrn2theme. Drupal FTW!
III. Developers Often Don't Form Opinions From Experience -- Most developers like to sound smart. So when in doubt, they naturally look to the opinion of someone else who they think is smart. Making matters worse, developers have a tendency to think people they agree with are the smartest.
IV. Anti-PHP snobbery. The snob factor is huge. PHP's reputation among the elite opinion leaders in the development community is about as good as most people's opinion of communism. Making matters more difficult, PHP5 took care of most of their gripes, but nevertheless, they continue to quack the same anti-php song, and that hurts drupal.
V. Drupal Doesn't Speed Up Development for Developers Who Aren't Drupal Ninjas -- Learning drupal takes a lot of time. If time is short, and developers aren't familiar with the APIs, even I'd recommend against Drupal.
Drupal 6 AHAH forms: The easy way
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.
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.
I. CSS is not Java.
This java-style of CSS does not make the code easier to read:
#rule1
{
margin:0px;
}It just adds an unnecessary space. Below is the correct way, which is consistent with core CSS.
#rule1 {
margin:0px;
padding:1em;
}II. Two selectors = Two lines.
While the following code is more compact, it's also more difficult to scan.
#rule1, #rule2 {
margin:0px;
padding:1em;
}The right way is separate lines.
#rule1,
#rule2 {
margin:0px;
padding:1em;
}This small rule can make a big difference in complex themes (ever tried to debug some old civicspace themes?).
III. Single Line Rules
Single line rules are acceptable when there is only one selector and one property.
a {text-decoration:none;}
pre {font-size:1em;}Can you think of any others? Disagree?
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
*Pretend I actually have a Texan accent when you read that.
Quote of the Day: Is Drupal Enterprise Ready?
If Windows is enterprise ready, than any piece of software is.
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.
Making matters worse, the scripts didn’t offer much of an API, or interface for data mining – rather they provided a rigid, and worthless example – leaving their hapless users to mutilate whatever useful lines they could find, and create an even more horrid fraken-script.*
GOD OFFERED SIMPLEXML, AND IT WAS GOOD
It didn’t take me long to realize that PHP 5’s simpleXML was the answer. And indeed, after an hour of practice, simpleXML turned me into a scraping Ninja.
Below, is a very simple example [for drupal 6] that parses the drupal planet blogroll, and makes this neat little table out of it. Hopefully, you’ll find this method as easy, and useful as I did.
*Disclosure: I am not among the sadistic few that think Perl’s regular expressions are the greatest invention since sex. So you call simpleXML a crutch, and I’ll call you sick.


Recent comments
1 day 7 hours ago
1 day 21 hours ago
1 day 22 hours ago
2 days 15 hours ago
1 week 16 hours ago
1 week 2 days ago
1 week 2 days ago
1 week 2 days ago
1 week 5 days ago
1 week 5 days ago