• 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

suggestion for reducing code-test-debug cyclye

 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using groovy since few weeks. While it reduces key strokes reducing code time, the debugging time has gone up. For e.g. If you pass string to preparedstatement.setLong it will throw runtime exception. The stack trace thrown by groovy is hardly helpful, it does not tell me which line caused the problem. I will have to spend lot of my time to detect this. If I were using Java compiler would have caught this problem, no need to run the program to find this.

What do other handle these situations ?
 
Rancher
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The stacktrace should tell you what line in your code the problem originated from, it just won't be the first thing the stacktrace shows you. Because there are so many layers in Groovy, it probably showed you a MissingMethodException or something because it was looking for a setLong method that accepted a String.

Whenever I get a stacktrace like that, I usually pick a unique word from my packaging and search through the stacktrace for it. That way I can find the first line in my code that caused the problem. For example if all my Groovy code is in com.mcdonalds.burgerapp, I'll search the stacktrace for mcdonalds.
[ October 22, 2008: Message edited by: Matthew Taylor ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic