The moose likes Groovy and the fly likes Practical use of Groovy for statistical computations Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Other Languages » Groovy
Reply Bookmark "Practical use of Groovy for statistical computations" Watch "Practical use of Groovy for statistical computations" New topic
Author

Practical use of Groovy for statistical computations

Sum Nejm
Greenhorn

Joined: Sep 20, 2007
Posts: 22
Considering we have Scott Davis in the forum I'd like to add my question to the lot. I am currently working as a consultant in the health care industry and during the past months I've done a significant amount of pure coding to develop a reporting engine that handles data from a multitude of datasources, aggregating, grouping and calculating all the data to display them as reports.

During the development I often felt that arrays of data are handled like second class citizens in pure Java and I often had to resort to very creative structuring of my data to get anything done (finding method values deep in arrays of objects, sorting, moving around, creating new arrays etc. etc.). I heard that Groovy is making things easier but neither have I had the time to dig any deeper nor do I have any compelling arguments for my customer to try a "new language" now that the next iteration of the project is due.

So my question is a two-parter.

1.) Can multidimensional arrays be modified/sorted/aggregated/grouped easily in Groovy (maybe there is even an extension for simple mathematical computations which I now coded myself since there are no useful APIs in Java itself).

2.) How would you go about to recommend Groovy for a customer which is on a tight budget (both time- and money-wise).

Thanks a bunch!
Daniel
S Davis
Author
Ranch Hand

Joined: Feb 07, 2006
Posts: 40
The additions to the List interface are really nice:



And if you don't see the method you need, you can use the ExpandoMetaClass to add your own custom methods directly onto the class at runtime.

2.) How would you go about to recommend Groovy for a customer which is on a tight budget (both time- and money-wise).


Uh, well, um -- Groovy is a free download. That should help quite a bit... (wink)

My book is a pretty cheap proposition. It's a code-first book, so you'll be able to browse directly to the problem you're having, look at the code, and put it to use immediately. It's meant to be the quickest way to get you up and running with Groovy.
Dave Klein
author
Ranch Hand

Joined: Aug 29, 2007
Posts: 77
2.) How would you go about to recommend Groovy for a customer which is on a tight budget (both time- and money-wise).


Just a couple more thoughts on this: With Groovy, in a short amount of time (think days not weeks) developers will be much more productive, saving the client both time and money. Also, with any tool you are going to hit snags and you're going to need help. The Groovy and Grails mailing lists are very active and the people on those lists are very helpful. I have seen questions answered, literally, in minutes.

Dave


Author of Grails: A Quick-Start Guide
Sum Nejm
Greenhorn

Joined: Sep 20, 2007
Posts: 22
Originally posted by S Davis:
The additions to the List interface are really nice:



And if you don't see the method you need, you can use the ExpandoMetaClass to add your own custom methods directly onto the class at runtime.


Neat!
Sum Nejm
Greenhorn

Joined: Sep 20, 2007
Posts: 22
Originally posted by Dave Klein:


Just a couple more thoughts on this: With Groovy, in a short amount of time (think days not weeks) developers will be much more productive, saving the client both time and money. Also, with any tool you are going to hit snags and you're going to need help. The Groovy and Grails mailing lists are very active and the people on those lists are very helpful. I have seen questions answered, literally, in minutes.

Dave


Thanks, I'll try to code a small component for statistical computation with Groovy and show it to the customer. If I can do it quickly they might be convinced.
 
 
subject: Practical use of Groovy for statistical computations
 
MyEclipse, The Clear Choice