Joomla Extensions Demo

Support

Do not submit a bug report if you need technical support or have questions.

Forums

Post your suggestions ask for help in the community forums

Contact Me

Missing images/links, any comments, suggestions, need help? Contact me

Skype

Need desperately help?
Skype Me™! But dont abuse of it!

EVERY developer is convince that his code is better


At the end, You can discuss for hours, just for .... nothing, people don't like to change, just auto format code, sort methods and most of them are lost/complains/recommit their code on yours...
In order to force them or remove  difference between coding practice, why not bringing
Checkstyle in your organization?

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard. 
Checkstyle is highly configurable and can be made to support almost any coding standard. An example configuration file is supplied supporting the Sun Code Conventions. As well, other sample configuration files are supplied for other well known conventions. ¨

The best Eclipse plugin is available at  http://eclipse-cs.sourceforge.net/

The only practicable way of  is either to 
  • Bring all developer in a room, and let them vote all together which features is a warning, an error, or if it should not be removed from the common set of rules, but the discussion will be quite loud. You will hear a lot of "I do not need it, I know how to develop..."
  • Force them to use the common SUN/Other standard without discussion. This may work in a bug company/team.


Eclipse has a cleanup functionality (Windows - preferences - java - code styles - cleanup), which can be triggered at each save of a file (only in 3.3). I am personally using it since 2 months and refuse to live without. My settings are quite ambitious but reflect my intentions to keep my code as neutral as possible, it remove unneeded stuffs, format and add parenthesis where it is needed automatically.

- Add 'this' qualifier to unqualified field accesses
- Add 'this' qualifier to unqualified method accesses
- Qualify accesses to static fields with declaring class
- Qualify accesses to static methods with declaring class
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Convert control statement bodies to block
- Add paranoiac parentheses
- Remove unused imports
- Remove unused local variables
- Add missing '@Override' annotations
- Add missing '@Deprecated' annotations
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Sort all members
- Organize imports
- Format source code

About sorting method

A quite interesting discussion at Javaworld can be read here.  A lot of users have post responses, and of course still do not get the point that the  object code is not linear, so manual human sorting based on this flawed assumption is only a failure. It is more than a failure also because every developer will sort code differently...so the more neutral behavior is Eclipse alphabetical sorting.
Eclipse or any IDE have 3 magic keys: (F3) for opening declaration of the element, (F4) Open Type hierarchy and a back button (ALT - LEFT). You don't/can't have to read the code like a book, just to jump from one method to the other with F3 - back, use call hierarchy (CTRL -ALT - H).  If you want to understand the execution flow, it is better to look at the sequence diagram ....
  Moreover, I do not often stay in an object very long, because I always try to spread responsibilities across objects.
 
You might also like:
JDK 6 Release Candidate
2017 days ago
JDK 6 Release Candidate
Java Platform, Standard Edition 6 is a major feature release. Significant features and enhancements
The State of the Scripting Universe
2615 days ago
The State of the Scripting Universe
From www.devsource.com"Scripting languages have long been regarded by the programming world as
Introduction to Refactoring to Patterns
2661 days ago
Introduction to Refactoring to Patterns
Sample Chapter are provided courtesy of Addison Wesley Professional and can be read at  www.inf
J2EE Patterns, Patterns Use them!
2680 days ago
J2EE Patterns, Patterns Use them!
A collections of links, this time. A lot of persons have already done a stunning job:Sun Java Center
Getting started with test-driven development
2722 days ago
Getting started with test-driven development
In this article, an excerpt from Test-Driven Development: A J2EE Example (Apress, 2004), author Tho
SableVM running Eclipse 3.1
2728 days ago
SableVM running Eclipse 3.1
SableVM is a highly-portable Java virtual machine written in C, and implementing the Java virtual m
Preparing some Java certifications?
2743 days ago
Preparing some Java certifications?
Some links that may help You preparing the SUN java certification... Free SCBCD 1.3 Study Guid
Metapatterns
2792 days ago
Metapatterns
 Meta-Patterns: Design Patterns Explained Moisés Daniel Díaz Toledano. Email : moise
blog comments powered by Disqus
Category: Coding

Donations

Thank You for supporting my work
Subscribe to me on YouTube

Latest Articles

  • In this series of post I will outline some common techniques to help Joomla extensions development. As you know Jooml... ...
  • CedTag  has been updated to version 2.5.3 and correct a lot of bugs and contains some nice features. CedTag is t... ...
  • CedThumbnails has been updated to version 2.5.5 and contains 1 new features for both Joomla 1.7 and Joomla 2.5. For ex... ...
  • CedSmugmug  has been updated to version 2.5.2 and correct some bugs and contains some nice features. CedSmugmug&... ...
  • If you want an extra gigabyte of storage on your Dropbox account, the online cloud service invites you to compete in i... ...

Subscribe

Latest Comments

Popular Posts

rockettheme advertisement

dropbox logo

Help Us & Leave Feedback!

  • Do you have an excellent article idea you would like to read about here? Share it!
  • Do you have some interesting tips how we could improve our site?
  • Something missing here? Help us make this blog a better place, leave feedback!
We would love to hear from you! Be active! Write us now!