On Thursday 29 May 2008 10:14, Michael Hunger wrote: > >> You're right when you say that if your methods are small then final is > >> not neccessary. But when looking at the code in most professional > >> projects and even the (existing) qi4j runtime long methods of more that > >> 10 lines are ubiquitous. So making all possible local variables and > >> parameters final is a first step during refactoring that helps scoping > >> the method and extracting methods which are either commands or queries. > > > > And you are applying the wrong medicine for each problem. > > Sorry I don't understand that. Who said that I don't fix the problems by > breaking down methods and classes? This is about communication and intent. > If you use it just sporadically you don't need to use it at all as then the > sudden use is just surprising and unexpected for the reader of your code. > If you use one style, use it consistently.
I disagree. I think you should read up on competence development. A paper like http://www.nols.edu/store/pdf/leadershipnb_competence.pdf is a start. You speak like we are Novices and need hard fast rules that applies to every situation. I think I speak for both myself and Rickard, we are novices at many things, but coding is not one of them. > And as you surely know bugfixing is not always wanted to be accompanied by > refactoring as would have been your choice as developer. Refactoring is a continuous process. Some people do it sooner rather than later (sharpen up, Rickard ;o) ), but peer review is a lot about refactoring. I constantly refactor Rickard's code so I can better understand it. I think this is a natural and even healthy cycle. > No unfortunately real world production code. Most programmers are not that > skilled. I am not discussing general principles and other people's problems. I am discussing OUR codebase. In fact, I hope that Qi4j will raise both the skill requirement bar as well as the productivity so significantly that the industry can rid itself from sub-standard programmers that don't belong here in the first place. Cruel? Perhaps, but I have the opinion that we see 15% is doing 80% of the work, another 5% is doing 80% of the work, 20% is doing near none of the work, and the remaining 60% creates damages. Send them home to improve quality and effeciency. I am also amazed that 90% or more of the world developers think that they are better than average. My only explaination to that is that they have seen a lot of other people's code, and because they find it hard to understand, it was done by a less capable programmer. And I also think that this is the main reason for so many re-writes... "I could do that better" attitude of everyone. Sorry for ranting. Couldn't help myself. Still -1 to blindly putting "final" on local variables and method arguments. Cheers -- Niclas Hedhman, Software Developer I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

