JAutodoc: Auto JavaDoc Comments in Eclipse
Be the 1st to comment!

While comments are certainly an important part of code documentation, and become much appreciated later on during maintenance and support phases of an application, they can be quite tedious to write, particularly in cases where you are documenting the obvious. In some situations you may be able to get away without writing comments for these types of methods, but in some situations your IDE or Javadoc report may still flag those methods as missing Javadoc comments and so it’s best to put them in anyway.

JAutodoc is a super Eclipse plugin for assisting you with writing comments. It comes with customizable method prefix mappings to comment phrases. For example, if your method begins with ‘add’ the phrase ‘Adds the’ will be placed in the comment. Thus, if the method name was ‘addEmployee’ the comment text would be ‘Adds the employee’. If the method were ‘isActive’, the method text becomes ‘Checks if is active’. All of the mappings are customizable from the plugin properties.

It can be set to use the Eclipse comment formatter, to replace the existing Javadoc or to complete it, as well as optionally add a todo annonation to it for future review. It fills out all the parameters passed and return parameters as well.

You can highlight an individual method and right click and choose JAutodoc from the menu, or select the entire source of the class and complete all the javadocs. It saves a lot of time getting the skeleton of your javadoc comments in place, allowing you to focus your commenting time and energy on writing meaningful descriptions where necessary.

To read more about the plugin and download it, see the JAutodoc web site.

"The Real World"
Be the 1st to comment!

In a post on their blog, 37signals asked for readers to comment in ten words or less, what the phrase “real world” means. They mention how frequently this phrase is used in IT; in fact overused. The question is, if it’s used that much, does everyone mean the same thing when they use it? Do they even know what they mean by it?

I think that certainly many people who use it have a definition of it deep inside their minds. They may not have vocalized it, and really thought it through, but they are aware of a principle which they refer to when they use the phrase. However, I think there is more than one definition or principle behind it. I think it all comes down to your perspectives and goals.

Some will look at the development principles of Ruby on Rails and think that in “the real world”, Rails can’t cut it. Others believe that Rails is a real world solution, whereas Java is a solution for bloated IT departments. Is either belief correct?

Once again, it depends on the goal. I have been focusing on learning Internet Marketing for the past three years. It’s been great to learn some skills that relate to the Internet world, but from a different perspective than web development. Once you get into the Internet Marketing mindset, much of your thinking begins to change. For one, every minute spent designing, developing, testing, and all the project management, team meetings and team management that goes into a typical IT department, is now seen as costly. When an Internet Marketing entrepreneur sees an opportunity in a target niche, they want their online product delivered immediately, because every day not online is lost money and possibly a lost opportunity. These entrepreneurs talk in terms of days to get some software written and online, as opposed to the months that larger enterprises consider for their project timelines.

It would be amusing to them, not to mention completely unacceptable, to be told that something was going to go through a kickoff meeting, team assignments, UML design documents, development, unit testing, weeks of QA and integration testing before going live. Ten developers, a project manager, three QA testers, a DBA, a system administrator, department managers, tech writers, graphic designers, etc. To these entrepreneurs, this much bloat is not “real world”. It may be considered necessary for a large corporation to be as “safe” as possible, but it’s not agile enough to respond to online opportunities. I’ve seen opportunities to make $250,000 that literally lasted only a month.

On the other hand, if you went to the Java enterprise development team and said, we need to have a web site that manages the following eight sets of data, with user registration (including email verification, lost passwords, etc), functionality for regular email notifications to subscribers, and a nicely designed front end, and we need it in five days, they would respond, “that isn’t the real world!” They probably couldn’t even find time to schedule the kick off meeting that quickly.

In my 12 years of web development experience, I have heard more times than I can count, the marketing department give a timeline from their expectations which the IT department countered was unrealistic and impossible. The marketing department is frustrated with the time it takes to get to market, and the IT department is frustrated with the tight deadlines and long hours it takes to meet expectations. This is the real world. A constant battle between business leaders and developers to get to market fast.

Only you can decide for yourself which real world you want to belong to. Myself, I used to belong to the IT department real world of all the steps needed to get to market, but as I studied Internet Marketing I began to see every minute of my time as cost and delay toward making money. Now I look for short cuts, not in quality, but in process and development time. Streamlining; cutting the bloat that has crept in over the years, particularly, from my point of view, in the Java Enterprise. I prefer a short development life-cycle, keeping the requirements for each cycle short and to the point. The smaller the feature set, the shorter every sub-cycle is (design, testing, etc). I prefer online task management eliminating the project status meeting, where 15 people take turns telling the PM the same information they could have entered into some software in five minutes. I prefer streamlined communications and small teams. Get the product out there, and immediately start working on an update. This provides for more flexibility within the market, and allows businesses to respond to perceived online opportunities quickly. It will also reduce developer stress and burnout. But, it also requires less development technology bloat, that I believe is now a large part of Java web development. Java doesn’t have to be bloated, and neither does the development life-cycle. But it has become that way, and it will take some outside the box thinking, and a different perspective to make the process more efficient, less stressful, more financially lucrative, and ultimately, a whole lot more fun.

Tutorial for JasperReports, iReport, and JFreeChart
Be the 1st to comment!

This tutorial discusses building JasperReports in iReport using charts with JFreeChart.

Building Dynamic JasperReports
Be the 1st to comment!

If your reporting needs require more dynamic reports, with user control over the elements to be included in the report, developerWorks has an article on Generating XML templates for JasperReports using Rational Application Developer.

JasperReports helps organizations generate affordable business data reports using an XML template. The XML template provides the key report information such as the SQL query, report title, column headers, and database fields. This article discusses how to generate the XML template to allow a user to specify which report columns should be included.

Highlighting Odd and Even Rows in JasperReports
Be the 1st to comment!

In order to highlight odd or even rows with a background color, in JasperReports, first create a rectangle element with a background of your color choice, and send it to the background (in JasperAssistant, right click on the rectangle, choose Arrange and then Send to Back). Second, use the following expression to set when the element should appear, by placing the expression in the Print When Expression field of the rectangle element. Where the $V{PAGE_COUNT} appears, you can use that, to base it on the row number on the page, or use $V{REPORT_COUNT} to base it on the row within the report. Also, if you are using a group, you can use $V{groupname_COUNT} where groupname is replaced with the name of your group. The expression below will then test the row number within the Page, Report, or Group (whichever you selected) and if its divisible by 2, it will display the rectangle element with the background color.

new Boolean( $V{PAGE_COUNT}.intValue() % 2 ==0 )


Warning: Invalid argument supplied for foreach() in /srv/users/serverpilot/apps/brianburridge/public/wp-includes/script-loader.php on line 2678