Jump To Content

RORB 1. Knowing your Tools

Ruby is a Programming Langauge

Ruby is an computer language to control the behavior of machines.

If that doesn’t make sense maybe this scenario will.

Real World Scenario

If you had a giant robot that would destroy the world, you’d need someway to give it instructions on how to reek havoc. Otherwise your plan would just suck. Just like your Computer your Robot talks in Zeros and Ones. It would take forever to get it do anything if you had to shout a billion numbers. So instead of saying 1010101010101001010101010101000010111010101010101010100101010110101… you tell it:


things_to_destroy = ['buildings', 'cats', 'granola crunchers']

for thing in things_to_destroy do
  Robot.destroy(:all) thing
end

Every programming language is different, but ruby is one of the simplest and human readable. Ruby is great for beginners and pros. Most of all its really fun.

RubyGems are extra addons to the Langauge

Once you get to using ruby you here about gems. A gem is a group of code that serves a specific purpose. The idea is use can add gems to your ruby code and start using something that would have taken ages for you to code yourself. Its saves you time.

Real World Scenario

I’m a big CEO and I work at a fancy company that makes watches. I think it be a good idea to create a ruby program that will connect to my myspace page and show the companies flag-ship product. I’ve heard of a guy who already has ruby code that will connect my ruby app to my myspace and he made it into a gem. So all I got to do is download it and start using it.

So I download the gem using Terminal

gem install myspace-page

Then I go ahead and add it to my ruby app

include 'myspace-page'

if MySpace.connect.login?('CEO Carl Washington Jr','clubsoda')
 MySpace.add_to_page("Thunder Proof Wrist NGX Watch")
end 

There’s gems from everything. Its saves you time programming, and why reinvent the wheel if someone already got it right?

Rails is a Framework

Rails is a bunch of ruby code that works together to make the job of building web apps quickly and painlessly. Rails is actually a bunch of ruby gems. You could use parts of rails to build different kinds of ruby apps that aren’t for web.

MySQL is a Database. Its where you keep your information

You’ll need a place to store the information for your web app such as users, passwords, profiles and other things. A database can be though of as bunch of different tables or spreadsheets with powerful sorting and searching abilities. Databases have their own language to grab information called SQL. The database will be using is called MySQL.

A TextEditor is a Software where we write our code

All coding takes place in a text editor. Every computer comes with one. If your own Windows its called Notepad. If your own a Mac its TextEdit. You’ll want to look at getting something better because they’re very limited.

- Windows Mac
preinstalled Notepad TextEdit
free online Notepad++ BBedit
worth buying E-Text Editor TextMate

Terminal or CommandLine is a Software to use on your Computer just using text

Back in the day computers had no pretty windows, colours or a mouse. All you got with a black screen with a place to type text. You can still do this on your new computers. It just hides in a program called Terminal for Mac or Command Line for windows. With these programs you will learn more about your computer and have more control.

Photo 976

Server is a Software that makes web-sites work. It can also be Hardware

This is the really important and most complicated part. The server is the software that will tell the Internet or other computers that you got a web app on your computer and they can visit it. There are different kinds of server. Also the computer that is only intended to be used to run server software is called a server. It’s a complicated thing to grasp and it can be challenging for people who have a good chuck of experience. Just be patience when you start learning this stuff.

  • Your comment will be modifiable for 10 minutes after posted.

Page Author

Avatar
Andrew Brown
Name
Andrew Brown

From Here You Can…

Information

Most Recent Related Content

Published In…

This work is public domain.