EuroBasket 2009 — Day 3

I didn’t get to see the match, as it was too early, but France did it: they won against Russia! 64–69. They have been led almost the whole match, but they have always been in the game. Diaw has done a very good game, along with Parker (again) and Turiaf. Very good victory which puts them at the top of the new group E, along with Greece which destroyed Israel 106–80. Croatia in the meantime beat Macedonia 81–71; Macedonia will be the next opponent of the French team.

Next on the schedule was Slovenia–Spain which I had pointed out as a match to keep an eye out for. And it didn’t fail to entertain! Although Slovenia was led by 15 points at the end of qtr 3, they managed a crazy come back (especially thanks to Dragić, who managed 2 unbelievable steals) and in the 4th quarter came back to -5 with 32s to go… Quick fouls and a shaky Spanish team allowed Lorbek to score the equalizer on the buzzer, 78–78, finishing the amazing turnaround to drag Spain into extra-time. Unfortunately, the price paid was a bit too high (too many fouls), and Spain just walked through the extra-time to win 90–84. At the same time, Turkey confirmed their supremacy over Group D and won against the Polish home team, 69–87.

Germany–Latvia was to be tense, as the 2 teams were contending for the 3rd place, synonym of qualification for the next round. And tense it was! Latvia have been in the lead most of the game, and needed 8pts to go through. And with 22s to go, they had them (57–68) until Jagla scored a 3 pointer, followed by 2 free-throws. The game finished 62–68, and Latvia was out. They can have regrets, as they only scored a 19/38 on free-throws…

latvija.png

Finally, Lithuania needed a win to go through, and they got one. But how painful it was… Bulgaria seemed to be in good shape, but after a series of missed 3 pointers in the second half, and under the pressure of a bossy Lavrinovic, they just collapsed and lost the 4th quarter 27–13. Lithuania won 84–69, which is rather severe, considering they have been led for most of the game. Great Britain lost 59–77 to Serbia.

This Day 3 was the last of the Preliminary Round, and Israel, Bulgaria, Latvia and Great Britain are now out, and the other teams are now in 2 groups for the Qualifying round:

  • Group E: Greece, France, Croatia, Germany, Russia, Macedonia
  • Group F: Turkey, Slovenia, Serbia, Spain, Poland, Lithuania

The points gathered so far are kept (except the ones gathered against eliminated teams, if I understood correctly, because it’s hard to find a proper description of the competition system), and the last 2 teams of both group will go home.

Matches to watch on Friday and Saturday: Russia–Croatia, France–Macedonia, Turkey–Spain, Lithuania–Slovenia.

^{1} It appears that Kambala (“better than Rocky” indeed) elbowed Hamann in the face after the match, and the latter had to be brought to the dentist for a broken tooth. Kambala will more than likely face a lengthy ban.

Installing Rubygem on Cygwin

  1. Download the rubygem tgz from RubyForge,
  2. Type the following commands:
$ cd /tmp
$ tar xvzf rubygems-1.3.5.tgz
$ cd rubygems-1.3.5
$ ruby setup.rb install
$ gem update --system

If you’re behind a proxy, you can run gem by setting the following environment variables:

export HTTP_PROXY=http://x.x.x.x:80
export HTTP_PROXY_USER=bozo
export HTTP_PROXY_PASS=pipo

EuroBasket 2009 — Day 2

Crazy, crazy day. Absolutely crazy.

It started with a major upset: Germany beating Russia. I told you to keep an eye out for this match yesterday because Germany did look dangerous – and they did not disappoint. At the same time, Macedonia was beating Israel 79-82 in what became Macedonia’s first win ever in the EuroBasket; Israel is now out of the competition with 2 defeats.

Then, Lithuania was beaten for the second day in a row by an amazing Polish team which showed that they really meant business. And in the end, business means +11 for the home team, putting Lithuania in a dangerous position: they must win tomorrow’s match against Bulgaria if they want to go through. Slovenia disposed of Serbia easily enough, never really threatened. The final result is 80–69, and Slovenia secured the top spot of Group C.

France probably thought it would be an easy task against Latvia, but it was far far from easy. Extremely perturbed by the zone defence of the Latvian team, the French started very slowly, but turned ahead at the end of qtr1. The second quarter was tough, with the first point scored after nearly 5 min for Latvia, who finished the quarter on a stunning 13–3. Fouls were raining on the French players, and the prospect of the second half was uncertain. But like yesterday, the French visibly upped their defence agressivity in the 3rd quarter, and the points started to come, notably from 3 pointers by Diaw and De Colo, and the unstoppable Tony Parker, who made a real show in the second half. He was absolutely everywhere: jump shots, penetrating and provoking fouls, free throws. It is hard to deny that France won mostly thanks to him. Latvia collapsed in the 4th quarter, and France finally won 51–60, and is now qualified for the next round. Meanwhile, Greece won against Croatia, 76–68 and is now assured to get the top spot in Group A.

Finally, it could have been an incredible upset: despite losing 84–76 to Spain, Great Britain have made a fantastic match, and only lost on silly turnovers, missed free throws, and lack of experience. Their 3-point scoring was quite impressive, and GB were leading +4 with 5 min to go against the World Champion. They were some very worried looks in the staff and on the pitch, whereas the GB fans were absolutely thrilled. Good stuff. It is however extremely very worrying for Spain who came very close to elimination tonight. In the meantime, Turkey carried out their good tournament with a 66–94 destruction of Bulgaria. Turkey will finish first of Group D.

Match to look out for tomorrow:

  • Macedonia–Croatia: game for the second spot in Group A
  • Russia–France: the clash in Group B. France have a lot to prove, and Russia will not want to lose a second day in a row. I don’t see France winning if they play like today, though.
  • Spain–Slovenia: Spain really have to wake up; and Slovenia will want to prove they are the leaders of this group C. I predict a major bollocking in the changing room for the Spaniards, and a visible recovery on the pitch. It should be good.
  • Lithuania–Bulgaria: I cannot possibly imagine Lithuania losing this one, but given the matches so far, you never know…

Find a Class in Jars (II)

This one is a follow-up to this post, finding a class in jars under a certain folder. But this time, it is obviously in Ruby:

require ’java’


def scanDir(className, dirname=’C:’)
  begin
    Dir.foreach(dirname) do |filename|
      next if (filename == "." or filename == "..")
      if File.directory?(filename)
        scanDir className, filename
      elsif File.fnmatch("**.jar", filename)
        scanJar(className, File.join(dirname, filename))
      end 
    end
  rescue SystemCallError
    $stderr.print "IO failed: " + $!
  end
end


def scanJar(className, jarfile)
  entries = java.util.jar.JarFile.new(jarfile).entries
  entries.each do |entry| 
    if entry.getName().to_s.index(className) != nil 
      puts "#{jarfile}: #{entry}\
"
    end
  end
end


if ARGV.size == 2
  scanDir ARGV[0], ARGV[1]
else 
  puts "Usage: jruby search_jar.rb <class_name> <directory>"
end

You then call it as follows:

jruby search_jar.rb MyNiceStub C:\\application_server\\lib

Edit: Ideally, something like Rake’s FileList would make finding the jar in subfolders a trivial task…

JRuby and Java Iterators

Java Iterators in JRuby behave exactly as you’d expect them to… It’s always a pleasant surprise.

require ’java’
# Iterator
list = java.util.ArrayList.new
list.add("one")
list.add("two")
list.add("three")
list.each{ |item| puts item.upcase }
# Enumeration
jar = java.util.jar.JarFile.new("jruby.jar")
jar.entries.each{ |entry| puts entry.to_s }
C:\\>jruby -v
jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d) (Java HotSpot(TM) Client VM 1.
5.0_15) [x86-java]

EuroBasket 2009 — Day 1

The biggest surprise of Day 1 of the EuroBasket 2009 is for me Turkey teaching Lithuanian basket to Lithuania by scoring 3 pointers after 3 pointers (7/17 opposed to 9/25 for Lithuania!). Led by 10 pts with less than 2 min to go, Lithuania has never really seemed able to recover from the panic stance they displayed after the crazy session soon after half-time, despite coming back to -2 at the beginning of q4. Turkoglu and Arlsan were imperial.

The other surprise is… actually not so surprising. Spain were defeated by a Serbia in great form (-9) in a display very much in line with what they showed in Vilnius a few days ago where they suffered an “embarrassing” -22, and a not so convincing win against Poland in August. Hopefully, they’ll become themselves again after a match against Great Britain that should be a formality.

France did a good match against Germany, and won 70-65. It was a tense match, with Germany leading for quite some time, until the 3rd quarter when the French decided to defend quite high and aggressively, which earned them a 17-11 that made all the difference in the end. The 4th quarter is all Tony Parker, typical of a NBA money time, but I think what made the difference is that 3rd quarter.

Tonight, France is playing Latvia and could get their qualification for the next round if they win. Other matches to watch: Greece–Croatia, Germany–Russia, Slovenia–Serbia.

EuroBasket 2009

EuroBasket 2009 is starting on Monday in Poland with a crucial France – Germany at 7.15pm in Gdansk.

France had some troubles to qualify in the playoffs, but finally won the final match against Belgium to win their ticket. Ahead of the match on Monday, I decided to invest in the FIBAtv.com package, and despite the usual problems with my credit card (apparently, AML software have troubles understanding I’m a Frenchman with a French card living in Ireland), I am currently watching Argentina v. Uruguay. Well, let me tell you, it’s pretty amazing: I was a bit concerned with quality, but full screen, it’s actually amazing. 22€ well spent.

lietuva.png

Ruby and Oracle OCI8

Ruby comes handy for little nifty scripty stuff to be done before running unit tests. I use it in particular to do some database cleanups before running a whole suite of tests — it is far more efficient than dbUnit for simple tasks. ruby-oci8 is dead easy to install and to use, so that’s what I’m using and describing here.

(I did the following on Windows, still have to try on Ubuntu)

  1. Install the ruby-oci8 gem:

    >gem install ruby-oci8
    Successfully installed ruby-oci8-2.0.2-x86-mswin32-60
    1 gem installed
    Installing ri documentation for ruby-oci8-2.0.2-x86-mswin32-60...
    Installing RDoc documentation for ruby-oci8-2.0.2-x86-mswin32-60...
    
  2. Make sure the Oracle client folder is in the PATH.
  3. Create a sample file:

    require ’oci8’
    conn = OCI8.new(’user’, ’password’, ’tnsname’)
    conn.exec(’select table_name from user_tables’) { |r| puts r }
    conn.logoff
    

Make sure you replace tnsname with the value from your tnsname.ora file. You can then run your nice test with:

ruby oracle.rb

Or call it from ant with an exec task. The API is there, and quite straightforward.