Koplowicz.comKoplowicz.com

  • nathan
  • gallery
Home › Blogs › koppie's blog

The Original Hacker

koppie — Wed, 08/11/2010 - 02:30

Sadly, there is no incentive any more to write clean code.  So it was with a special, old-school thrill that I had a "hacker moment" earlier today.

Fun fact: hackers were originally good guys.  Back when computers were new, programs had to be very small.  Anyone who has ever had to "insert Disk 2" knows what I'm talking about.  A "hacker" was an expert programmer who could take 10 lines of code and reduce them to 4.  Code was clean, simple, and efficient.  Programming languages were praised for doing complicated tasks with simple commands.

Now, hardware is almost unlimited, and as things start to move into the "cloud," hardware will become "virtually" unlimited.  The result is that programmers have gotten lazy.  "Bloatware" is a piece of software that is larger and slower than it needs to be.  Sadly, there is no incentive any more to write clean code.  So it was with a special, old-school thrill that I had a "hacker moment" earlier today.

My mother's got a new book coming out and it's already receiving rave reviews.  I want to put these reviews on her website, but I know she'll be getting more and I don't want it to become unwieldy.  I'm already using the Drupal Content Management System, so it's easy to create new content and play with it.  My first thought was to create custom content types using the Content Construction Kit (CCK), and display them in custom-made lists using the Views module, and maybe even blend them in with existing pages using the Panels module.  Then I realized that none of that was necessary; it would only add to bloat, slow the site down, and distract me from more important tasks.  Turns out the entire task can be done using Drupal's built-in functions:

  1. Create a new content type called "Review"
  2. Create a new taxonomy called "Books"
  3. Create a new Book type called "Dust Devil" (the name of her new book)

Now, when she gets a new review, I go to the "Create Review" page, put in the reviewing agency, the book being reviewed, and the review itself.  Drupal keeps this content separate thanks to content types and taxonomy.  All I have to do is add a link to the taxonomy term and voila: all the Dust Devil reviews, lined up in a row.  And when I add a new one, it's automatically added to the list.

If I wanted to, I could still use Views and Panels to do all sorts of fancy things with the content.  The capability is there.  But I accomplished the task using fewer and simpler tools, and it works just as well (and faster).

Hooray for old school.

J<

  • Web Design
  • Rants
  • Technology
  • koppie's blog
  • Add new comment

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.

Gallery

IMG_8988

Follow me on:

Facebook Twitter LinkedIn Google Plus YouTube Picasa Flickr last.fm This site (RSS)

Subscribe

Enter your email address:

Delivered by FeedBurner

Search




Categories

Linux This is cool Web Design Politics Photography News Nathan Morris Windoze Rants Technology This is funny Reviews
more tags

Navigation

  • About
    • Contact Me
  • Wish List
  • Family Tree
  • Babycam
  • Civil War
  • Links
  • Quotes
  • Software Corner
  • Canadian Pride
  • Lego Collection
  • Music Piracy
  • Gallery
  • Sitemap

User login

  • Request new password

Powered by Drupal, an open source content management system

  • nathan
  • gallery

I am a lawyer but this is not legal advice. If you choose to rely on my opinions, you do so at your own detriment. If you need legal help, hire an attorney. (If you want to hire me, contact me and we can negotiate representation.) I used to work for the District Attorney's office but my opinions are my own and are not meant to represent the policy or position of anyone else.