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.

September 30th, 2008, posted by Darryl Clarke

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.

September 24th, 2008, posted by Darryl Clarke

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.

September 23rd, 2008, posted by Darryl Clarke

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!

September 17th, 2008, posted by Darryl Clarke

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…

September 15th, 2008, posted by Darryl Clarke

Google I/O 2008

I had the pleasure of attending Google I/O in San Francisco this year.  I’m only getting to posting about it now because work has been far too insane for me to even stop and think about all the glorious things I heard about during the conference.

In fact, I still find it hard to come up with any one outstanding part of the conference.  It was all so awesome, and all so in depth.

If there is anything that I brought out of it, it’s a desire to learn more Java and figure out some ideas to deal with GWT and Android.  Those are two pretty hot topics in my mind right now.

I was also impressed with the Google Earth and Google Maps API integration.  That’s a pretty sweet package right there.  I love maps, and man making maps with Google is fun.

Hopefully I’ll be able to put together some cool things for work in the near future.  I’ve got one project requiring maps and travel data right now, so we’ll see what that brings.

I also have a desire to actually figure out a Rubiks Cube.  Thanks Google, it was a blast.  See you next year, I hope.

June 11th, 2008, posted by Darryl Clarke

Eclipse and Ubuntu 8.04

I was having some trouble running Eclipse 3.3 Europa on Hardy Heron.  It was unstable, crashing a lot, and hogging way more ram than it normally hogs.

Then I realized what I’d forgotten to do on this fresh install.  I forgot to simply ’sudo update-java-alternatives -s java-6-sun’ and voila, it works like a charm.

Eclipse doesn’t work well with the gjc java (the ‘free’ and default) Hopefully this little thing won’t be an issue in the future when sun java 7 (open java) is ready to rock the free world.

April 7th, 2008, posted by Darryl Clarke

Useless: 10 body parts with 3 letter names

eye, ear, lip, hip, toe, rib, jaw, arm, leg, gum

And now for slang, because it’s so much more fun…

tit, ass, bag, vag, nip, cap, rod, rim…

March 7th, 2008, posted by Darryl Clarke

Subversion on the Mac

Why does subversion on the Mac have to suck so bad?

Sure there’s apps, SvnX, SCPlugin for Finder, and a few others that typically suck — and unfortunately I always end up using Eclipse and it’s Subversion plugin.

But really, the user friendliness of it all is making my stomach turn.

March 5th, 2008, posted by Darryl Clarke

Installing PHP Java Bridge on Ubuntu

Source Install

First, make sure all php packages are updated — if you update PHP after installing this, it will likely segfault.

For the purpose of this, I’m using Ubuntu 7.10, and Java 6 (sun-java6)


First, get the build essential, as well as php5-dev, sun java and automake

# apt-get install build-essential php5-dev sun-java6-jre \
    sun-java6-jdk sun-java6-source automake

Second, get the PHP/Java bridge source.

# cd /usr/src
# wget http://internap.dl.sourceforge.net/sourceforge/php-java-bridge/php-java-bridge_5.2.0.tar.gz
# tar xzfv php-java-bridge_5.2.0.tar.gz

And, install.

# cd /usr/src/php-java-bridge-5.2.0
# phpize
# ./configure --with-java=/usr/lib/jvm/java-6-sun-1.6.0.03,/usr/lib/jvm/java-6-sun-1.6.0.03
# make
# chmod +x install.sh
# ./install.sh

Answering the questions for the install script is fairly simple. It looks for some tomcat stuff for the servlet portion of the Java Bridge, but we won’t be using it.

Copy *.inc to someplace it can be found.

# mkdir /usr/share/php/java
# cp *.inc /usr/share/php/java

Testing,

# php test.php

By default, java is only enabled in the command line php; to enable it in the global instances of php, edit the php.ini file and add the extension.

;; java.ini: Activate the PHP/Java extension

;; zend_extension = "/path/to/java.so"
extension = java.so

;; If you have installed the java-servlet.ini leave this file alone,
;; edit the servlet or standalone ini file.  Otherwise uncomment the
;; following java section and one of the following options:
[java]

There are no other options required. Make sure the java.hosts and java.servlet are disabled. If logging is desired, that’s another story.

March 4th, 2008, posted by Darryl Clarke