




Java Tools For Extreme Programming 175
Java Tools For Exteme Programming: Mastering Open Source Tools including Ant, JUnit and Cactus | |
author | Richard Hightower & Nicholas Lesiecki |
pages | 516 |
publisher | Wiley Computer Publishing |
rating | 8 |
reviewer | David Kennedy |
ISBN | 047120708X |
summary | Practical introduction to Java tools for Extreme Programming, with an emphasis on immediate results rather than deep theory. |
In recent years there has been a increased emphasis on Agile Software Development. The most prominent of these methodologies is probably Extreme Programming.
What sets Extreme Programming apart from most other Agile Technologies, in my opinion at least, is that it has provided practical, easy-to-use tools to support its way of working. Most of these tools (Ant, JUnit etc) are Open Source and freely available. However popular these tools have been with the Open Source and Extreme Programming communities, it has arguably been difficult to introduce them to traditional IT development environments. This has been primarily due to the problems of justifying spending time on 'playing' with something and the difficulties of retro-fitting new tools to an existing development environment (think projects of 150+ people which have been releasing for 5-10 years for some idea of the potential problems).
It's worth noting that when embarking on a new, large-scale project it's very difficult to find a book discussing the issues of controlled builds, integration and deployment in practical terms. The most valuable aspect of Java Tools for eXteme Programming is that it's alone in its market niche.
The book is mainly useful as (a) an introduction to the various building and continuous testing tools out there and (b) a tutorial to getting them setup and working on your computer. As the authors note, there's a critical period where the user must get some result after playing with the tool for a short period of time or just give it up as 'too difficult.'
From a technical standpoint the book is very readable, but it doesn't tackle any one subject in great depth. It certainly provides enough information to get you up and running, and also, perhaps more valuably, illustrates how to integrate the tools together. It's an excellent primer for those who want to use the tools but are unsure of how exactly to start.
What's covered? Here are the chapter headings:
- Introduction and Key Concepts
- Introduction to Extreme Programming
- J2EE Deployment Concepts
- Example applications
- Mastering the Tools
- Continuous integration with Ant
- Building Java Applications with Ant
- Building J2EE applications with Ant
- Unit testing with JUnit
- Testing Container Services with Cactus
- Functional Testing with HttpUnit
- Measuring Application Performance with JMeter
- Load Testing with JUnitPerf
- API and Tag Reference
- Ant Tag Reference
- Ant API Reference
- JUnit API Reference
- Cactus API Reference
- HttpUnit API Reference
If you use some of these tools already will you learn anything? Probably -- I personally have been using JUnit to test EJBs for almost nine months now but didn't know about JUnitPerf or Cactus.
Should you buy it? If you're new to the tools, then Yes. If you work in a professional but traditional IT shop, I'd buy one for the group (I have). It'd be particularly useful when dealing with management and proposing changes to working processes, or when trying to bring co-workers up to speed and sell them the benefits of agile ways of working.
You can visit the book's website at Wiley. You can purchase the Jave Tools For Extreme Programming from bn.com. Want to see your own review here? Just read the book review guidelines, then use Slashdot's handy submission form.
This isn't a review (Score:1)
Re:This isn't a review (Score:1)
Modding it to zero reflects what on the part of Moderators?
Continuous Integration - CruiseControl (Score:5, Insightful)
"Build early and often" is one of the continuous integration mantras, and CruiseControl helps out with that. By having a coninuous build cycle, you can catch errors literally within minutes of when they're committed to the source repository. CruiseControl will email you if builds don't work, and also has a nifty servlet to let you track builds on the web. It's definitely worth a look.
Not for extreme programming (Score:2, Informative)
amazon reviews [amazon.com]
Catchphrase whoring (Score:2, Insightful)
YOur right about the amazon reviews. What is it with these "reviews" that get posted here -- the table of contents for christ sakes? It seems like book reviews are just an excuse to post a affiliate link to a book store. For shame slashdot. For shame...
Re:Catchphrase whoring (Score:1)
Even stupider (Score:1)
Re:Catchphrase whoring (Score:3, Informative)
Now if you're sitting next to your buddy, watching and commenting as he or she steps through some code, and your manager asks you why you're not at your own desk doing real work, you can explain that you're "pair programming" or code reviewing or what have you. Whatever. It's just a name for something everyone already does from time to time.
If you think the hype's a "load of crap" then I would tend to agree, but if it's the practice you object to, then you're obviously a rank beginner.
Some clarifications (Score:1)
There's a big difference between two people sitting together to work on a problem and two people chained to the same computer in the vain hope that they will produce better results. It's the old "two men dig a hole in half the time of one" syndrome.
But that's just me and I could be wrong. Maybe it does make alot of sense.
A relief, for me (Score:2, Insightful)
Personally, I learn programming concepts well when I have a real book instead of web research. Either I missed this book or it's new, because learning JUnit, Cactus, and Ant all at once on a single project from only web research is rather challenging.
This is going on my shopping list.
Dummy (Score:1)
Extreme Programming: Unrealistic? (Score:4, Insightful)
Last year, I actually had the opportunity to ask Kent Beck if he had any suggestions for adopting XP to large projects (200+ people across multiple geographic locations), and unfortunately, he wasn't too optimistic. He indicated that the largest projects he's tried XP on were 20 people or so.
Other issues we've had when considering adopting XP in our organization are that XP tends to assume that you will be developing for a single customer with a set of evolving - but consistent - requirements. In our reality, we have multiple customers, who want different things.
Finally, XP doesn't seem to offer any solution for testing GUIs, which make up a large part of our product.
So while I'm very excited by the promises of XP (and will likely buy this book), I think it is important to temper your enthusiasm with a healthy dose of reality, and consider that XP relies on some subtle preconditions in order to deliver on the promise of a smooth and successful development cycle.
Re:Extreme Programming: Unrealistic? (Score:1)
Well, testing anything specific (and GUIs in particular) is not something that development methodology has to answer for. You're on your own, just as if you were to test, say, a numerical algorithm used in your code.
That said, there
--
You have to pick your battles... (Score:3, Insightful)
The concept of user stories is great for getting our multiple customers to get to grips with their requirements; the tactile nature of the cards allows the planning sessions to be participatory and inclusive, the customers understand the trade-offs and the developers get to understand what they're _really_ being asked to deliver.
Pair programming and continuous testing have produced decent results; the main problems we have are accomodating sickness and holidays into the project plan.
On the other hand, our organisation does insist on some of the more traditional aspects of development management - a formal "Project Manager" role, regular progress reports to the executive team, functional and technical specifications etc.
I don't see how you could realistically hope to convert an entire team to XP overnight. The gradual introduction of some of the basic concepts - esp. those which can be explained as "quality oriented" - is a lot more likely to succeed.
I've read the book, and it's okay; the editing could have been a lot tighter (there's page after page of code printed out which outlines the application to be tested, not the tests themselves, there is a huge chunk devoted to the documentation for the tools which is available online etc.), and it kinda drifts away from the point now and then. If you want to get up to speed with Ant, jUnit etc. it's worthwhile, but don't expect to become an XP xpert.
JFCUnit (Score:1)
http://sourceforge.net/projects/jfcunit/
Re:Extreme Programming: Unrealistic? (Score:2, Insightful)
I think the most important, critical, absolutely must criteria is self-organizing teams. Traditionally, especially your 200+ person team, chops up development into "pieces" according to some vague boundries based on classical engineering practices. Some shops get into creating blueprints aka UML by "architects" and code written by "monkeys" aka contracters.
Re:Read the book... (Score:2, Insightful)
Because it is !
Lets see:
Houses, Bridges, planes = Tangible, concrete
Software = Intagible, computations
I'm just sick and tired of people thinking that only way to do Software is to try to fit it in models that are meant for something totally different.
Lets face it, Software Engineering is not (in most cases) like bridge engineering. Trying to build software like you build bridges just doesn't work.
Software is something totally unique.
Re:Read the book... (Score:2)
Software can be altered easially throughout it's lifetime. You can't take a piece of a bridge out make it better and put it back in.
Developing with XP let's you get to the point, realize your mistakes or places that can be improved, and do so quickly. The concept is that the design will evolve out of the code.
I have to admit, when I first heard of it I was the same way, but I've found that for small projects, with few people, it works well and the code does naturally evolve into a decent design using proper refactoring techniques.
Later-
Re:Read the book... (Score:2, Interesting)
Um, well, actually yes you can [b-t.com].
They took out each segment of the bridge and replaced it with a new one. The work was done at night, with traffic flowing during the day. Quite a piece of work....
Re:Read the book... (Score:2)
Re:Read the book... (Score:1)
Re:Read the book... (Score:4, Insightful)
I think you're only right if you look at a special subset of software: those software projects where failure and loss are acceptable.
Read this article [fastcompany.com] from the December '96 issue of Fast Company. It's about the the team that writes the software for the space shuttle's on-board computer systems.
Interesting stats: at the time the article was written, the previous 11 releases of the software had had a total of 17 bugs. Not each; total. In 400,000+ lines of code.
Great quote, from one of the team members: "If the software isn't perfect, some of the people we go to meetings with might die."
There's a big difference between computer programming and software engineering. Techniques like extreme programming may work well in a pure programming environment, in which the results of your work just don't matter all that much. So you software crashed; nobody got hurt, right? Just re-launch it, and remember to save often!
At the opposite end of the spectrum, though, software engineering is just like civil engineering, or mechanical engineering, or aerospace engineering. If you f*ck up, somebody may die.
Commercial software development is somewhere in between. If you don't have any discipline or oversight, your software will be so bad that your company will go out of business. On the other hand, if you institute military-grade processes, you'll never deliver a product in a reasonable time. So you have to compromise.
But people who say that software is totally different are just fooling themselves. In software, like everything else, there's good work and there's shoddy work. Putting a label on shoddy work and calling it a "technique" doesn't make it less shoddy; it's just gilding the lily.
Re:Read the book... (Score:2)
The techniques of XP are incredibly useful in the world many of us have to work in. They work and produce tangible results.
As for the whole "software built like a bridge" crap... there's a bridge over the Mississippi near where i live. It causes traffic backups in both directions every day because it doesn't scale. They're planning on fixing it... it will take six years, cost millions of dollars, and make traffic even worse during that time. Does this sound like a software project to you?
Re:Read the book... (Score:2)
Not all of us are writing software for the space shuttle. I'll bet you aren't, either.
Nope. I'm writing software for customers to buy. Nobody will die if it fails, but my customers will get annoyed. Annoy 'em enough and they'll go elsewhere. My company will go out of business. My family-- and the families of all of my employees-- will suffer. While that's not the space shuttle, it's important to me.
See? It's that spectrum thing that I wrote about in my post that you evidently didn't read. At one end, we have hobbyists; it doesn't matter to anybody but them if their software fails. At the other end, we have stuff like the space shuttle and nuclear power plants: life and death stuff. My company considers our work to be closer to the space-shuttle end than the hobbyist end.
Jesus, don't you people work for a living? I can't believe you don't take your jobs more seriously!
As for the whole "software built like a bridge" crap...
If architects built buildings the way programmers write programs, the first woodpecker to come along would destroy civilization.
-- Dave Baranec
Re:Read the book... (Score:2)
Dave Thomas described two problems with XP that I agree whole-heartedly with:
* YAGNI principle doesn't hold. According to XP you must always use the simplest design. However, sometimes experienced developers know the right solution from the start and doesn't have to get there by evolving the design.
* XP puts too much responsibility back on the customer. In my experience this is very true; Too much choice is almost as bad as only being able to make decisions up front when you have little experience to base your decisions upon (analysis phase in waterfall process).
The pros on the other hand is:
* Higher quality
* Tunable quality (you can turn the knob up and down as you go, not very far down though, or the process will stop working)
* Fast pace
* Solves the business problem - doesn't just deliver on a requirement spec (which describe a system that may or may not actually solve the business problem)
* Happier and more productive developers
Re:Read the book... (Score:1)
I think you're confusing bridge engineering (the designer) with traffic engineering (the client - ie a roading authority). It's still standing ain't it?
That would be like blaming the programmer for software that bogs down with 200 simultaneous users, when the client asked for a cheap solution to handle 5 users.
Re:Read the book... (Score:2)
boy, would I love to say that to some people at meetings I go to.
"Sure, We don't have to take the time to test it properly, but if we don't YOU might die.Whats that? I get the extra 2 days to test, why thanks."
There are 2 types of Software engineering:
One is good engineer and the other is bad engineering, often called 'programming'.
Extreme Programming *can* be Software Engineering (Score:1)
BUT it's a bit extreme (pardon the pun) to say software engineering is "at the other end of the spectrum". Software engineering, like any professional engineering, is a discipline where you consciously investigate how much error is tolerable and establish a plan accordingly.
The exteme programming techniques, interweaved with tools, and managed carefully, can be great software engineering tools for the right kind of project. The skill is in choosing the ones that are suitable for the job - which may be none or all.
Sure, most of these things won't work too well ofn a safety-critical system, at least not if they are the main way to ensure the desired quality. But for a typical, small-medium business application, extreme programming might well be chosen as the most productive route to the necessary quality.
Re:Read the book... (Score:2)
I like to think of XP and agile methodologies as applying a more scientific-research model to programming. ("Experimental Programming")
Engineering approaches focus on very well known, defined problems. The shuttle is a good example: the design of the craft itself has been known since the early 70s, the behavior of its systems are already well known through simulation and experiment years before anything is installed or implemented. (The unknowns, or 'poorly knowns' can result in disaster, ala 1986) Mechanical engineering of any type follows the same process. Behaviors, requirements, and designs are known far in advance of attempting to build or implement.
However, business software is really not like that. Requirements are never that well known, and subject to change, even while the 'engineering' is being done. In chemical manufacturing, the unknown and changing conditions are tested constantly and adjusted as the process continues. (i.e. change concentrations, temperatures, etc. until you get the desired result.)
Business software development, with changing requirements and scope, is more of an empirical process than bridge building (or 'engineering software' for things like space shuttles.) I don't imagine shuttle software ever needs to be refactored. Of course, most companies cannot afford to measure ship times in terms of 5 or 6 years, either.
That's what XP is about. Design, Measure, and Adjust. How you implement XP is largely up to you.
See: Ward's Wiki (The Portland Pattern Repository) I'd post a link, but I want to make you do a little work before hammering the server!
Re:Read the book... (Score:3, Interesting)
Whats that? a badly engineered software program lost all your customers account information? hey, its only computations, we can recompile it and fix it later!
The same METHODS apply to ALL forms of engineering. The fact that people have taken the we can recompile it and release a patch later mentality shows exactly how crappy the software development industry has become.
of course XP is a waste of time, because its not going to really catch on, It makes management accountable.
Re:Read the book... (Score:4, Informative)
This isn't true - XP is no more for hackers than any other type of programmer. At the core of XP is building quality in from the first stages. For example, one of the XP techniques, pair programming, though very intensive, increases quality through a continual peer-review - you have two coders going at the same code on one machine - any line of code that doesn't cut the mustard is more likely to be found.
Additionally, XP tends away from 'big-bang' integration scenarios by having early releases, regardless of size - this means the system is all working together from the beginning, and that bugs residing in different definitions of what an interface 'really' means are found early before they cause problems. If that wasn't enough, there is also a large concentration on testing - before writing the code, XP users are thinking 'how are we going to test this? Exactly? What are the exact criteria for success of this unit?'.
It isn't a tenet of XP that you 'continually change each piece'.
XP isn't a tool for hackers, it's got nothing to do with it. Nobody is saying 'don't design the architecture of your system', nor is anyone saying 'change things around until they work'.
thenerd.
Rubbish... (Score:3, Interesting)
This isn't a troll, or flamebait, its a standard old fashioned flame.
Peer Programming means continual review by two people, two bad people = bad code. 1 good + 1 bad = 1 slow average. Code review must be done by several people and must also include a senior resource to help less experienced ones.
This was also the tennant behind the Team oriented approach of the Mythical Man Month, which was based around the assumption of everyone should be good, just fire the rest.
XP is basically the re-hashing of some long held good ideas, interspersed with some total drivel from a bunch of hackers.
XP DOES say don't design the overall architecture of the system, it DOES say don't design how each service should work. It relies on the concept of Unit Tests where anyone will tell you that bad developers = bad unit tests.
XP is a sham and a fraud that is only allowed because the industry doesn't care about quality.
Re:Rubbish... (Score:2)
a)It holds management accountable of each step, module, and test. we all know how management likes to be held accountable....
b)If you have 1 good programmer, and one bad, or Jr programmer, it gives them the opportunity to improve. It might be slow at first, but you sould end up with 2 good programmers. Mentoring can be a wonderfull thing.
c)everyone knows the code. of course properly documented code does this as well...
OK (Score:5, Insightful)
Your point about pair programming is completely groundless.
Scenario 1 - no pair programming
Two bad programmers, bad code
One good programmer, one bad programmer, some bad code, some good code.
Scenario 2 - pair programming
Two bad programmers, bad code but any mistake either of them see will be removed, improving the quality of the code.
One good programmer, one bad programmer, code up to the standard of the good programmer, and the bad programmer learns, hopefully becoming better.
XP does not say 'don't design the overall system' - you are misrepresenting it. A look at this [extremeprogramming.org] talks about the plan for each release. Sure, bad developers = bad unit tests, but bad developers = bad product, nothing will guard you against that. Nobody said 'Extreme Programming will mean you have no bad developers.'
thenerd.
Have you ever met a bad programmer? (Score:2)
I haven't tried pair programming, but my experience with bad programmers is that their main malfunction is often that they don't realize they're bad. They think they're super smart, and will argue ferociously for their demented complicated schemes. If you pair a good and bad programmer, you're likely to end up with either no code, or if the good programmer is willing to compromise to get something done, a loopy design that's been polished to work adequately by the oversight of the good programmer.
I guess my point is who is the most pigheaded person may have a bigger influence on the results of pair programming than who is the better programmer. And that you often get more humble the more you learn in this business.
Re:OK (Score:1)
First, I recently went to an interview where the development manager told me that architecture goes out the window when using XP. Extremeprogramming.org doesn't say this (nor anyplace else I've seen). In fact, extremeprogramming.org just says that the architectural knowledge becomes the domain of all of the developers, not just a primary architect. I really hope that the latter is true. What has your experience been? I'd like everyone who has done XP to wiegh in on this. If the former is true, I think I'll pass on XP.
I've been a J2EE architect for a while, and architecture counts.
Second, a lot of this sounds kind of like a ripoff of the Rational Unified Process (RUP) of development. Obviously the paired programming thing is different, but what about the rest (i.e. iterative development seems to be key in both ways).
So, why would I choose XP over RUP? RUP certainly has better industry acceptance, wider use, and better known success. These things don't mean that XP can't spank RUP, but I think I need convincing (maybe I'm feeling gunshy after an interview with a guy who didn't know what he was doing).
Re:OK (Score:2)
Of course architecture counts. XP does not eliminate architecture or design. However, XP tries to get away from the "big design up front" - where you design for three months, before writing any code.
In XP you try to build pieces of the system that work on their own - but still within the overall design and architecture.
So, why would I choose XP over RUP?
XP is meant to be a lighweight method, one that does not get in developer's way. By the time your RUP developers are done writing use cases, the XP developers will have a partial system up and running and the users will be able to discover that their use cases were wrong. No expensive tools are needed - just whiteboards and index cards. :-)
No methodology/process will take place of smart developers, no matter what the vendors of fancy tools say.
Re:OK (Score:1)
You might have a system up and running, and it might be the best/coolest tech ever, but if it doesn't meet client needs or expectations, it's still a piece of shit.
Why is XP different? This isn't a flame question. I really want to know. I want to hear some success stories. I've had a great deal of success with RUP, but if XP is better, I want to know. I'm not stubborn. I'll switch my projects to the best methodolgy in a hearbeat. But I gotta be convinced.
Also, and XP may circumvent this, but with a good design process, every hour you spend in design, you prevent 5 hours of recoding when you get slapped around because of refactoring or something you missed, whatever. How does XP deal with this?
Just cuz I spent three months in design, doesn't mean I didn't deliver the right project, with the goods on-time and on-budget. RUP puts just as much emphasis on iterative dev and client interaction as XP. Whether or not it gets me somehwere faster in the short run doesn't matter to me. If it gets me to make a better product, and make a client happy does matter.
Re:OK (Score:2)
I have no doubt that projects that just start coding with no design AND no XP techniques have high failure rates. They have no way to fix anything! The beauty of XP is that, by constantly refactoring the code, there is very little to fix, and you're not afraid to fix it when something needs fixed. That's where unit tests and continuous integration come in. Since i started using XP techniques (not full XP, unfortunately), i've never been "slapped around" by refactoring or something i missed. I've never spent more than a half hour refactoring anything to get it working again, because i had my unit tests to guide me.
I also don't think XP is anti-design. It's just anti-BDUF (Big Design Up Front). Keep a general architecture in your head, but do the smallest bits you possibly can, and make them work. I do design sessions all the time. A half hour in the cafeteria with some paper, or a whiteboard, and i have a healthy day's programming ahead of me. Yes, i make mistakes. I'd have made those same mistakes if i spent months designing up front. Except now i can *fix* mistakes in rational time.
I don't think XP is competing with RUP and other iterative methodologies so much as waterfall design and the Ball of Mud antipattern. Unfortunately, the latter two are the primary design methodologies of 95% of the industry.
Re:OK (Score:1)
Re:Rubbish... (Score:2)
When you pair a senior and a jr person together the jr person really does learn and improve. Also, the senior person does benefit from a second pair of eyes on the code.
XP doesn't say don't design the overall arch. It does say that you shouldn't attempt to design the every last detail. Those details are often implemented differently than the design because something new is discovered during development. Instead, XP suggests you design the easy 80% up front and leave the detailed 20% for the engineers.
Finally, studies prove that pairs take 58% of the time that two seperate people do. However, the lost 8% is more than recovered by the improved quality of code. (I'm too lazy to find the paper.)
Pairing up is good, small design up front is good (for smaller projects), and automated testing is good. Those are the three foundations of XP.
Vanguard
Cutting edge engineers always iterate (Score:1)
Oh yes, the "tin benders" who built the X planes during the 50s and 60s cannot have been either.
Bridgebuilding... Sheeesh!
Hmmm, the waterfall methodology (Score:2, Insightful)
XP realises that
a) there will be feature creep,
b) you must test, retest, and test again,
c) it's really how most developers work
If you had to change a bridge because the river got wider, would you insist on using the same parts as before - regardless of how long the bridge needs to be now?
Re:Read the book... (Score:1)
The great benefit of XP comes from it's flattening of the cost/change curve.
Re:Read the book... (Score:2, Interesting)
This issue of "hard" enginerring is clearly addressed. The point is that things like bridges, buildings etc, are not easy to alter once you have built them. If you find that the bridge was originally specified to be a footbridge and then the customer decides that what they really wanted was a road bridge, then it is very difficult to retrofit this new requirement. It has always been believed that software is the same - that changing it half way through is a very costly thing to do.
However, XP claims that with a good unit test harness, it should be, and in my experience is, very easy to change the underlying implementation of the code without breaking anything. You can't just rip out the entire ground floor of a building, but you can reimplement your decisioning code without the entire application falling down on you. This means that it becomes much easier to fit later requirements as and when they are needed. The XP project that I worked on had a major change to both the business requirements and, as a result, the whole way of interacting with an external system.
We had designed the package up front, but had designed it to do the requirements as they stood when we started. There was no suggestion to us of this other requirement at the start of the project, so no amount of analysis or clever design would have allowed us to code for it. However, once the new design was produced from these requirements, it was a trivial (1-2 days) task to recode several of the back-end classes to have the new flexibility in communication that was required (but with the same functionality). The unit tests allowed us to be confident that we had not broken anything. It was then another quick job to add the new functionaly, and we had a new working system.
None of this meant skipping design, or hacking. It just meant doing the amount of design that was appropriate at the time, and building a framework to allow us to change (hence "agile methodology") when requirements change.
Consider purchase from half.com instead (Score:2)
Overall, they're cheaper than bn.com (I have no association with either, but I've found good deals on these book resellers).
Sig: What Happened To The Censorware Project (censorware.org) [sethf.com]
Re:Consider purchase from half.com instead (Score:1)
How to make money with /. (Score:1)
2) post a critic, including links to web stores
3) earn referer fees
bookpool (Score:1)
JUnit advantage? (Score:2)
1. We mark the test code in the classes between special comment lines (so that it can be programmatically removed)
2. The tests are in static methods with the prefix "test", called by a Test.class in each package. Test.class has a main that just calls the other tests
3. Each test prints out on a single line the class it's in, the name of the test and "passed" or "failed" and the failure may have extra info as to why it failed
This is working well for us, but considering how many people are happy with JUnit I was wondering what it provides over this way of doing unit tests? Basically, I'm just looking for some of the things that JUnit has provided you (above and beyond what the above gives) and maybe a real use example, but don't really need to be sold on unit testing (we already think it's great and are doing it).
F
Re:JUnit advantage? (Score:1)
It's also a realy nice framework. You can extend TestResult to do whatever you want, meaning you can have your harness report directly to your defect tracking system, send e-mail to the appropriate place, or some other thing that hasn't been thought of yet.
So three things. Reliability, unit clients, and flexability.
It's handy as heck.
Re:JUnit advantage? (Score:3, Informative)
As for your first unit test, it isn't that hard. Use a standard naming schema like "FooTest.java" or "FooJUnit.java" for your test cases - this way ant can filter on those name and run junit against them while keeping your unit tests out of your distribution jars. Extend TestCase and overload setUp() and tearDown() - often you won't need those. Name your methods testXYZ() and junit will run them. Inside your test methods call Assert.xxx() on the things you want to test. You can test for null, compare to known values, etc. You can test to make sure exceptions should be thrown or not. Sprinkle in a little log4j [apache.org] and you can get more detailed progress of the tests.
-tim
Re:JUnit advantage? (Score:2)
java in pratice (Score:1, Troll)
Is java an idea that never lived up to its hype of being cross-platform or do most web designers need a serious lesson in programming?
Re:java in pratice (Score:2, Insightful)
Java did live up to the hype, but no on the desktop 'though. Java is very much alive on the server side. Client side java pretty much never existed on the big scale ('though there are some very good client side java programms). Applets were killed by old and incompatible implementations of the JVM (not only Microsofts, but others as well). The Problem is/was that most Browsers shipped with a Version 1.1 JDK, which is just plain old and outdated. Microsoft never even shipped anything more up to date. You can use plugins to use more up-to-date versions of Java, but that's quite some trouble. And most Applets are just used as a flash-replacement and for this it really isn't worth to download the Plugin.
Re:java in pratice (Score:4, Informative)
Okay, all ribbing aside, as someone who programs Java for money, let me give you the skinny: Java applets bite. More specifically, they are slow to download, prone to crashing, and subject to problems due to lack of control over the Java runtime available to the browser.
Java has, instead, found its niche on the server. Server-side programming is where Java works really, really well. Development is generally faster than with C/C++, and Sun and others (go Apache!
The other benefit that Java on the server provides is that web designers don't have to monkey with the code, and programmers don't have to deal (so much) with HTML.
Needless to say, everything above is a generalization, all generalizations are false (including this one), and YMMV.
Re:java in pratice (Score:1)
Re:java in pratice (Score:2, Insightful)
Having said all that, I think applets are the worst representative of Java usage. I write server-side Java and really like it. The server-side specs (JSP's, Servlets, J2EE) seem to be port across platforms quite well. When we deploy code on WebSphere (IBM's J2EE platform) it runs across Windows, Linux, AIX, Solaris,etc with no problems. I haven't tried porting EJB's between J2EE platforms but I have written Servlets & JSP's on one platform and moved them to another with no changes, although the deployment details (what goes where) may differ.
Extreme Programming - WTF is that? (Score:3, Funny)
Re:Extreme Programming - WTF is that? (Score:3, Funny)
Everybody knows that Xtreme Programming is programming for Windows XP. (using Athlong XP is optional)
:)
Re:Extreme Programming - WTF is that? (Score:1)
Extreme Programming?? (Score:1, Redundant)
As a programmer, something like Extreme Programming sounds downright scary to me. Or at the very least, something that would force me to get up out of my chair more often than I would like.
Java Refactoring Browsers (Score:4, Informative)
I'v enot read the book, but looking at the chapter headings they seem to have leftout one great tool for XP in Java - the various refactoring browsers that are now hitting stride for Java, including JRefactory, IDEA (my favorite IDE period), jFactor, and X-ref (for the Emacs lovers)
With the XP RefactorMercilessly principle, IDE support for for refactoring is a must on big projects. Custom writing a Perl, sed, or awk script to move a method from one class to another (in its argument list) is possible, having IDEA or another refactoring tool handle all the updates across 2000 changes in 700 files is a lot nicer.
-Frums
Re:Java Refactoring Browsers (Score:3, Interesting)
I don't think you could be more correct. You simply can't have a book about Java tools for XP without talking about IDEA and some of the other great refactoring tools out there.
IDEA has completely changed the way I write code. I never really took the idea of refactoring seriously until I found it. Until then, it seemed like the refactoring book was just a guide to the obvious, but to see the refactorings automated with names I immediately recognize made me rethink things. All those idealistic phrases I once laughed at started flooding back to mind.
With the exception of JUnit (and even that's a close call), I don't think any other tool supports XP as well as IDEA.
Pair programming (Score:2)
Now some poor programmers don't even have a PC for themselves. They have to share it with a colleague and they are even denied their most basic right to have a few square meters of personal space.
I would never accept such working conditions but it's unfortunate that this seems to happen more and more.
Re:Pair programming (Score:2)
Re:Pair programming (Score:1)
Tom
it's only when u code Re:Pair programming (Score:1)
VNC Baby! (Score:2)
A co-worker and I stumbled onto a GREAT way to do pair-programming: VNC.
It's awesome, you sit facing each other on your own computers (thus having your personal space) and then you can work together in an instant just by logging on using VNC to see the other programmer's computer. VNC is fully interactive and you both have control of the keyboard/mouse at the same time. It's perfect for pair programming.
There are many times when all you're doing in programming is a bunch of busy work. Copying and pasting fields from a database into get/sets of a Java class or something ridiculous like that that doesn't really need two heads. These can be done solo, but then when you start to get heads down into the business logic, you can just say "Hey, let's work together on this bit," and your coworker just logs on and you start collaboratively working together again.
This way there's no fighting over the keyboard ("Oh, christ! When are you going to learn to touch-type, give me that!", "No! You drive me crazy with your backspacing... I'll drive."). Whoever has the right idea can type just by doing so and the other person can watch for errors, comment on style, etc.
Mark my words, it works really well, it should be part of the XP standard.
-Russ
Re:Pair programming (Score:2)
The person watching is supposed to be doing the thinking. The other guy is supposed to bang out the code. i.e., one guy is thinking of the "big picture" and how it all fits together, while the other guy concerns himself with the details of syntax and writing code that runs. You alternate the roles periodically so each person has a chance to contribute to the "big picture."
I find that in almost all cases, whether it's coding or testing, I get better solutions more quickly when I'm working with another person.
Java Tools inside, but XP, too? (Score:1)
The book had two quite bad reviews there. (2.5 points out of 5, which seems to be a pretty bad rating for amazon) The main point from both was the missing link between the java build tools, which seem to be discussed considerably, and eXtreme programming.
Naked objects (Score:4, Informative)
Re:Naked objects (Score:2)
Buzzword warning... (Score:2)
Re:Buzzword warning... (Score:2)
And since when is "Java" a buzz word?
Re:Buzzword warning... (Score:1)
extreme programming (Score:2, Interesting)
The advocates of eXtreme pr0gramming who love to "refactor" their code on a daily basis seem to have the same mindset as the people in my upper level CS courses that would spend the entire weekend in the computer lab on their projects, and complain about their grades and the time they spent afterward.
I'd spend a couple hours making object relationship diagrams, program flow diagrams, etc beforehand. I'd show up at the lab Saturday morning at 9 and leave at noon, and the looks these students gave me were a combination of hatred, jealousy, and disbelief.
IMO, it's just a process choice. Planned, focussed development, or tinker-till-it-works.
Re:extreme programming (Score:1)
Programming isn't just about programming. Too often its about learning how to do the clients job to a minute detail. XP (to me) seems to be about one person learning the clients job, while the other is banging out some code.
Keeping a client involved is a good thing. Showing them frequent results gets feedback before its too late.
This style won't work for everything, but I see it as a valid way of working with business clients.
Sorry, but I glean little from this review (Score:4, Insightful)
Check me if I'm wrong, but from my initial readings, XP relies heavily on customer feedback, and short-term iterations serving to adjust the project plan "on-the-run" so to speak, which minimizes time loss incurred by the difficulty of making accurate long-term estimates in programming, and compensation made for fickle end users. While testing is a large part of XP, is only a part of XP. What does this book say about implementing XP on the whole? Anything? Is this just a book about tools you may use to test your software? Can I test my software if I don't use XP?
The most valuable aspect of Java Tools for eXt[r]eme Programming is that it's alone in its market niche.
Excuse me for being picky, but what is useful about that? Are you saying that this is good if you want generic text that has XP written on the cover, or what?
The links describing XP give it a nice once-over on how you can think about the process of getting release versions out the door [which users and managers like]. I haven't seen anything that deals with the aspects of applications design that span beyond iterative releases, namely, systems that are proven to assist in the overall application architecture, and systems that are proven effective for creating flexible and useable GUIs. If you have a crack team of programmers, XP will cushion the unavoidables [ software is hard to estimate, and users change their minds frequently ]. Of course, you still need competent minds at work on the overall architecture of your code, and that planning seems to be an afterthought in XP ( features first, architecture second, perhaps this is why managers like it
Also, for any large project, you are going to have developers who display special skill in certain areas, and some who display ineptitude in certain areas. Before you start saying, "well, just fire the inept", remember that firing and finding replacement talent isn't all its cracked up to be, and "failure to exhibit genius" isn't cause to send somebody packing (nor is it always wise). XP takes the stance that everybody should do everything, but oftentimes you'll find that some on your team just don't have it like the top dogs do. In many cases, you want an expert to code a critical segment and, while it'd be nice if they could teach the whole team their skills, in reality, that is not always possible. I believe in peer learning, but everybody do everything, well... excuse the pun but that sounds a little "extreme"
XP has good guidelines, but I have many questions about how to interpret those guidelines, and a text that puts XP on the cover should say something about them, IMHO. So you say this book is about tools for XP, not XP itself. Ok, then what tools does it discuss other than those used to test code? Are there any other tools? Are these tools only for use with XP?
I guess what I can take home with me is that if the buzzwords "Java" and "XP" are on your cover, than somebody will publish your book.
Re:Sorry, but I glean little from this review (Score:1)
You gleam little because you don't have the base knowledge that this book expects from its audience.
If you were expecting an overview of XP you were completely off base... You should perhaps check out the SERIES of books on XP at your local bookstore...
I'm glad that you pointed out that you still need qualified people in order to develop software... However, by implying that you would like to fire the inept you are overlooking how pair programming helps share the knowledge between the specialists that you have in your organization.
Finally, if you want to know what XP has to say about developing flexible gui's, etc, perhaps you should read up a bit more on Design Patterns... then see what Beck has to say about using them in extreme programming.
Have a nice day.
Re:Sorry, but I glean little from this review (Score:2)
I don't pretend to be an expert (just regurgitating some information from a guest speaker from Object Mentor at a JUG meeting), but from what I understood there are several reasons not to pick XP for a given project. Some that I remember include lack of management buy in (XP can't be forced on a company), extremely large projects that can't(won't) be broken up, or too many dead-beat programmers to fail (although he only conceded to the most extreme example... one guy worked in a programmers union).
XP isn't for every project.
"Extreme" Programming, huh? (Score:2, Funny)
sunday, Sunday, SUNDAY...
At the Megaplex Arena,
Extreme, In Your Face, Programming Action!!!!
Java, Perl, C/C++, VB, and many, many more...
Geek-tastic and nerd-a-riffic!
Tickets going Fast!!!!!
Remember, this Sunday at the Megaplex, EXTEREME Programming!
We'll sell you the whole seat, but you'll only need the edge!
Re:"Extreme" Programming, huh? (Score:2)
Can XP work? (Score:2, Insightful)
- XP is very tactical. You need someone at the strategic level guiding and leading.
- Productivity drops significantly after about 40 hours per week (they collect detailed statistics about defect rates showing this).
- Individual productivity appears to suffer, but the result of pair programming and short (two-week for them) iterations results in code that is easy to work on (read: good design) and very low on bugs (read: well written).
They've put a lot of support around their XP team to make XP effective, in the form of tools, processes, and people (roles). Without that, I suspect they would be disorganized and chaotic.
There's a time and a place for just about every methodology out there. XP is an effective approach to development as long as it's done in the right environment by people who understand (or can learn) how to make it work for them.
who needs extreme programming (Score:1)
Managers Hate Extreme Programming (Score:2, Insightful)
Re:Managers Hate Extreme Programming (Score:2, Informative)
With XP you would have gathered your stories first... (requirements) After that you'd have decided which stories were important for that release, and then you would've worked on implementing *those stories* in that specific release... You would not have included more stories than you could actually complete in your release cycle. Your managers would've been perhaps following the metrics recommended by the big blue XP book also, if they were really into measuring things.
Were you doing unittests? If so, you might have had managers measuring the number of unittests as a metric... perhaps measuring the number of functional test that were passing fo the stories that were in that release... just ideas...
I'm glad you were able to rant, however, don't confuse what you experienced with extreme programming.... you are the victim of bad management.
Re:Managers Hate Extreme Programming (Score:1)
Re:Managers Hate Extreme Programming (Score:1)
Java Tools book, not extreme programming book (Score:1)
The title is a very unfortunate marketing ploy. I say unfortunate because putting XP in the title will probably drive away Java programmers who don't care for XP.
But the tools it discusses (Ant, JUnit (and family), and JMeter) are applicable to any Java project, regardless of your development methodology. And beyond the first twenty pages or so of the book, the authors really don't mention XP.
XP worthless (Score:1)
It's a (GOOD) marketing brand for a loose set of unrelated ways of trying to solve complex problems in the field of application programming. Not much more.
XP will work for talents (and a few trainees) who, if left alone, would probably work somewhat like that, not for "people" in general, and especially not for the workplaces that need a "development model", and sees XP as a Solution (yes the "S" is on purpose
Although people in general (especially the one who should not use XP) think it's great -- I fail to see the benefits, beyound rationalizing and "memorizing" the way talent's work.
Educated: Someone with a vast knowledge about a problem-domain, and means (often approximating algorithms) to recognize problem/solution pairs.
Talent: Someone who "just does stuff", doesn't have to think about it. Often turns out to outperform educated people by doing "The Right Thing", even when they should not be able to
Educated Talent: Rare! explosive mix! Hire at all cost!
PS: I don't think of myself as talented at more than 2-3 (smaller) things/fields.
Another Good Java Tool (Score:1)
BlueJ [bluej.org]
Extreme Programming? (Score:1)
Would you like some Extreme Programming? Some nachos?
Software Engineering and Open source (Score:1)
Re:Software Engineering and Open source (Score:1)
Why Ant? (Score:1)
Many people have been using makefiles successfully for years, and, now, part of the Java community comes out and says, "Make sucks. Let's just throw it away (even though it is really mature) and start over from scratch (instead of implementing Make in Java)."
I have found that the common arguments against Make really aren't very strong. The tab issue is really minor. The only issue that bugs me is that parallel builds aren't possible with most implementations. There are other more theoretical issues, such as the dependency graphing, etc., but I don't see Ant taking on these much more complex issues.
My other peeve is that Ant is fairly Java-specific, while Make is really language-independent (I use it for Java, C, C++, release management, testing, etc.).
Is the popularity of Ant really just a case of jumping on the bandwagon?
Re:Why Ant? (Score:4, Informative)
Ant isn't really 'reinventing' the wheel, but making the wheel easier to manage (one file) and extend (ant tasks). It's a neat tool to have in the arsenal; I personally have found it easier and more intuative than Make for more 'complicated' projects. (Now, if I could just create an Ant script to automate and test builds of Oracle Pro*C programs...)
Re:Why Ant? (Score:2)
For example,
all: Class1 Class2
javac -classpath . `cat ClassList.txt`
rm ClassList.txt
Class1: Class1.java
printf "Class1.java " >> ClassList.txt
Class2: Class2.java
printf "Class2.java " >> ClassList.txt
Thank you from one of the authors (Score:2, Informative)
I'd like to thank some other folks.
This book would not be possible without the great set of tools written for building and testing J2EE. I'd like to publicly thank James Duncan Davidson et al, Mike Clark, Vincent Massol et al, Kent Beck and Erich Gamma.
James Duncan Davidson et al created Ant. The de facto build tool for Java. This is the glue for building applications and making continuos integration doable with Java.
JUnit is the regression-testing framework written by Erich Gamma and Kent Beck. After looking at this code base you can see this framework screams with design patterns and solid OOP, and is central to Extreme Programming development with Java. It is as if these guys wrote *the definitive books* on Design Patterns and Extreme Programming--oh yeah they did!
Russell Gold wrote HttpUnit, which makes functional web applications easy and fun. (It can also be combined with Cactus.)
Mike Clark extended JUnit to provide JUnitPerf, which does load testing and performance testing. This code is an excellent example of how to extend JUnit. Mike Clark is also a really nice guy.
Vincent Massol et al for creating the Cactus (was J2EEUnit). I use this tool every day at work to unit test JSP Tags and EJBs. This is a truly novel tool. (BTW Nicholas Lesiecki, the co-author of the book, is an active committer on this project.)
Vincent Massol of Cactus contributed to the creation of the book. He reviewed the chapter on Cactus. His acknowledgement was accidentally omitted from the book during publication.
I am not implying that anyone mentioned above endorses the book or name dropping. I just wanted to thank them for contributing their time and effort to create these tools and then just give them away! Without them this book would not exist.
The book has been a bestseller under software development on Amazon most of this year. Thank you. We are blown away with the success of the book.
Check out these threads about the book if you get a chance....
Thread TheServerSide.com [theserverside.com]
Nick and I answered a lot of questions about the book at the JavaRanch as well...
Thread at JavaRanch [javaranch.com]
I've posted some more background information about the book here...
Book Web Site [rickhightower.com]
I'll check back and try to answer any questions about the book. Thanks again.
The web site will soon have a sample chapter on it. Later, when we write the second edition, the book web site will have early drafts for review.
--Rick Hightower Co-Author of Java Tools for Extreme Programming
Book description from one of the authors (Score:2, Informative)
Java Tools for eXtreme Programming describes techniques for implementing the Extreme Programming practices of Automated Testing and Continuous Integration using Open Source tools, e.g., Ant, JUnit, HttpUnit, JMeter, and much more.
There are other great books that cover other aspects of Extreme Programming. This book focuses on Automated Testing and Continuous Integration.
The book does mention XP throughout, but does not cover all other practices of XP in detail. This book focuses on the mechanics of XP. Other books cover the philosophy of XP quite nicely and there was no need to repeat it in this book. There is an introduction to all aspects of XP, however, the focus is on Automated Testing and Continuous Integration.
The book contains small examples and tutorials on each tool. The examples cover building, deploying, and testing Java and J2EE applications.
In addition to small examples, there are larger case studies. The case studies are larger more realistic examples. We have case studies involving XSLT, EJB, Struts, JDBC, etc.
Each case study is complete with an ant build script and several tests, written with JUnit, HttpUnit, Cactus, JUnitPerf and/or JMeter. The case studies focus on building, deploying and testing J2EE applications with Ant and JUnit.
There is also a reference section for APIs. Instead of rehashing the API documentation, the reference section has example usage, i.e., code examples for the important classes and methods.
Although this book speaks from an XP perspective, you need not practice XP to benefit from it. For example, you do not have to adopt the entire XP methodology to get value out of this book. Automated testing, for example, can help you refactor code regardless of whether you are doing pair programming or not. Continuous integration can help you detect and fix problems early in the lifecycle of the system regardless of whether your customer is on site or not.
There are some really great books on XP. Three of my favorites are as follows:
Extreme Programming Explained: Embrace Change by Kent Beck
Planning Extreme Programming by Kent Beck, Martin Fowler (favorite)
Agile Modeling: Effective Practices for Extreme Programming and the Unified Process by Scott W. Ambler
You will enjoy this book as it covers topics not covered in other books, i.e., essential topics that are critical to J2EE and Java development. This book is highly rated and is doing very well. If you are thinking about buying a copy check out these reviews reviews [rickhightower.com]