The power of pair programming

Some weeks ago I started doing pair programming with some co-workers basically for two things:

  1. code some tasks of an user story
  2. get familiar with a new software code base

I haven’t had an opportunity to put this technique in practice a lot before, but I can say it was extremely important and benefit for the project. Sometimes I was the driver and sometimes I was the observer. The driver is the person who starts coding and the observer is who starts doing the code review. That point is important: code review.

Pair programming encourages the review of the code. Perhaps you won’t have an opportunity to refactor some code as you have when you are pairing with someone. I think code reviews are important because:

  • Reviews increase code quality, because there are 2 people thinking at the same task at the same time.
  • Refactoring areas arise in the design where improvements are needed
  • When you have the strong support of an IDE (as Eclipse), some refactorings (extract method, extract class, introduce parameter) are highly automated
  • Code is more read than written, two people reading the code can understand a lot more about the code base
  • New ideas arise because of different point of views
  • Questions can be solved by the sum of knowledge of the code base

And you? What’s your experience with pair programming?

My paper MIMECORA-DS added as LNCS at SpringerLink

I’m proud to announce that my paper A Collaborative Support Approach on UML Sequence Diagrams for Aspect-Oriented Software was added as lecture notes in computer science at SpringerLink.

At this paper it is presented an extension based on the default UML meta-model, named MIMECORA-DS, to show object-object, object-aspect and aspect-aspect interactions applying the UML’s sequence diagram.

You can check it out here.

My first experiences on a Scrum team

I moved to a new job recently, which applies agile methodologies to manage software teams, particularly Scrum, which was adopted to make an effective management of price, estimates, task and resources. It’s my first experience working with an agile process and I’m no doubt it brings a lot of values for a software project.

The Scrum methodology works something like this:

The team works on iterations (called sprints) during from 2 to 4 weeks (it depends on the project, organization..) on features prioritized by the owner(s) and the Scrum master of the project referring to a list of requirements written on a document (called product backlog). The priority is set according to the business value of the feature. The called owner is a representation of the customer. The Scrum master is the person who removes impediments for the team to keep them focused on the tasks and keeps the focus on the sprint goal. More information you can find here.

Every sprint start we estimate some stories and select the work to be done on the current sprint. At the end of the sprint, we have the review and restrospective of was and wasn’t done.

Above are my opinions about this agile methodology working with for a month:

  1. The team is completely committed to the overall goal of the sprint
  2. Members try to help each other as soon as one poses an impediment
  3. Everyone on the team knows which task the others are doing
  4. Every member helps each other to complete their tasks when they finish their ones
  5. The Scrum Master is always there to remove obstacles, clarify the understanding of the stories and help the estimates
  6. The PO acts with the team to give directions and suggestions for the next stepsand how to interact with other areas on the organization

I’m very motivated with Scrum practices and the way we put it in practice, and I know I have to learn a lot more.

Have you ever worked with Scrum? What do you think about this agile methodology?

Fixing Eclipse buttons for Ubuntu 9.10

I’ve just updated to the new Ubuntu Karmic 9.10 and I’ve found some weird problems running Eclipse. Some buttons didn’t work when they were clicked, but the keyboard shortcuts worked well. It looks like in Eclipse 3.6 the bug will be solved. It looks like it’s a hack between Eclipse SWT and GTK. More information here, here and here.

To fix the problem, just launch Eclipse through this shell script file, assuming Eclipse is installed at /home/rnaufal/eclipse/eclipse:

#!/bin/sh
export GDK_NATIVE_WINDOWS=1
/home/rnaufal/eclipse/eclipse

Product Owner vs Product Manager

I received from @akitaonrails an interesting article concerning the differences and responsibilities of the product owner and product manager roles.

For the author, the PO must perform:

  1. Articulate the product vision to the team
  2. Define the goals at the beginning of every sprint
  3. Tell the story behind each user story so that the development team understands what is required. So the PO must understand the end user requirements.
  4. Define or help define the user story acceptance criteria so the team knows when they are DONE
  5. Be able to prioritize the stories and be able to negotiate/collaborate on priorities with the team. Negotiate priorities occurs when after taking the top priorities off the backlog; there may be some remaining capacity that the next highest priority story won’t fit in to. So in those cases, a lower priority feature could be picked.
  6. Must be available at all inspect and adapt points to answer questions and help guide the team empirically

On the other side, the PM must perform:

  1. Defining the marketing strategies and outbound marketing communications
  2. Pricing strategies
  3. Understanding the positioning of the product in the market place
  4. Competitive analysis

For me, the PO mainly responsibilities are the ones that highlighted. What do you think about them?

Effect propagation to code

Reading Michael Feathers’ ‘Working Effectively With LegacyCode’, I found quite interesting his heuristics to trace propagation of effects to code:

  1. Identify a method that will change.
  2. If the method has a return value, look at its callers.
  3. See if the method modifies any values. If it does, look at the method that use those values, and the methods that use those methods.
  4. Make sure you look for superclasses and subclasses that might be users of these instance variables and methods also.
  5. Look at parameters to the methods. See if they or any objects that their methods return are used by the code that you want to change.
  6. Look for global variables and static data that is modified in any of the methods you’ve identified.

JFileContentManager included in the Softpedia Mac OS software database

100% FREE award granted by Softpedia

I’m proud to announce that JFileContentManager, a software of mine, has been added to Softpedia’s database of software programs for Mac OS. It is featured with a description text, screenshots, download links and technical details on this page.

JFileContentManager has been tested in the Softpedia labs using several industry-leading security solutions and found to be completely clean of adware/spyware components. We are impressed with the quality of your product and encourage you to keep these high standards in the future.

You can see the announce by clicking on the image above. Thanks Softpedia for the award!

JDK7 Tackles Java Verbosity

Interesting article showing some changes on the Java platform to address its verbosity, but keeping code readability safe.
I liked the new Collection’s literals syntax to create lists, sets and maps:

List powersOf2 = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024};
Map ages = {"John" : 35, "Mary" : 28, "Steve" : 42};

Although it can be possible to use the DoubleBraceInitialization idiom to initialize collections in a more elegant way, this syntax is very terse and concise.

BTW, as I said before, Scala already has a syntactic sugar to create a literal Map:

val ages = Map("John" -> 35, "Mary" -> 28, "Steve" -> 42)

Maybe this change was taken into account considering the Scala collection literals implementation?

Constructors in Scala

I just came across an interesting post by Stephan Schmidt about constructors in Scala.

It shows how to create constructors with immutable and mutable fields, how to have multiple constructors how to invoke super class constructors. I found it very handy and concise to create a constructor with a private immutable field:

class Foo(private val bar: Bar)