Sunday, March 18, 2007

Who will develop software in 10 years?

This is topic of the panel moderated by Martin Fowler on recent JAOO Conference. But the discussion goes beyond it to other interesting questions "How is it going to be done ?" and "Where it is going to be done?". The video of this panel is available on InfoQ website here. Opinions of panellists to the first question are software is still going to be developed by software developer in next 10 years. However tools, DSL will help non-software people i.e. domain experts more involving in the process such as configuring software or create domain model and using tool to generate software. This will make the distinction between application software developer and domain experts less obvious. As result of this, an idea to build a DSL rather than an application presented in Never Build an Application becomes more acceptable.

Saturday, March 17, 2007

My second job

In 1992, one friend introduced me to Notia, an finance consulting, auditor and software development company in Prague. Then I joined Notia as programmer. This was one of most important milestone in my professional career and Notia was my employer until 1996. I have worked for the company in many projects, playing different role, getting a lot of wonderful friends, learned many new things. My first team leader was Tran Duc Trung, who is now Chief Architect for NetBean at Sun Microsystem.

Saturday, March 10, 2007

An answer to PragDave Quick Ruby Quiz

Dave Thomas in Quick Ruby Quiz asked how to call method say_hello in
class Fred
  class << self
    def self.say_hello
      puts "Hi!"
I have figured out one of possible way is
klass = class << Fred; self; end
klass.singleton_methods #=> ["constants","nesting",
                        # "say_hello"]
klass.say_hello #Hi!

Thursday, March 8, 2007

Using Ruby flatten and to_a

class Processor
  def initialize arg
  @arg = arg
 def process
  puts @arg

def run_single(processor)

def run(processors)
 processors.each{|p| p.process}

run_single( 'Hello')
run([ 'Hello', 'World'])
In above example, we need to define two methods run_single taking a processor and run taking array of processors. To make it simple, we can remove run_single method just call
run([ 'Hello']) 
in case of single processor. However passing a single element array seems to be not natural, by using flatten or to_a we can create a method that accept both element and array of element as parameter
def run(processor)
 [processor].flatten.each{|p| p.process }
or other possible way is
def run(processor)
 processor.to_a.each{|p| p.process }
then we can do
run( 'Hello')
run([ 'Hello', 'World'])