• 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

I looooove GroovyConsole

 
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'm using GroovyConsole more and more and more these days.

Every time I'm writing new code I'm jumping over to it. I'll write the method or class in the console and test it thoroughly in the console before bringing my code over into the IDE.

Has anyone else started working this way?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmmm. I hadn't tried this before, but I do enjoy working that way sometimes (the Jess rule engine has a read-eval-print loop, and I often use that to explore a new Java API by typing Lisp code!) I'm just giving it a try and you're right, it seems very cool. I'm going to check out if something similar is available plugin-wise for IntelliJ, because I'm pretty picky about keybindings and color and such when I'm coding.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did a little research on the GroovyConsole inside Intellij thing. First, there really isn't anything in the JetGroovy plugin that lets you run the GroovyConsole. Now, that being said, you can create a .groovy file and put any kind of script code in it and tell IDEA to execute it. How is that different than putting it in GroovyConsole first?
 
Marc Peabody
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

Originally posted by Gregg Bolinger:
I did a little research on the GroovyConsole inside Intellij thing. First, there really isn't anything in the JetGroovy plugin that lets you run the GroovyConsole. Now, that being said, you can create a .groovy file and put any kind of script code in it and tell IDEA to execute it. How is that different than putting it in GroovyConsole first?


Great question and I used to do that. Here's what I don't like about simply doing a script inside IntelliJ:
1) I need to worry that the script stays out of versioning.
2) I need to worry that the script isn't in a source path... otherwise it can break everything.
3) It adds to the clutter of editor tabs.
4) I'd rather not deal with the possibility of an infinite loop in a little experimental script slip-up bring my IDE to a crashing halt.
5) Most Importantly: I think it's easier to isolate what I'm trying to accomplish if I'm doing it in an environment that's separate from the rest of my code. It's easier for me to focus on "I have a list of [1,2,3] but I need a list of ['a','b','c']" when I know I don't have my other classes all around staring at me. Out of sight out of mind, and I think my objects have been more cohesive as a result.

I will agree that GroovyConsole isn't perfect with coloration of text. Sometimes it splits up colors where it shouldn't. But I've found that the shorter my methods and closures are, the less my brain needs code colorized to cope with it.
 
Rancher
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also keep in mind if you are using Grails that there is a 'grails console', too. It gives you everything the groovy console does, and loads the grails domain model.
 
reply
    Bookmark Topic Watch Topic
  • New Topic