• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Critique Please

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you give a sample input file???
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic