Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc
 
Ruby - the second rung of learning the language

When you're learning a programming language - or to program - your text / tutor will almost inevitably start with "Hello World" - a program to display a string of text. That's chosen as the first example as it shows you how to enter and store you program, it shows you any steps necessary to convert it to a runnable program (e.g. C, C++ or Java compilers and/or loaders), and it shows you how to run it. At Well House Consultants, we do "Hello World" too - it's sensible.

But then ... very often you're raced by your course or your tutor from the first rung of the ladder to the tenth, and you had better keep up. For some people, learning on a course at college with a lecture on the language once a week and plenty of time to study in between, this works well. For an intensive course, a book where you have to be self-motivating, or for employees of a company with limited time between lesseons, such a leap is a recipe to get lost very quicky indeed! And alas it doesn't even work all that well for university training, if the shocking drop-out rate is examined.

So we move on from "Hello World" to lots of basics - even for delegates who are experienced in other languages - building up to little read / calculate / write examples, looking at simple conditionals and loops and getting an idea of the feeling and the metrics of the language. And we write the examples in front of the delegates, so that our delegates are shown not only what a program does, but also our mindset as to how we decided to write it that way. The results are available on our website - not necessarily the best of programs, but they do illustrate the basic concepts and some of the "gotcha"s.

As I'm starting the new year with Ruby, I've been through some of our very early Ruby examples this morning, and added sample outputs to our web site from running these programs - including the error messages that you'll get from erroneous programs. One of the big pluses of learning with a tutor / from us is that we'll teach you how to read error messages properly and sort out syntax issues quickly rather than staing at them for hours over (perhaps) a missing quote!

Our Introduction to Ruby module currently has six simple examples - from an extended 'Hell World' through Prompt, read, calculate, write demo.

Moving on to Basic Ruby Language Elements, you can see examples of simple string formatting, various print alternatives, and simple calculations ... as well as some "gotcha" examples such as multiplication replicating a string and rounding error issues on floats.

Ruby is an Object Oriented language, and very early on the course we have a module that introduced Ruby Objects. Please link to the module to see all the examples - or look [here] for one of the example to start you off - and you'll find links to other examples there.

If you want to learn Ruby with us, take a look at our course schedule or public courses. Or if there's a group of you all wanting to learn Ruby at the same time, please check for a private course; typically, such courses are tuned for your organisation's needs, and are more cost effective if you have four or more delegates. It's such a course I'm staring the new year with, and indeed my schedule's looking rather busy with such private group course for the next couple of months. That's unusual after the Christmas break as it's the one time of year that people don't plan ahead. Looks like our formula's working better than ever, and that 2015 will be a busy year!
(written 2014-12-28, updated 2014-12-30)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
R101 - Ruby - Introduction
  [4498] Ruby - where one statement ends and the next begins - (2015-05-26)
  [2607] Answers on Ruby on Rails - (2010-01-30)
  [2287] Learning to program in Ruby - examples of the programming basics - (2009-07-15)
  [2286] New to programming? It is natural (but needless) for you to be nervous - (2009-07-14)
  [1887] Ruby Programming Course - Saturday and Sunday - (2008-11-16)
  [1375] Python v Ruby - (2007-10-02)
  [1302] Ruby, Ruby, Ruby. Rails, Rails, Rails. - (2007-08-13)
  [1041] Learnt in London - Ruby, Martini, Coral and the Core - (2007-01-17)
  [1027] Cue the music, I'm happy. - (2007-01-09)
  [664] Ruby course - oops - it's not happening - (2006-04-01)
  [550] 2006 - Making business a pleasure - (2006-01-01)

R102 - Hello Ruby Objects
  [4673] Separating detailed data code from the main application - Ruby example - (2016-05-16)
  [4581] Thin application, thick objects - keep you main code simple. Example in Ruby - (2015-11-21)
  [4580] Easy example - data record to object and object to data record mapping in Ruby - (2015-11-21)
  [4009] Clear, concise examples - Ruby classes and objects. - (2013-02-17)
  [2603] Ruby objects - a primer - (2010-01-29)

R103 - Basic Ruby Language Elements
  [4504] Where does Ruby load modules from, and how to load from current directory - (2015-06-03)
  [4324] Learning to program - variables and constants - (2014-11-22)
  [3917] BODMAS - the order a computer evaluates arithmetic expressions - (2012-11-09)
  [3758] Ruby - standard operators are overloaded. Perl - they are not - (2012-06-09)
  [3430] Sigils - the characters on the start of variable names in Perl, Ruby and Fortran - (2011-09-10)
  [3278] Do I need to initialise variables - programming in C, C++, Perl, PHP, Python, Ruby or Java. - (2011-05-05)
  [2617] Comparing floating point numbers - a word of caution and a solution - (2010-02-01)
  [2613] Constants in Ruby - (2010-02-01)
  [2296] Variable scope - what is it, and how does it Ruby? - (2009-07-18)
  [986] puts - opposite of chomp in Ruby - (2006-12-15)


Back to
Shuffling a list - Ruby and Python
Previous and next
or
Horse's mouth home
Forward to
Conditionals, loops and methods in Ruby - a primer with simple examples
Some other Articles
A long and disappointing evening
Template / design pattern for C++ constructor and accessors
Why are people using the TransWilts?
Conditionals, loops and methods in Ruby - a primer with simple examples
Ruby - the second rung of learning the language
Shuffling a list - Ruby and Python
A year of rail memories!
Changing what operators do on objects - a comparison across different programming languages
The changing face of Christmas
Christmas day in Melksham
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2019: 404 The Spa • Melksham, Wiltshire • United Kingdom • SN12 6QL
PH: 01225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/4369_Rub ... guage.html • PAGE BUILT: Sat May 27 16:49:10 2017 • BUILD SYSTEM: WomanWithCat