Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Upcoming Ruby courses ... Learning to program in Ruby
Ruby programming
Introduction to Ruby on Rails

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Ruby module R103
Basic Ruby Language Elements
Exercises, examples and other material relating to training module R103. This topic is presented on public courses Learning to program in Ruby, Ruby Programming

Background
Ruby hasn't re-invented everything - it's taken the good basics from variables through "Bodmas" to statement structure and commenting from best practise elsewhere.
Articles and tips on this subjectupdated
3430Sigils - the characters on the start of variable names in Perl, Ruby and Fortran
A sigil (from Latin sigillum "seal") is a symbol created for a specific magical purpose. A sigil is usually made up of a complex combination of several specific symbols or geometric figures, each with a specific meaning or intent. In computer programming, a sigil is a special symbol attached to a variable ...
2011-09-10
 
3278Do I need to initialise variables - programming in C, C++, Perl, PHP, Python, Ruby or Java.
Starting with a clean slate. Are variables initisialised, and if so, how? Even with this fundamental question, languages vary considerably. C and C++ From my (e)mailbag ... """In a piece of code we’ve written we declare an array, but we do not fill the elements with values, we assume (dangerous ...
2011-05-05
 
2617Comparing floating point numbers - a word of caution and a solution
"Think of a number between 5 and 15. Double it. Add fourteen. Halve it. Take away the number you first thought of. Is the result 7?" We all played games like that as children, thinking of the number 0 ourselves so that we could do an easy calculation and impress our friends. And the result was 7 ... ...
2010-02-02
 
2613Constants in Ruby
If you want to have a read only variable in Ruby, start its name with a capital letter (and you may like to go with a convention of using capitals right through the variable name). Note that a Ruby constant - a name starting with a capital - hasa global scope, just like a variable name that starts with ...
2010-02-01
(short)
2296Variable scope - what is it, and how does it Ruby?
Variables have different "scopes" - in other words, a name that is allocated to a piece of computer memory and subsequently used to refer to that memory may be 'know about" to your program only within a very small area, or much more widely. It's the same IRL ("In Real Life") - consider you, Dad, Graham ...
2009-07-19
 
2287Learning to program in Ruby - examples of the programming basics
We so often overlook the basics of programming, and yet they are so fundamental to good code - understanding things like how widely variables can be seen (also known as variable scope), what happens when you divide two numbers (do you get a decimal result or is the remainder thrown away), and how do ...
2009-07-15
 
986puts - opposite of chomp in Ruby
In Ruby, the chomp method removes the last character of a string if it's a line separator. The puts method adds a new line character on to the output unless there's one already present. In Perl and other languages, a great deal of time and mental agility is expended in remembering where there are (and ...
2006-12-15
(short)
Examples from our training material
bw.rb   Formatting strings and conversions
calc.rb   Some early gotchas!
calcbetter.rb   A simple calculation in Ruby
d2.4   Easier output formatting in double quoted strings
d2.5   Calculations within double quotes
floater   Floating point rounding errors
muck   Common Ruby Pitfalls
print.rb   Print alternatives
rub1   FAILS to continue a line
x01   Constants in Ruby
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
Structure of statements and comments.
Variables and constants.
Operators.
Assignments, calculations, etc.
Integer, float and string formats.
Single and double quotes, here documents, general strings.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.


You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2012: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/R103.html • PAGE BUILT: Sat Jan 28 06:41:11 2012 • BUILD SYSTEM: wizard