Prep
- Watch How to begin thinking like a programmer: A lecture by Andy Harris - we will watch a few sections in class for discussion
- Sign up and check out people’s projects on Scratch - we will use this for our first assignment
- Advanced Reading: Javascript Under the Hood
- how javascript works
- history of javascript
CPNT-262 Course High Level Overview
- Objectives:
- to learn fundamentals about computer programming
- to be able to build websites using modern technologies
- to create a foundation for your future in tech
- Client and server programming
- Javascript syntax and patterns
- How to be successful at programming:
- focus on problem solving
- spending enough time practicing to understand concepts
- collaborate with others
- avoid comparing yourself to others
- don’t copy/paste code without understanding how it works
- Scrum Teams
- Scrum Standup Sessions will take place at the beginning of open lab
- You’ll have 1 team for days 1-10 and another for 11-20
- Scrum Standup Sessions shouldn’t last more than 15 minutes
- Answer the following:
- what I did yesterday
- what I’m doing today
- am I blocked by anything
Computational Thinking
Lecture Slides
Key Takeaways
- Words, images, numbers… everything that we see on computers are representations of binary values
- Programming logic can be viewed in flowcharts
- Variables are “buckets” that hold values
- When we think programmatically, we are breaking complex tasks down into small steps and dictating the results at each given step
Flow Charts
Activity: Algorithms in Everyday Life (30 minutes)
Focus: Anything goes! (within a sharable school context)
- Create a flowchart of something that you enjoy doing using the instructions linked below (15 minutes)
- Briefly discuss your findings:
- What activity did you document? What step(s) did you break down into micro steps?
- Walk each other through your steps
- When broken into micro steps, did you underestimate how complex the activity actually was?
Instructions Link
Pseudo Code
- Pseudocode is used to think through the steps of an algorithm
- it exists between the flowcharting and code implementation phases
- normally pseudocode is written in comments in your actual code
- when pseudocoding, you move from how a human thinks to how a computer thinks
- your pseudocode will look like a number of things along this spectrum
- Geeks for Geeks Article
Activity: Program an Intersection
Each scrum team will get a part of the intersection to program. The options are:
- Vehicles
- Traffic lights
- Intersection
- General Rules
Your goal is to figure out and document the following of your section:
- relevant variables (ie: in this example, a passenger is not an important factor)
- control flow logic (are there actions that are repeated? if/else conditional choices to be made? - these need to be mapped out)
- rules that cannot be broken
Presentation
Each team will get a chance to discuss their part of the program, and each member of each team must present a part of the information.
- explain the problems that you identified and needed to solve
- outline variables and their properties
- describe control flow logic
- explain rules, their conditions, and outcomes
- Note that we will be following up with this tomorrow where the different parts of the program will be put together
Brief Introduction to Scratch
Scratch is a visual programming language. While mostly used to teach kids to code, it serves as a brilliant way to familiarize with the fundamental elements of programming. We will do one small assignment using scratch, the objective of this assignment is to build with programming concepts like: variables, conditional logic, iterative logic (aka: loops), and functions
- Scratch Website: signup/login and create from here
- Getting Started Tutorial
Scratch is mostly used to create small video games and animations/short animated movies. But you can do quite a bit with it.
Workflow
this applies to pretty much any programming, but is great to practice with scratch in particular.
- Plan out what your program is going to do (or a part of it if you’ve already broken it down)
- Break the program out into parts and think about what parts are dependant on the others (this will help you decide what to do first)
- Plan the logic for the part that makes sense to start with
- Do one of the following:
- code the logic for that part
- plan out the logic for the other parts
- Do the other task from step 4
- Test, evaluate, document results
- Solve bugs
- Clean up code and repeat
Today's Achievement
Graded Activity 1: Program in Scratch
- Due:: Sunday February 11th
- Weight: 10%
- Objective: Learn about core programming concepts using a visual programming language