LUG Villafranca Programming Course
This document gives a brief outline of the programming course organised together with the Linux User Group of Villafranca
, and fundamentals of Ajax
over a ten week period. In twenty intensive hours, students are introduced to the tools and methods used in modern programming practices, and the author's twenty years of experience.
This document is being published on the Internet in parallel with the course. Once the course has finished, it will remain as a tutorial for other fledgling programmers.
This, and the other articles outlined here, are also available as a PDF document (about 2.3 MB).
The course has the following objectives:
Introduce programming in the Ruby language; development environment, simple Ruby exercises.
Advanced programming in the Ruby language; Unit testing in Ruby.
The first lesson entitled
'Welcome' took place on Monday, 14th
The second lesson entitled
The third lesson entitled
The fourth lesson entitled
'Prototype and script.aculo.us' took place on Monday, 4th
The fifth lesson entitled
The sixth lesson entitled
'Ruby Full Immersion' took place on Monday, 18th
The seventh lesson entitled
'Ruby and Ajax' took place on Monday, 25th
The eighth lesson entitled
'Review of Ruby, Overview of Ruby on Rails' took place on Monday, 3rd
The ninth lesson entitled
'Ruby on Rails, Part 1' took place on Monday, 10th
The tenth lesson entitled
'Ruby on Rails, Part 2' took place on Monday, 17th
Many thanks to all the participants.
Good Tools = Good Start
Programming is a difficult task, but fortunately there are many tools available to ease the burden. Whilst it is perfectly possible to write programs using just a text editor and a compiler
, we're now well into the 21st
century, an overwhelming number of tools are available, and there is no reason to make our lives any harder than they already are.
Here then, is the minimal tool list for programming in a specific language:
General Language Agnostic Tools
There is one tool that I use as a professional programmer which I cannot live without – Subversion
, a modern version control system
. Think of it as being a database which can store (historically) each unit of work that you do on your computer. That may sound a little Orwellian
, but in fact you are the one who decides what does and does not get stored in the database. Of course you should backup
the database regularly.
For the course, the use of Subversion is optional, however I will probably make loving references to it on a regular basis.
If you want to learn to use it yourself, download
Subversion for your operating system, get the book
(also available in Italian
), and choose a client GUI such as TortoiseSVN
for windows, or RapidSVN
for Linux and Mac.
We'll be using the Firefox
web browser, together with the Firebug
add-on, which can be directly installed within the browser. However, the IDE we are going to use, Aptana Studio, does this for you so that it can directly connect to Firebug. If you don't want to use Aptana, you can install Firebug from this page
The IDE we'll be using is Aptana Studio Community Edition
. Follow the download instructions
for your operating system – in all cases, you'll only need the Zip files. On-line documentation is also available
, which is also included inside the IDE.
The program requires the Java Runtime Environment
to be installed for your operating system. The Java Runtime Environment
page provides verify buttons to check if you already have Java installed.
Extract the contents of the Zip file in the folder where you want the IDE to be stored – I have a windows platform, so I chose C:\DevTools\Aptana. Then launch the application to complete the installation.
Aptana has an installation forum
, if you have problems installing the software.
Once you've got Aptana up and running, open the Plugins Manager view. From the menu bar select Window then Show view then Other..., click on the Aptana Views folder, select Plugins Manager, and click on OK. If you want to version control your projects, you'll want to install the Subclipse plugin.
This course looks at the fundamentals of Ruby. In order to do this, you will need to install the programs described below on your computer.
We'll continue using Aptana Studio for Ruby development on this course.
Later on in the course, you'll also need Ruby on Rails, SQLite, and Rmagick. So you'll need to install Ruby on Rails
– we're using version 2.0.2. Installing RMagick is explained in this FAQ
, we're using version 2.0.0. Installing SQLite is explained in this How-to
, we're using version SQLite3 1.2.1. Windows users will need both the .exe
versions of SQLite. The Ruby on Rails Wiki page
also gives helpful information for SQLite.
As such, the tools outlined above will give you enough to get started developing Ajax applications, however, you will also need to download the Prototype library
, and the script.aculo.us library
, which we'll be using during this course.
Learn to Program
, by Chris Pine.
The Pragmatic Programmer
, by Andrew Hunt and David Thomas.