Archive for December, 2006

6 Things [a meme theme/blog chain]

December 18th, 2006

Good God. These things have moved from electronic chain-mail to blogs.

Never-the-less, I will oblige the meme proposition from almostcool.org.
List 6 things about yourself most people don’t know about you.

1. I was the president of my senior class in high school, and was the D.J. for almost all of our school dances. And – I invented using the aide of a computer to deejay.
2. I have read nearly every fiction book by Michael Chrichton.
3. My first web page (circa 1995) actually said “Special thanks to Microsoft Corporation.” — a company which I now despise.
4. I have had one moment which I seriously felt like an angel was watching over me: I was about 13 when I was hunting with my uncle and his dog, and the dog goes on point right in front of me (this is the first bird hunting experience I can recall). I walk up behind the dog with my gun raised and the bird flushes out right in front of me. I was so shook I just pulled the trigger, not even aware of where my gun was pointed — and the gun didn’t go off! The primer was dented, but didn’t fire. It was the strangest feeling I have ever felt… because I know that if the gun went off I would have shot my uncle’s dog. Whew.
5. I was in to electronics when I was a kid… had boxes of wires, motors, resistors, capacitors, and various other crap, and built a home-made security system for my room when I was 8 or 9. I later moved on to electro-magnetic switches, keypads, and motion sensors and had a full scale security system with battery backup when I was 13.
6. On the first day I saw my wife (Katie), I wrote her name down because I knew there was something special about her — something like love at first sight. :-)

No one reads my blog, but I’ll TAG alvinwoon.com if he ever reads this — he’s the only other blogger I know that hasn’t been tagged yet!

Chiara_PEAR_Server Release Droplet for Mac OS X

December 16th, 2006

Hey, my first Mac Application! (which can hardly be called an App at all)…

This is a Mac OS X droplet for PEAR developers that run Chiara_PEAR_Server. This little droplet just takes in your PEAR Package .tgz and it will release it to Chiara_PEAR_Server.

Just drop your package.tgz onto the droplet, the script examines the .tgz, discovers the channel name it should be released to, prompts for your PEAR channel handle and password and saves the release to the server.
Note: It assumes your admin.php file is located at http://pear.examplechannel.com/admin.php

A very targeted audience, but none-the-less, a handy little droplet I use to deploy releases.

Source is at svn.saltybeagle.com.

This was built using Platypus, CocoaDialog, and my Salty_PEAR_Server_RemoteReleaseDeployer.

The PEAR Installer Manifesto

December 14th, 2006

I recently finished a book on the PEAR installer written by Greg Beaver. The book itself is an excellent read for anyone who develops installable PHP libraries or applications, and one I would highly recommend for anyone interested in building small to large PHP web applications.
The PEAR Installer Manifesto by Greg Beaver
Throughout the book, Greg demonstrates the complex features of the PEAR installer and package description file (package.xml) to guide you through understanding methods of distributing, installing, and maintaining PHP (and other) projects. The book is filled with real world examples and working applications from the guy who (seriously) ‘wrote the book’ on the PEAR installer.

To anyone who is building distributed PHP applications or reusable libraries, this book is a must have for understanding release deployment strategies and how they are managed with powerful ease. The author knows his stuff, and has used every one of the examples within real word applications. The book has everything from “Hello World” installable applications to a full blown source code repository and distribution system through PEAR channels.
With the book you will have all of the necessary information to build and maintain your complex PHP applications and easily distribute them across many servers, clients, or the open source community.

If you’re at the point in your application development where the unzip-and-go distribution method has reached its limit (typically the first bug after the first zip), the time has come to start building installable PEAR packages and to take advantage of all the capabilities the PEAR installer offers.

Despite maintaining my own PEAR channel server (pear.unl.edu) for over a year now, I still found plenty of information to continue the ease with which the PEAR installer offers. So even if you are an experienced PEAR developer, the book is still a good read and shelf reference.

I highly recommend the book, check it out.

PEAR Installer Manifesto by Gregory Beaver

Dining Room Table [Update]

December 12th, 2006

I’ve started on my next woodworking project… but I forgot to update everyone on the status of my last project – the dining room table.
I ended up staining it black… about 3 coats of ebony stain, and 4 coats of a wipe-on polyurethane.

The table is finished and in our dining room. Many other photos @ flickr.

dining room table

What’s Wrong With RSS, Atom, Podcasts, webcalendars, etc.

December 9th, 2006

Prepare for a rant about what’s wrong with feeds and RSS, Podcasts, Atom, webcal://, vcards, etc etc.

Feeds Are More Trouble Than They’re Worth

Now some of you are saying, “wait a sec, I like RSS feeds… I like aggregating the content from websites… I like subscribing to web-based calendars… I like downloading contact information in a vcf file” etc… And so do I! But the basics of each of these aggregated, subscription, feed, information related xml/IETF/IMC formats has caused me more frustration in building websites that I’m just sick of the coding and maintenance that makes all of these work.

Here’s a few examples some of you can relate to:

  • Website X says, “Were changing our feed address!”
  • iTunes has a circle with an exclamation point next to a podcast.
  • Their feed has less content than their web site.
  • The feed is updated later than their website.
  • Website Foo has http://foo.com/, but our feed address is actually http://feedburner.com/bar
  • Reader Y says, “Why don’t you offer Atom?”
  • Reader Z says, “Why don’t you offer RSS 2.0?”

Before you know it, you’re managing (or visiting) http://schmooser.com/ which says this:

“SUBSCRIBE!”

  • RSS 0.9
  • RSS 1.0
  • RSS 2.0
  • RSS 3.0 !! TADA!
  • Atom 0.3
  • Atom 1.0
  • Atom 2.0!! TADA!
  • OGG Podcast
  • MP3 Podcast
  • MP3 64 (mono)
  • AAC Podcast
  • … insert next best format here …
  • Each feed carries (nearly) the same info. And everyone is stuck maintaining (or reading) a page which describes each of the formats so their readers know which one they want to subscribe to (I’ll get a screenshot of one of these sites just in case this is your first time on the Internet).

    Enough Already!

    All of these cause confusion for readers, maintenance problems for developers, wasteful cpu cycles, cluttering the web with useless URI’s which will quickly change when you move to a different CMS. And, you’re stuck publishing in the ‘next best format’ when egghead # 5,437,189,427,819 decides there’s a minutely better way of aggregating info on the web.

    All the while, you’re publishing all the same info you’re aggregating from the HTML index file at http://schmooser.com/ !
    It’s the SAME info… just in a different format!

    I can’t wait for my Semantic Web which was promised me a few years back. I’m sure it’s just right around the corner. The day when I can enter schmooser.com and read his blog my web browser, subscribe to his content using the same URI, chat with Joe Schmooser by using his URI schmooser.com, schedule a meeting by checking schmooser.com’s free busy time, or give him a call by plugging schmooser.com into my phone. Now if if that’s not a semantic web, then obviously I don’t know what is… but that’s what I’m waiting for.

    Now Microformats solve a lot of these problems… as well as the rel= attribute enabling auto-discovery, but many people don’t know what they are, and even more aren’t actively using them or developing tools to discover them.

    In case you aren’t aware… Microformats leverage existing html content, and add small underlying structure by using class names to identify structured, or informational data within a web page. The key here being that they LEVERAGE the format which the data already resides! Meaning you don’t have to publish another feed using a different schema at a different URI… the content all exists within the same file.

    But unfortunately we live in a world where the next egghead is developing another useless format which doesn’t utilize the EXISTING format the information is already published in.

    I would encourage every web developer to read up on Tantek ?elik and Microformats, and start using them in the applications they build. (Me included).

Safari Is OK . . .

December 6th, 2006

. . . as long as you can find the one guy on the Internet who cared enough about the rest of us poor bastards to post a solution to the problem!

The latest issue was the javascript onkey* events in Safari firing twice for an event. Alvin struggled with this little known feature of safari for a while until I found a post by some random guy which details our exact problem.

So, here’s a plea from me to the rest of you web developers out there.
When you struggle with something for any amount of time — and find a solution — please be kind enough to post about it SOMEWHERE. And by all means, don’t post it on Webmaster World.com.

Converting a PNG to GIF with Transparency Matte

December 4th, 2006

A couple months ago a coworker and I were trying to figure out how to use ImageMagick to convert a bunch of .png images to .gif. Using mogrify, the process is fairly straightforward, but preserving the transparency by matting alpha pixels against a white background was pretty tricky.

Here’s the issue:

Original png zip icon
Bad gif zip icon
Good gif zip icon

The epic search turned up the following command:

mogrify -format gif -bordercolor white -border 0x0  application-zip.png.png

Which gives you the good gif above.

Update to Services_W3C_HTMLValidator

December 3rd, 2006

I updated the PHP API interface to the W3’s html validator with two new methods:

validateFile($file)

validateFragment($file)

The two methods allow you to validate a local file which is uploaded to the validator, or a string of html code.

Test it out or comment on the PEAR proposal.
Download Services_W3C_HTMLValidator
Comment @ PEAR Proposal for “Services_W3C_HTMLValidator”