Course Introduction
What do your profs look like?
Quibble Question
Why are you taking this course?
Why Computing?
Part of core education for Engineers (and anyone who makes something
these days).
From passive to active! Freedom from apps!
Control over your own scientific instrument.
"Tools" don't always solve your problem!
English is a powerful tool but writing is still hard.
Mathematica solves super-complex
symbolic mathematics problems 'Automagically' but you have to understand
what you want in mathematical terms, and Mathematica's little ways, in order
to get anything significant done.
Programming as Engineering Design
- "Software Engineering" does exist!
-
Constructing large, complex, reliable, updatable, extensible,
understandable, dynamic, data-driven, output-producing, possibly
real-time artifacts is as challenging for software as for hardware
systems (and many artifacts these days have both components).
- Engineering often generates 'Algebra word problems',
leading to questions such as:
- What are the variables, their mathematical relationships?
- What are the appropriate mathematical or physical laws?
How are equations formulated?
- How are they solved?
- In 'Programming' we must address similar questions:
- What are the inputs, the desired outputs, the variables,
and their mathematical relationships?
- What are the appropriate mathematical or physical laws?
- How should we structure the data, and pick an algorithm?
- how can we recognize intractable computational problems?
- How do we map the problem into a computer language and
familiar data structures (e.g. lists, hierarchies of objects)?
- How do we modularize, debug, test, document the resulting programs?
-
Documentation and Scientific Reporting are as fundamental to
programming as any other engineering endeavor.
You'll be doing a lot of it in this course.
Computers at Engineering Frontier
- Designing new architectures: portable, network, hugely parallel,
quantum, DNA...
- Uniting hardware and software, plus swapping traditional h/w and
s/w roles. (e.g. adding intelligence to hardware).
- Computational Science: massive number-crunching.
- Parallel hardware like cluster computing (e.g. UR CRC) mean new and
better languages for parallelism.
- Parallel Graphics Processing Units: in use in ME and
CSC. Programming an issue.
Computers in Daily Engineering Life
- Writing and manipulating simulations
- Creatively analyzing data
- Customizing Visualization
- Analyzing Complex Systems
- Scientific Computing (Computational Science)
Weather --
Sustainability computing
Sub-atomic to Cosmological huge-scale simulations and visualization
Some Course Goals
- To read technical literature for understanding
- To use common resources (e.g. web searches)
- To learn a basic skill: programming
- To use a practical Engg. language: Matlab
- To take on open-ended problems
- To prepare for later courses: Engg. concepts
- To learn experimental and data analysis techniques
- To have fun learning new things
- To become Invincible and hence Fearless.
You and Us (your instructors)
"As a teacher, my goal is for my students not to need me
any more. I knead your brain --- you don't need me."
Jacobus in Devil's Trill, Gerald Elias
- Consider us as coaches, not gas pumps. We don't know all the answers, but
we will do our best to help you find workable ones.
- Don't worry first about the answer: worry first about the question.
- We don't care so much about the answers you got as how you got them.
- You're not learning "tools", you're learning generalizable,
versatile skills.
- It's process, not product. A change in your brain, not marks on
some exam.
- Don't expect to know all about everything already;
even when you find you know some of it.
There are a wide variety of ideas and techniques in 160, so stay flexible
and receptive.
- Develop skill of prioritization of your time and attention:
e.g. we may allude to aspects of a topic "for your delectation",
just hinting at depths you needn't plumb for 160. You can always ask
an intellectual version of "will this be on the final?".
- When you hit a concept, word, phrase, etc. you need to understand,
and our explanations are inadequate, go to the web or a textbook or a
buddy and get so you do understand.
We're always here to help, but we're a limited resource that is being split
120 or so ways, and wouldn't you rather go on a quest than stand in line?
- Your success is in your hands.
- You have to do the reading
- You have to do the thinking
- You have to do the research
- You have to do the work
- We can't pump skills into you. All we can do is kibbitz.
- When in doubt, repeat "I am strong, I am invincible..." (OK that's
new-age garbage, but possibly there is a nugget of truth somewhere there.)
Reading
They call it The Onion because you often don't know whether to
laugh or cry.
Success in this course depends HEAVILY on
reading and understanding sometimes long stuff :
long directions, long tutorials, long assignments, long web pages,
long textbook. Long! long!! long!!!
Some important stuff just doesn't seem to fit in a tweet. Or if it
does, it takes you hours of contemplation to understand its implications
(e.g. F = ma or E = mc2)
If you can't or don't read effectively you will likely have
serious difficulty with this course.
Reading's a bit old school, but it's empowering. Unlike your profs, a book
(and usually the internet) is a friend that's always there.
The Course
- Website: www.cs.rochester.edu/u/brown/160/
- The Text:
Stormy Attaway's Book
- Note Companion Site with Matlab programs from book
(Info on course website).
- Buy and Read the Book -- Many useful features: Quick Questions,
Practice, Summary, Exercises.
- You'll Also Want
- Earpods or earphones or headset.
- Thumb (flash) drive, to keep your programs and data on between classes.
Class Computers
- You've got a computer in front of you. Its supposed to help, by
giving you access to notes, Matlab, course-related information, etc.
It's also dangerous because it could infect you with Facebook, Twitter, or
some worse disease, causing you to miss something important, or turn into
a glassy-eyed, twittering zombie.
We looked into software to protect you, but the technology doesn't exist,
so you will have to do your best to protect yourself.
- We are experimenting with mixing computer interaction into lectures.
We think there is probably some benefit to be had, but we are not yet sure
exactly what form effective augmentation will take.
You are guinea pigs. Bear with us, and give us feedback.
- Don't bring your own computer, thanks.
- The classroom computers are wiped every day, so don't store anything
on them and expect it to last beyond the class period.
Use your thumb drive.
- Don't leave the computers in a mess by moving applications around to
non-standard locations, putting them in unfamiliar states or configurations,
introducing foreign programs, infecting them with worms or viruses,
or anything that might make them difficult for the next student to use.
You are the next student in your next class.
Course Details
- Lecture notes should be considered readings, and some are all
the readings we've got.
- Projects -- Programming and Applications
- Labwork -- w/partner, results and report graded.
- Detailed Grading Rubric
Programming Laboratories
- Sign up!
- Goal: work on assignments in maximally-productive setting.
- Two Hours, Four Timeslots:
Sunday 5-7 PM,
Tuesday 5-7, 7-9 PM,
Thursday 5-7 PM.
- A conflict with all the above times? Please see a professor.
- Compare: Duke has mandatory 3-hour lab.
- Compare: Pilot course (Fall 2010) had no lab: big problems.
- Main chance for individual real-time instruction, tutoring,
advice: huge savings in time and frustration.
- 12 UR-Undergrad Matlab-trained TAs.
Programming Languages
- All 'real' ones are "Universal" or "Turing complete":
equivalent to the same simple
architecture. So none is mathematically more powerful than another.
- Surprisingly simple computers can be Turing complete, including
a programming language with (essentially) one statement: "subtract A from B and
branch if negative". But simplicity isn't convenience! The search
for "convenient" languages continues....
Two Famous, Elegant, Universal but Hard-To-Program Computers:
The Turing Machine
Credits:
1: ideonexus.com. 2: Tom Dunne American Scientist, March-April
2002.
3: gadgets.boingboing.net.
The Game of Life
Game of Life.
Practical Computer Languages
- Compilers -- potentially fast, efficient, types, declarations,
often rigid formalism (e.g. functional, object-oriented).
- Compile-link-execute cycle
- Interpreters -- often (very) slow, inefficient, flexible
(polymorphic), interactive, fewer rules, less syntax
- read-evaluate-print cycle
Textual Programming Examples
Java
--object-oriented, tightly typed, common, compile, link, run:
public class myFirstProgram{
public static void main(String args[]){
System.out.println("Hello world!"); }}
C
-- glorified machine language, very common, compile, link, run:
#include < stdio.h >
main()
{ printf("Hello, world!"); }
Python
-- (object-oriented) and Matlab (no religion) intepreters,
common. No (visible) compile or link -- just type and run:
You Type:
'Hello, world!'
Interpreter Answers:
'Hello, world!'
Graphical Programming Example I: Alice
Alice
-- object-oriented, graphical, pedagogical: drag, drop, run:
Alice
Graphical Programming Example II: LabView
LabView
-- practial engineering tool, graphical: drag, drop, wire, run:
LabView and USB-6009
Symbolic Mathematics Languages
Mathematica, Maple, MatLab Symbolic Toolbox
Symbolic and numeric mathematics, animations, graphics. Very
practical and common. Calls for fewer programming chops, more
mathematical
awareness and maturity. Here's Euler's method at integrating a
simple ODE (we'll do this in 160 in a few weeks).
steps = 200;
dt = 1 = 10; period = 10;
Clear[y];
Y = Array[y, steps + 1, 0];
y[0] = -period / 2 / Pi;
Do[ y[i+ 1] = y[i] + dt Sin[s2 Pi i dt / period],
{i, 0, steps - 1}]
...(four plotting commands)...
Note the "dt Sin..." bit? That's computing the symbolic,
analytical derivative of the Sine (i.e. Cosine) using symbol
ic mathematical computing. This version produces something like
the figure below:
Mathematica
Spreadsheets
Excel
Turing complete, rather array-oriented capabilities, huge stable of
mathematical, statistical, data analysis, graphical functionality.
It's a functional language, in which functions (not objects,
classes, data structures...) are the fundamental building blocks.
Cells hold values or formulae that involve other cells. Excel solves
the constraint satisfaction problem of keeping all cells
consistent.
Very common for engineering data analysis: a contemporary
slide-rule or calculator. Also common format for data transfer.
In our opinion, only worth using for its constraint-satisfaction capabilities.
Taxes and Grading Algorithms: Excel. Everything Else: Matlab.
Learn it yourself or fight it: recommend and stick to Matlab.
Matrix (and everything else) Language
Matlab
An interpreted, C-like programming facility. Used in Engineering
and (for us) in interactive programming with graphics
and a huge library of useful functions, toolboxes, real-time hardware
interfaces, etc. Slow, expensive, seriously
licensed, unprincipled grammar; but lingua franca, powerful, often 'does the
right thing'.
Could easily replace simple use (most of BSEE use)
of Excel and LabView.
Matlab as Calculator
For Next Class
Get the textbook.
Bring it to class.
Start Week 1 Exercises. MATLAB should run at any IT
site on campus. If not Tell Us!
If you don't have a text, improvise: arrange to share with classmate,
use texts on reserve in Carlson, find a different text you like
(library), use our on-line Overheads and Notes for next week, use on-line
tutorials, Matlab help,etc.
A fine exercise: cultivate invincibility! No whingeing!
Last update: 2/21/2001: RN