Going backstage — building a Ruby CLI app

Photo by Federica Giusti on Unsplash

In our coding bootcamp we’ve been learning about Ruby, the software that supports web development and server projects. In my first Ruby project we were tasked with creating a CLI application that calls on information from an API. I’ve worked with APIs in my other projects, so going in I felt like a pro. Well almost.

I made a Ruby app called Moonology. It takes in information from a moon API called FarmSense and returns key pieces of information based on option flags that the user inputs into the command line.

The good

  • Gaining coding momentum: It is becoming easier and easier to learn yet another programming language. I’m seeing the similarities in how they work and how they’re structured. I love that Ruby code seems streamlined in a way — it does away with many of the brackets, semi-colons and other coding grammar styles of programs like JavaScript. This all makes it a little more straightforward to use, and lets me focus on what I’m trying to achieve in the code. Does this style hinder how specific you can be with the code, or the complexity of what you can achieve in this program? I’m not advanced enough to be able to tell yet, but it was a passing thought.
  • No GUI means more focus on your functionality: I found not having to think so much about a graphical user interface and the visual design of how a user would view the app a bit of a relief. The visual almost comes second and allows you to build out all your functionality first, test, refine and then consider if you need to visually tidy things up. Did I miss having something to visually craft and style? Yes, a little bit, so I think I’m destined for the front-end. I love me some CSS.
  • Testing is so easy: Reviewing and testing your progress in the command line is quick and easy. You just keep running your ruby file and the results show you where errors may be lurking.

The not so good

  • Your hard work looks like a bunch of text: “But wait, what am I looking at? It just looks like some words.” These were the ‘user testing’ comments from my partner as I proudly showed her a working version of my app. Yep, to non-coders it might be hard to get your head around an app just looking like words in a terminal screen. It harks back to the green text on the DOS computers that we (non-Millennials) grew up with in the 80s. But I promise, even if the output just looks like commands and words on the screen, lots of hard work goes into building a Ruby app.
Source: me.me
  • Was I learning a language that’s on its way out?: When I saw there were old videos online including Ruby in their list of Top 4 programming languages on their way out, it didn’t spark joy. That’s some feedback I can give to our course convenor. Can I use the skills and approaches I learned with Ruby and apply them to learning a language that seems more prevalent, like Python? You bet.

Last thoughts

Overall I had a good experience learning Ruby, it was great to learn something more in the back-end. I can see from other command line applications like GitHub that they can be complex and very powerful. I’m keen to now explore other back-end languages like Python and see where I go from there.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store