Programming basics – UOHack - Rob Denton



Programming basics – UOHack - Rob Denton

0 0


programming-basics


On Github uohack / programming-basics

Programming basics

UOHack - Rob Denton

What is code?

(5 minutes)

Data types (and variables)

(15 minutes)

Conditionals

(5 minutes)

Loops

(5 minutes)

Example

(20 minutes)

Wrap up

(5 minutes)

Welcome to UOHack

- With thanks to Ivar Vong - About two hours, bring projects - 6-8 on Tuesdays

What is code?

- Code is simply speaking a language that a computer can under - Some computers are bigger than others - Some computers simply host files for serving on the web, these are typically called servers - Servers host documents - When you go to a website you're downloading those files to your machine and they are rendered as a website - Although there are *A LOT* of different types of documents that can serve a web page, there are three main building blocks that we'll discuss tonight: HTML, CSS, JavaScript

HTML

(HyperText Markup Language) - .html extension - index.html - Moving into example...

CSS

(Cascading Style Sheets) - .css extension - This is the design (need something to design) - HTML and CSS work together, just like and architect and interior designer - Do website trick and move into example...

JavaScript

(Has nothing to do with Java) - .js extension - This is the functionality (provides some interaction) - In the house metaphor, this is the the light switch, water facet, garbage disposal. - Generally, JS requires some sort of input to do something. Other times, it just manipulates the page to do something.Like make this a slideshow instead of a web page. - JS can get extremely complicated so I'm just going to breeze over it here. - Show slideshow no-js example: uohack.com/web-basics/no-js/

Wrap up

- You can see HTML, CSS, JS work closely together - If you look on a server, you'll see a bunch of folders with these documents in there. Most sites have a folder structure with HTML documents and only one CSS and JS document. This is so that those files aren't repeated in every folder, making changing styles super hard. - (Look at example directory) - On major websites there may be hundreds of documents called for a single page (Daily Emerald has 140) - Of course, simple is always better - Your first website should have one or two documents (HTML and CSS) - Work your way up from there, take your time, get good at Googling, practice and most importantly NEVER STOP LEARNING

Questions?

Hit me up anytime@robertrdenton

Programming basics UOHack - Rob Denton