Programming Merit Badge

Programming?

Programming!

So what is programming, anyway?

program (v): provide a computer or other machine with coded instructions for the automatic performance of a particular task.

computer (n): a device that can be instructed to carry out arithmetic or logical operations automatically.

Computers have been around for a long time.

Ankythera Mechanism
Greece - ~200 BC

Found pieces in a shipwreck, we’re pretty sure it was basically a calendar with eclipse-predicting abilities.

Jacquard Loom

France - 1801

Feed in punch cards, get woven cloth out

Analytical Engine

England - Designed in 1837

Difference Engine

England - Designed in 1822

Charles Babbage, followed basic structure of modern computers, neither was actually completed due to the cost of manufacturing

Telegraph

1830’s

First practical long-distance electronic communication, introduced binary encoding, relays, ...

Electronic Relay

1835

Switch triggered by another electrical signal - allows amplification, put a bunch together and you can start doing logic-y stuff

Tabulating Machine

New York - 1890

Results of 1880 census took nearly 10 years to figure up. Herman Hollerith came up with a machine to count & do math with punch cards. An army of these things helped do the 1890 census in about a year. This was also 1/3rd of the company that became IBM, along with a timeclock manufacturer & a scale manufacturer.

Vacuum Tubes

England - 1904

Mostly replaced relays - cheaper & faster, but fragile.

Colossus

England - 1933

Bombe

England - 1939

Both developed to help crack Nazi encryption during WWII. Bombes were run with gears, Colossus was the first purely electronic computer.

ENIAC

Pennsylvania - 1946

First fully electronic computer built in the US. Programmed with a mess of switches & patch cables. Developed to calculate missile trajectories.

Transistors

New York - 1947

Replaced vacuum tubes - way smaller, more reliable, cheaper.

Integrated Circuits

Texas - 1958

Bundle a bunch of transistors together that perform a certain task - or several.

Microprocessors

California (and lots of other places) - 1971

Microprocessors are very flexible/general purpose ICs. Typically have some sort of storage, input, output, and a clock.

All of this research & invention also caused a lot of legal issues.

All of this research & invention also caused a lot of legal issues.

Can anyone really “own” basic math & logic?

All of this research & invention also caused a lot of legal issues.

Where’s the line between creation and discovery?

All of this research & invention also caused a lot of legal issues.

What happens when I quit my job & take the new tech I’ve been developing with me?

All of this research & invention also caused a lot of legal issues.

Do I own my ideas or does my employer?

Fortunately, the legal system already had some tools in place to answer these questions.

patent (n): a government authority or license conferring a right or title for a set period, especially the sole right to exclude others from making, using, or selling an invention.

AKA government protection to ensure that other people can’t steal your product designs & profit off of them

copyright (n): the exclusive legal right, given to an originator or an assignee to print, publish, perform, film, or record literary, artistic, or musical material, and to authorize others to do the same.

AKA government protection to ensure that other people can’t steal your ideas & profit off of them

trademark (n): a symbol, word, or words legally registered or established by use as representing a company or product.

AKA government protection to ensure that other people can’t steal your name or brand & profit off of it

Fortunately, the legal system already

had some tools in place to answer

these questions.

These tools are still evolving to catch up with technology.

Software can be patented.

Software can be patented.

This can be somewhat controversial.

Apple tried to/has patented things around the “app store”, “patent trolls” & super-generic patents

Some people & companies decide to release open source programs.

Distribute the code, people can hack on it, redistribute their changes or contribute them back to the source

Programming-Related Injuries???

Programming-Related Injuries

Carpal Tunnel

Eyestrain

Programming-Related Injuries

Carpal Tunnel

Eyestrain

In order to start programming, we need to find a language that both people & computers can understand.

Early programmable computers only understood their native machine code - sequences of numbers that told the computer what to do.

All programs eventually need to get turned into machine code by being compiled or interpreted.

Compiled = compile once, get an executable out. Interpreted = do the translating on the fly when the program runs

Assembly is a slight simplification over machine code - instead of having to remember that a 4 means “add these numbers together”, we can just remember “ADD”.

C is a popular language invented in the 70’s. It has a lot of nice things & is much easier to read & write compared to Assembly. C is still widely used today, and many languages have been inspired by C.

FORTRAN is regarded as the first “high level” language - a language that takes care of a lot of the technical details. FORTRAN isn’t used much in new projects today, but lots of big businesses still rely on old FORTRAN systems to do lots of important things.

LISP is a very different way of thinking about programming based entirely around functions. It’s pretty popular in certain scientific fields & artificial intelligence work.

Smalltalk introduced the idea of objects, which make it easier to organize & think about large programs.

C++ brought objects & some other handy features to C in the early 1980’s.

Java pioneered the idea of compiling programs to a form that later gets interpreted by another program.

Python is a high-level language used a lot in the science & engineering community.

Ruby is another high-level language used mostly in web development.

Javascript is used on web pages to make them interactive.

Scratch is a drag-n-drop programming language that makes it easy to learn how to program.

Let’s go write some code!

ProgrammingMeritBadge - Google Slides