Groovy Over Python?

For some simple things, Groovy and Python are very easy. For scalability, Groovy wins and it should. Change my mind.

Groovy Over Python?
Photo by Brittani Burns / Unsplash

After a few frustrating events where I had some Python code blow up because of dependencies, I started looking hard a using Groovy going forward. For some simple things, Groovy and Python are very easy. For example, if I wanted to read the latest sales from and print them out, I could do the following in Python on my Mac.

import pandas as pd

df = pd.read_csv('')

print (df)


If I tried that on my old Raspberry Pi, I'd run into dependency issues w.r.t. to Numpy not compiling correctly.

With Groovy, it's roughly the same but no need to call a module, it's just built in.

String getResult = new URL('').text

print getResult


And that works on my Raspberry Pi. Granted, I don't need all the multithreading power of Java to run this simple program but the portability is nice.

If I wanted to read's JSON endpoint, it's as simple as doing this:

import groovy.json.JsonSlurper

def slurped = new JsonSlurper().parse(''.toURL())

print slurped

Why Groovy?

The answer is simple, throughput and performance. Groovy runs wherever a JVM is and it's multithreaded. While I use Python every day for my work, it annoys the hell out of me. I don't know why, maybe it's my Engineering upbringing but I do love the simplicity of a good scripting language.

I love the ease of prototyping out programs in a scripting language but then compiling it for performance. I know there are some hacks for Python and that Python is eating the world are we desperately trying to cram a square programming peg into round hole?

On top of that, I've been thinking of building an MVP using Groovy and Grails. My strategy behind this is to build an enterprise-ready product from the ground up. I'm not looking to build trading bots, but rather build something that will provide end users with decision support services in the crazy world of trading and investing.

There will be no fancy deep learning (although there are Java libraries for it), instead, it will be a web application that will allow me to do some financial-related analysis.

Subscribe to Neural Market Trends

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.