Yes, I know, it’s been almost an entire week since I blogged. There have been plenty of reasons why I haven’t been blogging my progress. Heck, there are plenty of reasons why I haven’t been blogging altogether. 1

But, for the last three days of last week, we began learning about Ruby Gems. Ruby Gems are small packages of code (snippets) that you download (via Ruby’s gem install (gem name) command on your Terminal) and install to your system to give that supercharged addition to all your scripts. It’s kind of like jQuery for Javascript, and as for PHP, it’s just like PEAR 2 Packages and PHP packages and libraries, where you can add that extra oomph to all your scripts. I hope that makes a little bit of sense.

A few good examples of Ruby Gems are: Instagram Ruby Gem, 3Nokogiri, 4 and the very first Ruby Gem that I was exposed to years ago when I was learning my very first static site generator script on Udemy: Jekyll.

For our assignments, we focused on two particular ruby gems and then create some cool scripts using the ruby gems provided code. The ones that Skillcrush chose were: Nokogiri and Twilio. 5 For some strange reason, my Nokogiri-based 6 script isn’t reading the CSS class that I pointed out from the given URL to make the “web scraping” capabilities work, so now I would have to start looking into what went wrong with it.

The second assignment, we were asked to create a Magic 8-Ball Fortune Telling script, in which users input their “yes/no/maybe” question into the prompt and then the script’s reply to their question are sent directly to their phone in text/SMS format. The first half is pretty easy, now I’ve gotten used to the earlier assignments. The texting/SMS part is where the Twilio app comes into play.

All of our scripts are now required to be pushed to our GitHub accounts, therefore you can check out the script in there if you’re interested.

When tested on the Terminal, it looks something like this:

The part at the bottom displayed my phone number, so I covered it up for privacy. Basically, the “Welcome…” part is the script asking the user to type in a question about your hopes, wishes, and dreams (must be yes/no/maybe question), just like that good ol’ Magic 8-Ball toy that we used to shake for our answers. In the screenshot of the terminal earlier, I asked if I would meet that special someone near the end of the year.

Unfortunately, my answer via text was not exactly I hoped. It’s the screenshot of my Android phone screen right above this entry.

That’s it for today. I’m now working on our final project for basic Ruby class: a weather app using another Ruby gem. I don’t know how well I’m progressing right now, to tell you the truth, but I’ll keep on working on it. 😅

Link The NINPOJineous

Would you like to donate a button?Contact me along with your button(s). It could be of any theme/subject (as long as it's not offensive) and in any size (88x31, 100x35, etc.). Much appreciated!

Part of…

The “Jineous” behind The NINPOJineous

Adrianne Marie P. is a self-proclaimed poly-swaggin' nerdette who wishes she can be a jill of all trades. She is a unicorn who dabbles in both web designing and development in all sides (especially with WordPress). Aside from doing the digital stuff, she collects read-worthy books, writes stories of all lengths, handmade art, DIY crafts, and has a deep appreciation of food since diabetes came to her life. She also loves a lot of other things, but that would be too long for this widget.