Tuesday, January 01, 2008

Ruby on Rails 2.0: link_to for nested resources

If you specify nested resources in routes.rb such as

map.resources :daily_contents do |daily_content|
daily_content.resources :vocabularies
end

you have to specify a parameter for link_to like this:

<% for vocabulary in @daily_content.vocabularies %>
..
<%= link_to 'Show', [@daily_content, vocabulary] %>
<% end %>

The generated URL is like this:

http://localhost:3000/daily_contents/5/vocabularies/2

Moreover, if @daily_content.entities is just an array, which happens to contain an object of type, Vocabulary, the following works as well:

<% for entity in @daily_content.entities %>
..
<%= link_to 'Show', [@daily_content, entity] %>
<% end %>

Again the generated URL is same as above like:

http://localhost:3000/daily_contents/5/vocabularies/2

Wednesday, December 26, 2007

Problem with installing Ruby 1.9 on Mac OS X 10.5 Leopard

I have tried to install Ruby 1.9 from tar ball. But so far, there is a problem and it's not successful.

I borrowed the ideas from the following sites:

"Building Ruby, Rails, Subversion, Mongrel, and MySQL on Mac OS X"

"Ruby on Rails install on 10.5 OS X"

"Trouble with Readline and Building Ruby 1.9"

(Also the same post under ruby-forum: "Trouble with Readline and Building Ruby 1.9")

Still Ruby make is failing with regard to readline.


By the way, I miss Linux package managers. It was easy to see which version of what is installed. MacPort is trying to achieve the same thing. But so far, it was not successful to install it. When it comes to package management, I think Linux is better.

Ruby 1.9 Released

You can download it from Ruby Programming Language site.

Sunday, December 23, 2007

Location of Ruby gems for the preinstalled Ruby on Mac OS X 10.5 Leopard

It's /Library/Ruby/Gems/1.8/gems/

The preinstalled Ruby is /usr/bin/ruby (note: execute "which ruby" from command line), which is a symbolic link to

/System/Library/Frameworks/Ruby.framework/Versions/
Current/usr/bin/ruby


So you would think that the location of the gems is under

/System/Library/Frameworks/Ruby.framework/Versions/
Current/usr/lib/ruby/gems/1.8/gems


just like when you install Ruby manually.
But when I looked at the Rails gem under the directory, it was rails-1.2.3.

I performed a search for "rails" gem under each directory under the path as a root user but all the searches found only the same rails-1.2.3.
So finally I performed a search for the entire directory tree, i.e. executed

find / -name "rails" -print

as a root user. And here it is, it found

/Library/Ruby/Gems/1.8/gems/rails-2.0.1/bin/rails

By the way, as a side note, I wanted to see if "/Library/Ruby/Gems/1.8/gems/rails-2.0.1/bin/rails" is sym-linked from /usr/bin/rails (by executing "ls -alFh /usr/bin/rails"). But it isn't. /usr/bin/rails is not a symbolic link of anything. It's an executable file.

This whole thing is very confusing to me.
All I wanted to do was to look at the Rails 2.0.1 source code.

Thursday, December 20, 2007

Ruby on Rails 2.0 configuration files, etc.

I have read through the files in the Rails project generated with Ruby on Rails 2.0, such as the configuration files, etc. e.g. /config/boot.rb, /config/environment.rb.

I've found that they are more well-written and well-structured.

Ruby gem install error with Mac OS X 10.5 Leopard

I attempted to install ruby-debug gem but it failed with a message:

ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install ruby-debug can't find header files for ruby.


This was because the installed Mac OS X Xcode Tools was old, specifically, GCC was old. I had to install Xcode Tools 3.0, which is actually shipped with Mac OS X 10.5 Leopard DVD. You can also download it.

Thursday, December 13, 2007

Switched to TextMate

As I updated to Ruby on Rails 2.0, I decided to try out TextMate.

After getting used to it after reading its documents, I came to like it because its Ruby and Ruby on Rails Bundles seem to have lots of good features.

But I didn't necessarily like its Subversion Bundle. I had to do "svn import" from the command line, delete the local Rails directory (of course, after backing it up), and check out the directory from the Subversion. Otherwise, there is no .svn folder. With Subversion (Eclipse Subversion Plugin), you don't have to delete the local directory. Maybe there is a better way to make this work in TextMate and I would like to know it.

Sunday, December 09, 2007

Ruby MetaProgramming

Watch the video
"MetaProgramming - Extending Ruby for Fun and Profit"

Isn't this wonderful?

Updating to Ruby on Rails 2.0

Until today, I have been using Ruby I installed manually on /usr/local/ (/usr/local/bin/ruby) because that's how I installed it on Mac OS X 4 Tiger. When I purchased Mac OS X 5 Leopard several days after it was released, I noticed that Ruby was installed under /usr (/usr/bin/ruby) as a part of Mac OS X developer tools. But I kept my .profile with "export PATH=/usr/local/bin:/usr/local/sbin:$PATH" because I had lots of gems installed already under the Ruby under /usr/local (/usr/local/lib/ruby).

Today as a part of updating to Ruby on Rails 2.0, I switched to use the Ruby included with Mac OS X developer tools (under /usr). And updated Rails gem under that location (under /user):

1. Commented out "export PATH=/usr/local/bin:/usr/local/sbin:$PATH" in my .profile. Restarted the shell.

2. Executed "gem update rails".

Ruby on Rails 2.0 Released

See Ruby on Rails official site and Ruby on Rails weblog.

Tuesday, November 27, 2007

Uploading audio file and playing it on a web page using attachment_fu Ruby on Rails plugin

Basically used the information from "File Upload Fu" and "Demonstration of Different Ways to Play a Sound from a Web Page".

Uploaded audio file and stored it in file system just like image file using attachment_fu. Then in show.rhtml,
instead of:

<b>Audio:</b>
<%= link_to @vocabulary.public_filename %>

used:

<b>Audio:</b>
<embed src="<%=@vocabulary.public_filename %>" autostart="false" loop="false" height="20" width="200"></embed>

Of course, if there is a better way, I would like to know.

Monday, November 05, 2007

Ordering a service through a customer support by phone

I ordered satellite TV service by calling customer support by phone because I didn't have Internet access temporarily.
To make the story short, after all the communications, they put a wrong service and now I have to pay for the extra service I never requested for the next 30 days.

I am even more convinced that it's a better approach for a customer to order and select what he/she wants through web site.

Also I am even more a proponent of easy subscribe-unsubscribe model without long-term contract. There shouldn't be any 1-year contract or 2-year contract. The customer should be able to sign up anytime and cancel anytime without any penalty.

It is very unfair that the majority of my money has been lost throughout my life because I was charged for what I didn't ask for and what I was not supposed to be charged for.

I have lived both in a country with excellent customer support services and in countries/regions with customer support personnels doing whatever they feel like based on their emotion. I hope that the more web based approach would make this cultural difference irrelevant.

Saturday, October 27, 2007

OOPSLA 2007 - Thursday

The keynote speech was very good.

In the speech, there was a comment by John Vlissides saying that Patterns were used unexpected way. At that moment, I thought that maybe the reason why he had said to me at one OOPSLA that learning Refactoring to Patterns was better than learning Patterns straight.

One attendee said that "A developer" wanted to work with "A developer" or even a better developer so that he/she could learn from him/her. But "B developer" wanted to hire "C developer" because he/she wanted to work with a developer who was worse than him/her. A, B, C, and D means that A is the best and D is the worst. I agree with him.
And I want to work with a developer better than me and I love to develop a quality software, which means I have to improve my skills even more so that I can have a chance to work with "A developer".

OOPSLA 2007 - Tuesday - 2

50-50 was hilarious. Even just attending this session only would make me feel that it was worth attending this year's OOPSLA.

Thursday, October 25, 2007

OOPSLA 2007 - Wednesday

Many big names from the past made keynote speeches. It was amazing.

Domain Driven Design Movie BOF (Birds of a Feather) was good. It was very clear about how Domain Driven Desisn progresses with developer-customer interaction. I wish they post the movie online.

Tuesday, October 23, 2007

OOPSLA 2007 - Tuesday

The opening Keynote Speech by Peter Turchi was very good. "Get lost" - and experience what you have never experienced before. I agree that's the key of OOPSLA. That's why I come to OOPSLA. And I have lived almost entire life with this joy of getting lost (encountering an unfamiliar thing).

The panel of "Celebrating 40 Years of Language Evolution: Simula 67 to the Present and Beyond" was educational to me. The languages are increasingly getting functional. And multiprocessor hardware is making concurrency the main issue of the coming future.

Monday, October 22, 2007

OOPSLA 2007 - Dynamic Languages Symposium

Quickly, just my impression.

Last year, I got an impression that Dynamic Language camp and Static Language camp would never get along with each other. This year, found that there are some activities to take advantage of the good from both.

As usual, it's good to know and hear about something I have never known before. After all, that's why I come to OOPSLA.

I saw the actual OLPC XO during Dynamic Languages Symposium and Squeak Birds of Feathers session. Also link - XO Giving. It's exciting. I felt like getting one of those and play around with Squeak development environment in Etoy.

There is a Squeak book to download, announced at Squeak Birds of Feathers session.

Sunday, October 21, 2007

OOPSLA 2007 remaining Podcasts

I have finished listening to the remaining OOPSLA 2007 Podcasts.

Unexpectedly, the Podcasts I wasn't expecting to learn from much for my purpose were very educational for me. "FindBugs" was interesting and I agree that it should be a part of continuous checking in - whenever a developer checks the code into the source control system, he/she runs FindBugs.

There seem to be lots to learn from ooPSLA this year.

I hope that it would be like what Linda Rising said in her Podcast about MiniPLoP - Don't criticize the author of the pattern by using the words such as "Your work is bad," instead, suggest what can be improved.
And I certainly don't expect a person in an important position to make a claim that some attendee is an idiot without even knowing the person or even talking to him/her even once. The comment should be scientific - based on the fact and evidence, not on personal emotion or cultural bias.
ooPSLA is a conference that we can demand such an integrity as a common sense.

Saturday, October 20, 2007

OOPSLA 2007 Podcast

I have listened to some of OOPSLA 2007 Podcasts.
I enjoyed them very much.

Particularly, I enjoyed, "The Scala Experience", "Ruby", and "Unit Testing Patterns". I wish I would have a time to listen to "Domain-Specific Modeling" and "Aggressive Learning", too, which sound interesting.

Tuesday, October 16, 2007

Green Recruiting

Many people seem to want to work for a company that is environmentally responsible. I'm glad to know that.
"What’s Your Green Recruiting Strategy?"
"Green is the Color of Successful Recruiting"

In the past, I was discriminated because I was trying to recycle materials. I hope that it will become a thing of the past.

By the way, sometimes in the past, I was socially discriminated by religious workers, even though it is a basic human rights violation. But they don't care or maybe they don't understand the concept of human rights. I hope the society becomes the one where nobody is discriminated when he/she acts based on the fact.

Monday, October 15, 2007

Improved Ruby Gems

Ruby Gems: new release and plans for inclusion in Ruby 1.9

RubyGems Beta 0.9.4.5

I have update to Ruby Gems 0.9.4.5 right after I've read the InfoQ article above.
$ sudo gem update --system --source http://segment7.net/
(sudo is for Mac OS X)

I'm getting back the mode to live on the Edge as I used to with Eclipse. I used to download every milestone as soon as it was released - this was influenced by my former colleague.

Tuesday, October 09, 2007

Seats in buses and trains in South America are more comfortable

Seats in buses in South America are very comfortable. Especially, "Cama". Even "Semi-cama", which is not as good as "Cama", is very comfortable. Even the buses in less developed countries like Peru have comfortable seats. And the seat in a train in Chile was comfortable as well.

After I came back to North America, I found that the seats in buses and trains were very poor and uncomfortable. I can't believe that I had thought that they were comfortable before going to South America.

By the way, unrelated but I saw people making a call from cell phone in a running subway in Chile and I think Argentina, too. But in North America, there is no signal in subway.

Ruby on Rails - ActiveScaffold

It's good to generate repeatedly used codes.

But ActiveScaffold is using configuration to set particular parameters or conditions. That reminded me of Java + XML, where XML configures the auto generated Java code. It seems to be "configuration over convention" instead of "convention over configuration". Going back to the bad approach. Only the good thing about ActiveScaffold's way is that it's done in Ruby language itself not external stuff like XML.

Isn't there a way to generate codes for controller and views in "Convention over Configuration"? I wonder.

--------------------

P.S.
I have wanted to mention this. So decided to add now.
ActiveScaffold is tying View and Controller together by generating them dynamically. Then, what's the point of Model-View-Controller separating View and Controller? The purpose of Model-View-Controller separating View from Controller is that View can be created/changed independently from Controller.

Wednesday, October 03, 2007

Rails: How to test

I came across Jay Fields' blog entry, "Rails: How we test".

I'm glad that I happened to find this article because it contains the ways to use mock object and to make rails unit test not to access database. I like the way of writing unit tests without accessing database by mocking database access. But I didn't know how to do that with Rails. And I wanted to follow the Rails convention because that's one of the strength of Rails. But now I can do whole a lot of better way of writing tests.

AgileEvents Calendar

InfoQ article listed AgileEvents.

Also InfoQ Agile homepage lists them.

Monday, September 24, 2007

Buy a Laptop for a Child, Get Another Laptop Free

Through ACM TechNews, I found this article. The full story is here.
And the name of the project is "One Laptop Per Child".

I wonder if Millennium Village project the non profit project I was contributing to is for will be utilizing this. If not, they may be able to get one to access the web site.

Wednesday, September 19, 2007

Language-oriented programming

Interesting article.

Walk the walk - it's different

Deborah Hartmann is using Ron Jeffries' quote at the foot of her e-mail.

"My advice is to do it by the book,
get good at the practices,
then do as you will.
Many people want to skip to step three.
How do they know? " -- Ron Jeffries

I like it.
I don't like people who make a judgment of something they never practiced only by reading about it or even just by hearing about it. For example, I don't like people who criticize Agile software development practices simply because those practices sound unfamiliar to them.

Monday, September 17, 2007

Back from South America

I've just posted a new blog.
It's good to have Internet access at hand with wide-range wifi, etc. That's a good thing about being back in North America.

South America was good.
I may write a summary of what was good there later on.
But I just write a few of them.

People in South America were very nice while some of the English speaking people from other parts of the world are just so full of themselves.

I found that people in Brazil, especially around Sao Paulo, were more open to different kind of people. - Before the trip, I thought that North America was the most diversified place in the world (in fact, that's why I decided to live in Canada). But it was not true. It was good to know that. Especially, religious people in English speaking countries are very closed minded to different kind of people.

Homer's Odyssey as an Agile Consultant

I've just watched the video of Jean Tabaka's presentation at Agile 2006 ("Homer's Odyssey or My Life as an Agile Consultant").

In one of the companies I worked for, I encountered many of the monsters she described. For example, Laestrygonian (Technical Lead Saboteur), The Siren (person who tells what Agile is and teaches wrong practices), and the control guy who says that it's not Agile unless everybody follows what he says.

My emotional feeling was that I felt relieved that somebody identified those problems. What this presentation means to me in practice is that I learned what to watch out and how to deal with them.

Saturday, July 28, 2007

Christopher Alexander's keynote speech at OOPSLA 1996

One of my acquaintances sent me this link to OOPSLA 1996 keynote speech - "The Origins of Pattern Theory - the Future of the Theory, And The Generation of a Living World by Christopher Alexander".

I'm on road so I just write my impression of reading it briefly. It is ironical that his good intension was misunderstood and misused. When did referring to his work start to prevent software developers from reacting to what's happening to the code at hand and from building software generatively, like in Agile way?

In the next last section of this blog, I just paste excerpts from his speech, which I found interesting.

--------

I don't know hardly anything about what all of you do.

I didn't really understand what had been going on, and that my work had somehow been useful to computer science.

When I faced the question of addressing you, I wondered what on earth I should talk about.

That local adaptation can happen successfully only if people (who are locally knowledgeable) do it for themselves.

one of the efforts of the pattern language was not merely to try and identify structural features which would make the environment positive or nurturing, but also to do it in a fashion which could be in everybody's hands, so that the whole thing would effectively then generate itself.

(Bear in mind, as you hear my comments, that they need to be taken with a grain of salt; I'm ignorant; I'm not in your field.)

We were able to judge patterns, and tried to judge them, according to the extent that when present in the environment we were confident that they really do make people more whole in themselves. Of course you may ask, How in the hell did you test for that? But that is too long a story which I cannot cover in this speech. The important point is that such testing was going on continuously.

We were looking for the extent to which, as a whole, a pattern language would produce a coherent entity.

(1) the moral capacity to produce a living structure and (2) the generativity of the thing,

It seemed to me that we had fallen far short of the mark that I had intended.

At about the same time I began to notice a deeper level of structure and a small number (fifteen) of geometric properties that appeared to exist recursively in space whenever buildings had life.

The comparable view, in software design, would tell you that a program which is objectively profound (elegant, efficient, effective and good as a program) would be the one which generates the most profound feeling of wholeness in an observer who looks at the code.

The important thing is that -- in architecture -- this is not merely a hunch but a testable empirical result. It means that the objects that are most profound functionally (when I say objects, I mean buildings, streets, door knobs, shelf, room, dome, bridge) the objects that are most profound functionally are the ones which also promote the greatest feeling in us.

If there really is a way of looking at structures which both deals with real functional structure in the ordinary technical and practical sense, and simultaneously has its roots in human feeling, there will be a very huge and positive step.

recursively

That is what happens in all the living structures we think of as nature. When you analyze carefully just what's going on and how things are happening in the natural world, this sort of structure preserving transformation tends to be what's going on most of the time. That is why, when nature is left alone, most of the time living structure is produced.

I have, for many years, thought that this could only be solved by a genetic approach -- an approach where deep structure, spread through society, creates and generates the right sort of structure, very much as genetic code creates and generates organisms and ecological systems -- indirectly, by letting loose life creating process.

If these software packages are life creating, and accepted, and widely enough spread throughout the world, there is a chance we might get a grip on this problem: provided that the software is freeing, liberating, allows each person individual control and decision making power to do the right thing, and to create living structure, locally, wherever they are.

the process by which one discusses these kind of things, shares ideas about them, gradually influences the way people are thinking so that gradually larger and larger percentages of bits of the environment might turn into living structure.

When I had the pleasure of beginning to meet some of the various folks who introduced themselves to me over the last year and a half from the software community, I began to be fascinated by the number of them that were closet architects. Greg Bryant who worked on the 486 chip, is really interested in ecology and is an editor of Rain, an ecological magazine. Bill Joy is writing about workstations in the concrete physical sense that is familiar as an architect. John Gage, chief scientific officer of Sun, is interested in neighborhood schools, and in the process by which people can repair their own physical neighborhoods by working together. Jim Coplien is dealing with social structures in human organizations. Mark Sewell from IBM wants to build houses. Dick Gabriel has as his deepest passion, the writing of poetry: another kind of art. I don't have a long enough list.

The new generative languages are dynamic and, like software, interact with context, to allow people to generate an infinite variety of possible results but, in this case, with a built-in guarantee of well-formed results.

When a paradigm change occurs, in a discipline, it is not always the members of the old profession, who take it to the next stage.

I want you to help me. I want you to realize that that problem of generating living structure is not being handled well by architectural planners or developers or construction people now, and the Earth is suffering because of it. I believe there may be no way that they are ever going to actually be able to do it, because the methods they use are not capable of it. For you it is different. The idea of generative process is natural to you. It forms the core of the computer science field. The methods that you have at your fingertips and deal with everyday in the normal course of software design are perfectly designed to do this. So, if only you have the interest, you do have the capacity and you do have the means.

What I am proposing here is something a little bit different from that. It is a view of programming as the natural genetic infrastructure of a living world which you/we are capable of creating, managing, making available, and which could then have the result that a living structure in our towns, houses, work places, cities, becomes an attainable thing.

Thursday, June 21, 2007

¨The End of Poverty¨

I have just finished reading ¨The End of Poverty¨.

I think I need perseverance.
Often times, people prevent me from acting on good cause because of discrimination, etc. Sometimes that´s because I don´t believe in a religion some people believe in and they think that I should be punished.
But I need perseverance to keep on going.

Sunday, May 27, 2007

Recycling in South America

I thought of this idea more than a month ago. But didn´t have a chance to write it.

While traveling in South America, you notice that there is no recycle bin and all the plastic bottles and metals are thrown away into garbage can.
I think that those materials can become resource for them. Instead of mining from the earth, they can collect those materials and reuse them. If you consider them as a resource, South America is abundant with free resources.

Tuesday, April 17, 2007

View of Glaciar Perito Moreno from sky



I flew from Puerto Montt to Punta Arenas today and the plane flew over Glaciar Perito Moreno. It was magnificent. The Glaciar was huge. The very first time to see a glaciar in full scale.

I would recommend everybody to fly to Punta Arenas to enjoy the view of Glaciar from the sky.

P.S. It turned out that the glaciar on the photo was Glaciar Ipsala. I have photos of Glaciar Perito Moreno, too, and I will put it here when I have a time.

Tuesday, April 10, 2007

Chilian people are very kind

I have found that people in Chile are very kind.
When I am traveling around, they are very helpful and always respect me.
I am enjoying meeting people here.

Saturday, April 07, 2007

Valparaiso and Vina del Mar in Chile

Yesterday, I visited Valparaiso and Vina del Mar from Santiago in Chile.

On the bus, a local lady from Valparaiso kindly gave me information about Valparaiso.
I asked for a good seafood restaurant. And she recommended me Bar La Playa. It was a very good and unique place. People there were very nice. The waitress was very kind. She even let me go behind the counter and took a picture for me. It is not listed in South American Handbook - the guidebook I'm using. The price range is the middle range in that book, i.e. $6-11. Good food. It's located just west of Plaza Sotomayor. There is an entrance both on Cochrane and Serrano.

Speaking of what's new from the information on the guidebook, the train between Valparaiso and Vina del Mar is actually a modern Metro. You have to purchase a card for 500 pesos. Then you have to add money for the fair on the top of it.


Valparaiso


Entrance of Bar La Playa on Cochrane (Avenue?) in Valparaiso


Vina del Mar

Thursday, April 05, 2007

First Time South America

I have just arrived at Santiago in Chile yesterday morning.
This is my first time to South America.
So far, things are going smoothly.
I´m writing this blog at an Internet Cafe in downtown Santiago.
When I can connect my digital camera to a computer, I will try to post some photos here.

Tuesday, March 27, 2007

InfoQ posted an article about a Ruby on Rails project similar to what I have been contributing to

"Ruby on Rails case study: ChangingThePresent.org"

I posted a reply introducing our Open Source Ruby on Rails project.

Well, that would reveal which project I have been working on, which is against the intension of this blog. In this blog, I'm trying to avoid revealing any project or individual so that I can express myself more freely and that I wouldn't offend anybody without intension by mistake. After all, naming somebody and blaming him/her explicitly doesn't help to solve a problem.

Monday, March 26, 2007

Easy On, Easy Off - it's true

"Getting Real" says "Make signup and cancellation a painless process".
And I think that making cancellation a painless process is crucial.
It is important for your business.

I have recently encountered the situation that cancellation was painful by being refused to be given the necessary information.
All I wanted to do was to put my auto insurance on hold while I'm not driving my car for a few months. I never expected that the auto insurance agent would give me a hard time. He even diffused my question - do I have to visit the office to sign a document? He talked about different things and never answered my question. He never gave a clear answer about what happens to the money I already paid.

Then I was reminded of what "Getting Real" said. Making customer's life difficult is not a good business practice. I expect a painless cancellation process will become prevalent in the business in the coming future.

P.S.
As I wrote this blog, I was reminded of my visit to Arusha in Tanzania about 10 years ago. It was the base for Safari trip to Serengeti National Park. The moment I got off the bus, people crowded around me and all shouted at me insisting to join their Safari package. Because all were talking to me at the same time and didn't give me any time to even respond, all I did was to walk away into an accommodation. They might be desperate and were obviously new to capitalism. And I'm not judging their culture or anything. But it was pathetic.

Sunday, March 25, 2007

Ruby on Rails production - just not to forget

Just in order not to forget, I just put a link here regarding migration.

"How to migrate databases in production environment"

Friday, March 23, 2007

RESTful Rails resources

One developer in the Open Source project I'm participating in posted links to RESTful Rails resources. I appreciate that he posted these links. I just paste them here so that I can access easily. They are all public site so should be OK to paste them here.

Getting started with RESTful rails

Nested CRUD resources in RAILS

Quick guide to the new scaffold_resource generator

Ruby on Rails: RESTful Routing Basics (slides)

I use StoryBoard to plan my life, too

I use index cards on the wall or board to plan various errands just like you do in Agile software development. It is very effective. It motivated me to get the stories done. It gives me a sense of direction. And I feel good when stories are done.

InfoQ posted an article "Fun: Planning your Life with Index Cards" with the picture of Mike Mason's taskboard in his blog.

In my case, I put estimated time, too. Then I fit stories in the time available. That allows me which one has a higher priority and which one is non-essential so I can drop.

And after done, I put how long the story took. That gives me an instant retrospective that helps me to get better in what I do in my life.

Wednesday, March 21, 2007

"The End of Poverty" and "Integrated Community Development"

The coordinator of the non-profit organization I'm volunteering for kindly spent a time for me at a coffee shop today.

He mentioned the book by Jeffrey Sachs, "The End of Poverty". I bought the book right away. The back cover had a comment by Jared Diamond, the author of "Collapse", which I enjoyed reading (actually, listening to its audiobook).

Also he mentioned the concept of "Integrated Community Development".

I list the programs/organizations he mentioned:
- Millennium Promise
- Aga Khan Foundation
- Dhan Foundation
- Habitat for Humanity
- Opportunity International, also Opportunity International Canada

I am very excited.

Saturday, March 17, 2007

Positive collaborative work at the current Open Source Rails project I'm participating in

Today, there was a first code review meeting at the Open Source Rails project I'm participating in. Before that, I wasn't necessarily fond of having a code review meeting without committing the code (of course, with tests) to RubyForge so that the project can progress based on the power of the collaboration of the community - I mean that's what's good about Open Source project. But the code review meeting turned out be quite good.

What I liked most was team members respected each other and each other's work regardless of the difference in the style of software development. It was a positive collaborative work.

Thursday, March 15, 2007

Agile Estimating podcast

I listened to a podcast about Agile Estimating - an interview with Mike Cohn.

It was a fun to listen to.

They developed a web site for planning poker. It's written in Ruby on Rails. It's free to use. I'm going to try it out.

Wednesday, March 14, 2007

Database Refactoring

InfoQ posted a video of Scott Ambler's talk on Database Refactoring at Agile 2006.
I like the messages.

Monday, March 12, 2007

A blog post about career in computer programming

I was looking at del.icio.us just to check out what's there. There was a post "Why a career in computer programming sucks". It was an interesting reading. And I think it hits the truth. His response to the comments was interesting, too, though I don't necessarily agree with everything he said in (4). It's true that it's a huge problem to integrate different technologies, but according to "The Wisdom of Crowds", variety and diversity produce a better product.

Your Code.. it's Alive..

My acquaintance sent me this Michael Feather's blog entry through Google Reader.
"Your Code.. it's Alive.."

I agree that code is alive.
I think that that's the reason why it's important to keep the code as simple as possible and to write a code only for a feature that is necessary at a time. And I think that it's important to write tests first to get reactions from the code.

Saturday, March 10, 2007

Installing MacPorts on Mac OS X 10.4.8

Basically followed what's written in InstallingMacPorts.

But there were some things that didn't work.
So I write what was successful on my machine.

1. Install Xcode Tools.
From "Mac OS X Install Disk 1", select "Xcode Tools" -> click on "XcodeTools.mpkg".
Follow the installation window.

2. Install XWindows (X11).
From "Mac OS X Install Disk 1", click on "Optional Installs.mpkg".
Follow the installation window up to the step "Installation Type".
Under the right pane with the title "Custom Install on Macintosh HD", expand "Applications" -> check on "X11" -> click on "Install".
Follow the installation window until the end.

3. Set Shell environment.

As a root user (I think sudo would do, too), under its home folder(/var/root), add the followings to .profile file.

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export DISPLAY=:0.0
export EDITOR=/usr/bin/vim

Save the file.
Execute "source ~/.profile".

As a root user (again I think sudo would do, too), add the following to /etc/X11/xinit/xinitrc.
 
source ~/.profile


4. Install MacPorts.
Download the latest MacPorts dmg file.
Click on the file to mount it.
Under the mounted directory, click on pkg file.
Follow the installation window.

5. Update MacPorts via selfupdate.
Execute "sudo port -d selfupdate".

Friday, March 09, 2007

Ruby programmers do it from within Ruby

From "Ruby Cookbook", Recipe 10.10 "Avoiding Boilerplate Code with Metaprogramming".
I think this would make a good bumper sticker, too.

Thursday, March 08, 2007

Sunshine Village

Just to try out a new feature on this Blogger, exporting pictures to Picasa.

Positive encounters

Being negative and critical is easy. When I read books/articles with the level equivalent to that of academic books, or when I do intense logical reasoning, I tend to be critical to what others do or how society is functioning, probably because my brain is required to distinguish various details.

At the same time, reading reading about biology, genetics, evolution, physics, psychology, etc. makes me realize how amazing it is that our body is even functioning cohesively which is based on the series of constant reactions (to change/environment) and their results. I cannot help thinking how precious each individual or each individual creature is. I want to be positive to everybody so that he/she can make the most out of what he/she has.

So I thought I start writing any small positive encounter in my blog as much as I can. By writing and making it public, I can have more balance in my view, especially when I'm doing critical thinkings most of the time, writing programs or learning new technologies, etc.

Getting Real

About a month ago, a Ruby on Rails instructor/consultant gave me his copy of "Getting Real" from 37 Signals. I've been enjoying reading it. They and I share the same view.

Today, I've found that you can read it online ("Getting Real")

Linux community is wonderful

I have just attended the local Linux Users Group.
They are very nice people. Every time I attend, I feel refreshed and motivated.

Wednesday, March 07, 2007

JRuby 0.9.8 Released

http://jruby.codehaus.org/

Almost 1.0? Maybe I should spend some time to try it out.

Testing Web Applications with Selenium and Ruby

Bob Cotton from Rally made a talk about "Testing Web Applications with Selenium and Ruby" at the local Agile Methods Users Group.

It was very good. I liked Selenium IDE, which is Firefox Plugin, with which you can record and play back user actions. It generates Selenium HTML script. And what I liked most was that you can export to Java or Ruby code (or any language Selenium supports) in the format of TestCase like JUnit.

And I liked the way they used Ruby for their tool on the top of Selenium. Even though that second section of the talk was about their proprietary tool, I learned a lot about how Ruby is used. I liked the way they used Metaprogramming and block.

Reference: http://openqa.org, RSpec

Saturday, March 03, 2007

Some disappointment at the current Open Source Rails project I'm participating in

I'm involved in a local Open Source Rails project.
It's building a web site for people to donate money for development/aid projects in developing countries. The purpose is very motivating.

Since it's local, I have been attending their meetings every week.

There are some disappointments.
I just list them as they come up to my mind.

- A person is against writing functional tests and doesn't know what Continuous Integration is for. And he is warning that there will be a merging problem with confidence. -> Well, if there is a merging problem and a problem of dealing with it, that's because he doesn't write tests and that's because he doesn't know anything about Continuous Integration. Continuous Integration and running test automatically are for preventing such a merging problem.

- A person insists that if you design up front correctly, you don't have to change anything later. He says Refactoring is necessary only because architecture is not defined correctly at the beginning. But he is ignorant with Ruby on Rails built-in architecture. -> First of all, software development is a product development activity not manufacturing. And it is closer to scientific research in the sense that discovery is constantly made(See Mary Poppendieck's Lean Software Development.). Second of all, he is forcing his architecture as if it is the only one. There are many architectures for different purposes and different tools. And Ruby on Rails uses one of them. And all the rest of the team have understanding of it and are trying to follow it. He is the only one who is ignorant about it and believes that his architecture works for Ruby on Rails.

- Developers are expected to bring the code in their laptop to the next meeting. Committing the code to RubyForge is prohibited. -> That's not utilizing Open Source approach. When some of them were working on this project under SourceForge, one person (the same one as the first one above) was committing the code without running tests and the code was constantly broken. Now they are preventing developers from committing the code? Write tests, do Continuous Integration!

I wish I could speak up. But just like the consulting company I worked for before, which I wrote about several times, if I speak up and say the right thing when others are completely wrong, if they don't get it, they do anything to discredit me and socially destroy me by spreading bad rumors in this city. Unfortunately, there are many people in the city who take part in as their tools.
It is even a joke that a person in that company who is writing testing patterns book is criticizing me that I'm insisting on writing unit tests, using the excuse that unit testing is not necessary if testing doesn't fit the organization. (The claim that Agile should be adjusted to fit local environment is not an excuse to ignore software quality.)

So I learned that it is important to work for a project/organization/team that embrace what I'm into, namely, Agile software development. And it is better than persuading a team who doesn't embrace Agile software development.

And because last year in this project, there was an argument between me and the first person above about Test-Driven Development and idea of Continuous Integration, both of which he had no idea about, when I was invited again to the project about a month ago, I decided not to say anything because I thought it was not an environment that embraces Agile software development.

Luckily, there were at least two people who understand Agile software development. And until a few weeks ago, I was getting a better feeling about this project.

Now, I'm disappointed again.
And there are many things they are trying to solve that are already identified by Agile software development (, which even provides solutions already). Do I have to go through all the troubles and time until they rediscover the same solution on their own?

New Continuous Integration server - CruiseControl.rb

CruiseControl.rb. It's very nice.

And it's based on Ruby on Rails.
Reading its code is a fun, too.

I heard that the version 1 would be released soon.

Thursday, March 01, 2007

Allowing Remote Login with SSH on Mac OS X

Sounds silly but took a while to figure out how to allow SSH access on Mac OS X.
I expected that it would act the similar way as in Linux.
But it was different, at least from user interface.

Just to remember for myself, this is what I did:
"System Preferences" -> "Sharing" -> "Services" -> Check on "Remote Login"
Also activated Firewall:
"System Preferences" -> "Sharing" -> "Firewall" -> Click on "Start" button

The main problem is that Google search doesn't provide the answer.
When I search for an answer for Linux related question, Google search usually gives me a very good hit. But that is not the case for Mac OS X.

Sunday, February 18, 2007

Super Developer as recruiters said

At one user group meeting, recruiters said that companies are asking for so-called Super Developer, who can use e.g. Java, PHP as needed.

At that time, I thought that it is difficult to be such a developer unless you are in an Agile software development environment, especially, Extreme Programming using Pair Programming.

In Extreme Programming, developers work on different tasks, e.g. front-end, server-side, database, environment settings, switching to work on different tasks often. But if you work in non-Agile environment, you are only assigned to one task, such as front-end GUI development and you never have a chance to even look at the code for the rest of the system.

One recruiter said that you need to be able to work on both Agile and non-Agile environment. Of course, she is just a recruiter and doesn't know what is actually involved in software development. But you can't ask a developer to be a Super Developer while you are demanding him/her to work in non-Agile environment.

Also, I thought that they are missing that each language has its pitfalls. How can one person know the pitfalls when he/she is working on many languages for a short period of time each? What I observed from those developers is that they tended to use wrong solution for each language because they didn't know that there is a better proper well-established solution in a particular language because he/she hadn't had enough time to learn about them.

I also think that it may be an organizational problem in the companies that they demand Super Developer. Aren't they using improper stale technologies instead of improving to use better technologies that have learned from the mistakes made by other technologies in the past? If that's the case, even if the companies bring Super Developer, he/she cannot solve the fundamental problem and as he/she works in such an environment, he/she eventually stops being Super Developer because he/she is constrained to use only the technologies the companies force.

Instead, I agree with what Scott W. Ambler said in his essay on Generalizing Specialists.

Friday, February 16, 2007

Set up Pound to use HTTPS with Mongrel

I wanted to use HTTPS and followed what is written in Pound Best Practice Deployment and Pound Installation mostly. Also Think Again! >> Mongrel is useful.

Briefly, the following is what I did:
1. Install Pound
$./configure --prefix=/usr/local
$ make
$ sudo make install
2. Update mongrel to 1.0.1 (because I had one older one)
$ gem update mongrel
3. Install mongrel_cluster gem
$ gem install mongrel_cluster
4. Configure Pound
4-1. Created pound.cfg under /user/local/etc.
4-2. Filled the pound.cfg with the following content:

ListenHTTP
Address 0.0.0.0
Port 80
Service
BackEnd
Address 127.0.0.1
Port 8000
End
End
End

ListenHTTPS
Address 0.0.0.0
Port 443
Cert "/usr/local/etc/test.pem"
# pass along https hint
AddHeader "X-Forwarded-Proto: https"
HeadRemove "X-Forwarded-Proto"
Service
BackEnd
Address 127.0.0.1
Port 8000
End
End
End

4-3. Generated test certificate
$ openssl req -x509 -newkey rsa:1024 -keyout test.pem -out test.pem -days -nodes
5. Configure Mongrel Cluster and start Mongrel with Cluster
$ cd railsapp
$ mongrel_rails cluster::configure -p 8000 -N 1 (I set the number of clusters to be 1.)
$ mongrel_rails cluster::start
6. Start Pound
$ sudo pound -f /usr/local/etc/pound.cfg

Note:
The following command shows Help for Mongrel (e.g. "mongrel_rails cluster::stop" to stop Mongrel with Cluster):
$ mongrel_rails help

Tuesday, February 06, 2007

Friday, February 02, 2007

Uncle Bob's blog about Specs vs. Tests

Specs vs. Tests.

I like RSpec myself and Behavior-Driven Development in general.
But never thought of it in the way Uncle Bob described.
Also the comments to the blog by Michael Feathers and others are interesting.
Interesting reading.

I just wish I could work with developers like them.

Wednesday, January 24, 2007

I thought using Mac was easier than Linux...

I was just trying to add a group, which is a very easy thing to do in Linux, especially when using GUI.
But it turned out that it is such a pain to do so with Mac OS X. Maybe it's because I'm new to it and not familiar with it. But I wonder if it is because of OS X or FreeBSD.

Also I found that copying and pasting an application on Desktop actually copies the entire application to the Desktop folder instead of creating a short cut on it like in Linux. So I opened a terminal window and created symbolic link inside the Desktop folder. But I wonder if general Mac users would do that or even know what symbolic link is.

It seems that I have a lot to learn. Despite of it, I'm enjoying using Mac. It's just that so far, Ubuntu is much easier to use for me.

Monday, January 15, 2007

Installed Ruby on Rails and Subversion on MacBook

Locomotive didn't work well or I don't know enough about it. Also I couldn't use Eclipse with it.

So I installed Ruby on Rails and all the dependencies from command line, including compiling Ruby from src.
Certainly my experience of installing it from command line on Ubuntu in order to install the latest one instead of the older one installed by packaging tool helped me.

Also installed Subversion server.
The steps I had to take reminded me of what I had to do when I installed it on Ubuntu.
But this time, I installed everything under /usr/local instead of using the packaged ones for the depending libraries. So it involved more.
Those libraries are in addition to what is written in Dan Benjamin's blog.

But I liked the process because it was Unix/Linux-like. Of course, it is Unix.

The steps I took for Subversion installation are as follows:

1. Install Apache Portable Runtime.
1-1. Download src.(http://apr.apache.org/download.cgi)
1-2. ./configure --prefix=/usr/local
1-3. make
1-4. sudo make install
2. Install Apache Portable Runtime Utility.
2-1. Download src. (http://apr.apache.org/download.cgi)
2-2. ./configure --prefix=/usr/local --with-apr=/usr/local/
2-3. make
2-4. sudo make install
3. Install WebDAV neon.
3-1. Download src. (http://www.webdav.org/neon/neon-0.25.5.tar.gz)
3-2. ./configure --prefix=/usr/local --with-openssl --with-ssl
3-3. make
3-4. sudo make install
4. Install Apache to eliminate warning during ./configure for subversion.
4-1. Download src. (http://httpd.apache.org/download.cgi)
4-2. ./configure --prefix=/usr/local --enable-module=so
4-3. make
4-4. sudo make install
5. Install Apache Portable Runtime iconv.
5-1. Download src. (http://apr.apache.org/download.cgi)
5-2. ./configure --prefix=/usr/local --with-apr=/usr/local/
5-3. sudo make install
6. Install Subversion.
6-1. Download src.
6-2. ./configure --prefix=/usr/local --with-openssl --with-ssl --with-zlib --with-apxs
6-3. make
6-4. sudo make install

Sunday, January 14, 2007

I've got MacBook!

I have just got a MacBook two days ago.
I'm enjoying using it.

Since I like Ubuntu, I installed it on VMware Fusion (Mac version of VMware) on it.

I still have a lot to learn about MacBook. It's different from Linux and what I'm not familiar with is how to manage applications, which you can do with apt-get, yum, etc. on Linux. Also the directory structure itself.

The next thing I do is to set up Ruby on Rails on it.

Well, I kept the promise to get one with a speaker at No Fluff Just Stuff conference last September. Of course, many other people recommended, too.

Tuesday, January 09, 2007

James Bach's talk: The Unbearable Lightness of Model-Based Testing

There was a talk by James Bach this evening.

The talk itself was OK. But the Question and Answer session was very interesting. Many good points and interesting concepts. "The Law of Leaky Abstractions", Pair Testing, Blink Testing (which is based on the functionality of a certain region of frontal cortex), etc.

From his past presentation, I knew that his background was from exploratory, more like hacking style. With that knowledge in mind, what he said today had good points.

Thursday, January 04, 2007

Most problems come from what is not written in specification

I spent the New Year's Eve at a small town and had a chance to have a dinner with someone who owns a software business.

He mentioned that most of the problems come from what is not written in the specification. And that big companies deal with it by making smaller contracting companies work long-hour over-time, which I think is terrible.

He was not familiar with Agile software development.
I mentioned that the essence of Agile software development is to accept the reality of what actually happens in software development and to deal with it. What those big companies are doing is completely wrong.
It seems that people who are not familiar with Agile software development is also noticing what it is identifying.
I felt that more people are in the same page with us.

Anyway, I enjoyed the conversation with him.

Friday, December 22, 2006

RailsConf 2006 Keynote speeches

There are good keynote speeches from RailsConf 2006.
You can view the video from here.

I watched the speeches by Martin Fowler and Dave Thomas.
I totally agree with Martin Fowler. What he mentioned is one of the main reasons why I like to use Ruby on Rails.
And Dave has good points.

And also watched the one by David Heinemeier Hansson at the local Ruby Users Group meeting recently.
Here is the slide for it. It is eye-opening.

I simply enjoyed listening to their talks.

Friday, December 15, 2006

Good and Bad Procrastination

XPToronto's post with link to Good and Bad Procrastination shed some light on my current situation.
I felt a little good about myself.
Mastering Ruby on Rails and using it in Agile way is important to me.
Even though I'm not earning money to make a living in order to give time to do so, it is a good way to spend my time.

Monday, December 11, 2006

Java SE 6 released!

Java SE 6

Things have been changing. Improvements have been done.

After I'm done with mastering Ruby on Rails following Dave Thomas and David Heinemeier Hansson's "Agile Web Development with Rails" cover to cover, I may go back to Java and try Java SE 6.

Saturday, December 02, 2006

Raptors Win! Raptors Win! Raptors Win!

My another passion, basketball, both playing and watching.
Yesterday, I had a chance to watch NBA Toronto Raptors home game.



Wednesday, November 29, 2006

Ubuntu 6.10 as a development platform

Ubuntu is very nice. Especially as a desktop.

But I was trying to use Ruby on Rails on it. And many necessary libraries were missing, such as gcc, etc.
So I had to do, "apt-get install build-essential", etc.
I don't mind doing it.
But it was just time-consuming to find the information.
I wish at least the minimum ones are already installed by default.

Thursday, November 16, 2006

Agile Vancouver 2006 - Speed Geek - Tools Demos, etc.

I liked the Speed Geek session after hours and fish bowl was especially good.

In the Tools Demos, one guy showed Google Stacks. One of them was Google Docs.
When I was going to write my blog, I found a new feature to import from Google Docs.
So I'm trying it out now.
I'm writing this in Google Docs and I'm gonna export it to the Blogspot (Google Blog).

Agile Vancouver 2006 - Speed Geek - fish bowl: Tools support for interative usage

There was half an hour fish bowl session.
The topic was "Does Agile development need a tool?"

At one time, I walked to and sat on one of the chairs in the middle and talked about my opition about tools in Agile development.

The point I made was that it is important for any tools we use should have bare minimum simplest features needed at any given point of the time in the project and as a need arises, we can plugin a necessary minimum feature or unplug an unused feature.
In other words, they should have plugin capabilities to allow iterative usage.

Analogy I used was Eclipse. When you download Eclipse, it has only bare minimum features and depending on your needs, you download the necessary Plugins.

I was glad that I got positive responses to what I said. I guess I made a good point.
Now I like the term I came up, "Iterative Usage."

OOPSLA 2006 - fifth day

To be added.

Wednesday, October 25, 2006

OOPSLA 2006 - fourth day

Keynote - It was good that I learned language designs that I was not familiar with. This is one of the good things to attend conferences: You can listen to what you are not familiar with and you don't understand but you can keep it in somewhere in your brain and later on it gets easier to use it when the need arises.

Practitioner's Reports -

- Transition to Software Product Line Practice - Lost interest in it in the middle because it seemed in surface traditional software process. But at the end, I thought maybe I should learn from this.
- Towards Agile SEcurity in Web Applications - It was very good.
- keywords - "How can you misuse this functionality? (something like that)" -> Misuse story.
- Automated web testing - for security acceptance(?) testing. Selenium.
-> session handling (Selenium version > 0.8)

OOPSLA 2006 - third day

Keynote - It was interesting. It's a good thing about attending conferences that you can learn different perspectives. You can learn disciplines of other fields. In this case, drama and art.

Panel: Objects and databases - I wish the panelists answered the audiences' questions directly.


After the conference day - Loren showed me and Greg his Ruby on Rails code. It was a fun.

OOPSLA 2006 - second day - Dynamic Language Symposium

Dynamic Language Symposium was awesome.

Perl 6 and Pug - I was inspired to learn Perl 6. They resolve known issues such as Dynamic vs. Static by allowing them both.

Sunday, October 22, 2006

OOPSLA 2006 - first day

Workshop 1: Library-Centric Software Design

This is my first workshop other than Eclipse workshop. I expected it to be more interactive. But so far I cannot see anything different from other technical sessions.

Keynote speech - It was very different from what I expected. From my point of view, I couldn't see much related to library.


Tutorial: AOP:
It was good. The second half explained what I was looking for.

OOPSLA 2006 - preconference day

It was good to see familiar faces.
Greg talked me about different construct about Dynamic Languages.

We happened to encounter Jim from San Francisco and Jim from Florida.

Sunday, October 08, 2006

Similarity in software development and new restaurant construction

These days there are many TV programs showing home renovation.
One of them is about constructing a new restaurant and opening it.
Those restaurants are featuring the owners' own concept and they are not franchised one.

Every restaurant in the show is unique. The construction is adjusted to accommodate the uniqueness. And the construction is always delayed. And you hear the frustration of the owner that they need to open the restaurant as soon as possible and to get steady cash flow in, while the opening is already several weeks or months delayed.

Usually, it is said that software development is different from constructing buildings. It is true because every software development is new and different (unique) and constructing buildings follows the established standard steps.

Actually, for those unique restaurants, those established standard steps cannot be applied because each one of them is new and different. And they suffer the same problem as Software Development.

If you watch the show, you can see the proof that waterfall model of software development never works and the proof that software development needs Agile way.

Wednesday, October 04, 2006

Disappointment in the current project

I joined a consulting company that is famous for Agile Methodology and software testing last week.
Immediately I started working for one of their clients.
The first two hours already told me that it was not good environment. Their technology is terribly old. They are not following Agile practices. IBM is making the systems unnecessarily complicated.

This evening, at the local Agile users group, I had a chance to consult with the main person in the consulting company. I understand that Agile is not about following predefined practices and that it is about human interaction. I agree with it. At the same time, they can't just go without making software development work and they can't just ignore the reality of software development. Those practices are based on the reality of software development. For example, unit testing - it has been important even before Agile Methodology gained popularity.

The majority of the current project doesn't have any unit test. Even though Agile is about adjusting to each unique environment and business and delivering value to the customer, I don't agree not to follow the practice of writing unit tests.

Personally, I moved to this city I currently live just to get fully involved in Agile Software Development. It is extremely disappointing and frustrating that the current project doesn't even follow the practices that many companies in the previous city that don't even care about Agile Methodology follow. The companies that don't even know the term Agile are following more Agile practices than the current client. Then what's the reason why I'm working there?

Martin Fowler said in this blog about Rake, it's a good thing to try a technology to the limit so that you know its limit. Right now I want to try all the Agile practices to the limit instead of making mediocre compromise. While I value what the main person of the consulting company said, I know that there are more Agile experts that have said that compromise is not a good thing because it leads to bad results. That's why I moved here. How ironical it is...

Thursday, September 28, 2006

Rake - internal Domain Specific Language using Ruby

I read a Martin Fowler's article about Rake (Using the Rake Build Language).

Rake provides solutions to the problems I encountered in the past.

The more I learn about Ruby related features, the more I get fascinated by Ruby.

Sunday, September 24, 2006

No Fluff Just Stuff Conference - session about Java Annotation

Several months ago, the speaker at the local Java Users Group criticized Java Annotation severely. And he said that for language design, it was better to have one person making the decision.

Today, one of the member JSR 175 committee did a presentation about Java Annotation. He explained the reason why certain syntax has its syntax. Some of them are because of the committee lead's decision not to introduce new keyword, some of them are because of implementation. For some decisions, the lead just said no.
So for me, the problem was more toward that one person making the decision.

The speaker at Java Users Group I mentioned at the first paragraph above was there and asked why not @annotation instead of @interface. The presentator agreed and by the time he came up with it, the specification was already published and it was too late. I thought that if they had made the greater community to vote on the naming, the community must have picked up that naming.

I am not an expert of language design. But I thought that it seemed to be better not to make one person make the decision.

That speaker I mentioned at the first paragraph above said in his talk at the Java Users Group, it's better to open source Java. Maybe he was in the same page with me in a sense to utilize the wisdom of crowd.

Anyway, it was interesting to see that his view toward Java Annotation seemed to have changed gradually by listening to the reasons of each decisions.

No Fluff Just Stuff Conference

I've finally got a chance to attend No Fluff Just Stuff Conference.
The last two days have been a blast.
This is one of the best conferences I have ever attended.

Still one more day left and I have to wake up early. So I can't write much.
But I just wanted to write something when it's still going on instead of after it's over.

BOF about Dynamic Language was good.
Those three panelists - their knowledge is amazing.
I want to have their level of understanding of the languages.
It must be a fun.

Tuesday, September 19, 2006

Disappointment in employment process

I was expecting to start working for a company practicing Agile Methodologies.
But despite the fact that I have been inquiring about employment conditions for over a month, all of them are ignored and they expected me to work without a written employment contract.
I was very disappointed.

At the first interview around the beginning of August, the person who interviewed me said that there were two options to work for the company - as a full-time employee or as a contractor with his/her own corporation. I expressed that I would like to be a full-time employee. He was open about it while he repeatedly expressed his preference of me working as a contractor with my own corporation. I suggested that in the second interview (the technical interview) he said that I would have in the beginning of September, I would go through more rigorous interviews for a full-time employee and if the interviewers thought that I was not good enough for a full-time employee yet, I would accept to work as a contractor.

I appreciated his time when he was extremely busy especially just before he was going for a long vacation.

There were several concerns about working as a contractor with my own corporation. One was non-compete agreement. So I sent him e-mail asking about it. But it was not replied probably because he was busy.

In September, on the day he had told me to remind him if I hadn't heard from him, I sent him an e-mail. There was no reply because he was extremely busy and I understood it. So I waited one week and sent him another e-mail. This time, I asked if it's possible for me to work as a contractor without establishing my new corporation. The reason why I did was that thinking of how busy he was, it wouldn't be a good time to ask for a possibility of becoming a full-time employee because that would involve more paper works. And also while he had said that he would help me to establish a new corporation, it was not realistic to ask for his help while he was extremely busy. So by working as a contractor without establishing my new corporation - basically working as an hourly paid fixed-term worker (determinant worker, as my acquaintance said), I would reduce his workload and his having me wouldn't become a burden when he was extremely busy.

But this e-mail was not replied, either.

Two days later, last Friday, he called me and asked me if I could come for the second interview. One of their clients needed a developer as soon as possible because one of the developers had a health problem and would be out for half a year. And he wanted me to work as a contractor. He didn't mention anything about my last question. Whenever the talk got close to it, he said, "Don't worry about it. We will talk about it later." But I assumed that he read my e-mail and that he was considerting my option. I went for the interview on the same day as soon as the interview was arranged. The developers who interviewed me were also busy and we had only a limited amount of time until their next meeting.

The next Monday, yesterday, he called me in the afternoon and told me that I would be working for the client. It would be three-month. He asked me to start working at 1pm the next day. He talked as if I would be working as a contractor with my own corporation, completely ignoring my suggesion. So I asked him if I can work as a deteminant worker (an hourly paid worker), explaining various points. And I said to him that that would be the only option that we could finish the necessary paper works before I start working the next day. He said that he would ask thier accountant if it was possible.

This morning, he called me and told me that my working as a contractor with my corporation (subcontracting) is the only way. I was reluntant. So he offered to discuss about it before I start working 1pm today.

We met at 12:30 and discussed the issues. I asked about the non-compete agreement. I asked why it was not possible to work as an hourly paid worker without establishing a corporation. He gave me two points - first tax issue, second they don't want to hire an employee without trying him/her out as a contractor. (I don't know why he had mentioned an option of becoming a full-time employee in the first interview.) He wanted me to start working without any employment contract.
My decision was that I don't work until we sign an employment contract. He said that he hadn't got a reply from the accountant yet even though over the phone he said that the only way is working as a subcontractor based on the discussion with the accountant. So I said that I couldn't start working until we got a reply from the accountant.
Basically, he needed a developer immediately for the client.

I have been expressing all my concerns in my e-mails. And I did everything I needed to do. And working without no written contract is not unthinkable and problematic for all the parties involved. I am upset that I ended up appearing that I was not showing up for the client site, because of his avoidance in answering my concerns. I have trusted this company for many months and I don't deserve to be treated in such a way.

I am very disappointed.

Thursday, September 14, 2006

JavaScript

At the local Java Users Group meeting today, I learned about JavaScript.

I found many similarities with Ruby. Having learned Ruby helped me to understand the features of JavaScript. As the speaker said, most of the people who have used JavaScript only knows the on-click feature, so do I. It's good to know more because those features are the ones used heavily these days, for example, in AJAX or Firefox Extensions.

I don't think I will allocate time to learn JavaScript and I would rather spend time to learn Ruby and Ruby on Rails more. But I would like to learn scripting language support of Java SE 6 (Mustang).

Tuesday, September 12, 2006

Travelling and programming

I'm in a National Park.
I am reminded how productive I become when I'm travelling, especially in scenic place (I mean I'm not including business travel. Business travel is still same as going to the office.).

Before I started this my Blog site in July, 2006, I travelled in the mountain areas and experimented how it is to work on software development while travelling. Because whenever I'm on road, I tend to focus more on programming work, become more productive and become more innovative and creative. I have been using EV-DO with Blackberry and even when there is no EV-DO signal in the area, I could access Internet through 1X connection. So basically I could access Internet anywhere.

I was definately more productive and achieved a lot.

In fact, I came up with the idea and worked on the jMock's support for JUnit 4, outside a mountain cottage looking at high Rocky mountains across the valley.

Now I live in an urban area and I have recently lost the sense I had when travelling. Then I came to this National Park and the sense and the feeling have come back.

Saturday, September 09, 2006

OSGi meets Spring

One of my acquaintances, the best software developer I have ever worked with as far as I know, recently sent me an e-mail with the link to InfoQ article about Spring 2's support of OSGi.

I remembered OSGi somehow from somewhere but I didn't remember what it was.

Then I started reading about OSGi and was reminded that it was Eclipse. When I was trying to write Eclipse plugin, sometimes I had a hard time tracing the code and understanding it because Javadoc for OSGi was missing. (The version before that didn't have OSGi dependency and I could trace the Eclipse code easily.) Around that time, somebody working on Eclipse at IBM said at OOPSLA that the reason Eclipse had been changed to be based on OSGi was because one of the department in IBM that was dealing with embedded system demanded it. He said that it was an unfortunate compromise. So I considered it as such.

As the result of today's reading, I learned that OSGi has been extended beyond embedded system and that now it's one of the promising dynamic module system. And it's concept is very exciting.

In the matter of within a few years or less, the perception has changed dramatically. And there are people who have been working on OSGi and innovating it.

There are so many things to learn and there are so many changes including perception. Again even more than before, I am convinced that it's impossible to do up-front estimate on software development.

Thursday, September 07, 2006

Becoming Lean - Mary Poppendieck's talk

I have just attended a local Agile users group's meeting. Today, Mary Poppendieck made a presentation about Lean Software Development.

I still need a time to organize my thought. But I am very excited and I just wanted to write this blog soon.

It was excellent. Every point she made totally made sense.

One thing she mentioned about Scrum was interesting, answering a question from an audience. It was about limiting the task to the capacity. I wondered about Project Backlog in Scrum myself. She answered that we shouldn't keep tasks in the backlog and ignore them. An interesting thing she mentioned was that Ken said that Scrum is for disfunctioning team. For properly functioning team, you don't need a backlog, she said.

And most memorable thing she mentioned today was Project vs Product. We should consider software development in the sense of Product. If it's Project, then fixed scope with up-front estimation is norm. But if it's Product, it usually works incrementally. It is a wonderful concept.

Can't wait to read her new book. When I went to Amazon website, the time to deliver was more than a month. So I think I will get one at OOPSLA. It's usually discounted and I can get author's autograph at the signing session.

Monday, September 04, 2006

Learning Computer Science using the knowledge from other disciplines

We all know the lack of sleep is bad for learning. We all know we human can focus on one thing no more than an hour. We all know working long hours can increase the possibility of human error. And we all know that working overnight is not good for our health and affect other part of our lives.

Those knowledge comes from learning psychology, biology, sociology, etc.

People in Computer Science field are quite educated people.

I am surprised that recently I learned that at a very famous top university, working on programming project until 4 in the morning is considered to be normal.

Most of the students are in early 20s and it's important for them to have healthy life style so that they can establish the foundation for the rest of their lives. Working overnight and long hours is not good for them. It is not educational because you cannot learn much in that condition. Also it deprives the time to learn other subjects from them.

Also equally importantly, from Agile Methodologies, we know that we cannot write a program expecting that it would finish at a predetermined deadline.

Forcing the students to work on the project to be finished on the certain deadline by making them work overnight is wrong both for their health and in the reality of software development.

We should incorporate what we know from other disciplines and create a new grading system to measure the students performance based on what the teachers expect in incremental way - just like in Agile Methodologies, where the value of the software is measured based on what the customers expect from it. At the end of each iteration with the fixed number of hours, the teacher evaluates the project based on the value not on the fact if the project has completed a predetermined content.

These days, athletes are getting benefits from disciplines such as sports psychology and nutrition science. It is an irony the people in Computer Science field who are considered to have more intelligence than professional athletes are working under the condition similar to that of early 20th century.

Saturday, September 02, 2006

Bruce Tate's article "From Java to Ruby: Risk"

On InfoQ, there is an article by Bruce Tate titled, "From Java to Ruby: Risk".

It's interesting. And the threads of comments are even more so.
I've been in environments recently where somebody makes too simple strong statement.
I miss the environment where much sophisticated discussion is made like in this article and its commnets.

Tuesday, August 15, 2006

Philanthropist - Social enterpreneur

I happened to read an article in Reader's Digest Canada, September issue. It's about philanthropists and social enterpreneurship that is gaining popularity. It is very encouraging to me. This is the kind of work I would like to get involved. I want to work for good. For example, I want my work to contribute to protecting environment. Working just for money at money making business doesn't motivate me at all.

The article covers the stories of Social Venture Partners (SVP) Calgary Chapter and Brad Zumwalt, Social Capital Partners and Bill Young in Toronto, Inner City Renovations in Winnipeg, Community Foundation of Ottawa and its Engage! program by Coralie Lalonde (also Volunteer Ottawa), and The Maytree Foundation and Alan Broadbent, especially its The Mentoring Partnership program.

There is a course about Social Enterpreneurship at University of Alberta, Duke, Stanford, Harvard, Oxford, and IESE Business School, the article says. University of Toronto is also starting a new course this fall.

Also the article mentions the comments by Gary McPherson, executive director of the Canadian Centre for Social Enterpreneurship at University of Alberta.

Maybe acquiring business skills in this area is a good idea. I have always thought of acquiring business skills and learning how private sector business operates, just to understand how things are going. But I didn't have enough motivation to cut my time to work on computers in order to take courses about them.

I feel very good that there are people who have same mindset as I do who want to work for good cause.

Tuesday, August 08, 2006

Sarcasm is useless and harmful

Sarcasm doesn't allow the person who were told it to express his/her point of view.
In order to understand the action of the person, you need to understand his/her point of view. By communicating with him/her and creating a dialog, you can understand what is actually happening.

Human behavior or emotion is very difficult to guess. Even in the controlled psychological lab environment eliminating as many unrelated factors as possible, it is difficult to pinpoint the causality of the behavior, emotion, or reaction. In the real world environment, it is almost always true that the observer's experience, emotion, knowledge, etc. biases the observation. Not only that, the person who is being observed behaves differently depending on the circumstances he/she is in. So it is certain that the observation is wrong. Hence, sarcasm is useless, which is solely based on the observer's point of view.

Also sarcasm makes the topic appear to be more important than it is at the moment. Even when there is another important thing that is worth, say, 80% of the person's attention - e.g. software code that is used 80% of the time, etc. - if somebody says sarcasm about a topic that is worth only 20% of attention, that topic gets the major attention or even exclusive attention. That's harmful.

And if the person who is told sarcasm says something back, all the person who said sarcasm has to say is that he/she not talking about the person who is told sarcasm. In other words, the person who says sarcasm doesn't take a responsibility of what he/she says. So often times, the sarcasm is ignored by the person who is told the sarcasm. Who would take a comment seriously made by somebody who is not willing to take a responsibility of the comment? That's another reason whey sarcasm is useless.

Life without using sarcasm is much tougher and requires intelligence and discipline, which is the opposite of some people's belief that using sarcasm is a sign of smartness. And life without sarcasm is much more productive and fulfilling.

Friday, August 04, 2006

Thin slicing and snap judgement on software - Blink and Smell

I've been listening to an audiobook, "Blink" by Malcolm Gladwell recently.

I just wondered if we can judge software quality by thin slicing and snap judgement. Martin Fowler uses the word, "smell". I even saw him holding his nose saying, "Oh! It smells!" looking at a code at one conference. I think we can extend it to see a positive sign of software quality, maybe browing a word from "Blink".

One thing I found from my past experience of looking at other people's code is that the code that is well formatted and that is following some convention - i.e. easier to read, has higher quality, whereas the code written by people who don't care about any of them tends to have lower quality. And it doesn't take long to sense it.

I don't claim that this kind of judgement is accurate or anything. But I think it's interesting to explore it.
(By the way, of course, I write test first and the main judgement should be done by running tests.)

Turning wrong snap judgement into positive

Malcolm Gladwell said in the Epilogue of his book, "Blink", that he was inspired to write the book by a wrong snap judgement and stereotype of a police officer who doubted him. I wonder how he could come up with a positive idea out of a negative experience that is completely because of other people's fault. I just wonder if I could do the same thing. At least, my recent experiences led me to read (actually listen to the audiobook of) "Blink" again.

Thursday, August 03, 2006

JMock: JUnit4 support without extending MockObjectTestCase

Back in early June, I submitted a code for JMock to support JUnit 4 without extending MockObjectTestCase.
http://jira.codehaus.org/browse/JMOCK-97

Recently, one person wrote a comment that it has been very helpful in his project.
I appreciate his comment very much and I am glad that the code is helping his project.

I wasn't expecting that the code would be used before it is added to the main jMock distribution. But since it may take a while for that to happen, I added a jar file also so that the code can be used immediately.

I use Eclipse. If I extend MockObjectTestCase and use JUnit4 annotation to indicate Test methods as one jMock mailing list thread says to get around the problem of using JUnit4 with jMock, Eclipse complains that no test method is found. It is because MockObjectTestCase extends the old JUnit TestCase class and Eclipse simply assumes that I am executing the old JUnit TestCase (3.8.1). Eclipse looks for a method prefixed with "test" in that case. And my test method using JUnit4 is not prefixed with "test" any more. (I use the method name to describe behavior.)
So my code for supporting JUnit4 without extending MockObjectTestCase is helping me very much as well.