" /> Primordial Ooze: February 2007 Archives

« January 2007 | Main | March 2007 »

February 27, 2007

Flex your muscles

I’ve mentioned before that I wanted to write Rails apps using Flex to spice things up. In essence, I want Rails to be my server-side web application platform and I want flex to add interactivity and UI fidelity that HTML would probably have a hard time recreating.

Not that I haven’t been completely AMAZED at what HTML can do these days, with CSS, JavaScript, and AJAX because I have been amazed.

That said, I always felt like the apps that keep running through my head will require some vector goodness and flex fits that bill rather nicely.

So, tonight, I decided to post a simple Hello World app. It’s nothing special really and the screenshot is as follows:

Flex app 1

You may ask yourself what exactly we’re showing here. Well, it’s a flex app I created using the TextMate flex bundle, a simple “Hello World!” application. The code is pretty simple:

<mx:Panel title="My Application" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10" > 
    <mx:Label text="Hello Primordial Ooze!" fontWeight="bold" fontSize="24" /> 
</mx:Panel>

(I’m wondering if TextMate markdown mode is going to escape that XML madness properly without any action on my part?)

If you don’t like screenshots, go ahead and try it yourself here:

http://wars.primordia.com/nick.swf

More complex apps to come :-)

February 26, 2007

Cub Scouts Pinewood Derby

My two oldest sons are both cub scouts and tonight was a Pack Night. Cub scouts are organized into dens and packs. Tiger, Wolf, Bear, and Webelos all get together and do some activity on pack nights. Sometimes it’s a demonstration from a local organization (my Tae Kwon Do school did a demonstration, for instance). Sometimes the local Astronomy club speaks (as was the case for my friend Steve’s pack). Tonight, though, was the biggest pack night of the year, for it was the Pinewood Derby and many scouts spent many hours preparing their home-made cars for the big race.

Who am I kidding, I made the damn cars and my kids maybe spent 10 minutes applying spray paint and stickers all over my basement floor. Oh, and they did a little sanding if you can call it that.

Back to the race. The Pinewood Derby is a race of wooden cars built to a rigid specification that emphasizes simplicity. The cars are propelled only by gravity and a lack of friction. Air resistance and aerodynamic designs, they say, play no part in the performance of the cars. The cars are judged on how fast they can go in the 2-3 seconds they sail down the old wooden track made specifically for this purpose. It’s a straight track and it holds the fate of each scouts dreams in it’s emotionless span from starting gate to infra-red finish line.

Like many fathers, I started out with a simple kit which contained a small block of wood, four plastic wheels, four nails, and an instruction booklet. This Pinewood Derby was my first and I didn’t know what the hell I was doing.

Luckily, my contractor and friend Greg was doing work in my basement and was kind enough to cut a car-shape out of the raw pieces of wood that came with the kits. If I was left to do it, the car would, well, it could have been ugly.

Here is a picture of the Pinewood Derby track:

PinewoodDerbyTrack

When all was said and done, the cars I made for my sons did quite well. Giovanni placed third for the Wolves and Antonio placed second. I could not be more pleased and the kids really felt great.

Here is a picture of my sons with their cars after the race:

GioNioAndCars

Here is a picture of some of the other cars:

PinewoodDerbyCars

(If these pictures are too big for the blog, I apologize. I’m still learning markdown and the blogging bundle in TextMate.)

One of the cars, one of the winners in fact, was amazing. I wish I had a picture of it. The paint job was superb! The car had a blend from dark to light that was simply gorgeous. The cars were fast, too, so I suspect the father had some decent engineering know-how.

All in all, it turned out to be a pretty great night. I took plenty of photos and a ton of video. Lots of memories to remember for a long time.

I’d like to thank my friend Steve for sending me all kinds of PDF’s and guides on how to make the car fast, perhaps some of those techniques came into play tonight and I don’t think we would have fared so well were it not for his sage advice. Thanks Steve!

Jungle Disk and Amazon S3

So, I’m using a product called Jungle Disk which is a front-end interface to Amazon’s Simple Storage Service (S3).

Jungle Disk really became useful to me when they implemented automatic backup to the S3 service. Currently, I save a bunch of files which aren’t huge in size, but would be a pain in the next to lose. Using the Jungle Disk backup feature, I save almost 5GB of files to S3. The backups happen continuously, every 5 minutes to 1 hour depending on which machine we’re talking about.

How much does this cost me per month? About $1.53! Consider these advantages:

  • Your files are safely stored on a server somewhere in Amazon’s data centers, far from your home. A fire, for instance, would not threaten the data you have backed up.
  • You can access the files from anywhere, assuming you can remember the massively complex keys that amazon supplies you with to protect your files. Man, I miss TrueCrypt while on my Mac.
  • Did I mention the ridiculously trivial cost for this?

Jungle Disk stores the backups in folders based on your computer name. In my case, my root folder is accessed via a network share in OS X. On Windows, it looks like WebDAV is used and the S3 home folder is shown in “My Network Places.”

On my Mac, for example, I can see all of the files backed up by my PC and vice versa. File copies are pretty fast, too, though it’s hard to tell since your home or work network connection plays a large part in that.

Amazon S3 can also encrypt your files, but I don’t enable that. I figure that I’m going to encrypt anything really sensitive locally myself with my own software. So, if some Amazon system administrator wants to browse my files, they could, but the files I encrypt myself should be safe.

If you were looking into a different way to backup your personal files, I definitely think you should check out S3 and JungleDisk.

Blogging from TextMate, Part Deux

This is a duplicate of the previous post, but this time I installed the markdown plugin for movable type. For now, I think that I have to go into movable type and set the text formatter by hand since I don't know how to tell it that I'm using markdown from here (from TextMate).

You can blog from TextMate and the blogging bundle has a lot of cool features. While Google docs doesn't seem to support categories (yet), TextMate does support them but I get errors!

You can see that graphics are pretty easy to support. I just drag the image into the TextMate window and the file is uploaded and the resulting image URL is inserted into the post:

Text Mate Screenshot

Also, Google docs hosts any images you insert and that's something that I don't like one bit.

If you'd like to get a taste at what the blogging bundle can do, check out this screencast:

http://macromates.com/screencast/bloggingtaketwo.mov

Blogging from TextMate

You can blog from TextMate and the blogging bundle has a lot of cool features. While Google docs doesn't seem to support categories (yet), TextMate does support them but I get errors! You can see that graphics are pretty easy to support. I just drag the image into the TextMate window and the file is uploaded and the resulting image URL is inserted into the post: ![Text Mate Screenshot](http://www.primordia.com/blog/2007-02-26_text_mate_screenshot.png) Also, Google docs hosts any images you insert and that's something that I don't like one bit. If you'd like to get a taste at what the blogging bundle can do, check out this screencast: http://macromates.com/screencast/blogging_take_two.mov UPDATE: Oops, looks like I have some more learning about the bundle. This post looks like crap.

Test from Google Docs.


Test from Google Docs. Not too happy with Ecto, trying other alternatives.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed rutrum lacinia sem. Quisque eros libero, bibendum in, placerat a, suscipit vel, dolor. Phasellus bibendum neque aliquet urna. Aenean lobortis. Vestibulum ac leo et purus rhoncus congue. Nulla nunc. Curabitur eleifend ipsum et felis. Nunc sollicitudin. Vivamus tincidunt, leo non varius dapibus, quam pede ultricies felis, vel sodales ante quam ut magna. Duis lobortis. Sed nibh. Ut tincidunt. Integer non purus.

Donec viverra viverra metus. Nam augue lectus, commodo sit amet, mattis non, tempor vel, lacus. Aenean nisi purus, posuere quis, elementum sed, pellentesque id, tortor. Vivamus ultricies mauris auctor lacus. Fusce nisi dui, pretium eu, fringilla quis, eleifend id, leo. Morbi elementum enim facilisis ante. Curabitur ultrices purus quis nulla. Aliquam tempus, felis quis eleifend gravida, lectus neque porta nulla, vitae vulputate augue lectus vulputate tortor. Duis convallis. Aliquam quis tortor et augue aliquam nonummy. Donec tincidunt, augue ut molestie venenatis, felis enim commodo dui, id ullamcorper erat neque eget pede. Morbi rutrum, mauris et vestibulum rhoncus, lectus neque laoreet ligula, non adipiscing turpis ante ut magna. Nulla porttitor vestibulum enim. In eget orci ac nibh aliquet accumsan. Donec cursus condimentum nisl. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent sit amet nibh at ante auctor vestibulum. Aenean ac eros. Quisque porttitor luctus sapien. Praesent tempor tellus quis arcu.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris facilisis lectus mollis neque. Aliquam non nunc a metus convallis consectetuer. Nulla ac felis sit amet metus accumsan luctus. Quisque vitae tortor non nulla aliquam molestie. Suspendisse eget metus in neque bibendum porttitor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Fusce commodo urna. Aliquam euismod. Integer quis magna. Donec lorem. Maecenas semper dolor ut velit. Maecenas nulla turpis, tempor ut, consectetuer eu, condimentum vel, ipsum. Proin eleifend vulputate nibh. Sed ultrices sollicitudin nibh. Sed blandit congue nisl. Cras ornare odio ac lectus. Vestibulum urna est, pretium luctus, scelerisque vel, lacinia in, eros.

Rails and Flex

I wrote a little bit about my earliest steps in Ruby on Rails in June. Today, I will start a series of posts that describe what I've done with it lately. Also, I'll slowly be introducing Adobe Flex development into my setup and I'm hoping these two platforms will serve as a good foundation for various projects that I have in mind.

This post will talk about my Rails development environment at home on my Mac and how I plan on publishing my apps to my primordia.com website. It's just an intro post, where detailed steps on everything mentioned here will be the subject of subsequent posts.

My Rig

Here is a summary of how I have things set up:

  • My editor is TextMate, although my friend Rob keeps singing the virtues of the VIM editor and Rails together. Tempting... In any case, TextMate is only available for the Mac, but their is a port planned for Windows in the E Text Editor (beta!). There are some very good screencasts on why TextMate is so loved here.
  • MySQL is used for database work. There are a few reasons for this. For one, it seems like the most popular database backend for Rails development. Second, I have some experience with it. And third, it's the database that I get for free on my public server from Dreamhost. I installed MySQL "Community Server" from the binary, but I had to learn quote a bit before getting things working smoothly. I use MySQL Administrator to administer the database which is a pretty awesome tool.
  • I use Apache as my web server, even during development. Rails developers typically use WEBrick, but the thought of starting it up all of the time and adding the extra port name to my browser kind of bugs me. In an forthcoming Apache-specific post, I'll discuss how I figured out how all of the Aliases and virtual directories are supposed to work.

One option to get all of this working in one step is to use Apache Friends Xampp. Under Windows, for example, you get all of this with one simple setup: Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, JpGraph, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql.

You get similar functionality on both Mac OS X and Linux. Go for it. Why didn't I use this method? I thought Xampp was only for Windows. Plus, I'm wondering what happens when I have this stuff installed already, in piecemeal. I'm pretty scared to mess with things now. Oh, and there was this warning for Mac and Solaris:

WARNING: This version of XAMPP is still in the first steps of development. Use at you own risk!

Two things don't work yet, but I'm working on it. One is fastcgi. This will allow pages to load faster since I believe Ruby and other "stuff" won't need to be completely reloaded on each page hit. For now, cgi is working find for me.

The second thing I still have yet to get working is subversion. I have a subversion repository set up on my primordia.com server and TextMate even has some integration with subversion. Still, I haven't gotten my Mac to talk to it properly yet. I hope to use subversion as the deployment mechanism for my projects, where code that I check in at home can be sync'd from primordia.com and thus deployed that way. I hope to get this workflow working soon.

So, over the next week or so, you can expect these posts from me:

  • The fun that is TextMate, for Ruby on Rails development
  • MySql Setup, in detail
  • Apache setup, in detail
  • Subversion deployment

February 20, 2007

Video card died

The fan on my PC's video card got gunked up, made funny noises for a few weeks (which I stupidly ignored) and then eventually FELL OFF the video card onto my sound card. Kerplunk. The plastic clip holding the fan where it was must have melted.

The video card eventually died once the GPU fused to the silicon. I'm surprised it didn't start a fire.

So, knowing I want to [eventually] get a Mac Pro as a permanent upgrade path from my PC workstation, I wonder if I should spend any more money to repair it. Something very powerful and genetic is stopping me from spending $30 and getting a crap card to replace my Radeon 9800 Pro. Logic would say that's what I should do.

But you know me.

February 15, 2007

Gates vs. Jobs

This is so funny I almost wet my pants.

Thanks Kevin!

February 8, 2007

Cool Sky Wiki - WikiSky.org

Someone sent me a link to this amazing astronomy/web2.0 mashup called WikiSky.org. This site has so many possibilities, I don't know where to begin.

I guess the site can be described primarily as a star chart. But it's also a Wiki. A Wiki, as many of you know, is “is a website that allows the visitors themselves to easily add, remove, and otherwise edit and change available content” so says Wikipedia on the topic.

Users can do all kinds of interesting things with the site:

  • Of course, you can browse the site and zoom in on a starfield of your choosing.
  • You can search for objects, like M51 (The whirlpool galaxy)
  • Oh, and you can send a link to M51 (then click on show Sloan Digital Sky Survey to see a full-color photo... sadly, a programmer who invented the Sky Server, an image retrieval package designed for the SDSS, is missing.)
  • Oh, and did I say you can generate in-place images for your website? Here is a 20 degree view containing Andromeda:



There are other API's available, too. As far as Wiki capabilities go, users can upload their own images and patch them into the proper location in the map. Well, in theory. The site is still under development.

Despite the raw-ness of the interface and the somewhat clumsy styling for the site, I'm very optimistic about this project and the collaboration opportunities it presents for pros and amateurs alike.

Freaky miniature mountain range in China

The Register ran an article on a freaky miniaturized mountain range complete with intricate detail of “lakes, valleys and snow-capped peaks.”

Whoa! I wonder if they fly mini-helicopters over that and film it. That would be so cool.

Oh, it's probably a military model, of course:

Don't, however, spend the next three days scouring the world's mountain ranges trying to find a geographical match: the legwork has already been done for you by this enterprising Google Earth Community member who correctly identified the model as representing this disputed area on the Chinese/Indian border.

(Link)

Yahoo Pipes

Two people sent me links to Yahoo's new “Pipes.” Pipes is a very neat concept and some of the technology behind it seems pretty cutting edge.

What is Pipes?

Pipes allows you to mix and match various data sources such as RSS feeds and create something totally new. In it's very simplest form you can splice together two RSS feeds and create a single aggregate.

But, there are operators... filters... loops, content analysis, location extraction, language translation, and more.

You wire the various input sources into these operators and push them to an output which you can ultimately subscribe to. Outputs are RSS, Atom, and JSON (JSON is a data format that lets JavaScript get values without needing to parse XML).

Here is an iconic representation of my sample pipe, OozeTest1. This pipe aggregates my Blog's RSS with a flickr feed on keyword beach. Oh, and not any beach pictures, but beach pictures by my hometown in 11793 zip.

Picture 3-1

What people are saying about Pipes

This blog entry does a pretty good job describing the new Pipes service and offers some thoughtful commentary on the mixed reception it will likely receive.

Along with the good a service like this can do, content publishers may be scared of the service because it can be used to modify their feeds in arbitrary ways... like removing ads. Publishers can block pipes using various web tricks (blocking the “Yahoo Pipes” User-Agent, sending Yahoo! an e-mail asking to have your site blacklisted, etc.)

All the while, Yahoo! will now be the destination and penultimate aggregator of feeds, which seems like a pretty good business based on how I see FeedBurner expanding and expanding. I suppose there is no reason why just about all of FeedBurner's features could not be duplicated using Pipes. Plus, users will have arbitrary control on how the features work, which would be a step above FeedBurner's capabilities.

How did they do it?

Pipes seems to have been built using Perl and the Yahoo UI JavaScript library. I'm actually pretty amazed at what I see in the implementation. Although the GUI is a bit sluggish on my BlackBook, it's pretty darn pretty.

Plus, they draw these shiny pipes that aren't images and don't seem to be flash elements. I brought up “Page Info” in Firefox and looked at the media assets on the page... no pipe images. I right-clicked on the layout canvast (all parts of it) and didn't see any Adobe Flash player menus.

View source revealed a neatly implemented page, only two screenfulls tall. At the top are a bunch of links to javascript imports:

<script type=“text/javascript” src=“http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/yahoo-dom-event_2.1.2.js”></script>
<script type=“text/javascript” src=“http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/connection_2.1.2.js”></script>
<script type=“text/javascript” src=“http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/animation_2.1.2.js”></script>
<script type=“text/javascript” src=“http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/dragdrop_2.1.2.js”></script>
<script type=“text/javascript” src=“http://us.js2.yimg.com/us.js.yimg.com/lib/common/widgets/2/logger/logger_2.1.2.js”></script>
<link rel=“stylesheet” type=“text/css” href=“http://us.js2.yimg.com/us.js.yimg.com/lib/common/css/reset-fonts-grids_2.1.2.css”/>
<link rel=“stylesheet” type=“text/css” href=“http://us.js2.yimg.com/us.js.yimg.com/lib/common/widgets/2/logger/css/logger_2.1.2.css”/>

I loaded up some of the files and see that the Yahoo UI library has some cool animation functions, some with names like YAHOO.util.Bezier. I'm still now sure how things are drawn but I'll continue to look into it since it seems like a neat technology.

There is a Yahoo UI blog, which I just subscribed to. Lots of videos in that feed, which could of course be spliced into your “Master Media Pipe” which you can create yourself.

Red Square Game

I could not last more than 10 or so seconds. At least not before I cursed and gave up. How long can you last?

Picture 2-2

(Link)

February 7, 2007

Web 2.0... The Machine is Us/ing Us

An interesting take on what Web 2.0 is…

I do a moderate amount of video editing and I always get depressed when I see such brilliant display of skill.

(Link)

Thanks John!

Windows Vista Installation

This is a hilarious video of a guy who finally figures out how to get a machine to accept Windows Vista. 

Thanks Kevin!