Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Step 1 in Multithreaded XML Transformations (and All Other Programs) : Page 5

Work through a common multithreaded XML transformation problem in Java. Along the way, you'll learn why getting a software program working is just Step 1 in a series of steps to produce good software.


advertisement
Step 1: Got It Working!
Now the real fun starts when you execute the multithreaded program on a multiple CPU server. I was able to run the program on a server with four dual-core, single-thread CPUs and the run time decreased to just over 30 seconds. Memory consumption was a modest 20 MB, a very small fraction of the Iteration 1 big bang transformation program.

The output file was identical in size to the big bang transformation, but the contents were not. You did not take the time to order the output in this article so that is to be expected. However, the XML generated was in tact for all records in the file; they were just ordered differently. So you can declare victory, Step 1 is complete!

However, only novice software developers stop at Step 1. Disciplined developers quickly move on to estimate the lifetime of the code they just got to work. The longer the code is expected to live, the more effort they spend on the code. Each step has a goal in mind that increases the usefulness of the code to extend its lifetime:

  1. Get the code working
  2. Get the code understandable – Goal: allow others to maintain and enhance the code
  3. Get the code "debuggable" – Goal: minimize support efforts and production downtime
  4. Get the code efficient – Goal: improve the efficiency of the code so that it has acceptable response times and is scalable to support large volumes and/or users
  5. Get the code automation testable – Goal: manage the increasing size and complexity of a system; combat system entropy
  6. Get the code reusable – Goal: have more than one product offering use the same code; ease the maintenance burden and come out with more products more quickly



You got through Step 1; hopefully you found the programming exercise challenging and you are ready to move on to Step 2!



Todd Lauinger is the lead integration architect at Document Sciences. Todd has almost 20 years experience developing software and mentoring software engineering teams.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap