The Learning Curve of Programming


Practical posts from a puzzle-solving programmer

MyVerses: A Rails Project of Biblical Proportions

If you’re thinking that’s a Bible pun, you’re right! For my Rails project, I decided to make an app that lets people create and share their favorite Bible verses. Here’s where I got my idea: A few years back, my church had an event where people wrote down a #MyVerse - a Bible verse or passage that they liked and/or identified with - and an explanation of why they chose that verse. They would then put that #MyVerse on one of the walls of the church and/or post it on Facebook for all to see! The issue I had was that it was hard to choose just one Bible verse to be my #MyVerse - there are literally tens of thousands of them! My Rails app solves that issue: instead of requiring users to choose just one #MyVerse, they can write however many MyVerses they want.


How to Edit Lessons and Labs

Introduction: Have you ever worked on a lesson or a lab, only to realize that it didn’t look quite right - like maybe it had a couple of incorrect instructions, a sentence or two that could be phrased more clearly, or even a missing test? It happens. The people who write Learn’s curriculum are (just like the rest of us) imperfect; as such, there are going to be a few problems with the lessons here and there. But how do you fix them? You could Raise an Issue, but that might take a while to get fixed, depending on how urgent the issue is and/or how easy it is to solve. Thankfully, there’s another, arguably better option: opening a pull request on the lesson/lab itself! In this post, I’ll show you how to do just that (Hint: Just treat it like any other repository).


Recipe Rolodex: A Lesson in Keeping it Simple

Introduction: For my Sinatra project, I created a Recipe Rolodex app. Rolodexes were often used to organize business contacts, but I figured that the same could be done for recipes; thus, the name of the app. Oftentimes, people write or print off recipes and store them somewhere, but they can get easily lost and disorganized. The Recipe Rolodex lets you store and organize your recipes all in one place for easy access at any time! In this post, I will further explain how my app works, some of the problems I had to solve, how I learned the importance of keeping my projects simple, and my future plans for the Recipe Rolodex.


How to sort by more than one attribute in Ruby

I am currently making a Recipe Rolodex app for my Sinatra project. I have my models set up such that a Recipe belongs to a User, and a User has many Recipes. On one page, I decided to list my recipes in alphabetical order, by name. However, I realized that multiple users will likely give their recipes the same name: Scrambled Eggs, for example. Because of that, I want to additionally sort the recipes by their users’ names. This is fairly easy to do with a database language like SQL, but how would you do it with Ruby? The answer is surprisingly straightforward…


Route vs. Controller vs. Path vs...Everything Else

Synopsis: After completing a lesson about routes, I was still confused about what a route was and what it was not. After getting some help from some great Technical Coaches (thanks, Madeline and Isaac!), I believe I have a better grasp on it. My hope is that my explanation here will clarify a few concepts and be useful for future reference. It will also cover most of the MVC and “request/response cycle” concepts, but it won’t go into too much detail. (I went into more detail about the request/response cycle in a previous blog post; I might make an MVC post later.) And as I promised, I will make this post much shorter than my previous ones.