Archive for December, 2006

My Apple Add Treatment

There is a discussion going on at Digg.com concerning some Apple iChat AV commercial from October, and the heading “The Way Apple Ads Should Be”. If you watch the video it’s a rather dull yet straight to the point demonstration of the software (which I guess was intended for the Apple site, rather than broadcasting) but people are saying “Hey, why don’t they sack that ’snarky’ Mac guy and make some more of these?!”

My opinion is that Windows (which included me, until I got wise) users have been poking fun at Apple’s “funny little computers can’t run games or serious software” and the snarky Mac guy addresses the fact that the Intel Macs are overwhelmingly brilliant to the best of the script writer’s ability. It’s not just oneupmanship, it’s the little guys saying “Now it’s our turn”.

Anyway, this is how mine would go:

Rather nondescript twenty-something female walks up path in pleasant neighborhood (nice grass, white door and picket fence combo) listening to her white iPod Video. Close up of key going into the lock, cut to hallway facing the door. Character puts keys on table, walks straight down the hall throwing her jacket into the first room, and begins to remove iPod from ears and pocket. She enters a well lit, predominantly white, room and cut to iPod being put in dock. Cut back to character sitting in a large chair in front of a 24″ iMac - she nudges the mouse, screen comes on, music gets a bit more prominent, cut to images of iPod syncing, podcasts downloading, Safari opening, iPhoto “scrolling like butter”. Pans out down hallway, caption “It’s that simple” comes up followed by the Apple logo.

PowerBook Lust

A few days ago I wrote my wishlist for 2007 which included the £649 Apple MacBook (Student discount). I want something small enough to throw into a bag and not notice it, but powerful enough to use every day.

It seems that the MacBook has been a huge success on campus, and everyone not studying IT has one (sports students in particular), and on that general recommendation I began to think it was perfect for me. That was until this Tuesday when my eye was caught by lonely 12″ PowerBook sat on a single desk at the other side of the library - it’s no nonsense industrial beauty was seducing me from afar, my eyes were drawn to it in a way that they have been drawn to very few women. I began to drool.

It’s a lot like the VW Golf MK2 - It’s over twenty years old, and time has not done the over all condition of the cars any good, and by comparison to today’s models it doesn’t excel so much in performance. So, the new models have air conditioning (Widescreen) and advanced break systems (Intel based processors) but the old MK2 costs a fraction of the price, it looks as good as the day it was introduced, and it has a certain charm about it. Put it this way: I only need to get to 70Mph, and I can do that with my current G4.

I think I might save myself a couple of hundred pound, max out the RAM, and buy a laptop that is perfect in size, and I know I’m not going to crack. Metal > Plastic any day.

RIP James Kim

James Kim, the CNET editor who went missing at Thanksgiving, has been confirmed dead.

His family and two daughters, who were left behind in their snow bound car as James went for help, were found a couple of days ago, safe and alive.

From CNN:

“MERLIN, Oregon
(CNN) — The body of a San Francisco man who had walked into the Oregon wilderness to summon help for his stranded family was found Wednesday in a steep ravine where he had left clues for searchers.

Officials confirmed that James Kim, 35, an editor at the Web site CNET, had been found dead.”

My thoughts and prayers are with the family.

Additional Information: CNET’s Press Conference, Digg Articles and JamesAndKate.com.

Rails, MySQL & OSX, The Quick Way

Introduction

There a numerous ways of setting up Ruby On Rails server under OSX, but not all of them are simple. For instance there is the definitive way: install Ruby (bundled with OSX, as of 10.4), install RubyGems, install Rails, then install MySQL: a method in which Tiger users will often be thrown an error when installing MySQL. By the time you have found this, I expect you will have encountered this problem, and various fixes aren’t working.

Then there is the Locomotive way. Locomotive is bundled with the LightHTTPd webserver, as well as the SQLite 3 SQL server. It’s great: it’s free, it’s easy to install, and if Rails isn’t for you, then it’s easy to get rid of too.

However, I like many people, already run Apache and MySQL (I’m a PHP developer at heart) and I want to keep my databases in the same place, accessing them through the same account. As much as I respect SQLite, I wanted to stick with what I know. Besides, MySQL seems to have a greater user base, even under Rails.

In this quick tutorial I am going to show you how to setup a Rails development server on a local Mac (OSX 10.4), using Locomotive (LightHTTPd) and MAMP (MySQL), hopefully in under ten minutes.

Who This Is For

I suppose I should start with who this is not for…

This is a quick and (hopefully) painless method, it is not for anyone who uses Rails regularly (although, I expect that a fair few developers use this) and I would advise doing things as David Heinemeier Hansson and co suggest if you really get into the framework.

But, if you know a thing or two about other languages, are comfortable with MySQL, and don’t want any hassle, any commitment, and any command line then I think this might be a good starting point.

I’ll just say, it worked for me.

1. Downloads

I would advise downloading the following applications before you begin, but do them whilst one is installing. Whatever.

MAMP (Current Version: 1.4.1) - MAMP stands for Mac Apache MySQL and PHP and given that you are about to install Rails, I expect that you either run this, or have some idea of the technologies.

Locomotive (Current Version: 2.0.8) - This is our Ruby On Rails server.

CocoaMySQL (Current Version: 0.7b5) - A MySQL front end for OSX. This isn’t essential, but it sure beats configuring your database in the Terminal.

2. Install

Install MAMP as you would usually, run it, it should automatically open it’s own welcome page (Probably http://localhost/MAMP/?language=English) - if this works then we’re up and running. Notice that the username and password to your MySQL account are both “root” - You might want to change these, but you can figure that one out yourself.

Now, this isn’t essential, but it’s something I like to do. Go to the “Preferences” menu of MAMP and hit the “Set to default Apace and MySQL ports” button. This should make them ports 80 and 3306 respectively. It should then restart, but quit it anyway.

Now you have your MySQL server up and running, we must install Locomotive. Once installed go to the bottom-left-hand corner and click the add button. Create a new Rails application with the following:

  • Application Name: test
  • Application Directory: ~/Sites (This is the path to my Sites directory, but you can use any)
  • Framework: Standard Rails [release date]

Now point your browser at http://localhost:3000, where “3000″ is the port number of your Rails application (this can be changed by right clicking “Get Info” in Locomotive.

You should be greeted with the “Welcome aboard” screen! If you get this then the hard part is over, and you are finally “on rails”.

Finally, if you do so wish, install CocoaMySQL, and read on.

3. Setup An Application

Now open up your text editor of choice and open, for example, /Users/Samuel/Sites/test/config/database.yml. “Test” is where my application begins. Now find where it says “development:” and fill this in:

  • adapter: mysql
  • database: test_development
  • username: root
  • password: root
  • host: localhost
  • socket: /Applications/MAMP/tmp/mysql/mysql.sock

Then repeat for the “test” and “production” databases, substituting the username and password for whatever you chose.

This gives you the name for your three databases, although only development is necessary at the moment.

Conclusion

There we go. It may not be the best method, but it’s sure the easiest.

And no command line.

Taking Back Some Disk Space From OSX

When I got this Mac it had about 15GB of free hard disk space of it’s initial 37.26GB. I trawled the folders and deleted a few gig of crap I really didn’t need. Then I ripped 4GB of music to iTunes, copied a DVD or two of RAW photographs, and downloaded a few episodes of Diggnation.

Before I knew it I was teetering around the magic 5GB mark. For reasons I might explain one day, I had to convert a set of Nikon .nef (their proprietary RAW format) files to Adobe .dng (Digital Negative) and I was down to about 286MB.

So, this is what I did.

Firstly I downloaded Monolingual - a free application that safely removes all the languages you don’t use from OSX, and also all the architectures from each application your own processor wont use: I deleted everything from G5 to Intel. This saved me a couple of gigabytes.

Please be warned, however, Monolingual removes items you cannot replace without a full re-install of OSX, and it may have undesired effects on your system. I’m running a G4 MacMini and 10.4.8, and it’s not caused me any troubles.

Then I remembered an application I had seen mentioned on Digg.com a while ago: Disk Inventory X. It gives you a graphical representation of whats taking up valuable storage space, and it’s free. And it beats the old windows search trick of “Search + *.* + Arrange by size”.

I found that a huge portion of my disk space was being taken up by things in the iLife library: iDVD themes, Garageband samples, loops, etc, even though I had removed the majority of iLife, besides iPhoto. Disk Inventory X gives you the path to the offending files, and it’s a simple case of dragging them into the trash.

I’m currently the proud owner of 9.88GB of free hard disk space, which isn’t bad for an hours work.

Bastard!

Last night I fell asleep thinking about waking up in the Villa Royale, Paris, on the 16th of January… My 21st birthday. Caroline and I had been planning it since we got back in September.

Today I went to a horrible lecture only to find out I have a networking exam that morning! Instead of being woken by the sound of the most tuneful Parisian birds perched on the balcony, it will be rather atonal sound of my alarm clock to tell me to get out of bed, take a miserable bus journey and sit for two hours in a freezing cold gym hall.

That was the one thing I had to look forward to.

Five Songs Named After Real People

1. Modest Mouse - Bukowski
2. Belle & Sebastian - Seymour Stein
3. Interpol - Leif Ericson
4. The Red In Sofie Loren - Guy Fawkes
5. The Specials - Nelson Mandela

Five Songs Named After Products

1. Placebo - Commercial For Levi
2. Serge Gainsbourg - Ford Mustang
3. Paul Simon - Kodachrome
4. The Clash - Koka Kola
5. Ladytron - Commodore Rock

Back On Track

Please forgive the rather obvious pun, but I thought I’d take twelve from a day of Ruby on Rails development to write a blog and drink some strong coffee.

I have a final university project due in March, of which I have to design and build an application, perform usability tests, improve it and then write 10,000 words about how I did it. It’s December and I just started building.

Ruby On Rails, or Rails, (for those who don’t know) is a web framework written in Ruby, allowing you to create dynamic sites quickly and cleanly - the way I like to explain it to people is “It does the horrible bits” - and leaves me to do the stuff that only I can do. Like coding lovely XHTML and CSS documents.

I’d messed around with Ruby a while ago, on my PC, and it was horrible. It’s the sort of language that relies on you being able to jump into a command line, and Windows isn’t great for that. Bash, Taco and CocoaMySQL on the Mac are a pleasure to work with. Sadly, I’m in university tomorrow, and have to endure slow PC’s, bad editors, and badly written JavaScript examples from nine to five.

I should be done within the week, so if anyone knows of any good, cheap, RoR hosting then please let me know.

In other news I started a new blog. 5ivesongs is an almost daily list of five songs with some sort of connection. And they’re good songs too, so check it out.

- Samuel

Five Songs I Have Listened To More Than Any Others…

…According to Last.fm

1. Frank Zappa - Bobby Brown Goes Down (29)
2. Mates Of State - What I Could Stand For (28)
3. Mates Of State - La’hov (26)
4. Mates Of State - A Control Group (24)
5. Serge Gainsbourg - Melody [Extrat de Melody Nelson] (24)