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:
Agenda
Expectations
A Scout is…
Trustworthy Loyal
Helpful Friendly
Courteous Kind
Obedient Cheerful
Thrifty Brave
Clean Reverent
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...
Expectations
To Complete this Merit Badge you will…
What is Programming?
Safety
Computers are dangerous?
Cyber Chip
Why do you need your Cyber Chip for the Programming Merit Badge?
What Injuries are Possible when Programming?
Eye Strain
Repetitive Stress
Electrical Shock
Electrical Shock
Prevention Method
First Aid
Eye Strain
Prevention Method
First Aid
Repetitive Stress Injuries
Prevention Method
First Aid
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.
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)
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).
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.
First Computers
What did the first computers look like?
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
Early Computers
ENIAC – Electronic Numerical Integrator And Computer (1946)
UNIVAC – UNIVersal Automatic Computer (1951)
ENIAC 1946 – What do you notice about this photo?
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.
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
History of Programming
History of Programming
History of Programming
Next-Generation Languages came around the 1950’s.
They allowed:
The first big languages were… (in order of creation)
FORTRAN, LISP, COBOL, BASIC and Pascal
General Knowledge
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 |
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 |
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.
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
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);
}
}
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
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)
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)
Programming Language Types
Programming Language Types
This photo illiterates the difference between compiled and interpreted languages…
Where would you use a compiled languages vs an interpreted language?
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?
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
Intellectual Property (IP)
What are the four types of IP?…
What do you think each of these mean?
Intellectual Property (IP)
What is …
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?
License Types Explained
Can you tell me what each of these are?
License Types Explained
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
Careers in Programming
What careers in the programming field have you heard of?
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)
Project
Programming projects can be as simple or extravagant as you wish them to be. Let your creativity shine!