Going backstage — building a Ruby CLI app
Learning to build a Ruby CLI application
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.
- 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.
- 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.
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.