4.20.2009
Oracle buys Sun!
Is it a better thing having Oracle buy Sun instead of IBM... On the hardware side, it certainly is. On the Oracle announcement page, they clearly said that they will integrate Sun Hardware with their software to package complete solution.
On the software side, Solaris will continue to thrive. Oracle doesn't have any OSes. Java? I do not fear anything bad for Java, and if they do something bad, at least it is open sourced now and can be forked.
On the database side, I guess that MySQL will not be killed. Oracle have their on database, but MySQL can easily fit into their low end offering, even if MySQL can compete on the high end. They will probably integrate some of the Oracle SQl dialect into it so costumer can migrate more easily. They will probably also integrate MySQL dialect into Oracle to also easy that migration path.
On the app server side, I think it,s a bit less clear... But Glassfish is not really a significant competitor to any other app server on the market. They may keep it as the JEE reference implementation, but if they want to cut cost, they may aswell salvage part of it and let the rest die.
Overall, I think I prefer Sun to be acquired by Oracle instead of IBM... But Oracle has less interest toward open source than IBM, so it will be interesting to see how the merger will proceed and what will happen to Jonathan Schwartz who defined Sun's open source strategy.
The next few month will certainly be interesting.
4.06.2009
Sony Playstation 3 (PS3) Blu-Ray failed
The last time I saw it alive, was the day before, when my 21 month old daughter played PS1 Dora The Explorer game on it (it does look better on the PS3 than on the PS1 or PS2 ;-) ). The same evening, I launched a software update to update the firmware to the latest 2.70 version. I let the firmware install and shutdown the PS3 when it was finished.
When I got back from work on Friday, my little baby wanted to play Dora again... So I booted up the PS3 and waited for the Dora game to appear in the menu... But when the little disk spinning icon in the top-right corner of the screen stopped spinning, the game did not appear in the menu.
I tried ejecting and reinserting the disk a few time to no avail. Just to confirm that the disk was not the issue, I put it in my PS2 and it worked... I let my little one play Dora and soon forgot about the issue.
Fast forward a few hours later, with two freshly rented blu-ray movie. None of them loaded. I then tried some of my PS3 games... Not working either. Back to the video rental store to exchange the blu-ray disks for DVDs.
On Saturday, I searched on the Internet in hope of finding others with the same issue after upgrading to 2.70. While I did find some problems with this update, none of them related to the blu-ray drive. When searching for ps3 blu-ray failure, I did find a lot of people having the same issue as I.
On Sunday, I decided to call costumer support. They where very friendly (I did made the mistake of asking for service in french, my native language, as they hook you with an English tech support rep and with a translator) but of no real help beside telling me that my warranty was expired (I got the PS3 as a gift in March 2008) and so that my blu-ray drive decided to go dead a few weeks too late. I mentioned that in the Province of Quebec, we have a consumer law that state "38. Goods forming the object of a contract must be durable in normal use for a reasonable length time, having regard to their price, the terms of the contract and the conditions of their use." It means that consumers can expect to be under warranty for a reasonable length of time (which may be greater that the warranty period offered by the manufacturer). The rep stayed silent when hearing this. Like he stayed silent when I specified that the failure happened after updating the firmware. The only thing that he was able to say was that it would cost me 169$CAN +TX to have it serviced and that the shipping will be free! They will send me a box to put the PS3 in and to ship it back to them. That is kind of costly... Almost half the price of the PS3. I could get an XBox 360 for just a little bit more.
So I guess I'll have to pay for the repair, if I want to play games in the near future, and then send them a nasty formal notice to ask them for my money back. I guess I'll have a great chance for winning a suit in the small claim court. There are plenty of jurisprudence and the claim that the PS3 has a 10 year lifespan in the eye of Sony would certainly not hurt!
Here is a Google Search for ps3 blu ray failure.
And here is a link to an Online petition demanding Sony to extend the warranty period for this issue.
3.18.2009
Looks like IBM may acquire Sun... Is it bad for Java and Solaris?
It looks like IBM is in talk to acquire Sun. While I'm not very fond of Sun being swallowed by IBM, I have to say that I don't see that is a big deal now that it would have been few years ago.
The reason is not in hardware, but in software... In the past years, Sun open-sourced most of the software I care about (Java, Solaris, Glashfish, ...). So if IBM could have killed some of these if it acquired sun a while back (and there are reason to do it as they compete with their own stack of software), they can't do this today. This could even become the signal for some to begin forking Java (especially if IBM wants to get rid of the Java Community Process). It would be funny for the like of Oracle to now become a big IBM customer... But I doubt that Ellison would find it that funny (IMHO Oracle would benefit a lot more from acquiring Sun than IBM).
If this merger talk succeed, it will be interesting on how things unfold... What would IBM do with Solaris and Java (I'm pretty sure they will stop working on Glashfish). But whatever they do, both Solaris and Java are out in the open and if the community does not like IBM doing, these product will start to have a new life of their own. And I guess this would be a really good thing.
10.30.2008
Is JSF Fixable?
I've been wanting to write about JSF for a while now. I was an early adopter and big proponent of JSF when it first appear at the surface of Java land. Since then, I've worked on many projects that used this framework and slowly but surely, my opinion changed about this framework.
In Subbu opinion, JSF is not fixable because it was not designed with web architecture in mind. The framework is not RESTful and requires POST for everything. JSP proponent argue that RESTful is coming to JSF and it is even already supported right now when you use JBoss Seam.
It's true, that JSF is getting better. Facelets will become part of JSF (it should have been there from day though - why make a brand new framework and use broken things like JSPs). JSF 2.0 will make some space for GETs and JBoss Seam fixes a lot of other issues with JSF.
However, if JSF is not Fixable, it is not solely because it is not RESTful. JSF is broken at many places.
The JSF request processing life-cycle is one of the worst thing about JSF. There is so many steps in the life-cycle, different ways to exit the normal processing and this gives something many entry points for custom components (one for each steps in the life-cycle). Things can go wrong at many places without even touching your application code.
Closely related to the request processing life-cycle, is the component model. In JSF, components are a kind of black box. But when you think that black box should be mostly independent on the framework (beside the connecting part with the framework), there is so many implementation leak in JSF, that your component must be ported to every JSF implementation. I say ported and not tested... Because the order in which the component tree is processed can make you component fail. You have to make so many assumption based on the JSF implementation (things that are not present in the specification) that you actually need to choose your JSF implementation carefully and will never be guaranteed that your component will survive even minor updates in the JSF implementation.
Want to add to functionality to an existing component? There is no easy way to do that. The best way, is to take the source code (if available) for the component and refactor it with some new name and then hack you way through it. And when I say hack, I mean it in a bad way! I've never saw a component source code that was easily readable and understandable. Large component sets like ADF Faces are notably ugly. Even the Swing component model (which is quite complex) is super simple compared to JSF component model.
It looks like in JSF, the worst thing about leaking abstractions made it into the framework and the good thing about encapsulation where left out.
And before I get flamed that you will be able, with JSF 2.0 - which is still in draft, to create composite components soon... I have to respond that soon is not now.
One of a good indication that JSF is broken beyond fixable, is that you cannot do simple thing simply. Want to create a new component, then you have something like 3 files to edit. Want to create a new converter, again, three files needs to be edited. I know that good thing came in sets of three, but this is not the kind of good I want.
Another good indication that JSF is broken beyond fixable, is when thing go wrong. Good luck finding you problem... Facelets help you a bit by giving you a more precise location of the issue. But it does not always work. When you look at stack trace, you have to scroll hundreds of line before you see the line from you application. But what the hell do you do when you don't even have any of you application code in the stacktrace? Why on earth, you are have a stacktrace that is 30-40 level deep before even reaching an action method? Just to process a fringing POST.
In JSF, the framework is everywhere except where you need it.
Yes, there is some good things about JSF, I like the expression language (even is it is a bit inconsistent and not powerful enough to my taste). But the bad things are so deeply rooted. If you are just a user of the framework and that you are writing really simple applications, then it does look like JSF is great, but whenever you start digging a bit and adding a bit of complexity (Ajax anyone? Without another component set that takes a few MB?), the framework start eating up your nerves.
So would I ever recommend JSF again? Maybe maybe not, in the Java world, there is so many framework to choose from, that your cannot recommend one with the certainty that it will still be around one or two years from now. The only sure thing, is that JSF will be there because it is the standard... And this is very sad!
10.20.2008
Making Mr Bones work with jRuby
Want to make some GEM, Mr Bones (github) is going to help you setup your directory structure and comes with Rake tasks to package your application into a nice little Gem. The great thing about Mr Bones is that it does not add any dependencies to your Gem (like hoe does).
To create a new project, you just type bones [project_name] and you can start developping your application or library. You are done? type bones gem:install and your code is packaged and installed.
Now onto lib/bones/main.rb. In main.rb, there are calls to rake. This is one place I use the RUBY constant mentionned earlier to execute rake from the same interpreter location and not from the system PATH. To do that, I just dodiff --git a/lib/bones.rb b/lib/bones.rbindex 50a63b6..35dcd75 100644--- a/lib/bones.rb+++ b/lib/bones.rb@@ -4,8 +4,9 @@ module Bones# :stopdoc:VERSION = '2.1.1'PATH = File.expand_path(File.join(File.dirname(__FILE__), '..'))- WIN32 = %r/win32/ =~ RUBY_PLATFORM- DEV_NULL = WIN32 ? 'NUL:' : '/dev/null'+ HOME = File.expand_path(ENV['HOME'] || ENV['USERPROFILE'])+ DEV_NULL = File.exist?("/dev/null") ? "/dev/null" : "nul:"+ RUBY = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']). sub(/.*\s.*/m, '"\&"') # Ruby Interpreter location - taken from Rake source code# :startdoc:
# Returns the path for Mr Bones. If any arguments are given,@@ -16,6 +17,7 @@ module Bonesargs.empty? ? PATH : File.join(PATH, args.flatten)end
+# call-seq:# Bones.require_all_libs_relative_to( filename, directory = nil )#@@ -46,7 +48,7 @@ module Bonesload bones_setup
rakefiles = Dir.glob(File.join(Dir.pwd, %w[tasks *.rake])).sort- import(*rakefiles)+ import(*rakefiles) unless rakefiles.empty?end
# TODO: fix file lists for Test::Unit and RSpec
diff --git a/lib/bones/main.rb b/lib/bones/main.rbindex b7ec28b..1cc074a 100644--- a/lib/bones/main.rb+++ b/lib/bones/main.rb@@ -181,9 +181,9 @@ class Mainif test(?f, File.join(output_dir, 'Rakefile'))beginFileUtils.cd output_dir- system "rake manifest:create 2>&1 > #{::Bones::DEV_NULL}"+ system "#{::Bones::RUBY} -S rake manifest:create 2>&1 > #{::Bones::DEV_NULL}"@io.puts "now you need to fix these files"- system "rake notes"+ system "#{::Bones::RUBY} -S rake notes"ensureFileUtils.cd pwdend@@ -363,7 +363,7 @@ class Maindef mrbones_dirreturn @mrbones_dir if defined? @mrbones_dir
- path = (::Bones::WIN32 ? ENV['HOMEPATH'].tr("\\", "/") : ENV['HOME'])+ path = ::Bones::HOMEpath = File.join(path, '.mrbones')@mrbones_dir = File.expand_path(path)end
diff --git a/lib/bones/tasks/setup.rb b/lib/bones/tasks/setup.rbindex 27d659b..a722c13 100644--- a/lib/bones/tasks/setup.rb+++ b/lib/bones/tasks/setup.rb@@ -5,7 +5,7 @@ require 'rake/clean'require 'fileutils'require 'ostruct'
-class OpenStruct; undef :gem; end+class OpenStruct; undef :gem if defined? gem; end
# TODO: make my own openstruct type object that includes descriptions# TODO: use the descriptions to output help on the available bones options@@ -123,36 +123,17 @@ import(*rakefiles)%w(lib ext).each {|dir| PROJ.libs << dir if test ?d, dir}
# Setup some constants-WIN32 = %r/djgpp|(cyg|ms|bcc)win|mingw/ =~ RUBY_PLATFORM unless defined? WIN32--DEV_NULL = WIN32 ? 'NUL:' : '/dev/null'--def quiet( &block )- io = [STDOUT.dup, STDERR.dup]- STDOUT.reopen DEV_NULL- STDERR.reopen DEV_NULL- block.call-ensure- STDOUT.reopen io.first- STDERR.reopen io.last- $stdout, $stderr = STDOUT, STDERR-end+DEV_NULL = File.exist?("/dev/null") ? "/dev/null" : "nul:"++DIFF = if system("gdiff '#{__FILE__}' '#{__FILE__}' > #{DEV_NULL} 2>&1") then 'gdiff'+ else 'diff' end unless defined? DIFF++SUDO = if system("which sudo > #{DEV_NULL} 2>&1") then 'sudo'+ else '' end
-DIFF = if WIN32 then 'diff.exe'- else- if quiet {system "gdiff", __FILE__, __FILE__} then 'gdiff'- else 'diff' end- end unless defined? DIFF--SUDO = if WIN32 then ''- else- if quiet {system 'which sudo'} then 'sudo'- else '' end- end--RCOV = WIN32 ? 'rcov.bat' : 'rcov'-RDOC = WIN32 ? 'rdoc.bat' : 'rdoc'-GEM = WIN32 ? 'gem.bat' : 'gem'+RCOV = "#{RUBY} -S rcov"+RDOC = "#{RUBY} -S rdoc"+GEM = "#{RUBY} -S gem"
%w(rcov spec/rake/spectask rubyforge bones facets/ansicode).each do |lib|begin
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rbindex 5a60dc1..1965e1c 100644--- a/spec/spec_helper.rb+++ b/spec/spec_helper.rb@@ -3,6 +3,7 @@unless defined? BONES_SPEC_HELPERBONES_SPEC_HELPER = true
+require 'rubygems'require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib bones]))
--