Archive for September, 2008

Ubuntu 8.10 (Alpha 6) on my Mac Book Pro

I installed Ubuntu 8.10, Alpha 6 on my Mac Book Pro  (2nd generation) last night to give it a whirl.  I didn’t do anything with bootcamp, just a straight install.  The installer was fine, it went it’s normal route.  When I rebooted it took a while - I guess this is expected when booting an alternate OS.

The fun started when I logged in. What appeared to be a fully working install - wasn’t.  The touchpad was slow and almost non responsive. I boosted the acceleration and  other settings, but to no avail.  It was unusable.

Audio worked, but not the audio out on the side. It didn’t switch over to optical output like it does with Leopard installed.

Dual monitors would only go into mirror mode. Even after I fiddled around with the settings I couldn’t get my desktop spanned across the second display.

It’s sad, but I had to go back to Leopard on the same night because I just don’t have the time to fool around with Ubuntu on my Mac to make it work the way I want it to.

Given that this is still only an Alpha release of Ubuntu I won’t count it out yet for being on my Mac.  Once the proper release comes out, I’ll give it another try.  But until then, Fail.

Tuesday, September 30th, 2008

Posting Defaults for Checkboxes

I was playing around with Zend_Form a little while ago and I realized they did something neat with checkboxes.

Everytime I created a checkbox, Zend made two.

<input id="optInDefault" name="optIn" type="hidden" value="n" />
<input id="optIn" name="optIn" type="checkbox" value="y" />

One hidden, and one not.  This is handy because when the user doesn’t check it - the hidden value gets posted. When the checkbox is selected, that value overrides the hidden one.

This also works for radio buttons, or any other form element where you want a default value posted.

Wednesday, September 24th, 2008

Zend Framework, Rewrite Rules, Apache

Most of the Zend Framework documentation I’ve read recommends a rewrite rule that looks something like this:

RewriteEngine on
RewriteRule !\.(swf|js|ico|gif|jpg|png|css)$ index.php

Why not use a more elegant rule that looks like this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php

This rule basically says: If it’s not an existing file, and it’s not an existing directory - pass the request through index.php.

This allows you far more flexibility when you want to host non-framework files, or a whole slew of other media types that are not listed in your apache configuration.

Tuesday, September 23rd, 2008

Zend Framework 1.6, and more.

Zend released version 1.6 of their framework just a short while ago and I’ve been reviewing a lot of the changes.  As it turns out this framework is becoming quite large and diverse in what it can do.  Some of the newer features that interest me:

  • Saving sessions to a database table.
  • Dojo integration
  • Captcha and File upload form elements.

The saving sessions to a database table is conveniently easy, but I’m not too sure how well it will fare once I really get going.  It’s so simple that I’m not sure how well it’ll handle validating and securing sessions (based on Users IP, or web browser agent).  But we’ll see.

Dojo integration doesn’t really excite me that much. I’m a big fan of Prototype and Scriptaculous, and having another Javascript framework just sitting there seems like a waste of space to me - but again, it’s something I haven’t exactly dove into yet.  Maybe dojo rocks my socks and I just haven’t felt it yet.

And finally, the captcha and file uploaders may seem very trivial, but trust me - when you’re trying to build a site and those two elements were unavailable for use with Zend_Form — it was a big pain in the ass and effectively made Zend_Form useless when you needed those two elements.

Things are looking good, and the new source base for pileofcrap.org is getting there.  Of course every time I go to work on it I get distracted and then when I return to working on it a new version of ZF is out. Go figure!

Wednesday, September 17th, 2008

Insane Ubuntu Packages

I was fooling around and I decided to search for a clue…


dclarke@ubuntu-image:~$ apt-cache search clue
bughelper - bugsquad's utility for Launchpad
cl-clue - Lisp package for clue/clio/pictures: X interfaces for lisp
clisp - GNU CLISP, a Common Lisp implementation
clue - Package to ease upgrading, delete me
gfpoken - Recreate a grid of mirrors from clues given by tests
hybrid-dev - development files for ircd-hybrid
spamassassin-rules-ja - Japanese filter rules for spamassassin

Yep, there it is…

Monday, September 15th, 2008