Learn to code in Railsburger, with extra pickles
On the convergence of web frameworks and WYSIWYG editors, and what it often means to "learn to code"
You're at a coffee shop with a friend. At some point in the conversation, your friend tells you, "I'm learning to build."
"Build what?", you'd ask. "Build houses? Build up your self-confidence?". "I'm learning to build." is not an independent clause. Nor is "I'm learning to code".
#### What you type is what you get
This website is built on Ruby on Rails. The premise, and promise, of Ruby on Rails is "convention over configuration", which means that as long as you call stuff by the right name in your app, the framework will do most of the heavy lifting for you.
For example, to add pagination to this website, I did the following:
- Added gem 'will_paginate' to what's known as a Gemfile.
This is the coding equivalent to placing an order for a hamburger in a restaurant. - Typed bundle install into the Terminal
This is like getting the hamburger getting delivered to your table. You have no idea where the meat came from or how the hamburger was made. - Typed self.per\_page = 8 into one file and paginate(page: params[:page],:order => 'created\_at desc') into another
This is like arranging the toppings on your burger (e.g., lettuce, tomato, ketchup). Changing the "8" to a "9" would be like adding an extra pickle slice. - Typed <%= will\_paginate %> into another file
This is like eating the hamburger. Because at this point, pagination was already working.
If you're not familiar with web development, that code will seem pretty opaque to you. But really it won't take long to learn. Ruby on Rails is getting to be so beginner-friendly that, for simple stuff, you can barely call it coding. Whereas Squarespace has end users click buttons to make things show up on a website, Rails has end users type stuff in. In other words, if Squarespace is a WYSIWYG "What You See is What You Get" editor, Ruby on Rails is practically WYTIWYG: "What You Type is What you Get".
#### What it means to "learn to code"
Designers often learn CSS so they can implement the work they did in Photoshop. SEO experts learn HTML in order to help with website optimization. Analysts learn SQL in order to run data queries. All these things are code, and just because you know or don't know how to do all three of them doesn't define whether or not you're a "coder".
A little code can go a long way. Heck, if you're reading this post a few months after it was written, just a tiny bit of code got you to the second page of this blog.
¯\_(ツ)_/¯