Professional Documents
Culture Documents
Agenda:
Understandhowcomputersworkandlearnbasiccomputer
programmingconcepts(e.g.,variables,syntaxetc.)
Gainanappreciationofthevariousprogramminglanguagesandstudy
whattheycando.
Developaresourcelistofcomputerprogrammingtutorialsandtools.
Becomeinspiredtolearnprogrammingbasicstohelpyouworksmarter
andmoreefficiently.
Is coding a cryptic visual of typed languages?
Or a process? Or both?
Computerprogramminghasareputationof
beingcrypticandtoocomplexforthe
averageperson;however,whenyouget
familiarwithbasicprogramminglogicyou
willseepatternseverywhere!
What is computer programming?
Asetofcommandsacomputerunderstandslikearecipe.
Computerprogramscanhelpcurediseases;drivecars;createvideo
games;makeanimatedmovies/graphics;buildwebsitesandapps;and
muchmore.
Basiccodingconceptsareusedbymosteveryprogramandmostevery
programmer.
Tolearnmorevisithttp://www.bfoit.org/itp/Programming.html
Why learn to code?
Whynot?
Learntheimportanceofclarity/brevityofexpression.
Beabletothinkandproblemsolvemoreaccurately.
Haveabetterunderstandingofhowtechnologyworks.
Createatoolthatcanmakeyourlifeandmanyothersliveseasier.
Read more at http://goo.gl/Hgy16A
Ithasoftenbeensaidthatapersondoesnotreallyunderstand
somethinguntilheteachesittosomeoneelse.Actuallyaperson
doesnotreallyunderstandsomethinguntilafterteachingittoa
computer,i.e.,expressitasanalgorithm.
apeanutbutterandjellysandwich.
Some great resources to help you
learn to code
.com
Scratchhelpschildrencreatestories,games,animations,andalsoletsthemsharetheseprojectswithothersaroundtheworld.
Moreinfoathttp://scratch.mit.edu/.
www.scratchjr.orgisafreeiPadappthatbringscodingtostudentsasyoungasagefive.
www.kodable.comgiveschildrenopportunitiestoprograminordertosolvepuzzles.http://www.allcancode.comissimilar.
VisitMediumfora2minutereadlistingotherideasandresourcestohelpinspirechildrenandteenstocode.
ThereareseveralMOOCs(MassiveOpenOnlineCourse)andotherfreelyavailableresourcesthatoffercomputerprogramming
classes.Coursera,Udacity,andEdxaregreatexamples.Also,KhanAcademyhassomegreatresourcesforkidsandadultstoo!
SlidecourtesyofBrianPichman
Tons of example code in the Arduino
IDE (Integrated Development
Environment)
Raspberry Pi (Python)
programming
2.
A Few Basic Programming Components
(pretty much regardless of language)
Variables&Arrays
Operators
FlowControl
Functions
SlidecourtesyofBrianPichman
Variables & Arrays
Avariableisabucketthatholdsonepieceofinformation.Avariable
canchangevaluewhen
Specificconditionsaremet
Basedonuserinput
Examples(concept)
$string_myhomelibrary=MontgomeryLibrary;
$numeric_variable=100;
$myname=Brian;
SlidecourtesyofBrianPichman
Variables & Arrays
Anarrayisatypeofvariable(orbucket)thatholdsmanypiecesof
information.
Example(languagedoesntmatterhere;theconceptdoes):
$FavoriteCities=array(Orlando,Boulder,Miami)
$FavoriteCities[0]holdsOrlando
$FavoriteCities[1]holdsBoulder
$States=array(1=>Prime;FL=>Florida,CO=>Colorado)
$States[FL]holdsFlorida
SlidecourtesyofBrianPichman
Operators
Arithmetic
+,-,*,/(add,subtract,multiply,divide)
Assignment
=(assignthevalueof2tothevariablecalledv)
$v=2;
+=(Addthevalueof3tothevariablethatalreadyholds1)
$v+=3;//$anowholds5
SlidecourtesyofBrianPichman
Flow Control - Sequence
Readslikeabook,theinstructionsareexecutedinthesameorder
theywheregiven:
OPENthedoor
WALKinsidetheroom
SITonachair
PICKUPabook
READthebook.
SlidecourtesyofBrianPichman
Flow Control - Choice
IfThen
if(somethingistrue/conditionsaremet){
then dothis
}
IfThenElse
Else:XYZ
StartsthesameasIfThenbutallowsaresultifconditionisfalse
ElseIf
if(somethingistrue/conditionsaremet){
thendothis
}elseif(anothersomethingistrue/conditionsaremet){
thendothisinstead
}
SlidecourtesyofBrianPichman
Flow Control - Continual
Withcontinual,instructionsareexecutedbasedonvariables,commands,
outputs,etcastheyremaintrue
While(orrepeat)
while(somethingistrue){
dosomethinghere
}
for
for(somethingistrue){
dosomethinghere
}
SlidecourtesyofBrianPichman
Flow Control Putting It
Together
1) Sequence
Gotothelibrary
Checkoutabook
Readthebook
Returnthebook
2) Choice
Ifyouhavealibrarycard,youcancheckoutbooks.Otherwiseopenalibrarycardaccount.
3) Repeat
Continuetoreadthebooktilltherearenomorepages.
SlidecourtesyofBrianPichman
Functions
Afunctionistypeofprocedureorroutineandusuallyreturnsavalue.
Aprocedurepreformsanoperation,buttypicallydoesntprovideavalue.
Mostlanguageshavepre-builtorpre-definedfunctionsinitslibrary.
Forinstance,thedeletefunctionmeanstoremove.Youdonthaveto
codewhatremovedoes;onlywhattoremove.
COBOL
COmmon Business Oriented Language.
Developed in 1959.
Typically used for business applications.
SlidecourtesyofBrianPichman
Traditional Programming Languages
(contd.)
BASIC
Beginners All-purpose Symbolic Instruction Code.
Developed at Dartmouth College in mid 1960s.
Developed as a simple language for students to write programs
with which they could interact through terminals.
C
Developed by Bell Laboratories in the early 1970s.
Provides control and efficiency of assembly language
Often used for system programs.
UNIX is written in C.
SlidecourtesyofBrianPichman
Object-Oriented Programming
Languages
C++
It is C language with additional features.
Widely used for developing system and application software.
Graphical user interfaces can be developed easily with visual
programming tools.
Windows Based
JAVA
An object-oriented language similar to C++ that eliminates lots of
C++s problematic features
Allows a web page developer to create programs for applications,
called applets that can be used through a browser.
Objective of JAVA developers is that it be machine, platform and
operating system independent. SlidecourtesyofBrianPichman
Special Programming Languages
Scripting Languages
JavaScript and VBScript
Php and ASP
Perl and Python
Command Languages
sh, csh, bash, cmd
SlidecourtesyofBrianPichman
Special Programming Languages
HTML
HyperText Markup Language.
Used on the Internet and the World Wide Web (WWW).
Web page developer puts brief codes called tags in the page to
indicate how the page should be formatted.
XML
Extensible Markup Language.
A language for defining other languages.
SlidecourtesyofBrianPichman
What do you want to make?
Source: https://www.udemy.com/
Source: https://www.udemy.com/
Source: https://www.udemy.com/
Source: https://www.udemy.com/
Otherwaystolearncoding
See how things on the Web work behind the scenes using
http://getfirebug.com/
SCRATCH Basics
Scratchisaprogramminglanguageforeveryone.Create
interactivestories,games,musicandartandsharethemonline.
.mit.edu
FinchRobot,ca.$100
http://www.finchrobot.com/
Ozobot,ca.$60
http://www.ozobot.com/
LegoWeDo/LegoMindstorms
Spheroca.$130
http://www.sphero.com/
DashandDot,ca.$149
https://www.makewonder.com/
Interact with the real world
using the Tickle App
Learn to program Arduino, drones, robots, connected
toys, and smart home devices, all wirelessly.
https://tickleapp.com
HopscotchApp
https://www.gethopscotch.com/
pinocc.io,ca.$197
http://www.slideshare.net/chadmairn
@cmairn
Want to
Hangout?
gplus.to/chadmairn