Compuculture: Rails

Apr 13, 2020

This week, I took a break from VR to work on learning Ruby on Rails. I’ve discussed it before briefly, but to refresh your memory, Rails (as its name is shortened to) is a web development framework. Using Rails, you can create every part of a website in one place, including the databases, code, the website itself that users see, and more.

Rails is useful for a few reasons. First, it uses the programming language Ruby. Ruby is a very flexible and easy-to-learn programming language. Ruby is unique in that it allows programmers to use different syntax (rules that decide how you write your code) to write the same thing. For example, the two apparently different-looking code segments are actually exactly the same:

if true do print “Hello!” end

if true { print(“Hello!”) }

The second one replaces the words ‘do’ and ‘end’ with ‘{‘ and “}’ as well as adding parentheses around the word “Hello.” Nevertheless, both do the same thing: Prints out the word ‘Hello!’ to the user.

Another useful thing with Rails is that it comes with a wide array of useful commands that can be used to quickly create all sorts of common things, for example, database structures and webpages. The tutorial I’m using (Learn Enough to be Dangerous) discourages relying on these handy auto-generate commands too often, though, as many programmers who use them never learn what they actually do which prevents them from understanding how Rails works.

The last great thing with Rails is that it can easily be deployed to the internet. I’m using a ‘deployer’ called Heroku that lets me put my code on the internet. In fact, you can have a look at the same application I’m creating right now! It’s not done yet (I’m 55% through the tutorial) but you can click around a bit and even create an account (I’m working on adding logins right now). Have a look here: https://fathomless-shelf-36057.herokuapp.com/

Next week: Back to VR interviews and updates to the Rails application

3 Replies to “Compuculture: Rails”

  1. Ethan H. says:

    Awesome progress!
    Thanks for explaining why Ruby is so useful. I wish all programming languages were so user friendly. Hopefully Ruby doesn’t complain about semicolons!
    Heroku is super cool! While working with Flask, I was able to follow a Flask tutorial and deploy a Flask app using Heroku, but haven’t had the chance to explore it that much.
    Your app looks great – keep up the good work!

  2. Charles T. says:

    I’m not a CS guy, and I’m intrigued! Keep your research train chugging on Ruby on Rails!

  3. ashleyb says:

    Sounds like you are making some real progress. Do you find this interesting and could you see doing this in your every day life?

Leave a Reply

X