'railsgigs.com' domain name for sale (€ 2000). Contact me for details.

Spring garden colors

2009-04-12 19:27 UTC

This morning everything was blooming in the garden. Leaves were unfolding while looking at them and flowers started to bloom while taking pictures. Spring is in full swing. Awesome!

It’s hard to capture all colors but this sample gives some idea. These photos were used to create this color swatch.

0 comments

A simple plan for Detroit

2008-12-12 09:19 UTC

Let me start with two disclaimers. I know nothing about making cars. And I feel terribly sorry for everyone who is about to lose their job at General Motors and Chrysler.

Instead of investing 15 billion dollars in paying off debts, making cars that don’t sell too well, and keeping last century dealerships open and paying salaries to managers and marketers, I propose the following:

  • Keep the factory buildings open: do not turn off the light and heating but instead allow former factory workers to enter the buildings. Keep some security staff around to keep things orderly.
  • Enable small groups of up to 50 people to use the machines, tools and assembly lines to setup workshops where they can design and build products invented by themselves. I’m thinking about cheap windmills, solar panels, bicycles, water pumps, heck maybe even electric cars. Everyone who joins such a startup automatically becomes shareholder of a future corporation if the group succeeds with their venture.
  • These groups might consist of engineers, craftsmen and women, and some supporting roles for IT and administration. Everybody does sales: no need for marketers or sales people. Former administrative assistents role up their sleeves and do paint jobs. The catering lady designs a logo. And a senior assembly line worker finally seizes the opportunity to learn how to program the order picking robot.
  • These small groups can apply for funding if they have a good plan or product. Funding can be obtained from state or federal funds, universities, VCs or private investors. The 50 person limit prevents funding becoming too large or risky.
  • Other groups of people, who don’t have their own ideas, can apply for contracts in other industries or universities to ‘build stuff’. Detroit must have an amazing number of craftsmen and women who are experts in electrical engineering, metal processing, wielding, laser cutting et cetera. In the past e.g. MIT would never have considered outsourcing the production of experimental solar panels to Chrysler. But a band of 50 people in a skunkworks outfit is a perfect match.
  • Universities can setup small freshmen boot camps in the corner of a factory building to crank up the knowledge of people who see the current events as a (forced) opportunity to change course.
  • Everyone who joins one of these small startups is entitled to a modest salary. I’m pretty sure the costs of paying for food, clothing and shelter are much lower than the proposed, but failed, 15 billion.

I realize there are countless issues to be dealt with such as the selling of tools and factory buildings, but the infrastructure of the car makers is so incredibly big that I’m pretty sure it can accomodate 20 to 30 of those 50-people startups. And yes, this means only ~1500 people find a new job, but just wait a couple of years and some of these ventures will need new people to support their growth.

Andy Warhol said “They always say time changes things, but you actually have to change them yourself.”

3 comments

Back to C

2008-11-26 08:11 UTC

I’ve picked up a copy of Programming in Objective-C. Although I didn’t order a used version, Amazon shipped me a dusty and damaged copy. Odd.

I have several ideas for iPhone apps, toyed around with Xcode and decided I really like the language. With at least 200k lines of C code written in the past I suspect I should be able to pick up Objective-C quickly. I just noticed a new version of the book will be published early 2009, covering Objective-C 2.0. I previously purchased iPhone SDK Development from the Pragmatic Programmers but although I liked it, I wanted to learn more about Objective C itself.

Can anyone recommend any other good books on Objective C and iPhone app development?

0 comments

Passionate Minds: Émilie du Châtelet, Voltaire, and the Great Love Affair of the Enlightenment

2008-11-06 19:34 UTC

Some time ago this podcast (by my favorite interviewer Moira Gunn) inspired me to read Passionate Minds: Emilie du Chatelet, Voltaire, and the Great Love Affair of the Enlightenment.

Excerpt from Wikipedia: “Passionate Minds: The Great Enlightenment Love Affair is a book by author David Bodanis. Written in the form of a novel, the book deals with the life and love of Voltaire and his mistress, scientist Émilie du Châtelet. It also discusses the theories they propounded about life, theology and the nature of the universe. The story was written with the aid of historic letters of correspondence between Émilie and Voltaire, as well as between several other prominent figures of the Enlightenment.”

0 comments

Two books about Mars

2008-11-02 20:51 UTC

Recently I read two interesting books about Mars.

A Traveler’s Guide to Mars is written by William Hartmann who currently works on the Mars Global Surveyor program. The book discusses how Mars became the dry, cold planet it is today, describing 4 billion years of dramatic climate changes and continuously changing geology. It is illustrated with tons of beautiful photos and maps. Writing style: scientific style but with enough humor to make it very readable.

Many of the photos in the book were taken by the Mars Orbiter Camera. This camera is designed and operated by Malin Space Science Systems. I include a link to their site because it offers a better collection of recent Mars photos than the NASA site.

The other book is The Case for Mars: The Plan to Settle the Red Planet and Why We Must, by Robert Zubrin.

Zubrin makes a fascinating case for a $20-30 billion plan to land humans on Mars. He describes a well-thought out plan that includes: getting there cheaply and safely, how to build a base, and how to colonize and terraform Mars.

I just looked up the following figure: $845 billion is the amount of money the US has spent on the war in Iraq as of today. Just imagine what the world would look like if 5% of this sum would have been spent on an international mission to Mars. A 10 year Apollo-like program could have been devised bringing engineers and scientist from all over the world together to design, build and carry out the greatest mission mankind has ever undertaken. But alas, there’s no oil on Mars.

0 comments

Helvetica

2008-11-02 12:47 UTC

Last night we watched “Helvetica”, a documentary about the ubiquitous typeface. Highly recommended, if you’re into design it’s a must-see.

Credits: frame capture from documentary

Excerpt from the website of the documentary maker: Helvetica is a feature-length independent film about typography, graphic design and global visual culture. It looks at the proliferation of one typeface (which will celebrate its 50th birthday in 2007) as part of a larger conversation about the way type affects our lives. The film is an exploration of urban spaces in major cities and the type that inhabits them, and a fluid discussion with renowned designers about their work, the creative process, and the choices and aesthetics behind their use of type.

Among the interviewed are several Dutch, of which Wim Crouwel is the most famous. See Flickr for samples of his work.

0 comments

Why I ditched MacPorts and now use Ubuntu and OS X instead --all on one machine

2008-10-30 20:13 UTC

Some time ago my machine crashed and I reinstalled a fresh copy of OS X.

You probably know the feeling: it’s like a nicely mown lawn, no dishes in the sink, or a washed car.

After booting I stared at my pristine desktop and wondered “Do I really want to go through the hell of installing MacPorts (or compile everything myself?), getting RMagick to work, fixing the broken Ruby version and living with the way Apple shipped Rails on OS X?”.

I decided to try something else.

Instead I downloaded a copy of VMware Fusion (back then they offered a free download of the 2.0 beta, I purchased the final 2.0 version recently). Installation of Fusion was a breeze. I’ve been thoroughly impressed with Fusion, it seems more stable than Parallels which I used in the past.

I grabbed a copy of Ubuntu 8.04 LTS Server Edition and fed it to VMware. Again, installation was easy. I normally take notes during installations because if I work my way around quirks I don’t want to re-invent the wheel the next time. I did not make any notes during the whole process.

In less than 30 minutes after installing VMware I logged into Ubuntu via the OS X Terminal.app.

Now this wouldn’t be so cool if not for the next steps.

  • Installing RMagick is a matter of typing ‘sudo apt-get install libmagick9-dev ruby1.8-dev’ and you’re done. No lengthy compile process, no thousands of warning messages floating across the screen. Just apt-get, enter, Done.
  • Likewise for installing MySql, Ruby, Rails, Apache, Phusion Passenger, Git (and tig!) and the array of gems that I use. All painless, fast and easy.

Because I wanted to use TextMate (yeah, I know, there’s Emacs and Vim) I had to find a way to access the VM disk from the Finder. I messed around with Samba for an hour and then ditched it in favor of AFP (see note below) which seemed to be faster and was easier to install. I got it to work and the Ubuntu file system nicely showed up in the finder. The only gripe I have is that the Finder creates resource forks (._* or :2e*) in all directories it touches. But since these files are hidden (because of the dot) I’m not really bothered by them. It’s important though to tell Git to ignore these files (just add 'DS_Store', '.AppleDouble', '._*' and ':2e*' to .git/info/exclude).

The funny thing is that the whole setup seems to have a smaller total memory footprint than installing the same stuff under OS X. I’ve given VMware 256 MB of memory (Ubuntu runs fine with 128 MB) and everything (Apache, Rails, MySql, AFP) happily runs within this space.

Random notes

Another benefit of this VM approach is that you can make your development environment identical to your production environment.

EngineYard offers a VMware Fusion workstation image of their production stack. This might be handy for folks who don’t want to install the OS themselves.

VMware offers a marketplace with ready-to-use server images.

Today I also experimented with EC2. I’ll write an article about EC2 when I have a bit more to tell but the first impression is awesome: I had Ubuntu running in under 20 minutes flat! (but boy, Amazon should clean up their documentation and hire an interaction designer for their AWS service web pages).

AFP = AppleTalk. The Ubuntu/BSD implementation is called netatalk. I’ve tagged several useful sites about netatalk on del.icio.us.

0 comments

Rails fixtures blues

2008-10-27 21:44 UTC

I just lost five minutes because of ‘rake db:fixtures:load’ throwing an error. Here are my top fixtures woes in the hope it benefits others:

  • It borks if one of your models is accidentally using the plural form (e.g. posts) instead of the singular form (post). It more than once happened to me that I quickly created some models (posts[sic], comment, image), proceeded to create some fixtures and then stared at a nondescript error thrown by ‘fixtures:load’. I must confess that this only happens to me when I create models and fixtures by hand (instead of relying on script/generate).
  • It stumbles if you accidentally typed e.g. ‘belongs_to :User’ instead of using all lowercase. Again, stupid, but it happens, certainly when copying/pasting a class name behind ‘belongs_to’.
  • Don’t use the ‘_id’ suffix when using fixture names to reference foreign keys. So it’s either ‘user_id: 1’ or ‘user: jack’ but not ‘user_id: jack’. You can easily be bitten by this when cleaning up fixtures in older projects. Usually I check the loaded fixture data to see if everything has fallen into place. You can do a manual check using the Rails script/console.
  • This one is particularly nasty: never leave some half-baked work-in-progress code in a model when loading fixtures. The reason is, of course, that ‘fixtures:load’ needs to load each model class it references when executing the fixtures. However the error it throws with broken model code is something like ‘Unknown column ’foo’ in ‘field list’…‘. Not an error that really tells ’hey dude, your model code is broken, fix it and run me again’. You can test this behavior by entering ‘foo’ between two method declarations in a model and running ‘fixtures:load’.

One more thing about fixtures, there’s an easy way to preload your production database with all your fixture data: ‘rake db:fixtures:load RAILS_ENV=production’. The RAILS_ENV part tells the ‘fixtures:load’ command to use the production database settings instead of the development credentials which it uses by default.

0 comments

Can Google predict the future by measuring emoticons in data traffic?

2008-10-26 22:36 UTC

Last week Google’s Gmail team last week announced support for displaying emoticons in their Gmail service.

Personally I couldn’t care less, I guess this feature was demanded by users with poor mental rotation skills. Don’t get me wrong, I use emoticons a lot in emails and I see the value, but I don’t really care whether they’re comprised of characters or an image.

But I digress.

The announcement revived a wacky idea I had years ago. I discussed it in a pub with friends and forgot about it again. But it’s a neat idea and here it is: Google has the means of measuring the number of smileys and other emoticons people enter and use in content created in the ever-ballooning Google galaxy of services (Gmail, Chat, Blogger, etc). We’re talking about millions of emails per day, hundreds of thousands (or maybe, millions) of Blogger articles per day, tons of chat messages (nobody uses Google chat, hence the unit ‘tons’ is probably correct). I wouldn’t be surprised if Google could screen scrape 10-20 million emoticons per day.

What could Google do with all this data?

  • Present the aggregated data in a special version of their Zeitgeist.
  • Create a ’How’s The World Feeling At This Moment’ indicator.
  • Create a weekly forecast (“Better stay in bed next Monday, it’s super chagrin day”).
  • Short sell on the Stock Exchange (now that would be ‘forward looking’!).
  • Promote products via AdWords that make consumers happier if the ‘happiness trend’ goes down.

Another example: it would be super interesting to see whether there was as spike in the number of :-( faces before the stock market crash that began around September 16 2008. My take here is that tens of thousands of financial people knew something bad was going to happen, only the rest of the world didn’t yet realize it. If one could tap into the emails sent between the financial centers of the world (and I’m sure Google could do this if they wanted this) you would be able to focus the measurements on certain industries. Obviously, this would be evil so Google is not doing this.

As with any statistical data set it is important to correlate the data with other available data sets. In this case it would be interesting to see if spikes in Google’s data have any correlation with the data these fruitcakes are collecting.

As I said, a wacky idea. But an interesting one nonetheless.

3 comments

New site

2008-10-26 22:05 UTC

I finally found time to update the home brew blog engine and content management system that’s under the hood of this site. I hope the new super easy blog post editor will make me blog more often. I’ve bought some gear for my cat to help me.

1 comment