`
| |
|
Archive for October, 2005
Sunday, October 30th, 2005
Most often when we, agile enthusiasts, talk about Agile and its applicability, we talk about embracing change. Change in business needs/requirements, change in the team/team members, change in technology, etc.
Definition of porting project: In computer science, porting is the adaptation of a piece of software so that it will function in a different computing environment to that for which it was originally written. http://en.wikipedia.org/wiki/Porting
Googling on “Agile + Porting projects” returns some results out of which only one talks about using Agile practices. The focus though is using Agile testing techniques to guide the port.
What other practices of Agile have been found useful on porting projects? Any thoughts?
Posted in Agile | No Comments »
Sunday, October 23rd, 2005
Have you been wondering, what‘s happening to the software field?
Have you come across any innovation recently in the field of software development, which solved one of the basic problems in developing software?
Everybody used to talk about Software leading the innovation arena and improving people‘s life. Helping people improve the way they do things and help achieve some tasks which were impossible before.
I‘m personally disappointed with the innovation happening in this field. For me innovation is solving one or more important problems in a simple way. By simple I mean simple from a user‘s point of view. The implementation of the solution might be complex, but abstracted away.
Focusing on a narrow stream of things inside the software world
- 1991/92 The innovation of Internet : It changed the way we think of the world today, yet a very simple solution
- 1995 The Java Virtual Machine [JVM]: “Write once run anywhere”. If you have ever worked on a porting project, you will know what this means to you.
- 1996/97 Java embraced the Internet : With all those crazy applets and servlets, Java helped to push Internet to the next level
- 1998/99 KVM : Java for devices. Embedded programming with Java helped bringing nice colorful user interfaces for deceives.
- 1998 Search Engines : Goggle‘s search engine is surely changed the way we think about internet today.
Since then nothing significant has happened. We had Swing, J2EE, Java Web Start, Web Services, etc come and go. But nothing impressive.
Eclipse plugin architecture, MVC frameworks, .NET‘s CLR, etc are good ideas. But I would not term them as innovations that eased my life as a developer/customer.
I‘m seeing a trend of building a lot of applications, frameworks, language features, libraries, etc. But they are just building on the beaten path. Just trying to overcome some language/technology shortcomings. None of them really reflect directly to real world problems. They don‘t seem to simplify things to me. We are so deep into this maze of technology stack, then we have forgotten to think about the simple real world problems that software development is facing.
We still have security concerns. We still don‘t have a nice way to store and retrieve our data. We have issues with software becoming obsolete because everyday the volume of data is increasing.
Are we at the horizon of something new?
Posted in Random Thoughts | No Comments »
Saturday, October 15th, 2005
I‘m wondering how would CIOs or IT Managers feel off shoring business critical apps to an offshore development centers?
Could this answer why majority of software projects in India are not business critical?
If so, how do we make our work more challenging and interesting?
Posted in Java | No Comments »
Saturday, October 15th, 2005
When you see familiar office layouts,
But you don‘t remember where they‘re from,
Could you be wrong?
When you‘ve been particular offices,
That you know you‘ve never been before,
Can you be sure?
‘Cause you know you have seen this before,
And you know that this moment in time is for real,
And you know when you feel Deja vu.
Chorus:
Feel like I‘ve heard this before,
Feel like I‘ve seen this before.
Ever had a conversation,
That you realise you‘ve had before,
Isn‘t it strange?
Have you ever talked to someone,
And you feel you know what‘s coming next?
It feels pre-arranged.
‘Cause you know that you‘ve heard it before,
And you feel that this moment in time is surreal,
‘Cause you know when you feel deja-vu.
It‘s real, but unfortunate that some software companies are using Agile as a way to micro control their employees. In the name of Agile, some companies are doing the following:
1. Pulling down the cabins : Goodbye to all your personal phone conversations, emails and IM chats. Managers can see who is doing what and really scrutinize them. Whatever happened to breaking all barriers to communication? Though I‘m not a fan of spending time on personal stuff during work hours, the concept of pulling down the cabins in Agile is not to eat into your privacy.
2. Having more and more meetings : Goodbye to all your productive time and optimizing wastage.
3. Adding more and more managers : Whatever happened to making life simple and easy?
4. Trying to scale projects at an insane rate : Always reminds of the classical Mythical man month. If 9 ladies cannot deliver a baby in 1 month, 10 will surely not.
The list can go on…but I need to go and do some real work…
- : The above lyrics are copied and edited from Iron Maiden‘s Deja vu song.
Posted in Agile | No Comments »
Tuesday, October 11th, 2005
On my current project we have a requirement that we need to log every method entry and exit. For purpose of this post let‘s consider a simpler example.
public class Calculator{
private final LoggerWrapper logger;
static final String ADD_METHOD_SIGNATURE = “add(int, int)“;
Calculator(LoggerWrapper logger){
this.logger = logger;
}
public int add(int firstOperand, int secondOperand) {
logger.logMethodEntry(ADD_METHOD_SIGNATURE);
int result = firstOperand + secondOperand;
logger.logMethodExit(ADD_METHOD_SIGNATURE);
return result;
}
}
Since logging method entry and exit is a requirement we need to write unit tests to make sure we are logging the correct messages in the right sequence.
We started using easymocks and constructor based dependency injections.
Since our unit tests reside in the same package as the classes, [in a different source tree of course], we use package protected constructors to inject the logger.
//test class
import org.easymock.MockControl;
import junit.framework.TestCase;
public class CalculatorTest extends TestCase {
public void testAdding3To5Returns8() throws Exception {
MockControl loggerControl = MockControl. createStrictControl (LoggerWrapper.class);
LoggerWrapper mockLogger = (LoggerWrapper) loggerControl.getMock();
Calculator calculator = new Calculator(mockLogger);
mockLogger.logMethodEntry(Calculator. ADD_METHOD_SIGNATURE);
mockLogger.logMethodExit(Calculator. ADD_METHOD_SIGNATURE);
loggerControl.replay();
assertEquals(8, calculator.add(3,5));
loggerControl.verify();
}
}
This works perfectly fine. This test makes sure that logMethodEntry and logMethodExit is called in the same order and with the correct parameters. [method signature in this case].
So if you notice, we have defined a constant called ADD_METHOD_SIGNATURE in the Calculator class. We are using this constant in the test and making sure the logger methods are called with the correct method signature.
Using constants in this fashion surely has advantages. For Ex. someday we change the add method signature, we just need to update this constant and the tests will still pass. But the same advantage can turn into a big disadvantage if the constant value goes out of sink with the actual method signature. So, if we change the method signature and don‘t update the constant, the test would still pass, which is wrong. The tests should be checking for the absolute value in case of logging.
We have 2 approaches to tackle this.
1. Don‘t use the constant in the test and use the actual value. So if you change the method signature and don‘t update the constant, you‘ll have a failing test.
2. The second and the better approach is to use the constant in the test, but also add another test which checks for the absolute value of the constant.
public void testConstantValue() throws Exception {
assertEquals(“add(int, int)”, Calculator.ADD_METHOD_SIGNATURE);
}
Now you know, what‘s keeping me busy whole day
Posted in Java | No Comments »
Sunday, October 9th, 2005
AND - Another Natural Disaster
Krakatoa, Indonesia, volcanic eruption, (August 26, 1883)
Tangshan earthquake, China (July 26, 1976)
2001 Gujarat Earthquake, Bhuj, India (January 26, 2001)
Bam Earthquake, Iran (December 26, 2003)
Tsunami, 2004 Indian Ocean earthquake, Indonesia (December 26, 2004)
and now…
Rains causing floods in Mumbai, India (July 26, 2005)
Hope you guys must have read about the disaster that took place in Mumbai on 26th.
Mumbai was lashed by the highest ever rainfall recorded in a century in India. The suburbs in Mumbai recorded rainfall levels of 944 mm within one day. Rainfall lead to landslides, deaths, water and power cuts, food shortages, erratic telephone links, no trains, jammed roads and the airport coming to a stand still. The break down in communication and transportation caused havoc in the city.
Official news claims over 800 people dead. But I believe the number is more than 1500. The amount of destruction and chaos that these rains and floods have caused in Mumbai is not measurable. Estimated damage to property is around half a billion Rs.



With all these events the most affected part of the society is always the financially weaker community. Today I visited a few slums in Mumbai which were the worst victims of this disaster. Lots of people lost everything they have earned and saved. Right from food, clothes, medicines, beds to televisions and refrigerators as most of the houses were washed out.
Bottom line: Never plan things around the 26th!
Posted in Random Thoughts | No Comments »
Saturday, October 8th, 2005
Recently over a conversation, my tech lead mentioned that he thinks the GNU project is a failure. His point of view is that after two decades they have never released a complete GNU operating system suitable for production use. He also mentioned that apart from Richard Stallman, no one else thinks of Linux as GNU/Linux. [He was glad to meet the second person].
I almost freaked out hearing this. Since then, I spoke to a few other people who felt the same. I was thinking to myself, this is what I call, “missing the forest for a tree“.
I think Free Software Foundation [FSF] is one of the most successful movements in the history of humanity. And I consider the GNU project as a big success. To justify this, we need to look at the history of the GNU project and the FSF in general.
In 1983, Richard Stallman quit this job at MIT to begin developing a free software operating system. His hope was that a free operating system would open a path to escape forever from the system of subjugation which is proprietary software. He had then experienced the ugliness of the way of life that non-free software imposes on its users, and he was determined to escape and give others a way to escape.
The word “free“ in “free software” pertains to freedom, not price. Once you have the software you have three specific freedoms in using it.
1. The freedom to copy the program and give it away to your friends and co-workers;
2. The freedom to change the program as you wish, by having full access to source code;
3. The freedom to distribute an improved version and thus help build the community.
The GNU Project was conceived in 1983 as a way of bringing back the cooperative spirit that prevailed in the computing community in earlier days. To make cooperation possible once again it was important to remove the obstacles imposed by the owners of proprietary software.
FSF decided to make the operating system compatible with UNIX. A Unix-like operating system is much more than a kernel; it also includes compilers, editors, text formatters, mail software and many other things. Unfortunately many people think that an operating system means a kernel and everything else is secondary.
By 1990 FSF had either found or written all the major components except the kernel. By then Linux was developed by Linus Torvalds and made free software in 1992. Since Linus decided to release the Linux kernel under the GNU public license [GPL], FSF thought combining Linux with the almost-complete GNU system would be the right thing to do. Today we have a huge number of people who are using this operating system and are experiencing the freedom which Richard Stallman had dreamt of.
Another important point to consider is would Linux be possible without GCC and the other libraries which Linus used? Again I‘m not saying it would be impossible, but it‘s all about helping each other to solve a common problem.
Who cares if it is called Linux or GNU/Linux? GNU‘s intension was to come up with a free operating system. This does not mean they have to write everything from scratch. Their idea was to reuse whatever is available and write software which was not available or not free.
So today we do have a free operating system, which is been used and relished by countless users. The good news is for FSF the ultimate goal is to provide free software to do all of the jobs computer users want to do and thus make proprietary software obsolete.
Please remember, its freedom of software in the spirit of community building and not satisfying personal egos.
Must read : http://www.gnu.org/gnu/gnu-history.html
Posted in Linux | No Comments »
Friday, October 7th, 2005
Looks like the latest version of fitnesse seems to be hacked!
I just downloaded the latest version of fitnesse from http://fitnesse.org/fitnesse20050731.zip?responder=releaseDownload&release=20050731
After downloading, I unzipped it and ran the run.bat file. In my browser if I go to http://localhost, it shows me the FrontPage. Everything seems fine. But if I scroll down on this page, I see the following links.
http://hair-removal.healthandlive.com
http://short-hair-cut.healthandlive.com
http://prom-hair-style-picture.healthandlive.com
http://hair-dos.healthandlive.com
http://hair-shampoo.healthandlive.com
http://long-hair-cut.healthandlive.com
http://current-hair-style.healthandlive.com
http://teen-hair-style.healthandlive.com
http://wedding-hair.healthandlive.com
http://celebrity-hair.healthandlive.com
http://black-prom-hair-style.healthandlive.com
http://hair-style.healthandlive.com
http://hair-loss.healthandlive.com
http://prom-hair-updos.somecoolpages.com
These links actually exist in the content.txt file.
Hope the fitnesse guys could make big money by advertising these links.
Posted in Random Thoughts | No Comments »
Thursday, October 6th, 2005
About the place: Valley Green is located in the Wissahickon Valley of Fairmount Park in the City of Philadelphia. The Park (4,180 acres) is the largest landscaped park in the U.S. Users of Park trails include all people using trails whether on foot, bicycle, horse, carriage, horse-drawn vehicle or any other permitted vehicle. For more details http://www.fairmountpark.org/
Climate: Temperature is usually around 63.0 F (17.2 C) in the summers. [July – Oct]
The Hike itself: There are different hiking trails in the Wissahickon Valley. You can find more details about them on the website. All these trails are clearly marked unlike what it is back in India. Most of the hikes are a day long hike. Camping overnight is not allowed.
There is a trail that goes along a small stream and it‘s pretty simple and nice.
Route: Catch a Septa bus, route no. 27 from Philadelphia. There is a bus every 20 mins. Get down at Wises Mill Rd or Wissahickon Valley. It‘s about a 40 mins ride. The bus will drop you on the freeway. From here, there is a sign board on the right hand side which takes you the actual trail. On your way back, you can catch the same bus.
Food: There is a very nice restaurant called Valley Green Inn restaurant. At any time of the year, whatever the occasion, this place offers a charming and comfortable experience for good food, spirits and company. The Inn is open seven days a week, year round.
Some snaps:
Just before a small waterfall.

The waterfall

I was really surprised looking at the standstill water just before the fall. Looks like there is some underwater current. Hence swimming in these streams is prohibited.
Happy hiking!
Posted in Escapade | No Comments »
Thursday, October 6th, 2005
Background:
According to the FitNesse website, FitNesse is a fully integrated standalone wiki, and acceptance testing framework.
In simple words, FitNesse is essentially a wiki wrapper for FIT. FitNesse uses Ward Cunningham‘s FIT, which is the engine that actually runs the acceptance tests. The FitServer which comes with FitNesse, interfaces with FIT by converting all the wiki pages to HTML tables and passing them to the WikiRunner. FitNesse is not just limited to running only Java tests. Given an implementation of FIT and the corresponding FitServer, FitNesse can execute tests in any language.
As per the website, following languages have FIT/FitServer implementations.
- Java : Included in the FitNesse.jar.
- .NET : Included in the standard FitNesse distribution.
- C++ : C++ FIT and FitServer
- Delphi : Delphi FIT and FitServer
- Python : Python FIT and FitServer
- Ruby : Ruby FIT and FitServer
- Smalltalk : Visual Works Smalltalk FIT and FitServer
- Perl : Perl FitServer
Topic of the blog:
I have been using FitNesse for about 2 months now. FitNesse has a simple but not elegant wiki interface. [Well, it‘s not meant to be a full fledge fancy wiki]. But I‘m using it as a project wiki as well.
I must admit that I‘m pretty satisfied with FitNesse.
Reasons:
1. It has a decent menu on the left hand, which helps you declare a wiki page as a Test or a Test Suite. This means you can click one button on this menu and run any test or the whole suite.
2. It‘s very easy to download and install. Just a zip file which we need to unzip. There is a run.bat file, which needs the JAVA_HOME to be set. Double click the run.bat file, and you have FitNesse running on the specified port. [There is a bunch of simple command line arguments which can come very handy]
3. You can define a hierarchy of pages prefixing the link with ^ [caret character]. This hierarchy of pages is very useful when you want to organize the tests and run them together as a suite.
4. Classpath and other properties are pretty simple to setup. One needs to go to the root page and add them on this page. [http://localhost:8080/root]
5. It has a css file, which can be used to define custom format attributes.
6. Has a simple mapping of the pages to the file system. Under the FitNesse installation folder, there is a folder called FitNesseRoot, which will contain a folder per page created under the root folder. Each of these folders would contain a content.txt and properties.xml file. The content.txt file contains the actual contents of the page. The properties,xml file defines what menu buttons should be shown on the page. So it‘s pretty configurable.
Some pain points that I ran into with FitNesse are:
1. I want a good automatically backup strategy. It is a bit painful to just backup the whole FitnessRoot folder. I want a different backup strategy for the fixtures and the rest of the pages. FitNesse also contains a lot of backup zip file. Everytime, I change any page on the wiki, FitNesse zips up the contents.txt and the properties.xml file, before making any change. If you have lots of changes been done to the wiki there might be a huge number of these backup zip files.
2. Any wiki is not good at handling concurrent changes. I want to be able to manage concurrent changes with features like visual merge and rollbacks.
3. I want some kind of a configuration management on the tests. One should be able to tag the FitNesse fixtures against a build version and be able to keep it together with the build. FitNesse does not have a direct integration with the version control system I‘m using. [Might be a good idea to write a plugin]
4. Currently FitNesse comes with a build in web server. I‘m not aware of any easy way of pulling the fit server and wiki out and running it on any web server of our choice.
5. The CruiseControl war does not work with FitNesse. It needs another web container to run. It kind of gets annoying having so many web servers running on the build machine.
At this point I‘m trying to do all kinds of wacky stuff to get around these. Eventually I might just plan to throw out FitNesse and just go with simple FIT. There are a lot of alternatives for the wiki part of FitNesse. So breaking them up into a separate project wiki and a bunch of html files for FIT and maintaining them differently seems to make more sense.
Posted in Java | No Comments »
|