Wednesday, July 26, 2006

Explaining how Livejournal caches with memcached - Oh, I love memcached.
"Small businesses rule. They drive this economy, they provide the jobs, they provide the innovation, they provide the ideas. They fuel it all. Many are never noticed. Many are taken for granted. But people press on because it’s their passion. Small businesses are about passion and that’s why they’re so important. Passion and curiosity drive great things." - Jason from 37signals.

So cool. I really want to just have this great little small business that I have succeed. It's so nice working for myself, and I really want to do this for a long time. Wish me luck.
Whoa, sweet, a Javascript shell.

Tuesday, July 25, 2006

Migrations in Rails so rock.

Just create your models with


script/generate model TestModel


then run


rake migrate


If you discover you need to change something in the table, edit the migration file, 001_create_test_model.rb, then migrate to version 0 to drop all the tables:


rake migrate VERSION=0


then migrate again normally to update your database:


rake migrate


I had a really sweet solution with a custom built Makefile, it was truly sweet, and used dependencies and everything, but really, this way is so much better, and would work with any kind of database that Rails supports, so it's "The Right Thing". Drat, I'm not looking forward to recoding all my tables as migrations, but I am going to do it, and not slack off with "rake db_schema_dump" which just looks like it sucks, unless you have a truly massive database already built. Well, I do, it's lots and lots of tables, but still, I will be strong. :)
Mass linkage dump:

(Man, I need a script to automatically do this from Opera, I get so many links that I want to read and remember but just don't have time for right now. delicious doesn't work for me, it's too slow. Something better, please!)

http-access2 - A way to grab content from HTML pages. Needed by the excellent rssfwd, which I'm going to install locally, because they're having problems with the server.
Hpricot forms goodness - Wow Hpricot rocks for testing HTML pages generated by RoR.
A massive RoR wiki engine - If you have a huge server, this is lovely.
Installing rssfwd - Sweet goodness.
Myths, Lies, and Truths about the Linux kernel - An OLS (Ottawa Linux Symposium) 2006 keynote.
the juggernaut plugin - I'm going to do something a little more lightweight for TelepathyTest.com but this looks pretty sweet for pushing content to clients. Probably majorly resource hungry though.
Testing Ruby on Rails
A Technical History of Apple's Operating Systems - It's all been downhill since the Apple ][, which I did massive coding on. I made a restriction digest reader with photoresistors and the Apple ][ joystick back in 1986. Yeah, I rock.
Time for Contextual Tagging? - Like Anarchia says, maybe not.
Revision Control for groups.
Tim Bray on Ruby
Refactoring to REST
Ruby on Rails Migrations Explained
Gamma formalism - the "chemical reaction metaphor"
Separate data and formatting with microformats
Speed up Apache 2.0 with mod_deflate
Auto-generating schema from Rails migrations
Getting Started With ActiveRecord Migrations
Import CSV File into Database Using Migrations
Safely using models in migrations
Rails Migration Cheat Sheet
CSS Layout Techniques: for Fun and Profit
Box model tweaking
Border-Box vs. Content-Box
Box Sizing Behavior
Advanced box model test
Advanced box model test - part 2
HowtoUseRailsWithSubversion
Subversion Properties
compositekeys – ActiveRecord Composite Primary Keys
tabnav for Rails
more tabnav for Rails - Sweet.
HashLife - For when I have lots more time. I love the Game of Life, I remember back in Grade 6 when I tried to program a Game of Life simulator, for a computer camp. It was a little bit beyond me, but I got pretty close.
PostgreSQL Performance Tuning
Performance Tuning PostgreSQL
Performance Tips for PostgreSQL
indices for PostgreSQL
indices in SQL
Wikipedia - Index for Database
Sometimes you don't want to put things in a database. - I used to abhor databases, but now like them lots, but this is a good point, you don't need to put everything in a database. For lovemygarden.net, I'm not putting pictures in a database, for example.
Fine Typography for the Web
nload - A network traffic analyzer
Server monitoring with munin and monit - I'm going to install both of these. Working on munin first. I'm also going to get it to email me daily graphs, just so that I can have a good feeling for what is going on, and will try to get monit to email me information about when it needs to restart services. I'll keep you posted.
Howto: Performance Benchmarks a Web server - Important, I'll try to remember to do this.
The various versions of CSS
“ It’s a beautiful day for launching your love beams. ”

Edith Frost

Sunday, July 23, 2006



A recent crop circle in Oxfordshire.
You seem to want instant insight, forgetting
that the instant is always preceded by a long
preparation. The fruit falls suddenly, but the
ripening takes time.

- Nisargadatta Maharaj
Lovers in their brief delight
gamble both worlds away,
a century's worth of work
for one chance to surrender.

Many slow growth-stages build
to quick bursts of blossom.

A thousand half-loves
must be forsaken to take
one whole heart home.

- Rumi

` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `

Version by Coleman Barks
"Birdsong"
Maypop, 1993
You have the right to work, but never to the fruit of work. You should never engage in action for the sake of reward, nor should you long for inaction. Perform work in this world…as a man established within himself - without selfish attachments, and alike in success and defeat. For yoga is perfect evenness of mind.

-Bhagavad Gita 2:47-48

Saturday, July 22, 2006

“Make no little plans; they have no magic to stir men’s blood and probably will themselves not be realized.” Daniel Burnham

Friday, July 21, 2006

Migrations outside of rails

safe erb - A Ruby on Rails plugin to check to make sure your pages escape HTML correctly.

database normalization

The Subversion Manual

quick subversion tips

more subversion info

>How to use Rails with Subversion

Subversion in Emacs - I use psvn.el, an excellent elisp package.

Subversion on the Emacs Wiki

subversion cheat sheet

CSS - A detailed document about CSS.

The Joy of Migrations - I still don't use migrations, but I really should. Soon.

Rails best practices and tips

ffmpeg - A great way to make screencasts from Linux. I'm working on an Emacs screencast vlog, but I'm really busy with my Ruby on Rails projects right now.

Nice URLs with Ruby on Rails
Create 37signals style graphics
1001fonts.com - Good site for free fonts. I found Blue Highway there, which is a good free font that reminds you of 37signals.
Tips for making Print Stylesheets. You don't need to have a "Print" button on your web application that makes a simple version of your page, instead, make a print version of your CSS stylesheets, and hide the elements that you don't want to display.
rounded borders in Gimp. Rounded borders look really nice on web applications. I found the second example worked best for me:

1) Select a region
2) Shrink the region by 20 pixels
3) Grow the region by 10 pixels

Tuesday, July 18, 2006

Ruby bindings for Subversion - This post talks about replacing the ActiveRecord save function with a call to a Subversion repository. I'm not sure if I would have put this functionality into ActiveRecord, but this is a very intesting thing, that you can directly access Subversion with a Ruby client via SWIG. I've been thinking about better ways to show changes to documents, and using Subversion might be a good way to do this.
Microsummaries - A way to describe a changing page in a small summary that is more useful than the title of a page.

Saturday, July 15, 2006

Video Editing With Linux - I'm using Cinelerra, which looks really cool, but is pretty slow on my 256MB workstation.

cinelerra
Video capture and Editing under Linux
Cinelerra Tutorial

Friday, July 14, 2006

Links, links, links:

A short example of Camping - A tiny little webframework based on ActiveRecord from Rails
camping.rb
Hobix - A tiny blogging framework, from _why.
Installing Camping
the Camping Server - Even smaller camping - Just dump files in a directory
A lambda calculus for quantum computation
ExceptionTextable - SMS any exceptions from your Ruby on Rails app to your cellphone. Neato.
ExceptionTextable README
Ajax as a Remedy for the Cacheability-Personalization Dilemma
“I can’t understand why people are frightened of new ideas. I’m frightened of the old ones.” -John Cage

Thursday, July 13, 2006

Linux projects at Dell - Good on you, Dell. I've had really good luck with Dell computers. Miss my SGIs from time to time.

A drag and drop folder tree - From DHTML goodies

Controlling a computer mouse with your brain - EEG is so last century, fMRI is the way to go. Now, just to develop a tiny fMRI.

Wednesday, July 12, 2006

Rails Best Practices - Tips and Tricks - Lots of great stuff in this article, with links to places where you can find more information.
Adding the x11grab plugin to ffmpeg - This allows you to make linux screencasts. Sweet!

This worked:


ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -vd x11:0,0 -s 1024x768 test.avi


Another one:


ffmpeg -g 64 -r 8 -s 1024x768 -aspect 4:3 -vcodec mpeg4 -ar 16000 -vd x11:0,0 -qscale 1 ~/test.avi

Tuesday, July 11, 2006





Links can be fun:

Google Headquarters
Using memcached for Ruby on Rails sessions - I'm using this, and it's very fast. It's supposed to speed things up by 25%-30%, I haven't benchmarked it, but it was quite easy to install and runs great.
Usual Benchmarks for Ruby on Rails - The next stage in my application design for LoveMyGarden.net, benchmark things and then speed them up.
Railsbench - Benchmarking Ruby on Rails
Railsbench on RubyForge
open source eye tracking software - I previously posted articles about using eye-tracking to monitor web site usage, this would be a great company to start, tracking users eye movements on websites and charging people for the service.
19 Tricks most Rails programmers don't know - I learned some tricks from this list, very good.
mod_proxy_balancer - Right now I'm just using apache 2.0 and one Mongrel, but soon will move to 2.2 with a pack of Mongrels.
Introducting Capistrano
Getting started with Mongrel
Apache, Mongrel and Capistrano - I found Capistrano a little heavy-weight for my current needs, so I'm just using Apache and Mongrel, which is working great, so fast, way easier than that FastCGI nonsense I was using before.
Mongrel and Apache 2 on Debian - Some good points, but better to use Apache 2.2, with mod_proxy_balancer.
mod_proxy in Apache.
Google Checkout XML API
Managing many to many relationships with pl/pgSQL
Sixth Sense: The Vomeronasal Organ
Trees and Don Knuth
A crash course in Subversion
Linux essentials - According to an ex-Mac guy. My Linux essentials: xemacs, enlightenment, firefox, opera, mplayer, streamripper, find, gnome-terminal. I used to use xmms, but mplayer does it all. xemacs could do it all, I would use Emacs, but it just feels to authoritarian, XEmacs just feels more free, and ironically, it works better in a text-only window. That's right, I use -nw mode exclusively, windows are for the weak.
Web as a pipe
Working Assumption - Pictures by Kim Waldron. She lived in Paris, and went to people's workplaces, dressing in their clothes, and took pictures of herself. Canadian artist.
A history of Ketchup - A fasinating article! On the history of ketchup of all things! Umami...
Where visual design meets usability
Neat tricks in the new Emacs 22 - Hmmm, might have to change to Emacs now... Drat. Some great general Emacs tips in this article as well, like how to generate a list with increasing numbers, something I often find myself wanting to do.
The power of Prototype.js
Continuations and Advanced Flow Control
Ruby idioms
Rails reference
The complete guide to Rails plugins
A DOM ready extension for Prototype
Writing custom iterators for Prototype
Setting up Subversion
Ruby on Rails and Google/Yahoo maps
Mongrel and Rails with Apache 2.2 and SSL
Scaling Rails with Apache 2.2, mod_proxy_balance and Mongrel
mongrel_cluster 0.1.1
Apache for static and Mongrel for Rails
Installing Capistrano
Testing your Rails views with Hpricot.
The Aesthetic sense and comptuer interfaces

Saturday, July 08, 2006

Friday, July 07, 2006

Links for smart kids:

memcached - I'm using it to store session data for Rails, but you can use it as an intermediary between your web application and databases. First developed for the livejournal.com website.
MemCached in the Ruby on Rails wiki
Using memcached for Ruby on Rails session storage
Download site for memcached-client - It's better to use the memcached-client-1.0.3 version, instead of the gem version, it's faster.
Improving Ruby on Rails performance
Namespaces and controllers and models, oh my.
How to change SessionStore in Ruby on Rails
The new Googleplex. I really like architecture.
How to change session options
mod_proxy_balancer
Introducing SwitchTower - Now called Capistrano.




Wednesday, July 05, 2006