password
username
Sponsored by CakeMail, an email marketing software.
Newsletter preview

Javalobby logo image
Tuesday, June 26, 2007 

AJAX without AJAX

Building web applications with AJAX shouldn't be hard. Cut through the different frameworks, options and opinions and try the new version of Oracle's ADF Faces.

Out of the box, Oracle ADF Faces extends the Apache Trinidad framework to provide a rich set of AJAX-enabled JSF components that radically simplifies building rich, interactive applications.

Try a free download now!

 Perspective


Be sure and
check out a
No Fluff Just Stuff
Java conference
coming your way!

6/29-7/01 Austin
7/20-7/22 Raleigh
7/27-7/29 Phoenix
8/03-8/05 Des Moines
8/03-8/05 Green Bay

 
 A Developer's Perspective
 Next section
Ryan Cooper is the founder of Ryan Cooper Consulting, Inc, and the co-founder of the Agile User Group in his hometown of Halifax, Canada. He helps teams deliver business value sooner, faster, and more reliably through the application of agile methods. He blogs at www.onagile.com

Ryan CooperWhy You Won't Fix It Later

We've all been there. The deadline is looming, everything is behind schedule, and you're in a rush to finish the FooBar module. You're puzzling over one last glitch. You know how to fix it, but it looks like it will take a minor redesign of the module... probably 4-5 hours of work. You just don't have that kind of time.

Suddenly a clever idea strikes you. Hmmm... it just might work. You realize deep down it's not the right way to do it. Maybe it means adding some temporal/implicit dependencies. ("as long as no one starts calling foo() before initBar(), everything should keep working.")

Maybe it means throwing in a magic string that will only work until January 3 next year. ("No problem, I'll just come back to this code after the deadline. We shouldn't be too busy then.")

Maybe it means breaking the design and making the code untestable. ("Well, it would be nice to have automated tests around this, but it seems to be working. Hopefully no one makes any changes to this code before the deadline.")

Maybe it means living with intermittent bugs. ("Hmmm. The system only times out 8% of the time. We need to figure out why before we go into production, but that should be good enough for testing.")

Maybe it means removing one bug and introducing another one. ("Well, at least we can submit the page now. Hopefully none of the users double-clicks the submit button until I've had a chance to revisit the code after the deadline. I'll fix it later.")

That's the magic word. Later. It makes a great warning signal that you may be heading down a dangerous path. When you catch yourself thinking "I'll fix it later", stop for a minute. You're feeling that little twang of guilt for a reason (even if it's masked by the little ego boost you get from coming up with such a clever workaround). Think about the real consequences of this decision. Will you really get back to it later? What will happen if you don't? What are the risks you're introducing? Ask another developer for an opinion. Ask the customer for an opinion (if you can phrase it in customer language). Think a little longer about other solutions.

There are several popular variants of "I'll fix it later":

* I'll fix that bug later.
* I'll verify with the customer that I've built what they actually need later.
* I'll write unit tests later.
* I'll remove the fragility from the unit tests later.
* I'll make the unit tests readable later.
* I'll make the unit tests fast later.
* I'll integration test later.
* I'll usability test later.
* I'll remove that copy/paste duplication later.
* I'll bounce my idea/design/code off another developer later.
* I'll remove that workaround/hot fix/complete hack later.
* I'll make the code readable/maintainable later.
* I'll worry about performance/reliability later.

The problem is, we usually don't get around to doing any of those things we plan to do "later". After dealing with the consequences of "I'll fix it later" a few too many times, my friend Dave LeBlanc coined LeBlanc's Law:

"Later equals Never."

Why is this? There are a few reasons that I've noticed:

1. When you cut corners in order to deliver on time, you're giving management and your customer a false sense of how fast you can reliably deliver. Agile teams use the term 'velocity' to describe the estimated amount of customer value they can deliver per iteration. If there is still work left to be done, you are effectively lying to your customer about how fast you can deliver value. Since your customer thinks you can deliver more than you really can, you will be overloaded with work again next time. You will start accumulating technical debt. There is no easy cure for technical debt (the most common cure being a complete re-write), so prevention is the best medicine. The best way to prevent technical debt from accumulating is to establish realistic expectations about how fast you can effectively work.

2. When you skimp on automated tests, and even when you write tests but don't ensure they are readable, atomic, and easily-maintained unit tests, you limit your ability to effectively refactor. When you can't easily refactor, it begins to get hard to write readable, atomic, and easily-maintained unit tests. Not only that -- because it's harder to evolve your design, you will face a stronger temptation to fix bugs with workarounds and hacks that will come back to bite you later. You will spend more time debugging and bug fixing, leaving you less time to write tests and refactor. It's a downward spiral that results in reduced velocity.

Agile developers often work with what they call a "definition of done". You are not finished with a feature until it meets the definition of done. It acts as a checklist or set of heuristics that help you realize (and admit) when you have more work to do. A definition of done might include things like these:

* unit tested
* verified by customer & customer tests
* usability tested
* integrated
* integration tested
* documented
* performance tested
* peer reviewed (via pair programming or some other mechanism)
* refactored, readable, duplication-free
* bug-free

Of course, when you first introduce this idea, your definition won't be this comprehensive. Start small (coded, unit tested, peer reviewed, and refactored makes a good start). Every few iterations, if you are successfully meeting your current definition, add something to it. Eventually you will have a pretty comprehensive definition of done, and each time you finish a feature, you'll have a lot less stuff left over to finish "later".

Do you have any other "I'll fix it later" variants to add to my list? Stories about how planning on fixing something later came back to haunt you, or how adhering to a definition of done saved a lot of potential pain? When is it ok to "fix it later"? Where's the fine line between LeBlanc's Law and YAGNI?

Cheers,
Ryan Cooper

 
 DZ Top Links
 
 DZone Top Links
 Next section
 Back to top
most clicked this week from dzone.com

dzone

Most-clicked links this week

 
 Popular at JL
 
 Popular at Javalobby
 Next section
 Back to top
A recap of some of the most popular and active Javalobby.org discussions this week.
Is Java The Secret Weapon That Apple Ignores?

Although one piece of good news came out of WWDC, it also seems they are back up to their old selves again, and once again, they have alienated their developers. Even those paying good money for ADC.

Full Discussion Posted By: Michael Urban - (73 Replies)

Has Matisse Really Changed Anything?

A request for feedback on whether the Java Swing tutorial should include a section on using NetBeans for doing layout. got me thinking: Has Matisse really changed anything?

Full Discussion Posted By: Michael Urban - (68 Replies)

What (natural) language do you use for programming?

In the "global village" of software development, do all the document and code docs must be written in English? Or local languages have their place as well?

Full Discussion Posted By: Genady Beryozkin - (41 Replies)

Blockbuster Chooses Blu-ray: Is the War Over?

In a huge blow to Toshiba, Blockbuster has decided to stock only Blu-ray discs in the vast majority of its nationwide locations. This sounds like good news for Java developers.

Full Discussion Posted By: Michael Urban - (39 Replies)

Borland DBSwing are dead, what should I do now?

I tried out the latest version of Borland JBuilder, Eclipse based (...bah!). I was really surprised that they completely cut out the dbswing framework.

Full Discussion Posted By: Gabriele Bulfon - (23 Replies)

 White Papers & Announcements
 
 White Papers
 Next section
 Back to top
Technical papers & research related to Java development.
Log Anomaly Detection and Viewer for J2EE

Download Full White Paper Posted by: Xplg

 Product Announcements
 Next section
 Back to top
Product and service announcements for Java developers.
Free (LGPL) icons for Swing© programs

Some free (LGPL) riana icons for Swing© programs, using JFC © collection (by SUN ©). Gorazd Praprotnik

Full Announcement & Discussion Posted By: Gorazd Praprotnik - (0 Replies)

Artifactory 1.2.1 Released

Version 1.2.1 of Artifactory, the open source Maven 2 Enterprise Repository, has been released. This release contains a new enhanced security model as well as many small improvements and bug fixes.

Full Announcement & Discussion Posted By: yoav - (-1 Replies)

Overactive Logistics Version Pre Alpha 1.4 released

WHAT IS OVERACTIVE LOGISTICS? Overactive Logistics is a freight forwarding open source software solution being developed for the cargo transportation industry.

Full Announcement & Discussion Posted By: overactive - (-1 Replies)

A03 Look And Feel 1.0 has been released

A03 Look And Feel 1.0 has been finally released. DejaVu font has been included as embedded font, JSlider UI and JFileChooser UI have been enhanced, theme now has better customization options.

Full Announcement & Discussion Posted By: Davide Raccagni - (-1 Replies)

JDataGrid Spreadsheet Edition 2.1.0 Released!

JDataGrid Spreadsheet Edition provides a data grid, a spreadsheet style table, support some features such as row header, cell attributes, cell merge and split, undo and redo.

Full Announcement & Discussion Posted By: Fuqiang Zhao - (-1 Replies)

Java Print Dialog Framework version 1.7.

Soft Frame Works has recently released the Java Print Dialog Framework version 1.7.

Full Announcement & Discussion Posted By: Henry Lander - (0 Replies)

Available update 1.1.5 of OpenSwing free framework

OpenSwing is an opensource framework to develop java applications (2 or 3 tier) based on Swing toolkit. It can be used in combination with Spring framework.

Full Announcement & Discussion Posted By: mauro carniel - (0 Replies)

LiquiBase 1.0

The LiquiBase team is proud to announce version 1.0. LiquiBase is an open source (LGPL) java-based tool for managing database changes and refactorings.

Full Announcement & Discussion Posted By: Nathan Voxland - (0 Replies)

WinRun4J V0.0.2 Release

WinRun4J version 0.0.2: Main changes are new memory management arguments, improved logging and icon customisation.

Full Announcement & Discussion Posted By: Peter Smith - (0 Replies)

Xooctory continuous integration server 0.2

Xooctory, yet another open source continuous integration server providing massive scalability and distribution, instant feedback, rich web interface and high flexibility

Full Announcement & Discussion Posted By: Xavier Hanin - (0 Replies)

Canoo at Jazoon 07 / JavaFX script sample application

About Canoo Engineering's session at the upcoming Jazoon 07 and its JavaFX script sample application.

Full Announcement & Discussion Posted By: Sandra Wendland - (0 Replies)

XINS 2.0 - Web Services Framework

XINS 2.0 has been released. XINS is an open-source Web Services development framework. XINS accepts the following protocols: REST, SOAP, XML-RPC, XML, Yahoo! JSON and JSON-RPC.

Full Announcement & Discussion Posted By: Anthony Goubard - (0 Replies)

Relief 1.1, 3D visualization of Java projects

Relief 1.1 is released. It corrects some bugs and add the possibility to hide Java core classes and libraries.

Full Announcement & Discussion Posted By: Jean-Hugues de Raigniac - (0 Replies)

Sanaware Java Docking 1.1

Sanaware is pleased to announce version 1.1 of its Java Docking library. The library allows developers to easily manage dynamic dragging of Swing components. Version 1.1 adds a number of new features.

Full Announcement & Discussion Posted By: Heidi Rakels - (0 Replies)

SAP Memory Analyzer , a free heap dump analyzer, has been released

SAP Memory Analyzer, a tool for analyzing Java heap dumps, can now be downloaded for free. This tool has special features for SAP's application server, and runs as an Eclipse plugin.

Full Announcement & Discussion Posted By: Markus Kohler - (0 Replies)

LiquiBase 1.0 RC2

LiquiBase 1.0 RC2 has been released. Changes since RC2 are primarily minor bug fixes. Unless there are show-stopper bugs found, the final 1.0 release should be out next week.

Full Announcement & Discussion Posted By: Nathan Voxland - (1 Replies)

alcheMo automated J2ME to BREW porting

Innaworks today announced alcheMo J2ME to BREW porting solution. alcheMo is fully automated and designed to instantly port a standard J2ME application to BREW without further manual adjustments.

Full Announcement & Discussion Posted By: Stephen Cheng - (0 Replies)

Open Source List of Java Source Code Analyzers and Optimizers

A complete list of Open Source tools that can help examine your Java source code for potential problems as well as generate reports on the analysis of your Java source code.

Full Announcement & Discussion Posted By: Venkatt Guhesan - (0 Replies)

Amock 9.5 - Mock static method

AspectJ based Mock lib ver9.5 With Amock, You can - mock static method and constructor. - mock private method. - create mock instance of private constructor class, interface and normal class

Full Announcement & Discussion Posted By: Jonghyun Yoon - (2 Replies)

BuildDesk 2.1.1 released

BuildDesk is an ant build script generator that will compile, build jars, obfuscate and make native installers and launchers for Windows, Mac and generic platforms. Version 2.1.1 is a bugfix release

Full Announcement & Discussion Posted By: Kirilll Kalishev - (0 Replies)

 Your Account
 
 Your Account
 Next section
 Back to top
Manage your account info for this and other Javalobby publications.
Manage your Javalobby membership details

Click on the following links to:


 Contact Info
 Next section
 Back to top
Here's how to reach us, we love to hear from you.
Email us
Send news items to editor@javalobby.org
Send questions, complaints, or suggestions to feedback@javalobby.org
Send advertising inquiries to advertise@javalobby.org
 
Call us
Our number is (919) 678-0300. We'd love to hear from you!

 Legal
 Back to top
The fine print we'd rather avoid completely.
Feel free to redistribute this newsletter in part or in full to your friends.

Javalobby News is a service mark of DeveloperZone, Inc.
Copyright ©2001-2006 Javalobby, Inc.

Thank you for your continued support of Javalobby. If you prefer not to receive the Javalobby weekly newsletter, send an e-mail to ***-jlnews@javalobby.org and please ensure the actual email address to be removed is present.
Javalobby.org, 113 Legault Drive, Cary NC 27513 USA