KEMBAR78
APU RoR Workshop Series #1 - Introduction to Programming | PDF
Introduction to Programming
@jimmynguyc
Ruby on Rails
Workshop Series #1
http://www.techladies.co
TechLadies Bootcamp
• 12-weeks, part time programming bootcamp
• Learn how to code by building products for NGOs
• Designed to help women with near-zero coding
background
• Work in groups of 3
• 33% of graduates found software-related jobs and
internships afterwards
• Open for all nationalities
Other
• TechLadies Tech Talks
• TechLadies Study
• TechLadies Eat
• TechLadies Coding Weekend
• TechLadies Go
Talk to me later if you’re
interested to be part of it :)
http://rubybrigade.my
http://rubyconf.my
Talk to me later if you want
more information :)
Hi Everyone !!
• Jimmy Ngu
• Engineering Team Lead @ RapidRiver Software
• Programmer for 15 years
Hi Mentors !!
Hi Neighbors !!
https://repl.it/languages/ruby
Overview
• What is programming
• Introduction to Terminal
• Ruby programming language
• Write a computer program game
• Your own cloud computer (if we have time)
What is Programming
Computer programming (often shortened to
programming) is a process that leads from an
original formulation of a computing problem to
executable computer programs.
https://en.wikipedia.org/wiki/Computer_programming
Computer programming (often shortened to
programming) is a process that leads from an
original formulation of a computing problem to
executable computer programs.
What is Programming
A process where we
• Define & understand problems
• Decide how to solve the problem step by step
• Writing code in the selected programming
language
Computers are Stupid
• They do not think as humans
• They only do what we tell them to do
FizzBuzz
For each number from 1 to 100, if a number is
divisible by 3, write “Fizz”, whereas if a number is
divisible by 5, write “Buzz”. For all other numbers, just
write the number.
Understanding the Problem
• Number 1 -> write 1
• Number 3 -> write Fizz
• Number 5 -> write Buzz
• Number 15 -> ?
Example program
(Assembler)
Example program (Erlang)
Example Program (Ruby)
Example Program (Ruby)
Terminal
• Terminal is a text-based interface to the operating
system
• Think Windows Explorer / Finder, but in text
• More powerful than GUI, but header to learn
Editor
• A tool which we can edit texts in files
Ruby Language
• Ruby is a programming language, it allows us to
write programs that will be run on computers
• It’s very high-level, it looks a lot like the human
language
Language Syntax
• Computers are stupid
• They can’t understand our words, even very basic
sentence
• Strict sets of vocabulary & syntax
• E.g. if … else (but not if … otherwise)
Programming Syntax
• the arrangement of words and phrases to create
well-formed sentences in a language
Guess the Number
• Program chooses a random number between 0
and 100
• Player tries to guess the number, getting a hint
(“too low” or “too high”)
• Game ends when player guesses the number
15 Minutes Break
Guess the Number v2
• Program tells player how many tries she needed to
guess the number correctly
• Program shows player all the previous tries
Guess the Number v3
• Program asks for player’s name, and remembers
the last result of each player
Resources
https://github.com/TechLadies/workshop-1-materials
Questions?
Thank You

APU RoR Workshop Series #1 - Introduction to Programming