![]() |
|
A beginners guide to Ruby, Part 1 - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: A beginners guide to Ruby, Part 1 (/Thread-A-beginners-guide-to-Ruby-Part-1) |
A beginners guide to Ruby, Part 1 - Inori - 03-31-2015 Nightc||ed's Beginner Ruby Guide Introduction Ruby is a cross-platform interpreted language which has many features in common with other ‘scripting’ languages such as Perl and Python. It has an ‘English language’ style syntax which looks somewhat Pascal-like at first sight. It is thoroughly object oriented, and has a good deal in common with the greatgranddaddy of ‘pure’ OO languages, Smalltalk. It has been said that the languages which most influenced the development of Ruby were: Perl, Smalltalk, Eiffel, Ada and Lisp. The Ruby language was created by Yukihiro Matsumoto (commonly known as ‘Matz’) and it was first released in 1995. - Book Of Ruby; © Huw Collingbourne That's the textbook definition of the Ruby language, covering basic language relationship, history and syntax. Some things to note As mentioned in the introduction, I highly recommend learning Ruby if you already know Perl or Python as it's basically a cleaner python. Spoiler: Example
Ruby: Code: puts "This."
sleepPython: Code: print("As compared to this.")
wait = input()Perl: Code: print "Or this.\n";
sleep;Terminology Ruby terminology is pretty easy to understand but I'll drop this here for later use in the tutorial (Would be a lot more convenient if we had the table plugin, @Onion) [spoiler=A-F] Argument An argument to a method is a named variable in the method's definition, or an object passed to a method when called. Array An ordered collection values, often assigned to a variable. in Ruby, the array takes the place of all ordered collections. They act as arrays, lists, stacks, queues, etc... Benchmark An evaluation of how fast computer software can run. Boolean An expression that outputs either True or False Data Structure A way of storing data in memory for later use Define "Define" is used to express how and when variables, classes and methods are first available for use. DRY Don't Repeat Yourself. [/spoiler] [spoiler=G-L] GUI Graphic User Interface Hash A named collection of key/value pairs I/O Input / Output Iterate "Visit" each element in a collection. [/spoiler] [spoiler=M-R] Method A function associated with a class or object. Object An 'object' refers to an instance of a class Ruby on Rails (RoR) MVC framework for web applications [/spoiler] [spoiler=S-Z] Statement A stand-alone piece of code. String Text Syntax "Grammatical" rules of a programming language. [/spoiler] CodeCademy Ruby Glossary The Hello World Code: puts "Hello, world!"
sleepHope you guys enjoyed part one of the series. Like for more! -Nigthc||ed RE: A beginners guide to Ruby, Part 1 - Master - 03-31-2015 This is a good tut. Good job buddy!! Thank you for contributing. I asked for a table plugin a while ago, seem @Oni is too busy. |