1 of 45

Programming Merit Badge

Your Counselor - Shane Kraucyk

Contact Information:

Email - skraucyk@portagescouts.org

Phone - 608-742-4843

Special thanks to Robert Baker for his effort to generate portions of this presentation. His most current content can be found at:

https://github.com/rbaker26/Programming-Merit-Badge

2 of 45

Agenda

  • Expectations
  • What is Programming
  • Safety
  • Programming History
  • General Knowledge
  • Intellectual Property
  • Careers
  • Projects

3 of 45

Expectations

A Scout is…

Trustworthy Loyal

Helpful Friendly

Courteous Kind

Obedient Cheerful

Thrifty Brave

Clean Reverent

4 of 45

Expectations

This Merit Badge is not intended to make you a Programmer. This Merit Badge, like all Merit Badges, is created to show you opportunities available in this field.

If you are struggling, ask for help. I do want you to succeed! But please note, I am not a programmer, I do program, but the languages I know are limited...

5 of 45

Expectations

To Complete this Merit Badge you will…

  • Take some basic notes in the programming workbook to show you were listening.
  • Complete (3) Projects as Outlined in Requirement 5 (Next two sessions will provide time to work on projects)

6 of 45

What is Programming?

  • Programming is the act of inserting instructions into a computer or machine to be followed.

  • There are many different career fields involving the programming of computers; each utilizing different languages, techniques, and systems.

  • We are only going to cover a few of the different aspects of programming during this Merit Badge, but there are so many more.

7 of 45

Safety

Computers are dangerous?

8 of 45

Cyber Chip

Why do you need your Cyber Chip for the Programming Merit Badge?

9 of 45

What Injuries are Possible when Programming?

Eye Strain

Repetitive Stress

  • Headaches
  • Watery Eyes
  • Blurry or Double Vision
  • Sore Neck, Shoulders or Back
  • Light Sensitivity

Electrical Shock

  • Back Pain
  • Neck Pain
  • Muscle and Joint Pain
    • Carpal Tunnel
    • Tendonitis
    • Tennis Elbow
  • Weakness
  • Loss of Feeling

10 of 45

Electrical Shock

Prevention Method

  • Make sure all equipment is in good working order before using.
  • Keep liquids away from electronics.
  • Disconnect from power before servicing.

First Aid

  • Make sure circuit is not live before tending victim.
    • Shut off power source
    • Use non-conducting object to separate victim
  • If victim is not breathing, call 911 for medical assistance.
  • The order of treatment in a life-threatening emergency is A-B-C-D: Airway, Breathing, Circulation, and Defibrillation
    • Open Airway
    • Check for Breathing
    • If No Breathing, begin CPR
    • When defibrillator arrive, turn on the AED and follow the voice prompts.
    • Keep CPR going while the AED is being setup.

11 of 45

Eye Strain

Prevention Method

  • Program in a well lit room.
  • Minimize contrast between the monitor and the rest of the room but make sure there is no glare on the screen.
  • Take eye breaks (look away from the monitor periodically, preferably at something 20’ or more away.

First Aid

  • Eye Strain happens over time and the best cure is prevention. Simply, once you strain your eyes, the path to correction is lifestyle changes...

12 of 45

Repetitive Stress Injuries

Prevention Method

  • Proper Keyboard Height and Position.
  • Ergonomic Keyboard.
  • Good Chair.
  • Ergonomic Body Position.
  • Take breaks.

First Aid

  • Apply Ice Pack to the Injured Area to Reduce Pain and Swelling
  • Use and elastic joint support, or wrap, to limit the swelling and protect the injury. Do not wrap so tightly as to restrict blood circulation.
  • Rest the injured area.
  • Take an anti-inflammatory (as recommended by your Doctor)
  • After 24 hours, heat may be applied.
  • As symptoms diminish, gently exercise the area to help relieve the remaining tenderness, stiffness, and tingling.
  • If pain is severe or persistent, seek medical attention.

13 of 45

Programming History

The first programmer in the world was a woman. Her name was Ada Lovelace and she worked on an analytical engine back in the 1,800’s.

14 of 45

Programming Before Computers

Before the modern electrical computer, mechanical devices used in factories were the first machines to be programmed.

An example is the Joseph Jacquard Loom (1804) which used hole-punched cards to “program” patterns into fabric.

The Loom

The picture above is a portrait of Jacquard woven in silk on a Jacquard loom and required 24,000 punched cards to create (1839)

15 of 45

Programming Before Computers

Charles Babbage in 1823 started work on his Difference Engine. It was programmed using punch cards and could do simple calculations to 31 digits. Do to high costs, it was not built until 1991, well after his death. It weighed 15 tons and was 8 ft tall.

It used human-power to turn the gears and cranks and output the result using wheels with digits painted on.

Fun Fact: The gear technology didn’t exist to build his machine, so Babbage invented new ways of cutting gears. This incidentally advanced machinery and factories during the end industrial revolution (1760-1840).

16 of 45

Programming Before Computers

In 1885, Herman Hollerith designed the “Electric Tabulating System”, a machine designed to take on the 1890’s Census. It was an early Scantron-like machine using punch cards.

The 1880’s Census took 7 years to count, so due to the growing population, the 1890’s and 1900’s Censuses would have taken more than 10 years. This would not be good.

With his machine, the 1890’s Census only took 6 weeks rather than 10 years. This proved computers were a viable solution to many previously impossible problems.

17 of 45

First Computers

What did the first computers look like?

18 of 45

First Computers

A “Computer” used to be a job description, not an electronic machine

Women almost exclusively filled these positions.

Large agencies would have “Computer Rooms” with many ladies doing calculations by hand

A “kilogirl” was a unit of measurement equaling 1000 hours of computing labor

19 of 45

Early Computers

ENIAC – Electronic Numerical Integrator And Computer (1946)

  • First general-purpose computer
    • Used Base-10 instead of Binary (Base-2)
  • They used Vacuum Tubes and Mechanical Switches
  • Used to calculate firing-tables for the military.

UNIVAC – UNIVersal Automatic Computer (1951)

  • First commercial computer
  • Brought computers into the public eye after it correctly predicted the “total-upset, landslide”, 1952 Presidential Election.

ENIAC 1946 – What do you notice about this photo?

20 of 45

Pre-Modern Computers

After Vacuum Tube and Mechanical Switched computers, Integrated Circuits (ICs) allowed computers to get much smaller. Computers went from the Size of buildings to the size of desks.

This also allowed more powerful computers to be built because less space was needed.

This is an Apple 2 motherboard.

All the black chips make the CPU.

Each one is about 1” wide.

21 of 45

Modern Computers

The Microprocessor allowed computers to go from the size of desks to the size of a dime!

Each small square in this picture is a computer!

This allowed use to make computers even more powerful and allow us to use even more powerful language features.

Each “switch” in these chips are 10nm wide

22 of 45

History of Programming

  • What was the first programming language?
    • Binary / Machine Language (ML)
  • Binary / ML is really hard to read, but it can be done.
  • Early computers used switches and cables to accomplish this.
  • It is insanely fast, only limited by hardware speed.
  • All programming languages end up as Binary / ML at some point during execution.

23 of 45

History of Programming

  • Next came Assembly Language (ASM)
  • Slightly easier to read than Binary / ML
  • Still very fast because it maps back to Binary / ML
  • Very few people ‘need’ to program is ASM
  • There is a different Assembly Language for each CPU design, so it is not portable code.
  • Why is portable code good?

24 of 45

History of Programming

Next-Generation Languages came around the 1950’s.

They allowed:

  • Code portability between different systems
  • Easier to write, read and debug code
  • Allowed for new concepts (i.e. functions, classes, objects, OOP)
  • Explored new fields (i.e. science, math, computer science, data science, business)

The first big languages were… (in order of creation)

FORTRAN, LISP, COBOL, BASIC and Pascal

25 of 45

General Knowledge

26 of 45

Programming Now

How many languages do you recognize?

C

SQL

F#

RegEx

C++

MATLAB

R

PL/SQL

Java

Erlang

Go

MIPS

JavaScript

Ada

PowerShell

ColdFusion

HTML

Objective-C

BASH

LaTeX

CSS

Swift

TypeScript

XML

Python

Mathematica

PostScript

JSON

Ruby

C#

CoffeeScript

Ladder Logic

PHP

Visual Basic

Perl

YAML

OpenCL

Rust

x86-Assembly MASM

Batch

27 of 45

Programming Now

Why are the languages grouped into colors?

C

SQL

F#

RegEx

C++

MATLAB

R

PL/SQL

Java

Erlang

Go

MIPS

JavaScript

Ada

PowerShell

ColdFusion

HTML

Objective-C

BASH

LaTeX

CSS

Swift

TypeScript

XML

Python

Mathematica

PostScript

JSON

Ruby

C#

CoffeeScript

Ladder Logic

PHP

Visual Basic

Perl

YAML

OpenCL

Rust

x86-Assembly MASM

Batch

28 of 45

C

SQL

F#

RegEx

C++

MATLAB

R

PL/SQL

Java

Erlang

Go

MIPS

JavaScript

Ada

PowerShell

ColdFusion

HTML

Objective-C

BASH

LaTeX

CSS

Swift

TypeScript

XML

Python

Mathematica

PostScript

JSON

Ruby

C#

CoffeeScript

Ladder Logic

PHP

Visual Basic

Perl

YAML

OpenCL

Rust

x86-Assembly MASM

Batch

The Green Languages are General Programing Languages

The Purple Languages are Scripting Languages

The Red Languages are Markup Languages

The Blue Languages are Declarative Languages

The Orange Languages are Assembly Languages

Different types of languages have different purposes.

It is important to match the type of work to the correct language to insure the best results.

29 of 45

Programming Languages

Here are a few languages and the problems they try to tackle…

C++ General Purpose, High Performance | ex. Game Engines, Desktop Apps (Adobe Photoshop, Chrome)

C – General Purpose, High Performance, Light Weight | ex. Linux OS, macOS, Integrated Circuits, Drivers

Java – General Purpose, Multiplatform | ex. Minecraft, Server Apps, Android Apps

C# – General Purpose, Windows Platform | ex. Unity Games, Server Apps, StackOverflow

Swift – General Purpose, iOS & macOS | ex. most apps for iPhones and macOS (replaced Objective-C)

SQL – Database Communication

JavaScript – General Web Scripting | ex. Interactive webpages, webpages that can run dynamic code

HTML – Webpage Design, Layout and Markup

CSS – Webpage Styling, Coloring, Fonts and Positioning

PHP – Web Server Code | ex. Backend Web Dev., Web Content Management Systems (i.e. WordPress)

TypeScript – Stricter Superset of JS that transpiles into JS |ex. Large JavaScript Apps

XML – Human and Machine readable file format for data sharing between apps

30 of 45

Programming Examples

Notice how different languages can look very different even when they are doing the same task.

Notice also how the bracing ( i.e. “{}”) style is different between languages.

Hello World

C++

#include <iostream>

int main(int argc, char *argv[])

{

char myString[] = “Hello World!”;

std::cout << myString << std::endl;

return 0;

}

Java

class HelloWorld {

private String myString = "Hello World!";

public static void main(String args[]) {

System.out.println(myString);

}

}

31 of 45

Programming Examples

Hello World

C#

using System;

using System.Collections.Generic;

using System.Text;

namespace ConsoleApplication1

{

class HelloWorld

{

String myString = "Hello, world!";

static void Main(string[] args)

{

Console.WriteLine(myString);

}

}

}

X86 Assembly

.486

.model flat, stdcall

.stack 100h

option casemap :none

ExitProcess PROTO Near32 stdcall, dwExitCode:dword

putch PROTO Near32 stdcall, bChar:byte;

.data

strMyString byte "Hello World",0

.code

main PROC

mov ecx, LENGTHOF strMyString

mov esi, OFFSET strMyString

L1:

invoke putch, byte PTR esi

inc esi

loop L1

invoke ExitProcess,0

main ENDP

END main

32 of 45

Programming Examples

Notice how different languages can look very different even when they are doing the same task.

Hello World

JavaScript

myString = "Hello World!";

console.log(myString);

XPython

myString = 'Hello World!'

print(myString)

33 of 45

Programming Language Types

Languages can be split into a three different levels..

High-Level (ex. Python, Ruby, JavaScript, Java, SQL)

C-Level (ex. C, C++, Rust)

Low-Level (x86 Assembly, Machine Language)

34 of 45

Programming Language Types

35 of 45

Programming Language Types

This photo illiterates the difference between compiled and interpreted languages…

Where would you use a compiled languages vs an interpreted language?

36 of 45

Programmed Devices

Our lives are filled with so many programmed devices, you many not even notice…

What are somethings around your house that are programmed?

Smart TVs, Smart Door Bells

Xbox, PlayStation, Wii, Ms. Pacman

Microwave, Wi-Fi Router (these two are the same thing)

Etc..

What language do you think these were programmed in?

37 of 45

Intellectual Property

The most important thing about intellectual property vs. creative expression is that copyright law was created not to stifle creativity but to encourage creativity.

Shepard Fairey

38 of 45

Intellectual Property (IP)

What are the four types of IP?…

  1. Copyright
  2. Patent
  3. Trademark
  4. Trade Secret

What do you think each of these mean?

39 of 45

Intellectual Property (IP)

What is …

  1. Copyright – protects a particular expression of an idea that the author created (i.e. PowerPoints, Game Art, Specific Code)
  2. Patent – protects useful innovative processes or methods, machines, manufactured items, or “compositions of matter” (i.e. a new and revolutionary math algorithm used in an app)
  3. Trademark – protects a word, phrase, symbol or sound that identifies and distinguishes the source of a particular product or service (i.e. Windows Logo, “Your mattress is freeee”, etc.)
  4. Trade Secret – protects valuable information be not disclosing it to anyone, enforced by a contract called a NDA (i.e. what info Facebook collects)

40 of 45

Owning vs. Licensing

Do I own a copy of PowerPoint?

Do I own a copy of Google Chrome?

Do I own a copy of an App I built?

What is the difference between owning and licensing?

  • Owning means you can do what ever you want to the software. Most people do not own software.
  • Licensing is where you “buy or get permission” to use the software, often subscription based.

41 of 45

License Types Explained

Can you tell me what each of these are?

  • Open-Source
  • Closed-Source
  • Freeware
  • Shareware
  • Demo
  • Public Domain

42 of 45

License Types Explained

  • Open-Source – the code is exposed to the public and can be modified or distributed, may be limits or restrictions (doesn’t mean free).
  • Closed-Source – the code is NOT exposed to the public and cannot be edited or distributed (doesn’t mean free).
  • Freeware – 100% free to use, not necessarily free to be modified or distributed.
  • Shareware – free to download and use, but asked for donations (i.e. Ad-Block). Not free to modify or distribute.
  • Demo – A free trial version of the program, may not have all the features enabled. Not free to modify or distribute.
  • Pubic Domain – There is absolutely no ownership such as copyright, trademark, or patent. Software in the public domain can be modified, distributed, or sold even without any attribution by anyone.

43 of 45

Careers

We salute the coders, designers, and programmers already hard at work at their desks, and we encourage every student who can’t decide whether to take that computer science class to give it a try.

Michael Bloomberg

44 of 45

Careers in Programming

What careers in the programming field have you heard of?

  • Computer Scientist
  • Mobile App Developer (dev)
  • Desktop App Dev
  • UI / UX Engineer
  • Software Engineer
  • Game Engine Dev
  • Gameplay Dev
  • Database Engineer
  • Hardware Engineer
  • Computer Engineer
  • Sysadmin
  • Hacker / Pen-Tester
  • Web Dev (frontend and backend)

Find out about (3) programming careers of your choice, research the education, training, and experience required for one of them. Tell me why that career might interest you… (VIDEO GAME DESIGN)

45 of 45

Project

Programming projects can be as simple or extravagant as you wish them to be. Let your creativity shine!