inicio mail me! sindicaci;ón

Best rant ever

Translation From PR-Speak to English of Selected Portions of Rails Developer David Heinemeier Hansson’s Response to Alex Payne’s Interview

This is not about who’s right or wrong, it’s about me still laughing :-)

Rails, ActiveRecord, benchmarking and why I feel evil

I feel evil tonight (here is 3:30am) and then the fortune brought me to the /benchmark directory in ActiveRecord repository (for who doesn’t know what ActiveRecord is, and I think due to the hype everyone knows, see Wikipedia ORM page.).

A while ago someone slapped us with some bench between Rails, Django and Symphony and guess what: Django won hands down. What does it mean winning with raw numbers? To me not much but winning fairly is better than losing cheating. The thing I liked most in that bench page was not the bench itself but a comment at the end:

When connecting rails to Oracle the performance dropped to the extent it made any production use of the product useless.

That sentence is evil because recalls me words like enterprise, enterprisey and whatever that most of the time make me smile.

So, about benchmarks and being evil tonight. ActiveRecord trunk repository has two files in the so-called benchmark sub-directory with two benchs. This:

[code lang="python"] ActiveRecord::Base.establish_connection(:adapter => “mysql”, :database => “basecamp”)

class Post < ActiveRecord::Base; end

RUNS = ARGV[0].to_i

runtime = Benchmark::measure { RUNS.times { Post.find_all(nil,nil,100).each { |p| p.title } } }

puts “Runs: #{RUNS}” puts “Avg. runtime: #{runtime.real / RUNS}” puts “Requests/second: #{RUNS / runtime.real}” [/code]

and

[code lang="python"] conn = Mysql::real_connect(”localhost”, “root”, “”, “basecamp”)

RUNS = ARGV[0].to_i

runtime = Benchmark::measure { RUNS.times { result = conn.query(”SELECT * FROM posts LIMIT 100″) result.each_hash { |p| p["title"] } } }

puts “Runs: #{RUNS}” puts “Avg. runtime: #{runtime.real / RUNS}” puts “Requests/second: #{RUNS / runtime.real}” [/code]

Let the code and my evilness speak for itself, it’s not time to be sarcastic.

Rebbin 0.9

I released a you-should-have-released-it-months-ago version :)

What’s new?

  • SQLite 3 support

What’s changed?

  • Requires Rails 1.0
  • Atom 0.3 feed dropped

http://rebbin.berlios.de/

A live version here: http://pasteserver.net/

Rebbin SVN

The svn version of Rebbin now supports SQLite 3, lighttpd and runs on top of Rails 0.14.3. Try it out!

Rebbin 0.8

I released another version with some improvements and few bugfixes

What’s new?

  • Atom 1.0 feed (in addition to RSS2.0 and Atom0.3 already there)
  • Wordwrap for text-only snippets
  • Basic comment support for each paste
  • Use Rails caching system and custom caching for colourised snippets

What’s changed?

  • Wants Highlight 2.4
  • BSD licensed

What about the future?

I set aside the idea to write a ruby lexer for now, I will try to add SQLite support and maybe improve comments with Ajax

http://rebbin.berlios.de/

Rebbin 0.7

I released another version with some improvements and a lot of bugfixes

What’s new?

  • RSS 2.0 and Atom 0.3 feeds
  • XMLRPC and SOAP support:
    • num_of_pastes: returns the number of pastes
    • get_languages: returns the list of supported languages
    • add_paste: adds a paste to the pastebin and returns the id
    • get_paste: returns the paste with the given id
    • get_latest_pastes: returns the latest pastes
  • Scheduler to destroy pastes automatically, it destroys pastes older than 48h and it runs every 24h in a separate thread
  • Improved sorting in archive page

What’s changed?

The support for text wordwrap has been removed

What about the future?

The main issue is the external highlighter I want to replace with custom-clean-safe-fast-ruby-lexer_based code. I tried syntax but it doesn’t fit my needs. It will take a lot of time but I think it’s the way to go.

http://rebbin.berlios.de/

Rebbin

What is it?

Rebbin is an open source pastebin developed in Ruby.

What is a pastebin?

A pastebin is a web application which allows its users to upload snippets of text, usually samples of source code, for public viewing [...]

Why it does exist?

Because I didn’t know what to code to learn Rails and meanwhile Ruby :)

Why did you release it?

For the glory :D

Which features it has?

  • Syntax highlighting
  • Export pastes as plain text
  • Easy navigation interface
  • Archive page with sorting capabilities
  • Store author name in a cookie
  • Unicode (UTF-8) support
  • PostgreSQL and MySQL Schemas
  • Basic unit and functional testing
  • Markup is XHTML 1.0 transitional valid
  • Global in-memory cache
  • Text wordwrap

Where I can find it?

http://rebbin.berlios.de/

Jumping on the Rails bandwagon

Yesterday I started looking at Rails and it looks good, very good. I see and catch a glimpse of its power and its features and I’m feeling good. Don’t like hype so much but the product itself is cool :)

What can I say? Got through Four Days On Rails tutorial and altough I’ve found some things that I don’t like too much I enjoyed reading it :)

Ruby HTML/eRuby reminds me ASP3/PHP/PSP and so on, I prefer something like Cheetah and scaffold didn’t impress me much, but seems ok for little apps.

I admit that my post isn’t enthusiastic as others but I like this “stuff” and now I want to try writing a test app from scratch (speaking about “from scratch” in Rails could make you smile but that’s it…)

See you on irc.freenode.net/#rubyonrails (I’m rhymes) :D