Hell Opens Up New Exclusive Layer for Drupal Developers

(PRWeb) -- Last week, the Drupal Content Management System became the first opensource CMS to have its own layer of hell. Though many proprietary CMS's, most notably Vignette, have long had their own exclusive parts of hell, this was a first for open source.

Vincent Pendragoon, a spokesman for the Lucifer Ventures, described the new layer as a place for "Generally inexperienced, slothful, or overconfident developers who don't bother with things like APIs." When asked whether this meant hell would put a new emphasis on open source, Mr. Pendragoon replied, "Hell is merely acknowledging the amount of misery open source can inflict."

Hell's Global Marketing and Outreach team has prepared an FAQ for developer's interested in "visiting" Drupal's exclusive layer.

F.A.Q.

Q: What is drupal development hell?
A: Drupal development hell is very different from other layers of hell. Most of hell is fire and ice; vipers and black widows; chains and sharp hooks. Drupal development hell is a state of mind that results from certain configurations, and certain combinations of code.

Q: How much does it cost?
A: Your eternal soul.

Q: Do I have to know PHP, MySQL, or CSS to be damned to drupal development hell?
A: Of course not! All parts of hell are open to everyone, regardless of age, gender, race, nationality, or education. However, our survey data indicates that drupal development hell is mostly occupied by developers, designers, project managers, or clients.

Q: You sold me. How can I go to hell?
A: We thought you'd never ask. Souls are like snowflakes: no two are alike, and no two fall alike. Our marketing team has prepared a brochure for developers, project managers, designers, and clients.

A Roadmap to Drupal Development Hell

Top 10 Ways a Developer can Send a Drupal Project to Hell.

  1. Be liberal in hacking the core, and hacking contributed modules. Never take advantage of drupal's theme layer. For best results, make no attempt to understand how the database and the array of includes, modules, and themes works.
  2. Never search api.drupal.org for a function -- every smart person knows that there is not a single useful function in the entire api. Why use bug tested, fully integrated functions written by master programmers when you can write your own complex, one-time-one-use functions. For best results, actually -- don't use functions. And for god's sake, don't put them in a module.
  3. Never use the DRUPAL-4-7 tag when checking out drupal, or modules. CVS is where the new features are!
  4. Make an effort to fill up your tpl.php files with lots of scripting, sql queries, and javascript. Sure it would be easier to put that in a module, or the template.php file --but professionals should never be known for doing things the easy way.
  5. At no point should you listen to the code when it fights. When the code fights, it means you need to fight it harder -- preverably with ill-thought out workarounds, and deleting blocks of code in other modules.
  6. Challenge yourself -- use arbitrary names for functions, variables, css ID's and classes. One nice trick is to make different ID's, and variables use the same words, but differ in their use of underscores, dashes, capitialization, tenses, and plurality. For example, give a node the class "node-page", and wrap it in an ID "node-page", and use a switching body ID that is called "node_Pages".
  7. Why build blocks within a module when you can write PHP code directly in the block? I mean, who wants to develop in a text editor?
  8. Refuse to learn how the hook system works.
  9. Refuse to learn how the template.php file works
  10. Refuse to learn how the forms_api works.
  11. Bonus: use drupal 4.6

***

Most of the time, the journey to drupal hell is a team effort. Lets go over the two most common ways a team can go to hell:

The Classic Low-Budget Rollercoaster

The most common formula is a client with big requirements and small amounts of money, and a developer who needs the work at the time. This duo is bound for hell unless, a) the client is willing to scale back their requirements to fit their budget, b) the developer refuses to sign off on the initial set of requirements, and advises a more thrifty set of deliverables.

The Red Triangle

In general, larger projects are slightly less likely to send a team to hell. This is for no reason other than large projects tending to have one, or two competent people with experience in managing developers, or clients. Contrary to popular belief, the path to hell is not paved with code, but rather with bad chains of responsibility and communication.

The red triangle refers to a forumla we've developed that brings the greatest likelyhood of a large project going to hell. The idea of the red triangle is to ensure that the project manager is defacto non-existant. In the classic red triangle flow, the client, and designer directly order the developer, and the developer is given little to no leverage to refactor, or deny their requests. For best results, treat code and development as something like "witchcraft" -- like both witches, developers have magic powers; are not to be trusted; and often will pretend they can't do something because they are lazy. Our research has found that refusal to listen to warnings from developers is the quickest way to hell.

We've provided this visual aid to help you understand the dangers of project management. Red arrows denote our recommended "red triangle", while green arrows denote paths of communciation and responsibility which may prevent you from seeing hell.

visual aid

When a project goes to hell, the team will often give the developer full credit. Obviously, we disagree -- if the developer where the only one responsibile, than the entire team would not be in hell, would they? Even in cases where a developer's incompetence sends a project to hell, we feel that someone is responsibile for hiring an incompetent developer. The project manager is usually at fault in these cases. However, we also find that clients can often be given a great deal of credit, and get what they pay for. Regardless, we cannot reiterate this enough: good project managers are the single biggest block between your project and hell.

In projects that never make it to hell, the project manager should usually be the first to take the blame. At all costs, avoid project managers who:
a) understand the technical challenges, and best practices of drupal development,
b) are skilled at managing client expectations,
c) are skilled at managing overworked developers,
d) know how to ask developers questions that cut through b#llshit,
e) have a sense of humor

For more information, ask your Ouija board.

Comments

Thank god someone put this on the front page. Pure gold.

------------------------------
Alex Cochrane
Spoon Media

------------------------------
Alex Cochrane
Spoon | Pagebuild

Been wanting to go there, but never knew how to get there before. Thanks for writing such clear, detailed instructions, you devil you!

Awk, too true! It burns, it burns!!!

I suppose installation of this new layer is integrated with Fantastico De Luxe? ;)

- George @ Dynapres.nl

Lol. Great work putting this together.

I think someone should write a new(er) content voting application that is contained in the bluemarine theme. Then we could all vote this as one of the best articles on Drupal.org. Except, of course, that it wouldn't work and we would have to fill the rest of this page up with questions and complaints about the non-funcitoning voting module. This would lead to a huge flame war that would alienate lots of new Drupal users and take time away from the developers that do know what they are doing....

GREAT ARTICLE! We need more humor on this site. (biting satire too)

Todd
Vaules

Nick,

Fell off my chair laughing on this one. 5 thumbs up!

"Drupal and the Power of Categories (Taxonomy)"
http://digitalsolutions.ph/couchkamotereviews/power_drupal_categories

::::::
Drupal and the Power Taxonomy - View it

APIs are for sissies.

Great job with the relief. So you are saying I shouldn't hack the node.module to .......

A hack job is always around the corner, waiting to be invited in to trash a good concept.

for posting this. :-D hahaha

Ah yeah! Burn, baby, burn!

pretty darn funny! should be in the handbook under how to write a new module

Drupal-humor... it's a sign that our project of world-domination is progressing nicely.

Love the diagram. Great post!

------
Personal: Outlandish Josh

------
Personal: Outlandish Josh
Professional: Pantheon

"Hell hath no fury like a woman scorned." -The Mourning Bride, by William Congreve

Indeed. And especially if the developer is a woman, scorned. Hmm, I believe it also applies to a female project manager, scorned as well.

While the thesis about hell here plays on the Developer Hell concept, I can see a failure in communicating the contribution of Management Hell. You see, there is a very important English word that brings together "failure to notice something" and "supervision" - and that word is *oversight*.

Some husbands report that they were already living in hell when their domestic lives had been going through hard and rough times. They were already in hell and yet their wives shout to them to "Go to hell!". Then the house pets get confused, including the fish.

As you can see, almost everybody is actually having some kind of difficulty in hell and yet people still say that there's always "an easy way to hell". Where is that?! And yet in here, you tell us developers of having to follow 10 ways just to go to hell. It's just like rules. And I also suffer from difficulties in adhering to them ways and rules. The old adage is right - hell's just too darn hard.

You must have been a photo editor in a previous life. Where on Earth did you get the developer's photo??

In fact, the dev's photo is, to me, the funniest part about the entire article! Too funny!

The client looks...like a sharp businessman.
The designer/marketer looks...like a cool guy.
The project mgr looks...like a project mgr.
The developer looks...like he needs coffee & a donut!

(I hope it's not a pic of the author...if so, I'm laughing WITH him, and certainly not AT him!!! Hehehe...)

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

Is the project manager doing a crossword puzzle? Typical.

But as you can see, she's ready to answer the phone at a moments notice. Not to mention, when taking some clients calls, it might be good to have a crossword puzzle handy.

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
http://www.nicklewis.org

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
Personal: http://www.nicklewis.org
Work: http://www.chapterthree.com

I found all the photos using google's image search, and the right combo of keywords (which I've since now forgotten). I think the develper came up on something along the lines of "computer geek+nerd+drok". The designer came from something along "urban hipster+fashionista". I think it took about 30 minutes to find those 4 photos.

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
http://www.nicklewis.org

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
Personal: http://www.nicklewis.org
Work: http://www.chapterthree.com

love that post. and the pics. superb work.

Just a minor note..I was slightly preturbed at the comment about cramming as many snippets into your template files instead of installing a new module.

I'm so guilty on that front, I even started a large section of the handbook, based on that principle..i.e. "don't install an extra module to do something a snippet can do for you".

Would be keen to hear back on that point, as I'm working on a new theming book for Drupal that has whole chapters devoted to how to maximise template files.

Dub

Just a minor note..I was slightly preturbed at the comment about cramming as many snippets into your template files instead of installing a new module.

I'm so guilty on that front, I even started a large section of the handbook, based on that principle..i.e. "don't install an extra module to do something a snippet can do for you".

Would be keen to hear back on that point, as I'm working on a new theming book for Drupal that has whole chapters devoted to how to maximise template files.

Nothing (necesarily) wrong with using well written snippets. I'm pretty sure it was mainly the cramming them into your templates that Nick was advising against.

If you are going to use a lot (or any for that matter) of them though, a better approach is to create functions from them that return the snippet output. You can then group all these functions in a custom module or include file.

Then only use function calls in you templates or blocks or PHP nodes etc. It makes maintenance a lot easier, and with a bit of thought those functions can be reused in different parts of your site.

Also it means that the code you stick in blocks or nodes actually exists in a file rather than the DB - you can then edit it in a code syntax highlighting editor and version control it etc.

You could even split these functions into separate functions for the database or API logic (input) and the theme (output). The theme functions could then go in your theme(s) while the logic part lives in your custom module. That way you can theme these database queries or API calls differently and reuse the same logic across different sites/themes. Your favourite snippets then get turned into a common toolbox / function library.

Programmers have long recognised that separating code into various layers that each have different responsibilities will (if done right) make maintenance much easier. If you find yourself having lots of similar looking code in different places, its a sign you're doing something sub-optimally and you should look to group the common code into shared functions. Once the code is being reused properly, it makes future debugging and upgrading easier because there is less code to worry about and it all lives in a central spot.

It is precisely this layered separation approach that has made the Drupal codebase itself much cleaner and more flexible than most other CMS around.

I hope that was useful for everyone :)

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal

What he said. :-)

Here's my rules of thumb:
1. The number of node-foo.tpl.php files is directly proportional with the amount of times you will curse per hour while developing.
2. Use hook_form_alter() instead phptemplate_foo_form(). It makes debugging easier, and makes it easier for you to reuse the solutions you've developed. In addition, I've found that hook_form_alter affords superior freedom.
3. Whenever you see repeated lines of markup in a tpl.php file, kill them swiftly.
4. Build a utility module for your theme to handle logic, date functions, queries, or complex page elements.
5. Never start writing sql queries until you've searched both the modules and the API for an existing function.
6. long functions are always suspect. More of then than not they can be broken into smaller functions.
7. define constants whenever appropriate (e.g.

<?php
define
('YOURMODULE_PATH', drupal_get_path('module', 'yourmodule'));
?>

8. Seperate your theme functions from the module, e.g. (
<?php
include(YOURMODULE_PATH .'/yourmodule.theme');
?>

9. (iparaphrase of george orwell) Break any of these rules sooner than programing something outright barbarous.

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
http://www.nicklewis.org

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
Personal: http://www.nicklewis.org
Work: http://www.chapterthree.com

You still haven't change the paneling in your basement?

I like wood paneling in my basement. I also like it on my 1982 station waggon. I recently invested getting every wall of my house done in wood paneling. It looks great with the brown carpets, and my brownish indoor color scheme. I -- like the developer -- go for perrywinkles and purples for dress. I fel that my outer attire should contrast with my earthy interior.
--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
http://www.nicklewis.org

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
Personal: http://www.nicklewis.org
Work: http://www.chapterthree.com

Being a newbie... I understood only about 75% of what you said! But that's a big step from a month ago where I would have been completely confused!

With that said, I think it's impossible for me to go to Drupal Hell, because I tried to learn how things work before implementing them. Too bad... Drupal Hell sounds fun!

Kris
Latest project: www.cribfax.com

~~~~~~~~~~~~~~~~
Kris
Current projects: www.cribfax.com
www.myabatherapist.com

Man, thats the most hellarious thing I ever read on drupal.org :-D Having worked to death as a developer in a company that to make bad worse, went bankrupt - Its soo cool to find a roadmap to hell, we could need more people down here - shrieeeek!

If it was a hard application to build, it should be a hard application to support.

M

this was a great read. the message is too true.

I recently began using Drupal for the first time at the beginning of this summer to write a module for use on an internal site we have. I have been doing my best to learn the art of drupalizing my ideas and many of the things in this article are either items I decided out of common sense were/weren't the thing to do, or picked up after trying them and seeing how unwieldy it got! Excellent article from the humor point, and even better because it really does teach you a bit if you take time to wipe the milk off the screen after it squirted out your nose and read the article!
~Brian

~Brian

Great article. Hyper funny.

The developer reminded me of this guy that managed the accounting books and software at this other guy's office and that knew a few things about computers.

Whenever something broke they called him. So, he was fixing printers with paper jams, rebooting... may I say the word?... Windows stations and, of course, doing his accounting thing.

The last time I checked his master had ordered the poor fellow to create the company's website and he was "researching" a thing call Frontpage.

That dude doesn't need to go to hell, he's already there.

Alexis Bellido
Check out my Drupal site for teleworkers.

The developer reminds me of that guy from Office Space. You know who I mean. Like he's going to torch your office because you moved his cube to the basement.

Milton!
------------------------------
Alex Cochrane
Spoon Media

------------------------------
Alex Cochrane
Spoon | Pagebuild

"And I said, I don't care if they lay me off either, because I told, I told Bill that if they move my desk one more time, then, then I'm, I'm quitting, I'm going to quit. And, and I told Don too, because they've moved my desk four times already this year, and I used to be over by the window, and I could see the squirrels, and they were merry, but then, they switched from the Swingline to the Boston stapler, but I kept my Swingline stapler because it didn't bind up as much, and I kept the staples for the Swingline stapler and it's not okay because if they take my stapler then I'll set the building on fire...

- Milton Waddams, Office Space

Milton eats the worm... in a good way...

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
http://www.nicklewis.org

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
Personal: http://www.nicklewis.org
Work: http://www.chapterthree.com

God -- that picture reminds me of all these strange figures that hovered around me during my childhood... You know how sometimes you're talking to kids and they get that fixed jaw-open-eyes-directly-at-you look -- I swear that's them writing what you are doing to long term memory....

Anyways, I remember being about 9, and this programmer chump, named Robert, was in our office every once in a while... One time, while hanging out with my mom (she was the boss), I watched him... he started typing away at the commandline, and I pointed out to him -- "uh, why don't you use a mouse?"

He replied: "Mouses are for amateurs".

That moment has been burned into my memory ever since... I'm now paranoid of saying anything that might be construed as a modern day "a mouse is for amateurs" type statement...
[I'm 24 btw]
--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
http://www.nicklewis.org

--
"I'm not concerned about all hell breaking loose, but that a PART of hell will break loose... it'll be much harder to detect." - George Carlin
--
Personal: http://www.nicklewis.org
Work: http://www.chapterthree.com

Mice are vastly overused. They're useful things, but not a panacea. I like to have a mouse, but it's inefficient and I use it sparingly. 99.5% of the things people use a mouse for is superfluous.

Well, if you attach a little motor to the axle of the exercise wheels in their cages, you can use them to generate electricity. But you are correct in that you don’t want to over-use them for this purpose; their little hearts might go pitter-patter and explode… then you’ll be stuck in the dark with a dead mouse and no electricity!

I hate it when that happens.

The Ouija board knows more than an average designated-to-Drupal-hell developer.

All these spare developers in hell, and STILL people wonder where Microsoft's workforce is based!
-----------------------------------------------------------------
Michael O'Toole

Gay Youth :: South East - Chair & Operations Administrator

-----------------------------------------------------------------
Michael O'Toole

Gay Youth :: South East - Chair & Operations Administrator

My points

left out the coversheets for the new TPS reports... tut tut...

now where is my red stapler?

I recently began using Drupal for the first time at the beginning of this summer to write a module for use on an internal site we have. I have been doing my best to learn the art of drupalizing my ideas and many of the things in this article are either items I decided out of common sense were/weren't the thing to do, or picked up after trying them and seeing how unwieldy it got! Excellent article from the humor point, and even better because it really does teach you a bit if you take time to wipe the milk off the screen after it squirted out your nose and read the article!

---
My Drupal - Mahjong Game

How funny! I love it!

----------------
First attempt: http://www.easy-homemade-costumes.com

Waouh? I am fifty per cent agreeing with this post

http://www.webtiq.ci
DRUPAL is simply OOB, I mean Out Of the Box

You will most likely be damned forever if you mess up while using the wonderful functionality of node-access... eternal damnation and no way out is the way of the world when it comes to node-access!

To be honest, I think working with drupal is hell ;)

Could be much easier. I could solve all points for you listed on the "Why not OOP" page and give you thought on an easier way, but that would be making a new CMS...

Anyway, conclusion is: "Download/Install modules and do not customize them"

Superlyk!!!

I know this is old but it is hilarious, and the truth is usually stranger and funnier than fiction

Digital Catalyst
http://www.digcat.com

Haha yeah this is pretty good. Nice dig.

Jaypan
Our newest Drupal site: PacificAikido.com (Drupal showcase)