Entries Tagged 'Migrations' ↓
July 8th, 2006 — Migrations, Ruby
I was wondering how many people had downloaded my Agile Databases With Migrations talk from my web site, so I decided to check the logs. Given that there are sometimes many repeated downloads from the same IP, I wanted to filter out any duplicate IPs from the HTTP access_log.
So, first we create a small ruby file “ip.rb” to process the relevant lines from STDIN.
#!/usr/bin/env ruby
text = STDIN.read
lines = text.split("\n")
result = [ ]
for line in lines do
arr = line.split
result << arr[0]
end
p result.uniq!
puts result.size
Next, we use grep to pick out the download lines:
grep "agilemigrations" access_log
Finally, we combine the two commands:
grep "agilemigrations" access_log | ./ip.rb
The simplicity and expressiveness of Ruby to accomplish a useful task shines again.
UPDATE: 7000+ downloads as of 2/1/07.
June 26th, 2006 — Conference, Migrations, RailsConf
One of the rare photos of me speaking at Railsconf.
Thanks Mike!
June 26th, 2006 — Conference, Database, Migrations, Rails, RailsConf, Ruby
On the last day of RailsConf 2006, I had the opportunity to speak on Rails migrations. The talk appeared to be well received and was well attended. My guess is around 100 people showed up, which is not bad for a Sunday morning session. The questions were good and several people came up to speak with me afterwards.
The main point of the talk was to show how well migrations dovetail with the near-constant flow of changes we experience during continuous development. The talk was kind of a mix of introductory material on migrations with more advanced topics such as transaction issues and monkey patching Rails for foreign key support. I also put together a handy collection of tips for more effective migration development and a corresponding list of gotchas as well. I built the slides so they would be a good reference after the conference. I hope that you find something useful in there. Enjoy.
Agile Databases with Migrations - RailsConf [pdf]
(7000+ downloads as of 2/1/07)