N8x0 Amazon bestsellers

I’ve read similar stories but the actual position in Amazon.com was different. Now the positions are quite good.

Here you can see that the N800 is #1 and the N810 is #5.

I guess we must be doing something good ๐Ÿ™‚


N810 ars technica review

ars technica has a comprehensive review of the N810, and it’s positive ๐Ÿ™‚

Like the N800, the N810 delivers one of the best experiences in mobile web browsing on the market. The new browser that ships with OS2008 is truly outstanding, and most of the rest of OS2008 is pretty darn impressive too. For Linux enthusiasts as well as regular users, Nokia’s Maemo-based software platform offers power, flexibility, and ease of use.

Continue reading

Links for 08.05.07: Slashdot stuff, Open Source releases

Phew, I have quite a lot of links to post this time.

Ruby vs Python on Web2.0: Twitter

I always have said that I like Ruby much more than Python, but I really have not tried Python that much.

Here I’m going to port my twitter library from Ruby to Python and write down the things I find out.

Resulting code in Python:

#!/usr/bin/env python
import twitter
c = twitter.Connection("myuser", "mypassword")

Resulting code in Ruby:

#!/usr/bin/env ruby
require 'twitter'
c = Twitter::Connection.new("myuser", "mypassword")

I preffer “Mod::Class” syntax over “mod.Class”. That’s possible due to extensible module syntax in Ruby, where you can have different modules in the same file.

Twitter module in Python:

import rest
class Connection:
	url = "https://twitter.com"
	def __init__(self, username = None, password = None):
		self.conn = rest.Connection(self.url, username, password)
		self.status = Status(self.conn)
class Status:
	def __init__(self, conn):
		self.conn = conn
	def update(self, message):
		res = self.conn.request_post("statuses/update.xml", {"status": message})

Hell, where do I start?

  • __init__: I don’t like to type __whatever__
  • self on every function: I don’t like this either, can’t it just be assumed?
  • self.var: I like Ruby’s @var much better
  • None: I prefer nil, nul, or whatever

Twitter module in Ruby:

require 'rest'
module Twitter
	URL = "https://twitter.com/"
	class Connection
		def initialize(username, password)
			@conn = REST::Connection.new(URL, :username => username, :password => password)
			@status = Status.new(@conn)
		attr_reader :status
	class Status
		def initialize(conn)
			@conn = conn
		def update(message)
			res = @conn.request_post("statuses/update.xml", :status => message)
  • I can define the module, or modules
  • I can send hash tables as function arguments without {}’s, just :k => v
  • I can even specify that I want the status variable to be read only very easily with attr_reader

Some other things I don’t like about Python:

In Ruby, since everything is an object, so is an URL, and the URL object can be passed along a lot of functions very easily, and its members can be modified, so I can change que query part of it any time I want, that’s not possible with Python’s urlparse object.

Who thought “?”.join(array) was a good idea? In Ruby you do the same as array.join(“?”).

Arrays and Hashes work in weird ways, for example:

foo = {}
print foo["bar"]

That makes Ptyhon pop, while in Ruby you simply get nil, that makes programming with Hashes so much easier. For example: v = foo[“bar”]; if v….

Also, if you try ” “.join(“foo”, None]) Python would crash, while Ruby’s [“foo”, nil].join(” “) will not.

For web2.0 stuff HTTP Basic Authorization is, well, basic. In Python you either have to implement it yourself, or try urllib2’s API which I don’t understand yet.

Oh, and there is no switch/case statement.

You can check side by side both versions of the code:

So, I still love Ruby ๐Ÿ™‚

Links of 15.04.07: Web2.0, Open Source Software and Books

Ruby on Rails on Fedora Core 6

I just got my shinny new FC6, and I didn’t find a fool proof way to install Ruby on Rails, so here it goes.

First install the following packages:

  • ruby: The Ruby interpreter.
  • ruby-libs: Necessary to run Ruby.
  • ruby-devel: If you plan to build an extension or an application embedding Ruby.
  • ruby-rdoc: Generates Ruby documentation.
  • ruby-mysql: MySQL API module for Ruby.
  • ruby-irb: Interactive Ruby, so you can use it from the terminal

Fedora doesn’t come with Ruby on Rails, so you will need to install it manually. The best way to do that is with RubyGems, but Fedora doesn’t come with that either, so you will need to install it first.

The process is explained in here.

Download RubyGems from here.

Extract, and then as root:
ruby setup.rb

You’ll get:
Successfully built RubyGem

Now that you have RubyGems, you can install Ruby:
gem install rails --include-dependencies

You’ll see (among other things):
Successfully installed rails-[version]

Note: If you don’t have rdoc you’ll see the following non-fatal error:
no such file to load -- rdoc/rdoc (LoadError)

That’s it, now if you want to try it:
rails testapp
cd testapp
ruby script/server

Go to to see it in action ๐Ÿ™‚

You can also check: