Shahzad Bhatti Welcome to my ramblings and rants!

March 21, 2005

Bohrbug Vs Heisenbug

Filed under: Computing — admin @ 11:33 am

Bohrbug Vs Heisenbug
Bohrbug (Niel Bohr) – retrying will result in the same error.

Heisenbug (Werner Karl Heisenberg) – retrying may or may not result in the same error

  1. Omission Failure: abscence of response
  2. Timing Failure: system does not provide result within the specified timeframe (early timing failure/late timing failure)
  3. Response Failure – system provides incorrect value
  4. Crash Failure – no further responses until reboot

Principles of design

  1. Modularity
  2. Fail fast / heartbeat
  3. Independent failure modes
  4. Redundancy/repair – hot swapping
  5. Elimination of single point of failure – redundancy

Pair/Spare approach — provide two instances of critical resources and ability to swap one out.

February 18, 2005

Running Code and Regular Releases

Filed under: Computing — admin @ 7:56 am

Running Code and Regular Releases

1a) Releasing a protoype when only 20% of the functionality is complete, was a significant predictor of both reduced defect-rate and increased productivity.

1b) Both formal design reviews and regression tests were significant predictors of reduced defect-rate (but not productivity).

1c) Daily builds were a significant predictor of increased productivity (but not reduced defect-rate).

1d) There was no significant association between either defect-rate or productivity, and dividing a project into subcycles (which developed a subset of the final functionality).

Conclusion: Get a prototype into the hands of customers asap.

http://www.cc.gatech.edu/classes/AY2005/cs6300_fall/papers/maccormack

2a) One-third of the variation in product quality was explained by how quickly customers were given the first beta version.

2b) The data showed no relationship between the final product quality and the number of beta releases.

Conclusion: “Get a low-functionality version of the product into customers’ hands at the earliest possible stage…”

http://www.sloanreview.mit.edu/smr/issue/2001/winter/6/

Posted by: Isaac Gouy at February 11, 2005 11:59 AM

February 7, 2005

JINI

Filed under: Computing — admin @ 8:13 pm

JINI

 Mobile computing > continually changing topology
 Edge networking > no administrator access
 Utility computing > dynamic system re/provisioning
 Dynamic clustering > changing cluster configuration
 Large-scale distribution > constant partial failure
 Dynamic integration > unpredictable service availability
 Ad-hoc networking > spontaneous assembly
 Workflow/Msg switching > loose, asynchronous coupling
 Compute Grid > dynamic scalability
 
 RPC Systems require :
 > The client to know who it is calling
 > The client to know where the server is
 > The client and server to be active at the same time
 > The client and server to agree in detail on what form the
 call will take
 > The client and server to agree in detail on how the call
 will be made
 
 
 Where to Use Spaces
 Flow of objects
 > Workflow
 > Dataflow
 Coordinating loosely coupled collections of
 processes
 > Allows components to come and go
 > Allows components to change
 Don't use where you need
 > A file system
 > A database (object or relational)
 
 Security Valuation: Spaces Style
 Valuate set of fixed income securities
 > Break work into small chunks
 > Write an entry for each chunk into the space
 > Wait for results to come back
 Server process loops
 > Taking valuation requests
 > Executing each request, writing back results
 
 
 public class Task implements Entry
 public String clientID;
 public Task() {}
   public Entry execute() {
     throw new UnsupportedOperationException();
   }
   public long resultLeaseTime() {...}
   }
 public class ValuationTask extends Task {
   // public String clientID;
   public InitialConditions data;
   public ValuationTask() {}
   public Entry execute() {
     ValuationResult result = new ValuationResult();
     result.clientID = clientID;
     result.value = data.valuate();
     return result;
   }
   public long resultLeaseTime() {...}
   }
 
 Server
 ValuationTask tmpl = new ValuationTask();
 while (true) {
   ValuationTask task = (ValuationTask) space.take(tmpl, null, Long.MAX_VALUE);
   Entry result = task.execute();
   if (result != null) space.write(result, null, task.resultLeaseTime());
   //if (result != null) space.write(result, null, task.leaseTime());
 }
 
 Client
 int count = 0;
 while (i.hasNext()) {
 ValuationTask task = new ValuationTask();
 task.clientID = "jmcclain";
 task.data = (InitialConditions)i.next();
 Lease l = space.write(task, null, 3600000)
 lrm.renewFor(l, Lease.FOREVER, null);
 count++;
 }
 ValuationResult tmpl = new ValuationResult();
 tmpl.clientID = "jmcclain";
 for (int i=0; i Authentication
 > Integrity
 > Confidentiality
 > Quality of service
 Use constraints (with Java policy) to specify
 > What a Subject can do
 > What a Subject can't do
 > What a Subject must do
 
 
 The Secure Remote Call Model
 Obtain a proxy from somewhere
 Perform 'proxy preparation'
 > Verify that the proxy can be trusted
 > Attach constraints to the proxy
 > Grant necessary permissions to the proxy
 Make remote calls through the proxy
 
 
 Jini Extensible Remote Invocation
 > RMI/JRMP ('1.0')
 > RMI/IIOP ('1.0B')
 > Jini ERI ('2.0')
 > Kerberos (Java GSS)
 > JXTA (jini.org project)
 > UDP (experimental)
 
 public interface JavaSpace {
 Lease write(Entry entry, Transaction txn, long lease)
 throws TransactionException, RemoteException;
 Entry read(Entry tmpl, Transaction txn, long timeout)
 throws UnusableEntryException, TransactionException,
 InterruptedException, RemoteException;
 Entry take(Entry tmpl, Transaction txn, long timeout)
 throws UnusableEntryException, TransactionException,
 InterruptedException, RemoteException;
 EventRegistration
 notify(Entry tmpl, Transaction txn,
 RemoteEventListener listener, long lease,
 MarshalledObject handback)
 throws TransactionException, RemoteException;
 Entry readIfExists(Entry tmpl, Transaction txn,
 long timeout)
 throws UnusableEntryException, TransactionException,
 InterruptedException, RemoteException;
 Entry takeIfExists(Entry tmpl, Transaction txn,
 long timeout)
 throws UnusableEntryException, TransactionException,
 InterruptedException, RemoteException;
 long NO_WAIT = 0;
 Entry snapshot(Entry e) throws RemoteException
 }
 
 
 
 Exporter Configuration
 example.sunw.service {
 ..............
 private endpt = SSlServerEndpoint.getInstance(0);
 private constraints = new BasicMethodConstraints
 (new InvocationConstraints
 (new InvocationConstraint[]{Integrity.YES},
 null) );
 private ilFactory = new ProxyTrustILFactory
 (constraints,
 ServicePermission.class);
 serverExporter = new BasicJeriExporter
 (endpt, ilFactory);
 ..............
 }//end example.sunw.service
 
 Proxy Preparer Configuration
 example.sunw.client {
 ..............
 private verifyTrust = true;
 private constraints
 = new BasicMethodConstraints(...);
 private dynamicPermissions
 = new Permission[] {...};
 servicePreparer
 = new BasicProxyPreparer(verifyTrust,
 constraints,
 dynamicPermissions);
 ..............
 }//end example.sunw.client
 
 
 
 Refinements
 Wrap operations in transactions
 Priorities
 Create a FIFO
 > Push data structure logic into the space also
 Audit trails
 Status
 Dependent tasks
 Fixed function server nodes
 
 
 
 Future
 Community currently working on extension to
 spaces
 > Batch write and take
 > Exhaustive read
 > Also fills roll of batch read
 > New event
 > New queries support multiple templates
 Should make space better at multicasting
 Batch/multi-template take should help various
 compute server scenarios
 
 
 GigaSpaces http://www.gigaspaces.com
 IntaMission http://www.intamission.com
 Blitz - http://www.dancres.org/blitz
 
 

February 2, 2005

India Justice, the victim – Gujarat state fails to protect women from violence

Filed under: Politics — admin @ 5:04 pm

India Justice, the victim – Gujarat state fails to protect women from violence
In February 2002, violence erupted in the state of Gujarat in western India. Some 2000 people, mostly Muslims, were killed and many others were injured and forcibly evicted from their homes and businesses over the course of the following weeks. Violence against women and girls was a key feature of the violence. Scores of Muslim women and girls were sexually violated – raped, gang-raped or mutilated. Many saw their family members killed and their homes and businesses destroyed. After these traumatizing events many women victims were left to care for their family’s survival, often in makeshift relief camps with inadequate support, conditions and reparations. Few perpetrators were convicted and victims’ attempts to obtain legal redress have been largely frustrated.

The Indian state of Gujarat has a history of communal violence whereby violence was perpetrated by both Hindus and Muslims.(1) While the violence in 2002 followed a fire in a train which killed 59 Hindus, it cannot be likened to earlier patterns of communal violence. The violence that ensued in the period from late February to May 2002 almost exclusively involved Muslims suffering from targeted violence perpetrated by organized right wing Hindu mobs.(2) The violence was grounded in the widespread ideology of Hindutva which sees India as a nation of Hindus. (For details of this ideology see section 4 and 6.)

By looking primarily at the cases of two women victims – Bilqis Yakoob Rasool and Zahira Sheikh, this report demonstrates a range of failures of the state to fulfil the standard of due diligence under national and international obligation to prevent grave human rights abuses perpetrated against women, protect victims and bring the perpetrators of these crimes to justice. Failures are identified at all levels: the police, trial court, high court, the state government and central government.

In the first case, Zahira Sheikh, a 19-year-old woman witnessed the burning down of her family’s business, the Best Bakery in Vadodara, by a violent Hindu mob. During the night of 1 March 2002, 14 people, including several women and children, were killed in the incident. Zahira made a complaint to the police. The trial of the Best Bakery case began in February 2003. On 27 June 2003, the trial court acquitted all 21 accused after 37 of the 73 witnesses, including Zahira, had withdrawn their statements in court. Zahira and her mother Sherunissa days later publicly declared that they had “”trembled with fear”” in court as they had been threatened with harsh consequences by associates of the accused if they did not withdraw their eye-witness accounts. The NHRC petitioned the Supreme Court stating that the circumstances of the acquittal violated the victims’ right to a fair trial and sought re-investigation and retrial of the case outside Gujarat. The Gujarat High Court, hearing the appeal of the Gujarat government against the trial court judgment, in December 2003 confirmed the trial court’s acquittal. Zahira, in January 2004, filed an appeal against the Gujarat High Court judgment in the Supreme Court. On 12 April 2004, the apex court overruled the High Court judgment and ordered the retrial of the Best Bakery case in Maharashtra. It severely criticized the Gujarat government and the state judiciary for their failings. The retrial began in Mumbai in October 2004. On the day before Zahira Sheikh was to appear in court on 4 November 2004, she publicly withdrew her previous statements, claiming that members of the organisation which had protected her and her family and assisted her in filing her petition in the Supreme Court, had coerced her into accusing people unconnected with the killing of her relatives. The circumstances of this reversal are not at present clear. (For details see the section on witness protection and the appendix.)

February 1, 2005


Israeli Troops ‘Shot 10-Year-Old Girl In Face’

Filed under: Politics — admin @ 5:16 pm


Israeli Troops ‘Shot 10-Year-Old Girl In Face’

January 1, 2005

More papers on Aspected Oriented Programming/JFormDesigner

Filed under: Computing — admin @ 3:42 pm

More papers on Aspected Oriented Programming/JFormDesigner
Jini: Out of the Bottle and Into the Box

High availability Tomcat

iptables -t nat -A PREROUTING -p tcp -d lo –dport 80 -j DNAT –to 127.0.0.1:8081
LoadModule jk2_module modules/mod_jk2.so
APACHE2_OPTS=”-D JK2″

Murphy’s Law and Open Source Software Development

Web services programming tips and tricks: Improve interoperability between J2EE technology and .NET, Part 1

Review of 2004: Bruno Souza to Sun – “Stop Saying ‘Our Implementation Is Open Source,’ It Is Not”

Introducing the Reflexive User Interface Builder

OnJava Top articles

Use continuations to develop complex Web applications

Struts Action

Working with Hibernate in Eclipse

Holiday Party Guide to Patterns

Zen and the Art of Aspect-Oriented Programming

Ruby Gardens

Refactor dynaop Factories using dynaop

Dynamic AOP PDF

AspectWerkz PPT

AspectWerkz

Second-generation aspect-oriented programming

Zen and the Art of Aspect-Oriented Programming

Futures and Concurrent Programming (Part 1)

Future Java 1.5

Unbreakable Build

Developers should never build

MasterJ2EE Oracle

Yet Another 2005 Prediction List

Performance Tips PDF

Struts ActionMapping

December 31, 2004

Mixin Inheritance PDF

Filed under: Computing — admin @ 11:36 am

Mixin Inheritance PDF

 Mixins
  Class parametrized by a superclass
  A mixin applied to a class return a class with
 mixed-in behavior
  Reuse functionality orthogonal to inheritance
  Implementation: based on single inheritance
 linearisation
 
 Mixin inheritance
  Mixin inheritance is an approach that avoids many
 of these multiple inheritance problems
  Mixins are combined by using the regular single
 inheritance operation
  Mixins are always applied one after the other
 
 Implications
  Super is late bound!
  This is only at composition time that super will
 identify the right class.
  A mixin can be mixed in several classes
  Super refers to different classes!
  Similar to call-next-method (CLOS, Dylan)
 
 
 Mixin Inheritance Limits
  Implicit conflict resolution
  Surprising behavior
  Composite entity is not in full control
  Dispersal of glue code
  Fragile hierarchies
 
 
 Traits
 Groups of methods
  Within single inheritance
  Supporting construction of class based on building bricks
 
 How are Traits Used?
  Traits are the behavioral building blocks of classes
  Class = Superclass + State + Traits + Glue methods
 
 

Mixin: Multiple Inheritance in Java

December 24, 2004

Murphy’s Law and Open Source Software Development

Filed under: Computing — admin @ 7:59 pm

Murphy’s Law and Open Source Software Development

Q: Why do open source projects fail?
A: Because failure is easy.

You may run an open source project or a part of one. Odds are, things are not as rosy as you expected. Where are the volunteers? Where is the community? How can I make this project succeed?

The simple fact is that open source is not a guarantee of success. The real successes, like JBoss, Apache, Linux and others comes from the right mix of ideas, support and work done by members of the project. But what is required for success? To answer this question, let’s look at why open source projects fail. Using a Murphy’s Law approach can help get a grip on failures, their cause, and even a solution or two.

Knowing what can go wrong or even how things succeed can be used to keep a project on track. With thousands of failed projects and new ones coming on line every day, finding failure is easy. Time to start listing the failures you see in open source software and looking for ways to get around or to avoid failure all together.

Murphy’s laws lead to a preventative or at least failsafe solution based on knowing that failure can occur. So, if an airplane engine can fail because of one of a hundred possible reasons, odds are if you have two engines, only one will fail at a time or at least run long enough to get back on the ground. Knowing the failure gives you a chance to look for solutions, like an extra engine, over building, backups, alternative paths, etc. If it can go wrong, it will, so prevent or have a way to live with the failure. This is very simple logic that can be applied to open source development.

Law Zero: People are the source of all failures, especially when they are perfect

People do the work and people make the choices. If your tools are poor, that’s because people built the tools and people use the tools. People are not perfect and thus most things we create have a flaw or two. It is not just stupidity either. For the most part we are all quite smart. The problems come from assumptions, shortcuts, emotion, politics, and of course limited time and resources. Add to this an inattention to a missed detail and working past our limits, you get an almost infinite variety of errors.

The worst offences are times when errors and the failures they can create are discounted. Looking at open source, we expect that because there are great projects like JBoss, we can expect the same for any idea. The facts however, from my point of view as a community leader at java.net, is the likelihood of any one project reaching greatness is very low. It is true for most communities and other open source sites like SourceForge.net.

There are two ways to reduce human frailty: Reduce the involvement of people or use process. There is of course a hidden solution: Use people that make fewer errors. How do we prevent failures of open source projects? The answer is that it is a mix of things. Failures come from many sources for various reasons, therefore we need a mix to prevent a critical mass of failures from stopping success.

The remaining laws should be looked at as a set. Each law is important in some way to a project. No one failure, once corrected, guarantees success. Also, some of these failures happen at different points in the lifecycle, so they are not as problematic at other times. Some of these are important throughout the life of the project and need to be a priority in the project’s management. As a project owner or a member, use this list to help start your project and throughout its life.

Law 1: The worst project starts with a good idea

This law is so true it hurts. If you look at java.net or SourceForge, you will see the litter of hundreds of good ideas and no source code. At java.net, in general we approve most projects and many are based only on a good idea. Some succeed, but many more fail to grow.

In the Global Education and Learning Community (GELC) we have an incubator area for new projects. We do this because of this simple law. It helps us manage the dead wood and isolate them from active projects. Most of the projects are dead soon after they are proposed. The primary reason is that many think that the community will come to their aid and help their project become a reality. The fact is that there is usually not enough of an idea worth considering.

Why is a good idea a source of failure? There are quite a few reasons, all of which are based on human psychology. People in general hate the idea of work. Even worse they hate working without direction (many failed projects are proposed in less than one badly worded sentence). To add to the problem, many ideas are just that, an idea and nothing more. Very often the proposition fails to account for the fact that a solution to a problem has never been found and is likely impossible or very hard. Like proposing software to create world peace, nice idea, but how do you implement it? Developers are just not attracted to empty ideas.

The best way out of this fact of life is to start a project out with an already working version or a detail design. Ideas alone will only attract flies. For many, what this means is that the originator need to build the first version or a very functional prototype.

Law 2: Build it and they will come and do nothing

Admittedly, this law contradicts open source law 1. But if it is a good law, it is worth contradicting.
Build it, and they will come is a hallmark of successful projects. Even if it is just a seed, we see potential. Look at Ant, the highly successful build utility. James Duncan Davidson solved his few problems related to building and testing Jakarta (open source version of Servlets) and then released Ant to open source at Apache. Ant is now the number one way to build Java applications verses the prior solution: Make.

Ant is a simple idea, very useful, clear in its execution and its documentation. Better yet, Ant had the ability to be extended by adding new commands. Ant is now thriving as new technologies and techniques extend its usefulness. The open source community around Ant is now huge and quite successful.

Not all projects will attract developers or even users. The simple fact is that we need several things to make a project inviting. One of them is that the software is useful and in a complete contradiction, annoyingly incomplete. Unless there is a need for growth, there is no reason to add code to an open source project. Ant is a great example of need and a place to hang the solution. Lots of volunteers have extended Ant to make it fit their needs. Without this need for change, there are fewer developers to be intimate with the code and thus fewer people to fix bugs and support users. It is a cascade of possible failures if there is no reason for developers to work on the code over time.

There are also a slew of flawed applications that you would be insane to add to because of their complexity. Some open source is just plain garbage. Why would anyone want to make garbage smell nicer? It’s still garbage. So the code has to be worth fixing or extending in the first place.

Good design, well-written code, clear documentation, a useful idea that people need, and room to grow. Together they will make a great open source project. Loose any one of these, and you are on the road that can lead to failure.

Law 3: Membership has no privileges

Many people believe that joining an open source project means that they can request new features, or even add the features themselves. In simple fact, membership usually means you have the right to complain. Of course, with most complaints, there is no guarantee that you will be heard.

Most successful projects have hurdles to getting your way. Open source is usually controlled by a tightly knit group of developers. They usually have a process to review ideas and come to agreements before change is allowed to occur. Of course if you are a member of the ‘inside’ group, change is a little easier to do. But if you don’t play by the rules, you could be kicked out. The different levels of membership from observer to developer to project owner are a key part of open source development platforms.

Projects that do not regulate privileges have two types of failure. First is the obvious one of uncontrolled change. The second is less obvious. People act differently when trusted. If you earn trust and are granted authority people act a little more responsibly because they fear a loss of authority. When granted authority without earning it, there is less value put upon it because there was less work to get it.

Sometimes it takes years to get commit status on a project. The key is to follow the rules and work hard at gaining trust. This also ensures that you become not only familiar with a system, but that others can trust you and that reduces their need to micromanage your efforts.

Law 3: Open source is closed until further notice

The ‘open’ in open source software does not really mean open unless it’s what we want you to see. Open source has so many hidden rules that it is hard to play the game sometimes. It is a mistake to believe that there is a hippie like free love and software society behind successful open source projects. The fact is that ‘open’ only applies to your ability to read the code and to use it as you see fit. Modifying the primary code base is only at the will of the owners. Although we like free love, we use protection in the form of trust and rules to prevent unpredictable change.

The problem is that when a project is popular, there are a lot of people that would like to add to it. The reality is that gaining trust is a long process so adding new developers to a project is not a viable solution.

There is one way out of this dilemma. Simply you need to have an extension mechanism. This allows another developer to create their own project and just concentrate on extending rather than modifying the core code. Not all applications are capable of being extended, but those that do are better off with a strategy that offloads extensions to other projects. Look at NetBeans, Eclipse, and Ant for great examples of this.

Law 4: Most volunteers are just lookieloos

A lookieloo is just someone interested in looking and providing nothing. The term comes from realty agents and refers to people that flock to open houses just to see what is inside without any intent in buying a house. It is also a term used on freeways as a term of scorn for those that slow down on the freeway to get a good look-see at a traffic accident, only to slow traffic for others. Simply, most volunteers to open source projects supply about the same value. They waste your time and provide nothing.
The simple facts are that they are either incapable of helping because of a lack of time and/or skills or they just don’t have the real will to get moving (see law 5).

There is really little you can do about this problem. The key is to understand that lookieloos are real and that they do not represent true value. However, do not assume that they are permanent lookieloos. Some can become active members in the future. Thus, despite their annoyance, it is best to keep them around. Avoid having rules that cancel memberships for inactive members.

Law 5: Managing open source volunteers is like herding cats

If you look at the change logs of most successful open source projects, you will only see a few names and in many cases, just one name. The reason is that a small group or just an individual does all the work. The key reason is that volunteers are just plain hard to motivate. Motivation is hard!

Back to herding cats, there is little that really motivates a cat that can be used to train it. People are really very similar to cats. Look at what open source participation offers: no cash, little recognition, and hard work. Not much more than a sense of accomplishment and many can get that from watching the 10th season of survivor. Where do volunteers come from? A lot of volunteers come to projects because they need something. They have a scratch that needs itching. Some are willing to contribute to make the changes they need. But this is a mixed blessing (see law 6).

Law 6: Volunteers will work on really annoying problems – just not the ones you want them to work on

The best work you can get from someone on an open source project is when the developer has a problem that affects them personally. The problem is of course is that it may not be your problem or a priority to you or a majority of users or team members. This is back to herding cats (law 5) because the cat is just going to go its way and is little concerned with your priorities. If you are managing the project, you got to take what you can get if you can. If a developer has working code and it does not get in the way of other changes, go for it.

If you are in charge of an open source project, use barter to get some work done in trade for the developer working on a favorite addition or fix. Trade a developer’s ‘must have’ for something off the project’s priority list. If you are a developer trying to get approval for your off-topic fix, go for a similar offer to work a priority item.

Law 7: A lack of documentation and examples will waste your time

More work equals less work. The more you put into explaining an open source project, its design, its code, its bugs, its use, and its future, the less time you will waste managing developers and users. The problem of course is the most of you are coders and not writers of manuals. Worse still, though we may plan our development, we are bad about keeping design docs up to date (see law 8).

One real trick is to write everything down and publish it as part of the project. A bit difficult to pull off for many, but it can be done if you have the will.

There are a few possible ways to tackle this problem. First is the Wiki. A Wiki allows for more people to participate in developing the documentation. It is sort of documentation by opportunity. If you find something missing, it is simple to add a new entry or add/modify an exiting entry. Less trouble than checking in and out documents and no issues with incompatible editors, so a good solution for many. Wiki is catching on and becoming the primary way to document many projects.

A side issue of course is that everyone needs to know how to use a Wiki (What came first, the chicken or egg? Why the egg, because it must first exist!) . Wiki is simple, but it is still a different medium that is in no way like using something simple like a text editor or as full featured as a word processor.

Another way to document a project is with email list groups or forums. Usually there is enough dialog between developers and users to document both the code its use. As a searchable source they can help make a reasonable bit of documentation. However, the information should be moved out of these mediums to a Wiki or printable documentation. A person should be able to look at the relevant documentation (Wiki/html/text) for 95% of what they need.

Law 8: Open source documentation is a death of a thousand cuts

Open source documentation, for the most part, sucks. A large part of this is that open source projects are usually a moving target. Each change in the code may cause a change in the design, the code documentation, and the user documentation. Keeping the docs up to date is a constant problem.

One way to get more documentation and to keep it up to date is to ensure that each change or added feature is documented as part of your process. Many projects rely on issuezilla or other issue management system to document changes. The problem however is that issue systems are usually not easy to search and rarely answer the questions asked by developers or users. Changes, if they change any behavior should cause a change in both design and user documentation.

Law 9: Only a good process will create a successful open source project, but most open source developers hate process

Many believe that anarchy is the norm in open source. The truth is that most projects are run by the owners acting as dictators (Linus Torvalds is an excellent example). The open source process in most projects consists usually of an issue, then a proposed fix, a review, and if the review is positive, the code is committed. In some cases there is more to this, like requirements to add to JUnit tests, documentation, and others. The owner (like Linus) and lieutenants (Linus has a group of trusted developers that have similar philosophies and are highly trusted by him), set these rules and act as the primary reviewers.

Process can be complex or simple. A project might require UML documentation or to follow a specialized release schedule. The more process you see, the more stable the code is. This is something that is almost odd given that so some projects and the public perception of open source is anarchy. But projects based on pure anarchy are not successful. Why should they be? No one likes unpredictable change.

But many hate process. We might think we are smart enough without getting approvals from the key developers or that certain rules do not apply to us or this or that change. A lot of developers are drawn to open source because they hate the slow process they are exposed to at work. We see open source as freedom.

The reality is that process, even in small amounts, when added to software development can greatly improve things. Yes, a good developer might be highly productive without a process, but teams are less so. The simple reason for this is a way to increase understanding and ensure some unpleasant tasks (like documentation) are performed.

A single developer might be able to keep it all in their heads. Add one or more people and you get a decrease in understanding. Add users and the problem gets worse. Include the fact that the team is geographically separated and face-to-face meetings are unlikely,

Process is for groups. Discipline is for the individual. We need a lot of the first and enough of the second to ensure that the process is followed.

But what of open source anarchy? Anarchy is often on the front end, with a person that sees a need, creates the first version and then opens it to the community. After that, process needs to follow if others need to be involved. Exceptions to this rule are abound, but these are projects that are still run by a lone developer.

Isn’t anarchy what open source is about? The freedom to do what is right! Do what you want, ou are smart enough, right? Well, as said, anarchy happens, but look at the successes in open source and you will see leaders, communities of like-minded people, and process.

The simplest process in open source follows this simple set of rules:

Issues must be associated with all changes
Code must be approved by at least one other developer with commit authority. Any negative reviews should be resolved prior to commit
If the code change affects documentation or unit tests, these should be updated at the same time as the code
Commits to the CVS should be annotated with the issue number, the reviewer’s ID and any documentation about why and how the change is applied.
Law 10: Power corrupts and absolute power stagnates projects

I hate to say it, but most lone wolf developers are horrible at understanding how other people think and thus end up writing for themselves which makes it even harder to understand (the worst is someone with a perfect memory!!!). The lore of the great hackers is filled with stories of the unencumbered developer creating a great piece of software. There are also horror tales about the teams that had to take over such software that was almost impossible to understand. It is the transition that can kill a piece of software. But in open source, it is possible that the great hacker never releases control of the project.

I have seen dozens of projects that have just one person authorized to modify code, the original owner of the project. There are two reason for this. The first is many of the other laws is in affect and no other developers are remotely interested. Likely this is related to how the project is documented. The second reason is that the developer is not allowing other people to touch code in fear of change and fear of comment.

I use ‘fear of change’ and ‘fear of comment’ because these are probably two of the most visceral emotions in developers. We hate it when someone changes our code and worse we when someone talks badly about our code. We have a fear that someone will find our inelegant hacks or destroy our elegant ones. Try it. Just pick a random piece of someone’s code and call it a pile of Christmas dog vomit and see what happens.

This problem with change is we put our sweat into the code. Any change threatens our labor. There is inertia that makes us panic when someone changes the direction of our code. It could be good code or bad and we will avoid change before even considering why a change is being proposed. Look at most arguments from original developers. They are mostly negative about why a change should not be applied.

The solution is to just not let it bother you. If you look at such change as improvements to your code, the changes are easier to take. The whole reason for opening up your source to community development is to get other peoples wisdom. Take it and use it to better yourself and your code.

There is an opposite problem with this law as well. If you imagine we hate others changing our code, the other developers are often reluctant to make the changes. Simply, some people are afraid of our response. If you have been burned by someone maligning your changes as a knee jerk response (usually with a lot of venom), you are not likely to submit changes. The solution to this problem is to make sure there is plenty of commentary on your project about obvious changes and that there is always a need to improve the code. Make it easy for a developer to know that changes will be accepted if well thought out. It never hurts to assign an issue to get someone thinking that changes are acceptable.

Summing up

The difference between success and failure is sometimes slight. But I really am surprised by how many times the reason for failure is obvious. Recognizing the source of failure is just half the job though. Success takes planning and a lot of hard work. Luck is all about being prepared and ready for the good and prepared to dodge the bad.

Some of you may disagree with some of my reasoning. I can almost guarantee that you base the disagreement on something that occurred in your past. Well, history teaches us many things, but it can lie when it comes to why things succeed or fail. Just because something happened in the past does not make it true in the future. There are too many variables. Basing a solution entirely on history is not enough. This is really another law: If it happened once, it is not going to this time – especially if you are sure it will. Look to what works most of the time, rather than single examples. But, be ready for new failures and try to predict them before they occur.

That’s a start at the Murphy’s laws for open source. There are a lot more that we can get to later. If you would like to suggest a law of your own, please write me at Turbogeek @ cluck. com.

Want more Murphy? Take a look at one of my older articles: http://www.informit.com/articles/article.asp?p=26441&redir=1

Comments
Comments are listed in date ascending order (oldest first) | Post Comment

I’ve noticed there’s a certain strength in the leaders for these open source projects. Also, having even a few people seems to jump up the chance of open source even having a chance at success. Most of the sourceforge net failures seem due to individuals. I’ve volunteered for some OS and had some mild successes. Some concepts on how to improve particapation: * kill cvs, really, what a piece of junk * examples are awesome, is there a plugin like JUnit someone can make that can auto-generate examples * plan, plan, plan. especially with more then one person. 2 people is a little disorganized. 4 is just completely unknow. excel, quatro pro should be fine
Posted by: smartinumcp on December 30, 2004 at 12:53 PM

Daniel, that’s a really good piece of information. It should be in the java.net FAQ or something.

Psychology is the base for every decision, which you seem to have a very good grasp of.

Cheers,
Mikael Grev
Posted by: mgrev on December 31, 2004 at 04:40 AM

Another law: Its not easier to recreate some library then to depend on it
I have seen this many times in open source projects there is some core library thats really great.
The core is just an idea that allows other, known technologies, to be re-invented in whole new ways. For example; this imaginairy project allows partitioning a piece of software in groups. And now unit-testing done in groups looks really nice. Well, we could depend on JUnit, but we would probably have to change some of its code and the re-ship it. Hmm, its probably easier to rewrite JUnit from scratch and not having to be bothered with reading and changing other peoples code. Even though that code has seen many eyeballs.

the end result is always that the rewritten code is very low-standard since writing it was more work then originally thought. The project dies since nobody wants to work on something thats not even near as good as the thing its suppost to replace.

Gradual changes and temporary forks are what allow non-corporate sponsered projects to go forward. Make it work; but postpone a better structured rewrite.

Posted by: zander on December 31, 2004 at 05:34 AM

Simple Law – “Any other reason to avoid discontinuity”. Already spoken above, where lookiees are allowed to keep looking. Basically maintaining a facade or breeding ground for want of an elite fighting force. But let me emphasise in different light. You see with the web up 24X7, you pretty well have no further overhead to continuing any effort. And it has to be ‘other’ reason where you haven’t look such as asking a group to add to the bazaar effect, just long enough to draw attention, and dissipate your dictatorial gripe; the place becomes friendlier when there are real friends in there. Or if you re far ahead, showcase as part of your lecture to some class and get them testing out for the academic notion of it. Any other reason has got my http://red1.org/ going thus far 🙂 *coughs*
Posted by: red1 on January 03, 2005 at 10:10 PM

Another one: Maintenance is boring As stated managing an OS team is like herding cats. Programmers don’t like code maintenance and debugging (well, most of them, I guess there are some who find perverted pleasure in it). If there’s no incentive, most won’t be fixing bugs when there’s new features to add. This is what causes the attitude you get a lot from OS groups when you report a bug where they scream at you “fix it yourself or become a donator and we may look at it” or similar words. Many of them are just not interested in maintaining their product (unless it’s such a massive bug it influences core functionality for the majority of users in which case the problem can cause bad press which is bad for their egos).
Posted by: jwenting on January 04, 2005 at 01:07 AM

A couple years ago I launched what I coyly refer to as my contender for the least successful open source project in history. Sure, I got some downloads and people expressed interest, but I couldn’t even get so much as a suggestion out of the community I was courting. The disappointment was real, but I wasn’t really so surprised; it was my first time out and I had some baggage to unload. I was consciously engaging in boundary testing by ignoring proven practices and I was making a habit of being forcefully outspoken with my personal opinions to see how fast I could make the cluetrain go. I may as well test my luck marketing a sandstone sex toy. On the other hand, I read these rules of thumb and know that they are all true. There is no guarantee that a different tack would’ve produced any different results.
In the end, rather than be crushed by defeat I was relieved because throughout the effort I was being reminded that the software wasn’t ready and that I wasn’t ready. Having a user community would’ve been a hindrance to what I contribute as a rule I think you missed: Sometimes the best way to move forward is to start over again. I’ve seen painfully sweeping redesigns in countless other successful open source efforts, and each one makes a claim to necessity. I just count myself lucky to have the opportunity to try again with a considerably improved mousetrap. As I begin a new, more methodical journey this year, I will keep this guidance in mind. Most importantly, I will be prepared to fail all over again, content to know that what it’s worth won’t ultimately be determined by traditional measures of success but rather by my own evaluation of how earnestly I made the attempt.
Posted by: mentata on January 05, 2005 at 09:26 PM

October 24, 2004

A couple of papers on Aspected Oriented Programming

Filed under: Computing — admin @ 4:14 pm

A couple of papers on Aspected Oriented Programming

Excertp

Most software systems consist of several concerns that crosscut multiple modules. Object-oriented techniques for implementing such concerns result in systems that are invasive to implement, tough to understand, and difficult to evolve. The new aspect-oriented programming (AOP) methodology facilitates modularization of crosscutting concerns. Using AOP, you can create implementations that are easier to design, understand, and maintain. Further, AOP promises higher productivity, improved quality, and better ability to implement newer features.

I want my AOP
AJDT Tutorial
articles, tutorials, and advice about using and writing AspectJ pr
Improve modularity with aspect-oriented programming
Contract enforcement with AOP
AOP banishes the tight-coupling blues
“Use AOP to maintain legacy Java applications
Adrian’s blog
Introduction to AOP 1/2
Introduction to AOP 2/2


schmidmeier.pdf
kiczales
dynaop
AOP PPT
verifying AOP

AOP Pattern Testing

JDBC Rowset

J2ME SMS

EJB Shortcomings
AOP Filter

October 16, 2004

What is right methodology?

Filed under: Computing — admin @ 5:43 pm

What is right methodology?
Since beginning, software development was compared with manufacturing and construction, so early methodologies were largely influenced by them. They separated analysis and construction and came up with waterfall, or spiral methodologies. Finally, people are realizing is that the only construction in software development is compiling the source code and it’s all about design. Nevertheless, now there are tons of agile methodologies and new one coming every year. Sure there is a lot of commonality like lean development with emphasis on working software, short iteration, testing, etc. But, most of them are prescritive. Here, the thing, most companies have very unique business model and working environment, so one size does not fit. I do find Crystal family tries to come up with methodology based on company or team makeup. Again, most productive environment have smart people and little or no methodologies.

« Newer PostsOlder Posts »

Powered by WordPress