Mathew Kleppin
JavaScript Anyone?
A cup of code
Javascript Platform - Node
IDE - Atom
A Better Console - ConEmu
The Best - GitHub
Using a program is a lot like
Programming is a lot like
Write down the steps to make a PBJ
Think like a programmer
1. Take a slice of bread
2. Spread peanut butter
3. Spread jelly
4. Put a slice of bread on top
Being Exact
1. Remove 1 slice of bread from loaf
2. Open jar of 'peanut butter'
3. Insert knife into 'peanut butter'
4. Scoop a knife-full of 'peanut butter' out of jar
5. Press 'peanut butter' side of knife softly onto face of bread
6. Spread 'peanut butter' evenly across slice of bread
7. Repeat steps 2 through 7 for 'jelly', once, on same surface as
peanut butter
8. Remove 1 slice of bread from loaf
9. Place newly removed slice of bread onto face of PBJ Lets code a toaster
Inputs:
Bread
Outputs:
ToastFunction:
When slider pressed down, turn on heat
After:
A certain length of time, pop up toastclass Toaster{
this.bread = false;
this.timer = 10;
this.heat = "off";
constructor(bread){
this.bread = bread;
when("push lever", toast());
}
toast(){
this.heat = "on"
after(this.timer, ejectToast());
}
ejectToast(){
this.heat = "off";
this.bread = false;
}
setTimer(timer){
this.timer = timer;
}
}Why do people program?
It lets us tell a computer what to do...
Please show me directions to the nearest strip club,
Please fold these proteins so I dont get 'insert disease here'
Please create a map of my house so I dont get lostSo that it can solve problems for us.
I want to drive fast in the rain/on snow
I want to recieve 20lbs of cheese puffs the day after I order it online
I want to watch a show on-demand, while taking a crapDifferent types of environments
Desktop Applications
Mobile "Apps"
Car Traction Control, Microwave, Home Theromstat
IMDB, Evernote, Youtube,
Flappybird, WhatsApp
Embeded Systems
Photoshop, Chrome, VLC, Skype, etc
Web Applications
Youtube, Wolfram|Alpha, Netflix, Pandora
Different types of languages
Machine languages
Tedious and error-prone.
Operand Code - addition and subtraction
Operands - identity what (in memory) needs to be processed
High-Level Languages
Abstraction of machine code
Readable by humans
Offers organization and structure
Various different ways of doing the same/similar things
100011 00011 01000 00000 00001 000100
becomes
Take 3 add 17 log result100011 00011 01000 00000 00001 000100Compiled vs Intrepreted
All high level languages must be broken down into machine code.
Compiled means this process takes place BEFORE we run our program.
Intrepreted means this process takes place AS/WHILE we run our code
Compiled
'C/C++' //Most desktop applications/games
'Go' //API Services and Web servers
'Haskell' //Complex Math (Folding@Home)
'Objective-C' //iOS Applications
'Python' //Useful Program Glue(Usually) faster at run time. Can have complex debugging process, takes time to compile.
Interpreted
'JavaScript' //Every website since 2010
'PHP' //Wordpress
'Ruby' //Back-end web servers
'Perl' //Application security
'Lua' //Useful Program GlueNot ideal for doing the same thing N number of times. Easier to bug smash (generally)
Create desktop apps...
C/C++, VisualBasic, JavaScript
Create mobile apps...
Objective-C, Swift, JavaScript
Server-side apps...
PHP, Ruby, Go, JavaScript
Websites & Web apps...
JavaScript, PHP, Ruby, Java
Work with data...
Lua, Haskell, C, JavaScript
Build a robot slave army...
Haskell, C, BASIC, Erlang
The language of the internet (HTML5, CSS3, JavaScript) is
expanding, as most applications are moving into the cloud.
Adobe Creative Cloud,
Google Docs,
Dropbox,
PlayRetroGames.comJavaScript is the easiest language to start learning with since there’s nothing to install or complex “runtime” environments to configure.
It’s just more fun to start immediately crafting your own ideas rather than digging through the “best practices” of previous generations.
From servers built on NodeJS, to mobile HTML5 apps, to website front-ends, JavaScript is used almost everywhere to do anything you could want to do.
Read - You Dont Know JS
Watch - An Intro To JS
Read - An Intro To Programing
By Mathew Kleppin
Enter the world of programming