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.
The moose likes Groovy and the fly likes Critique Please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Critique Please" Watch "Critique Please" New topic
Author

Critique Please

Mark Williams
Ranch Hand

Joined: Aug 01, 2008
Posts: 66
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

Mark Secrist
Ranch Hand

Joined: Jul 01, 2003
Posts: 89
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.
Amu mathi
Greenhorn

Joined: Jul 04, 2008
Posts: 26
Can you give a sample input file???
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

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.



A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Critique Please