Upload
callum-jones
View
141
Download
0
Tags:
Embed Size (px)
Citation preview
Programming, Ruby, Rails and more
Callum Jones
Programming
The ability to instruct the computer what to do
Instruct the computer how to behave when certain events arise
Why program?• Solve a problem
• Solve other people’s problems
• Get a computer slave away on a laborious task, while you focus on the more important things
• Historically machines have replaced labour intensive jobs
• Perth’s next economy
A programmer
• Isn’t just focused on one skill.
• Employers want to hire programmers, not Rails programmers
• Should understand the depth of the tools they are working with
• Can extend and grow the tools they are working with
A programmer• Works with logic/decisions
• IF is_night_time? DO lights_on ELSE lights_off
• Works with repetition/iteration
• WHILE is_really_dark? DO lights_on ELSE lights_off
• Can talk to other computers and services
• IF bom_perth_sunset? DO lights_on ELSE lights_off
Tools
• Develop code in an editor
• Lightweight: Sublime Text, Notepad++
• Heavy/extensive: RubyMine, Aptana RadRails
• A computer. Any will do
• Cloud9 allows for programming in a browser
Ruby• Ruby is the language powering Rails, we need
appreciate what’s happening underneath and go beyond Rails.
• Developed in the mid 90s by Yukihiro Matsumoto (Matz)
• Built for productivity and for fun
• Reads as it is written (story like)
• Tryruby!
Rails• Rails bring Ruby to the web.
• Developed by David Heinemeier Hansson (DHH) for 37signals. Now 13 core team members.
• We write programs that output stuff that is sent to a web browser
• Our browsers can send stuff back to Rails and we can react
• Rails marries Ruby as a language with good web principles
Websites
• Can’t react to change without a human rewriting it
• Simple
• A restaurant site with with no booking, just a fixed menu.
• Always changing
• Computer programs can react to events and update the website.
• Human input
• Time of day
• The website can be personalised for each user
• facebook.com, News sites, Blogs
Static Dynamic