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.