Alex talks.

Olexiy (Alexey) Prokhorenko likes to live in different places and blog about different things. Ruby, JRuby, Java, Javascript, Scala, Rails, Spring, Hibernate... just to name a few. And different aspects of product management and agile software development. On the other note, he also loves speed in form of flashy cars and sportbikes, so those topics may find their place here, too.

Saturday, January 30, 2010

Matthew rides motorcycle...

And I do not even have one (yet) ;-(

Posted via email from olexiy prokhorenko's blog

Friday, January 29, 2010

So, iPhone #again #why #blackberry #switched #ipadnano

Everybody is writing about iPad this week, but I guess I want to be
special and write about iPhone (again) and my 100x time switching from/
to Blackerry to/from iPhone. It is definitely a love-hate relationship
between me and these devices. None of them is good enough to be 100%
my device, and what it feels that I am getting tired of lousiness of
each of them time to time.

This time I am switching from Blackberry Bold 9700 (which was also
known as Bold2) to my lovely wife's (http://twitter.com/bazinia hi!)
iPhone 3GS. I don't think I should write again that Blackberries
quality is less break-prone than iPhone's (total count of my returns/
exchanges of Blackberries I had is close to 10. Compare this to iPhone
which I never had to repair/exchange since using 1G (the very first
one), so I'll just concentrate on what I will and will NOT miss:

I will miss:

1. Keyboard. Just forcing myself into virtual one, and I know that
real keyboard is much better.
2. Battery life. Crap, they need to sell extra wall adapter for iPhone
and all other possible adapters to plug anywhere where you are.
Because iPhone sucks with battery big time.
3. LID which indicates new email/messages/whatever. Really helpful. I
can just take a look at my device to know if there is something
"inside".
4. Customizable profiles and ringtones for everything. Never thought I
will use them, but man, they are so convenient.
5. Tethering. It's very easy on Blackberry, with Mac, over Bluetooth,
which makes life easier and more portable. Loved it. iPhone? Tethe...
what? Jailbreak only? Or cought out $60 on top we are paying already
to greedy AT&T? Yeah... NO.
6. Multitasking. Didn't use it as much as I thought, that's why it's
the last item on the list, but still.

I guess that's it. Now, the list of what I WILL NOT miss:

1. Lack of Apps. I didn't think they are so useful but I am sporting
like 20 apps (on iPhone, not games) now which actually *are* useful.
2. Plasticish feel. It's the build quality of Blackberries. It's poor
comparing to iPhone. Like really poor.
3. Stupid BIS. What the fuck, really? No, RIM, really? At least 3
major problems in Northern America within 6 months? And that's
reliable messaging device then?
4. Browser. I wouldn't call it so. It's a laught on this word. It's a
piece of crap which cannot be called browser. Multitasking to launch
two browsing windows? No, impossible. And no need to tell me that I
had to checkout Opera or Bolt, etc. Been there, done that. No.
5. No two-way IMAP support. So, I've joined Blackberry world in 2009
and now it's 2010, and rumors about coming soon support are floating
around I guess since 2005. Not happening. I guess it's a very terribly
hard protocol to use. Or may be "corporate" business people do not
care. On the other hand RIM has no problems developing it's Twitter
client (like 5-10 exising ones are not good enough!) - so that means
that they want to target business people who don't give a fuck about
email support but all into tweeting. Hmmm... Nice breed.

I didn't add a lot of stuff here. Like I was complaining before that
Blackberry is more like a phone, but unfortunatelly they are becoming
less and less, closer to iPhones, when dialing a number is one of the
features, but not major product offering. Lags, etc. - they have it
all. And bunch of other stuff. It all matches this or that way, so it
does not matter.

After all, sum it up an you'll see that phones are equal. One is
equiped with nice features and other one has other. Both fucked up
with flaws. But at the end it's all about what fits you the best, and
in my case I guess I'll stick with iPhone for now.

Posted via email from olexiy prokhorenko's blog

Saturday, December 19, 2009

Fun with #ruby and #hbase for beginners.

This blog post is mostly educational for myself, as I am just trying to put my hands on HBase, so these are kind of "first steps" for anybody who never tried it before (like myself). My plan is to build simple application using HBase for storage (certainly, no expectations to make somehow "production ready", but it will be using HBase, so it will be "scalable" :-) and describe all the steps right here.

Let's begin with simplest. I am using Mac OS X, so you either follow the same steps or adjust them for your OS. First - our lovely process of installing new toys. I assume that we all have Java already, so not covering that. Installing HBase -- download it from http://hadoop.apache.org/hbase/ and then this is what I do:

o-macair:~ olexiy$ cd /usr/local/
o-macair:local olexiy$ tar -zxvf ~/Desktop/hbase-0.20.2.tar.gz
...
o-macair:local olexiy$ ln -sf hbase-0.20.2 hbase
o-macair:local olexiy$ ls -al | grep hba
lrwxr-xr-x   1 olexiy  wheel   12 Dec  9 21:23 hbase -> hbase-0.20.2
drwxr-xr-x@ 16 olexiy  wheel  544 Nov 10 10:24 hbase-0.20.2

It's that simple and actually the second step is my own preference, just to create symlink, for my own convenience. Now, let's verify that environment variables are set properly:

o-macair:~ olexiy$ echo $JAVA_HOME
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
o-macair:~ olexiy$ echo $HBASE_HOME
/usr/local/hbase
o-macair:~ olexiy$ echo $PATH
/opt/local/bin:/opt/local/sbin:/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin:/usr/local/hbase/bin:/usr/local/mysql/bin:/usr/local/maven/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

So far so good. But not enough - to do everything fast we want to cut corners -- we need to define JAVA_HOME in HBase's conf:

o-macair:~ olexiy$ cat /usr/local/hbase/conf/hbase-env.sh  - grep JAVA_HOME
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

And also let's check "System Preferences", then "Sharing" and see if "Remote Login" is enabled. It should be, because it enables SSH which is required before we can launch HBase.

Now we do have everything we want and need, so let's move slightly forward. Now, we have a dilemma. What are we going to use for our application? Will it be Java or Ruby? I decided to stick to Ruby, as my test code will very simple, and not sure if I want to do (but have to agree - more natural choice) Java here.

But the decision of which framework to use for Ruby is tough. I though to use Ruby's HBase gem which is linked from HBase's website. You can check it out here http://github.com/sishen/hbase-ruby. But, I knew that there is also other gem created by guys from Rapleaf. Here is the original blog post I found http://blog.rapleaf.com/dev/?p=16 and it gives a simple example of how gem could be used, but you'll also see the "kind of" same example down below. At the end I found myself using third option http://github.com/greglu/hbase-ruby/ which is an "official" gem modified to be used with HBase's Stargate REST server.

o-macair:hbase-with-ruby-first-try olexiy$ sudo gem install hbase-ruby -s http://gemcutter.org
Building native extensions.  This could take a while...
Successfully installed json-1.2.0
Successfully installed hbase-ruby-1.1.3
2 gems installed
Installing ri documentation for json-1.2.0...
Installing ri documentation for hbase-ruby-1.1.3...
Installing RDoc documentation for json-1.2.0...
Installing RDoc documentation for hbase-ruby-1.1.3...

Fast and simple. We seems like having just everything. Oh, sorry - I didn't mention that I do have Ruby pre-installed with my Mac OS X:

o-macair:~ olexiy$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]

But I guess it's not that important especially after we already installed HBase gem :-)

So, what kind of application are we going to build, what do you think? Something scalable, big and certainly very new? May be next time. I decided to build something better. Like forum! :-) So, our requirements to the forum are the following:
- It definitely needs to have user. Each user has name and email.
- It should have topics for discussion. Each topic has name and actual description.
- And we need comments. Each comment is posted by user for some topic and has the body of the comment.

Disclaimer: please, I do understand that forum is simple, stupid and easy example. That's why I chose it. And that's why I do not care if you think RDBMS works better for this kind of application. It's an example.

Fairly simple, don't you think? So, rolling our sleeves and here we go. We should start with reading documentation, though. Very helpful - http://wiki.apache.org/hadoop/Hbase/DataModel, http://wiki.apache.org/hadoop/Hbase/HbaseArchitecture and short but nice reading http://jimbojw.com/wiki/index.php?title=Understanding_HBase_and_BigTable. There is also basic BigTable document from Google http://labs.google.com/papers/bigtable.html but it's well too dry and basic, so not sure I got from it anything useful. ;-) But I see necessary to suggest you going through which was a very helpful presentation for me.

Before we even jump into coding we need to build storage structure. We have our requirements to the project listed above, so let's think (in terms of HBase) what we need to have. As my background was mostly with RDBMS I am almost hundred percent sure I didn't build the correct architecture for HBase, but what a heck, you learn from mistakes. ;-)

Launch HBase:

o-macair:~ olexiy$ start-hbase.sh
Password:
localhost: starting zookeeper, logging to /usr/local/hbase/bin/../logs/hbase-olexiy-zookeeper-o-macair.out
starting master, logging to /usr/local/hbase/bin/../logs/hbase-olexiy-master-o-macair.out
Password:
localhost: starting regionserver, logging to /usr/local/hbase/bin/../logs/hbase-olexiy-regionserver-o-macair.out

Nice. My tiny Macbook Air feels so powerful now, when it's running HBase. Just kidding :-) To create tables and stuff we want to use HBase Shell http://wiki.apache.org/hadoop/Hbase/Shell - tiny tool, but it helps to get things going faster.

Let's begin doing that one by one. So, we want table "userstable".

o-macair:~ olexiy$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Version: 0.20.2, r834515, Tue Nov 10 10:07:05 PST 2009
hbase(main):001:0> create 'userstable', {NAME => 'maininfo'}, {NAME => 'additionalinfo'}
...
0 row(s) in 6.2910 seconds
hbase(main):002:0> scan 'userstable'
09/12/13 14:38:56 DEBUG client.HConnectionManager$TableServers: Cached location address: 192.168.1.64:64336, regioninfo: REGION => {NAME => 'userstable,,1260743863388', STARTKEY => '', ENDKEY => '', ENCODED => 619697624, TABLE => {{NAME => 'userstable', FAMILIES => [{NAME => 'additionalinfo', COMPRESSION => 'NONE', VERSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}, {NAME => 'maininfo', COMPRESSION => 'NONE', VERSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}]}}
09/12/13 14:38:56 DEBUG client.HTable$ClientScanner: Creating scanner over userstable starting at key ''
09/12/13 14:38:56 DEBUG client.HTable$ClientScanner: Advancing internal scanner to startKey at ''
09/12/13 14:38:56 DEBUG client.HConnectionManager$TableServers: Cache hit for row <> in tableName userstable: location server 192.168.1.64:64336, location region name userstable,,1260743863388
ROW                          COLUMN+CELL                                                                     
09/12/13 14:38:56 DEBUG client.HTable$ClientScanner: Finished with scanning at REGION => {NAME => 'userstable,,1260743863388', STARTKEY => '', ENDKEY => '', ENCODED => 619697624, TABLE => {{NAME => 'userstable', FAMILIES => [{NAME => 'additionalinfo', COMPRESSION => 'NONE', VERSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}, {NAME => 'maininfo', COMPRESSION => 'NONE', VERSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}]}}
0 row(s) in 0.0170 seconds
hbase(main):003:0>

That's quite a thing we did. Let's cover everything line by line. So our first command was:

create 'userstable', { NAME => 'maininfo' }, { NAME => 'additionalinfo' }

In HBase Shell this means -- create table with name 'userstable' which has two column families 'maininfo' and 'additionalinfo'. Those two families - if we put it in simple words - is like predefined list of "columns structure". I.e. in our case we intend to keep "full name" and "password" in 'maininfo', and "city" and "state" in 'additionalinfo'. So, it's for our organizing of things.

Next useful line is:

scan 'userstable'

Which gives us everything about and from this table. We did it to be sure that our tables is really here, and certainly it yet has nothing inside. Let's fix that, and fill our table with some data:

hbase(main):004:0> put 'userstable', '20091213093540', 'maininfo:fullname', 'Olexiy Prokhorenko'
hbase(main):005:0> put 'userstable', '20091213093540', 'maininfo:email', 'olexiy@prokhorenko.us'    
hbase(main):006:0> put 'userstable', '20091213093540', 'maininfo:password', 'zup3rpazzv0rd'    
hbase(main):007:0> get 'userstable', '20091213093540'
...
COLUMN                       CELL                                                                            
 maininfo:email              timestamp=1260756864019, value=olexiy@prokhorenko.us                            
 maininfo:fullname           timestamp=1260756857570, value=Olexiy Prokhorenko                               
 maininfo:password           timestamp=1260756870079, value=zup3rpazzv0rd                                    
3 row(s) in 0.6730 seconds

Again, step by step explanation. First important line:

put 'userstable', '20091213093540', 'maininfo:fullname', 'Olexiy Prokhorenko'

So we save record in table 'userstable', for row with key '20091213093540' (in a second more details why it is so ugly), to 'maininfo' section into column 'fullname' my full name, which is Olexiy Prokhorenko. ID (or row key) for every user (and actually topic, etc. -- we will keep same idea everywhere) is some kind of timestamp -- YYYYMMYYhhmmss - simple enough to keep, and will work pretty fine unless we get users created more often than every second.

Second line and third line:

put 'userstable', '20091213093540', 'maininfo:email', 'olexiy@prokhorenko.us'    
put 'userstable', '20091213093540', 'maininfo:password', 'zup3rpazzv0rd'

Is the same, except that we save the email and password.
Third line actually gives us more warm feeling of filling table:

hbase(main):008:0> get 'userstable', '20091213093540'

Our table knows about our user 'olexiy@prokhorenko.us'!!! Woo-hoo! How cool is that?

Now, as we are getting more comfortable, let's create table for topics and fill it with couple records (please note, that output of commands is eliminated for convenience) - and note -- that we also creating one more user (with very bad password :-), to make our life more interesting!

hbase(main):009:0> put 'userstable', '20091213120030', 'maininfo:fullname', 'John Axe'
hbase(main):010:0> put 'userstable', '20091213120030', 'maininfo:email', 'westla7@gmail.com'
hbase(main):011:0> put 'userstable', '20091213120030', 'maininfo:password', 'john'

Okay, another user created.

hbase(main):012:0> create 'topicstable', { NAME => 'content' } 
hbase(main):013:0> put 'topicstable', '20091213161745', 'content:name', 'Blackberry Bold 9700'
hbase(main):014:0> put 'topicstable', '20091213161745', 'content:description', 'Discussion about Blackberry Bold 9700 and probably all other Blackberry phones.'

Now, we created 'topicstable', where we keep the content. ID for row key is the same idea as above.

hbase(main):015:0> create 'commentstable', { NAME => 'content' }, { NAME => 'postinginfo' }
hbase(main):016:0> put 'commentstable', '20091213161745-20091213120030-20091213172000', 'content:body', 'Hey, my first comment!'
hbase(main):017:0> put 'commentstable', '20091213161745-20091213120030-20091213172000', 'postinginfo:author', '20091213120030'
hbase(main):018:0> put 'commentstable', '20091213161745-20091213120030-20091213172000', 'postinginfo:topic', '20091213161745'
hbase(main):019:0> put 'commentstable', '20091213161745-20091213120030-20091213172000', 'postinginfo:replyto', ''

Almost same here. We create 'commentstable', which keeps the comments. It knows the author and the topic it was posted it, as well it keeps a track if this comment is reply to some other reply with 'postinginfo:replyto'. Please note, I decided to user composite row key for comments. First part of it (before - sign) is topic ID, and the second part is user's ID, and then the actual comment ID. In this case we pretty much sure until some topic is getting comments by same user more often than once a second - we are fine.

hbase(main):020:0> put 'commentstable', '20091213161745-20091213093540-20091213221000', 'content:body', 'I can comment on your comment!'
hbase(main):021:0> put 'commentstable', '20091213161745-20091213093540-20091213221000', 'postinginfo:author', '20091213093540'
hbase(main):022:0> put 'commentstable', '20091213161745-20091213093540-20091213221000', 'postinginfo:topic', '20091213161745'
hbase(main):023:0> put 'commentstable', '20091213161745-20091213093540-20091213221000', 'postinginfo:replyto', '20091213161745-20091213120030-20091213172000'
hbase(main):024:0> put 'commentstable', '20091213161745-20091213093540-20091213221250', 'content:body', 'And I can leave my own comment on topic...'
hbase(main):025:0> put 'commentstable', '20091213161745-20091213093540-20091213221250', 'postinginfo:author', '20091213093540'
hbase(main):026:0> put 'commentstable', '20091213161745-20091213093540-20091213221250', 'postinginfo:topic', '20091213161745'
hbase(main):027:0> put 'commentstable', '20091213161745-20091213093540-20091213221250', 'postinginfo:replyto', ''

So we dropped in two more comments by our first user. Everything looks kind of fun, we have everything we need, but let's think how we fulfill those two requirements:
1. Allow to see all comments by user?
2. Allow to see all comments on topic?

First thing comes to my mind is using normal 'scan'. Here we go:

hbase(main):028:0> scan 'commentstable', { STARTROW => '20091213161745-', STOPROW => '20091213161745-99999999999999-99999999999999' }

Will give us all comments on topic.

hbase(main):029:0> scan 'commentstable', { STARTROW => '20091213161745-20091213120030-', STOPROW => '20091213161745-20091213120030-99999999999999' }

This helps us to see all comments by user for specific topic. As you can tell -20091213120030- is a part where we mention ID of user with email 'westla7@gmail.com'.
We still have left one unresolved problem. How do we show all comments by user? We may create the same scan, but do the first part from 00000000000000-... to 99999999999999-..., and then filter out all entries with our user ID, but that does not sound too nice. I do not really like this solution, frankly speaking. It's neither scalable nor pretty.

So, don't you think that we can create referral table? Say something like the following:

hbase(main):030:0> create 'usersreferencestable', { NAME => 'comment' }

And imagine that when we created comments we also for every comment added:

hbase(main):031:0> put 'usersreferencestable', '20091213120030', 'comment:20091213161745-20091213120030-20091213172000', '20091213161745'
hbase(main):032:0> put 'usersreferencestable', '20091213093540', 'comment:20091213161745-20091213093540-20091213221250', '20091213161745'
hbase(main):033:0> put 'usersreferencestable', '20091213093540', 'comment:20091213161745-20091213093540-20091213221000', '20091213161745'

Yes, that's totally a denormalization of data, keeping it same, but let's see. Now to get all comments for user with email 'olexiy@prokhorenko.us' which ID is 20091213093540 we do simple:

hbase(main):034:0> get 'usersreferencestable', '20091213093540'
09/12/13 23:55:34 DEBUG client.HConnectionManager$TableServers: Cache hit for row <> in tableName usersreferencestable: location server 192.168.1.64:64336, location region name usersreferencestable,,1260777299770
COLUMN                       CELL                                                                            
 comment:20091213161745-2009 timestamp=1260777318126, value=20091213161745                                   
 1213093540-20091213221000                                                                                   
 comment:20091213161745-2009 timestamp=1260777312319, value=20091213161745                                   
 1213093540-20091213221250                                                                                   
2 row(s) in 0.0120 seconds

And get as result ID of comment as part of the column name, and actually the value will be the topic ID, which we may want to use for easier access. Totally makes us happy.

At this point we have our database created, filled with data, so let's try and create some Ruby application to do what we need - list topics, list comments to this topic, and list comments by user (you can use http://github.com/westla7/hbase-with-ruby-first-try/blob/master/hbase-shell-execute.txt to run all the commands mentioned above).

By the way, or Ruby application will be accessing the HBase with the help of REST API, which server supports. However, you need to remember to start REST server first -- so do:

o-macair:~ olexiy$ hbase rest start
Starting restServer
2009-12-17 21:20:46.886::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2009-12-17 21:20:46.973::INFO:  jetty-6.1.14
2009-12-17 21:20:47.866::INFO:  Started SocketConnector@0.0.0.0:60050
...

But as I am using http://github.com/greglu/hbase-ruby/ gem which is for Stargate server, we need to launch that one -- and it'll take a little bit more of the efforts:

o-macair:~ olexiy$ cd /usr/local/hbase
o-macair:hbase olexiy$ cp contrib/stargate/hbase-*-stargate.jar lib/
o-macair:hbase olexiy$ cp contrib/stargate/lib/* lib/

And now we launching the server:

o-macair:~ olexiy$ hbase org.apache.hadoop.hbase.stargate.Main
2009-12-19 19:31:47.827::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2009-12-19 19:31:47.886::INFO:  jetty-6.1.14
2009-12-19 19:31:48.183::INFO:  Started SocketConnector@0.0.0.0:8080
...

And keep it open or throw to background, whatever you prefer.

Now, point your browsers to http://github.com/westla7/hbase-with-ruby-first-try and check out the code.

We begin with http://github.com/westla7/hbase-with-ruby-first-try/blob/master/load_user.rb which is a script to load user, and say "Hello" to it. Showing that we can very easily access user's data and manipulate it.

But loading is not enough, so next will go http://github.com/westla7/hbase-with-ruby-first-try/blob/master/load_save_user.rb, which now can create user object and save it into HBase. Which gives us much more power.
Once you run it you'll get user created with the ID shown in the output.
By the way, if you don't like it, feel free to:

hbase(main):035:0> deleteall 'userstable', '20091219103439'

(where '20091219103439' is your created user ID, which you saw in the output)

But we are not going to stop on this. What we want now, is to get list of all users and topics we have. Open http://github.com/westla7/hbase-with-ruby-first-try/blob/master/list_data.rb and you can get an understanding how we can get list of topics we have.

Last, but not least - we are moving ahead to the simplest use case possible for our application. We want to list all the topics, and then list all of comments to every topic, and also user name, who posted each comment. Sounds big 'n crazy? Not really. Run http://github.com/westla7/hbase-with-ruby-first-try/blob/master/complete_list.rb and enjoy:

o-macair:hbase-with-ruby-first-try olexiy$ ruby complete_list.rb
"Blackberry Bold 9700": Discussion about Blackberry Bold 9700 and probably all other Blackberry phones.
   Olexiy Prokhorenko: I can comment on your comment! (reply to: Hey, my first comment!)
   Olexiy Prokhorenko: And I can leave my own comment on topic...
   John Axe: Hey, my first comment!

And - finally, for the sake of 'usersreferencestable', which I created and didn't use -- here is an example how it's possible to show comments by users. As for me - it looks better, but a little bit more wordy - http://github.com/westla7/hbase-with-ruby-first-try/blob/master/other_complete_list.rb

o-macair:hbase-with-ruby-first-try olexiy$ ruby other_complete_list.rb
User "Olexiy Prokhorenko" says:
   I can comment on your comment!
   And I can leave my own comment on topic...

User "John Axe" says:
   Hey, my first comment!

User "Test User" says:
   (nothing, 0 comments)

On this note I should say that I hope that gave you some overview of what you can do with HBase, and may be in general, what "key-value NOSQL" storages can bring to you. There is some headache, and obviously redundancy of data, but it helps to accomplish numerous other things. Before that it was all upon the SQL, now it's all about your code (again :-)

Posted via email from olexiy prokhorenko's blog

Thursday, December 10, 2009

My young man is ready for Christmas days

He is ready and waiting. And singing Christmas songs. :-)

Posted via email from olexiy prokhorenko's blog

Sunday, November 22, 2009

Tethering away now on 9700 (woo-hoo!) + kind of short review

I am a tethering freak. Apparently I really am, as I am doing this almost on all my recent devices (and I've been through quite few of them). And after I did upgrade to Blackberry Bold2 (or Blackberry Bold 9700 :-) I am doing this again. If you've been following me on Twitter (or just reading this blog on the regular basis) you probably already now that I was (and actually still am very satisfied with Curve 8900). The only reason why I did upgrade, is because I was able to get it with the very great deal, basically bringing it that I had to pay only restocking fee, and got the new device. So, I pulled the trigger and got it. And here we go.

The phone feels great - very nicely build, very close to iPhones sturdiness; it's heavy enough, but still it's awesomely comfortable. OS 5.0 makes some differences, feels snappier and just overall more satisfying. I really have on huge problem - and the problem is that multi-language software package Blackberry has for 9700 -- does not have Russian input method. That just SUCKS big time. I know device was released just recently, but what the heck? It does exist for 9000, for 8900 -- why not for 9700?? That just so disappointing!

But anyways, let's move on. I certainly will rant more about non-existing support for Russian input layout on Twitter. Or here. Unless RIM will move on with some updates which include it. :-)

So, tethering. Used the same path I described earlier and used successfully with Curve 8900 - I decided to give it a try again. Did it work? Yes. Flawlessly. And I also now just have to accept that I was wrong saying that 3G on AT&T works same way as EDGE. I was wrong. It does work faster. How fast? Compare yourself -- my data from 3G test:


It's enough fast to do something very comfortably.

Enjoy your Blackberries. :-)

P.S. Give me my Russian input, RIM!!! :-E~~~

Posted via email from olexiy prokhorenko's blog

Thursday, November 12, 2009

Snow Leopard gives me a headache! (Ruby/MySQL/DBI)

So, needed to create tiny Ruby script which will work with MySQL via DBI. It almost ate my brain. Didn't want to work! But I can swear that it did work before (until I upgraded to Snow Leopard!). Found this link http://freaking.hilbrink.org/?p=7 and it happened to be my problem:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

So easy and stupid :-(
Works now.

Posted via email from olexiy prokhorenko's blog

Monday, November 09, 2009

Tethering again, but now on Blackberry Curve 8900

Apparently, my blog becomes a place discussing Blackberry phones, but it's okay. I'll keep up to it, and want to say that tried tethering (using the following instructions) on my Mac with Blackberry Curve 8900. Works just fine. Speed is so-so (it's EDGE only, remember), but works pretty nice to get some small work done.

Love how easy it was. By the way, I find my Curve 8900 really comfortable and sleek. Happy that I chose it over Bold (despite the lack of 3G!), but the camera is awesome, and the phone feels just right. It's an phone, not a toy now :-)

Posted via email from olexiy prokhorenko's blog

By Curve 8900

Posted via email from olexiy prokhorenko's blog

Sunday, November 08, 2009

Had just great time ;-)

Posted via email from olexiy prokhorenko's blog

Saturday, November 07, 2009

So, about iPhone 3GS and Blackberry Bold...

As promised long time ago I am going to do kind of detailed review of my experience using iPhone 3GS and Blackberry Bold. I switched so many times back and forth, so I believe I cannot say that I prefer one to another. I did give up though on Blackberry and currently (and hopefully for a while) on the iPhone, so this is my disclaimer. At the end, this is just my personal experience, so it certainly may be opposite to yours.

So, let's start with the most annoying piece: Reliability and Build Quality.
iPhone had zero problems. Didn't have problems with my old and badly abused iPhone 2G, neither had my wife. No problems with 3GS's. My brother didn't have problems with his iPhone's either. One of my friends got a problem with his iPhone's battery, two days before warranty ended and actually Apple store did replace the phone.
Blackberry gave me some serious hard time. I have used 6 different Blackberry devices in a very short period of time, and 3 (or 4? don't remember really, but it does not matter that much) were brand new, on warranty. They all crashed, rebooted, heated badly (with consequences of being frozen, slowed down, etc.). When it worked it was like a charm. But I actually used "pull off the battery" almost every couple days, and "ctrl+alt+del" used every other day. And you know, it did help. So it reminded me Windows, but heck - I was just thinking it's just a coincidence! Apparently - not. I did dig quite a lot on that, and found out that a lot of people on Crackberry forum were on 2nd or 3rd Blackberry before they found good working phone. Sometimes they had their new phone replaced by refurbished (because these are warranty terms in AT&T) within 2 months.
As for the build quality - I would say iPhone wins hands down. It feels solid and very nicely built, while Blackberry brings some cheap plastic, which is annoying. You can get used to it (comparing to other crap phones like Samsung or whatever else), but it's not iPhone. I do not care about this part too much, but it's just the way it is. Necessary to mention, but it's only up to you if you pay attention to that.
I see the biggest problem here is that RIM is releasing many devices per year, so they know next year you have few devices to choose from, and probably you'll get new one. So there is no need to spend much time and efforts on building nice and solid phone, as customer will get rid of it next year anyway. Apple is not thinking so, that's why you can still see a lot of iPhone 2G around in decent condition, and I wouldn't be alone to say that Apple laptops are living at least twice as much as their PC brothers and sisters :-)

Phone itself. Much happier with Blackberry. It's louder, it heps to dial number faster, you can start typing name and it will go into contacts right away. Very very very much more phone. iPhone still feels like "phone" is just an extra feature among others, not the primary one.

Now, the User Interface. It's very touching and personal, even intimate topic. I happen to like Blackberry UI. It's more serious, if you will, than iPhone's bubbles all over the place. Tired of rounded bubblish icons - but may be it's just me. I did like Blackberry's ability browse through the text with trackball, liked that many things are in text, and that's so easy to navigate. iPhone is very good UI, I just wish I could have customize it? At least some predefined option to make it more "manly"? Or something. It does not affect my productivity with the device, just it would be nice to have something like that.

Keyboard. Like there is much to say here! iPhone has no keyboard. Blackberry has the keyboard. Bold has the best keyboard you can wish for. Very comfortable, very nice feeling, very crazy cool nice keyboard. iPhone has no keyboard -- did I say that already? Yes, I did. But heck, when you are comparing this fact to Blackberry Bold -- you want to say this again. Clearly Blackberry wins for me. And this was couple times a deal breaker for me. It was almost painful to get from Blackberry to iPhone. It literally hurts my fingers ;-)
However, I would not lie -- With landscape keyboard on iPhone you can type really fast. Really comfortable. Relly really an improvement comparing to portrait mode; however, missing real feel is a huge miss for me :-(

Flexibility of Settings. Blackberry wins here again. Very customizable devices. Can do this and that, and also can do this with that. Nevertheless, it failed to support different "From:" for the email accounts (as well as iPhone), and at some point I realized I don't need even half of those customization options. I am stupid, and I am just using what I am using. I don't need too many options. They make me think I missed something. I am pretty fine with what iPhone gives me. Happy that Blackberry does more, sometimes tweaking some minor thing easy makes you feel powerful :-) But I could care less about it. I did like I can use any MP3 track for Blackberry as a ringtone, while for iPhone it's more work. That's the only thing, I guess.
 
Internet and Tethering. Tethering is crazy easy and simple and nice working for Blackberry. iPhone does not have tethering. Well, I remember it did have it in 3.0? But with more recent OS's it does not. You can jailbreak, but I am not going this route.
Internet browsing and Internet apps (like SSH) are much more powerful on iPhone. Everybody knows that, and I am not going to repeat it again. Blackberry, you look like Motorola in 1992 comparing to iPhone for the Internet browsing.
Now, BIS and BES. What the crazy, terrible thing is requirement to have BIS? Why would I need that? Why, no really? Why can't this be an option? RIM is doing this the way -- they are requiring mobile carriers to keep their BISes... weirdo, just another point of single failure (and outages happen) - why would not make it an option? You bring this shit on yourself, so...

E-Mail and IM, and SMSs. I do not use MMSs. They do work on iPhone (finally). But it's not what I care about, so it's not an argument for me. And BBM. I do not use it, and I don't have much friends who are using it. After all, we all can use SMSs, they are not that expensive. And we are using emails. And IM. So BBM -- it's cool, but limit yourself even to big, but still limited Blackberry community - thanks, no.
Now, e-mail and IM and SMS. What I did love that everything goes to one "place" on Blackberry - one folder called "Messages". Yes, there are separate other folders for SMSs, and email accounts, but they all are combined in one. Awesome idea! And the LED indicator -- I can just take a look of my phone and see if I have new email, SMS or IM message... that's worth a lot of me. Really love this, and miss on iPhone. iPhone shows unread counts for every separated entity. Not too useful. Need to remember how many unread emails I had before. Or unread SMS. And I need to "unlock" the phone before I even can understand if I have something new. One tiny indicator would save thousands of my finger swipes :-)
However, the winner is not obvious. Right, Blackberry does push e-mail, but iPhone with MobileMe or GMail (through Exchange configuration) does it too. HTML messages on Blackberry? Save your eyes. iPhone renders them beautifully. Blackberry still does not support just IMAP folders. It does not support two-way sync for GMail (that means if you do something on Web, it does not reflect on your phone). By the way, if you do want to star/archive message from your "Messages" folder - it's not going to happen. To do that you have to go to the separate "email account folder". That's a bummer.

Multitasking. Ahhh, Apple. You suck here. and the iPhone sucks. Because Blackberry's multitasking did work very very very nice. And it did work. And there was multitasking. And, you know, you could never imaging how nice is to have multitasking abilities before you get one (with Blackberry) and then lose them (getting back to iPhone). However, here is my shit to Blackberry's yard. RIM guys. If you do multitasking, why the hell your browser supports only one open page at a time??? What the hell? How crazy is that? My UberTwitter opens page, I want to open another page -- and voila - only one is there. Where are others? Don't know. Neither does Blackberry. There is an option of using Mini Opera 5 beta which has "tabs" feature, but I found it too heavyweight as a browser for my Bold.

Battery Life. Blackberry wins. First, I can change battery. Second, it lasts longer. Only fraction of time, but this fraction is large and powerful enough to show the difference.

Applications. Like Blackberry has them! Just kidding, of course it has, and frankly speaking I am enough satisfied with Blackberry's selection. I did miss couple. Dropbox, online banking apps, Flickr (Blackberry has one, but it's not even close to what iPhone does), SSH.. and games? I do not play them, but for many peope - it's a great "wow" factor.

Media. You can play video and music on your Blackberry. iPhone does it nicer, but still, it's possible on both devices. Comfortably enough. However, when I were in the gym - I couldn't use Blackberry as media device. Unless I just set up playlist and do not touch it. With iPhone I can easily switch/jump/play from song to song, artist to album, and whatever not -- very easily - during working out. UI for media for Blackberry sucks big time, reminds me Windows Media Player.
Photos suck in quality on Bold comparing to 3GS, but "flash" really works nice and in many cases very useful. Video recording - it's cool, but I didn't use much though. And not much sense. With iPhone I can upload my video to Flickr right with app, with Bold it's much more complicated - you either have to email yourself the video in 3GP format, and then do some magic, or you have to download it from your SD card... None of them are natural and simple.


---

I guess I covered everything. At least all those moments were important to me, and may be important for you. Ask questions if you have any, I'll try to answer. Would I want Blackberry again? Yes. Or, if given an option of iPhone with keyboard, I would love to have iPhone with keyboard instead. But I guess this not going to happen any time soon :-\ Droid eventually may be an answer, or may be something else, I don't know. We'll see. I am open to what technology can give me.

Posted via email from olexiy prokhorenko's blog