JIRA UI in Python

Problem statement

See the problem statement in this post.

This post is about using Python to write a program that implements a shell (REPL) to JIRA’s servers.

Implement the REPL

I implemented this REPL the same way the C version was made. I opted to not go for the “eval” option (as I did in Tcl) since it allows way too much flexibility for the end-user. This is the same as my implementations in Nodejs and Ruby.

Code

Available here.

This code does as much as the C code does, but in 47 lines of code, compared to Ruby’s 60 lines of code. The only thing I’ve used beyond the standard-library is the “requests” library. This is because it seems to have thoroughly taken over the Python community.

Thoughts and impressions

Similar RAM usage as Ruby

The python program ran at 24MB of RAM. The Ruby program used ~25MB of RAM. The Nodejs program used ~43MB of RAM. Just like the other implementations, CPU usage was insignificant.

Amazing programmer productivity

This got built pretty quickly. My Python experience involves basic data-wrangling and a very small amount of fiddling with Django. I got this program all done up with a bow on it within 1 hour of googling.

I think it’s hilarious how similar my Tcl, Ruby, JS and Python code is. These languages have all converged on the same semantics by this point, and when you combine that with my preferred programming style the code has the same shape and pretty much the same size. All these program files are in the same range when compared to the C program; the programs in the higher-level languages weigh in at 12-18% of the lines of code of the C program.

Leave a Reply