This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am trying to learn to do things the groovy way and I am having a hard time.
First off, my code is not giving the right output (I'm okay with that at this point, I'll get there )
Second, when I try to step through the code in Eclipse, it feels like the debugger is out of sync with the source code. Especially when stepping into certain methods of this program.
Thirdly, sometimes stepping into a method seems to take FOREVER for the step to complete. It might be my use of regex....
If anyone is bored, I'd really appreciate some feedback. I am not sure I am really using Groovy as it is intended to be used. Btw, if you are familiar with DB2's dynamic sql snapshot output, you'll notice that this program (tries) to transform it into a csv file. Please don't make fun! I was really focusing on learning Groovy more than the product of the processing
Being new to Groovy myself, I'm not going to comment on your code. Regarding debugging in Eclipse, it may be that you are stepping into the generated code or some of the Groovy helpers. I know I ran into that a few times, especially when calling methods. I haven't really found a great way to get around this except to set breakpoints in the desired methods and continuing to the breakpoint.
I don't have any input data to work with to be sure this is 100% perfect, but this is approximately what I'd slim it down to. At the very least it should show some ways to use the iterator methods rather than for loops and extra if statements.