How to Clean Your Java Functions and Arguments
Join the DZone community and get the full member experience.Join For Free
Download Forrester’s “Vendor Landscape, Application Performance Management” report that examines the evolving role of APM as a key driver of customer satisfaction and business success, brought to you in partnership with BMC.
Developers today need to realize that sacrificing quality to get things out quickly will still cause major delays when that bad code needs to be fixed. Bob Martin will demonstrate how a Java module can start clean, but gradually degrade in quality, and then be refactored back to a good quality.
The mindset of "I'll clean it up later" can kill a business. A company's productivity will gradually decay as the system gets messier and messier, and when the business is forced to do a large-scale redesign, it rarely succeeds. This presentation is heavy on the code, and it will take you through its cleanup step-by-step. It's a great experience to see Martin present at a conference because the audience is directly involved in the example where you help Martin clean up a module. Interesting astronomy facts precede each talk.
Another audience-challenging presentation by Bob Martin examines the process of cleaning up Java functions. This talk starts with a pop quiz - you have three minutes to examine a two-page Java function and figure out what it does. Examples of great Java functions and poor Java functions will be examined for the audience's review. Martin will help you learn the process by which an expert coder would approach, analyze, and refractor this code. You'll discover how large functions should be and how they should be named and documented. You'll also learn how many indent levels it should include and how it should deal with exceptions, arguments, and return values.