As you know, ReProfit Lab is all about showing you how you can also produce measurable results with your work, stand out from your peers and be the most helpful programmer to your team, consulting clients and/or employer.
If you’re anything like the ambitious programmers that I work with at DYR Hackcamp and Hackchella, there’s a good chance you have similar career goals as the highly-skilled, highly-paid professional programmers you admire.
There’s no question you want to accelerate your progress, so that you can…
- Start freelance-consulting and get paid for your skills and knowledge
- Get a full-time programming position, locally or remotely
- Build a micro SaaS app or niche website that could generate enough income to replace your current salary and give you both time and location freedom
Still, it’s taking you longer than you expect – more than one year – to achieve any one of these goals, so that you can finally call yourself a professional programmer.
You don’t have the confidence you desperately need to sell yourself to potential consulting clients or employers, so that you can get paid to use your programming skills and knowledge.
You don’t believe in your own capabilities to build useful web and mobile applications from scratch, without following another step-by-step tutorial that’s outdated and impractical.
You don’t have clarity about what your next steps are…
…and whether you’re good enough to start looking for a full-time programming position, freelance-consulting clients or even start working on your own niche website or micro SaaS product.
So, let’s get you one step closer to your big goal…
If you’d like to start building useful software products that sell, so that you can proudly tell your friends, family and colleagues you’re a professional programmer now…
…this crash course, Create Your First Useful Ruby Gem, will show you that you’re good enough to start approaching potential consulting clients and employers for work, using everything you already know.
And without a blessing from the Pope.
Once you complete this crash course, you’ll have the confidence you desperately need to start selling yourself to potential consulting clients and employers so that you get paid to use your skills and knowledge.
Let’s get started, ambitious programmer…
Context – Automating a Marketing Workflow
The marketing team at StartupYou wants to improve the search engine rankings for their business blog so that they can get free traffic and leads.
Their process starts with a thorough analysis of their competitors’ blogs.
They compile data from several blog posts, so that they can identify patterns, create a better content marketing strategy and produce blog posts that’ll rank in the top 3 spots of Google and other search engines.
The data they collect includes:
- The title used for each blog post
- The keywords that are targeted in each blog post
- The meta description of each blog post
- The name of the author of each blog post
- The canonical link for each blog post
Right now, the Chief Marketing Officer uses the browser’s “View Source” feature to read the data and then copies them into a spreadsheet.
You’ve been hired as the Chief Technology Officer to create an Open Source Ruby program that automates this workflow.
You must build an Open Source Ruby program, a command-line tool that works on Windows, MacOS and Linux and has 100% test coverage.
The Ruby CLI tool must extract these data from the web, save it into a CSV or TXT file and make the file available to all stakeholders at StartupYou.
As the CTO, you’re allowed to give this brief to new hires as part of their training, so that they can create this Ruby app for the team at StartupYou.
Your primary goal is to free up the CMO’s time so that she can work on advanced marketing strategies that’ll improve StartupYou’s market share by 33.33 percent within one year.
Your secondary goal is keep all stakeholders informed about StartupYou’s content marketing strategy at all times, so that your team can reduce employee turnover by 50 percent within 90 days.
Here’s how your Ruby Open Source program, I called mine Spydec, will be used by your Chief Marketing Officer and her team via the command-line.
You can find a complete video demo for Spydec here, for you and your team.
RSpec Test Cases
I’d like to give you a hand-up because you’re a valuable member of the Kingmakers community. Use the RSpec test cases below so that you can get started today, accelerate your product development and release your Ruby program in record time.
You’ll know you’re moving towards Ruby mastery and you’ve achieved your specific goals for this project once all of the tests are green…green…green.
There are also pending RSpec test cases that you must implement before writing the methods that’ll make all of them pass.
Remember, you can always get help and ask for feedback on your work from your fellow Kingmakers in the comments section below.
Libraries and Tools
Here are the Ruby libraries I recommend you use during this training to simplify the process of getting the support and accountability you need.
Once you complete this training, you can go ahead and experiment with all the other libraries available for implementing similar functionalities.
You should also use only the latest version of each recommended library.
Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. Bundler is an exit from dependency hell, and ensures that the gems you need are present in development, staging, and production.
You can also use bundler for developing your own gems easily, because it provides a way to automate repetitive work based on conventions, configuration and templates.
OptionParser is a Ruby class for command-line option analysis. Some features of the OptionParser class includes the ability to write the argument specification and the code to handle it in the same place.
It prints out an option summary, so you don’t need to maintain a separate summary string in order to provide helpful messages to your users.
Also, optional and mandatory arguments are specified very gracefully.
Additionally, when you use option parser, arguments can be automatically converted to a specified class and can be restricted to a certain set.
RSpec is a popular Behaviour-Driven Development (BDD) tool amongst Ruby programmers. RSpec helps you focus on the documentation and design aspects of Test-Driven Development (TDD).
Nokogiri is an open source library used for parsing and extracting data from HTML and XML documents in Ruby. It’s used as a dependency in Mechanize, a library that’s used for automating interactions with website, such as filling out and submitting forms, following links and redirects.
That should give you a good idea of what could be done using Nokogiri.
Your Ideal Next Step
You’ll know it’s time to move to the next step in your Ruby and Rails development career (ie, create Ruby API libraries) once all of the RSpec test cases I’ve included in this project brief are passing.
You’ll finally confirm that you’re familiar with packaging Ruby programs for distribution and that you can apply them on your next Ruby project.
If you really want to ReProfit from your hard work, don’t forget to publish your Open Source Ruby program to Rubygems and showcase your source code on GitHub.
You should also publish a blog post that walks readers through your implementation of this program and share that with the Ruby community, friends and colleagues.
You can also share a link to your blog post in the comments sections below.