Upload
sherilyn-bradford
View
220
Download
0
Embed Size (px)
DESCRIPTION
functional view of a computer Inputs Devices CPU Main Memory (RAM) Output Devices Secondary Memory Q: What makes a computer magical ? A: It follows instructions. It can fetch, decode, execute…millions of instructions a second. Groups of instructions are programs.
Citation preview
Wrapping it Wrapping it UpUp
Administrative: Final Projects…A Bit of CS and Programming
What We Didn’t Cover…Evals
Next Tuesday: Six Student Presentations
Next Thursday: Six Student Presentation
Computers are …Computers are …• Computers are not the object of study for CS• “Computers are to computer science as telescopes
are to astronomy,” Edsger Dijkstra, famous CS fellow• CS in interested in what can be computed?• algorithm: a recipe or step-by-step process for
achieving a desired result = design• Test your design = analysis• For complex problems, try experimentation. Try to
make something work…Agile v. Waterfall development
• Design, analysis, experimentation = the core of CS
functional view of a functional view of a computercomputer
Inputs DevicesCPU
Main Memory(RAM)
Output Devices
Secondary Memory
Q: What makes a computer magical ?A: It follows instructions. It can fetch, decode, execute…millions of instructions a second. Groups of instructions are programs.
languagelanguage• Each kind of computer (CPU) has its own machine
language. Machine languages are created by the CPU manufacturer.
• Source code must be compiled or transformed into machine language.
• For example: from Python (source) code to machine language for my clunky Pentium 4 computer at home.
programming programming languageslanguages
• program: a sequence of instructions• Designing a computer to understand human
language is still an unsolved problem, and anyway natural language is ambiguous
• For example: “I saw the man in the park with the my telescope.” What does this sentence mean?
• Programming languages are exact and unambiguous
computer languagescomputer languages
Ex. how to move the Ex. how to move the dragondragon
• What HTML code could you use to move the red dragon across the screen?
• None, use javascript• RDP session: HTML markupCode (structure) v. CSS language(style) v.Javascript
Dragon Javascript Dragon Javascript CodeCode
// JavaScript Documentvar x = -500; //Starting Location – leftvar y = 5; //Starting Location – topvar dest_x = 610; //Ending Location – leftvar dest_y = 375; //Ending Location – topvar interval = 1; //Move 10px every initialization
function moveImage() { //Keep on moving the image till the target is achievedif(x<dest_x) x = x + interval;if(y<dest_y) y = y + interval;
//Move the image to the new location document.getElementById("ufo").style.top = y+'px'; document.getElementById("ufo").style.left = x+'px';
if ((x+interval < dest_x) && (y+interval < dest_y)) { // Keep on calling this function every 100 microseconds// till the target location is reachedwindow.setTimeout('moveImage()',100);
} }
conclusionsconclusions• Programming and code are ubiquitous, used in
everything from movie making to missile guidance
• But most of what you will likely need is web-based and available as add-on modules… a CMS
• You won’t have to build from scratch• When you want to build something for the web,
become fluent with what is out there and the functionality of various components to build your new systems
• Creation, collaboration and conference: Using IT applications and tools, especially desktop video conferencing, screencast, podcast
• Social networking tools for organizations• Security: Dec. 10 National Security Class• Building an android or iPhone app?
• Next year, Your thoughts:• Ideas for integration with other GSPP components?• A GSPP Developers Code Group to do HTML, SQL,
Python and other tech and code projects ?• An IT Speakers Series for the Spring?• …
what we didn’t do in what we didn’t do in classclass
next time:next time:• Dec. 4: Presentations
• Student• Student• Student• Student• Student• Student
• Dec. 6: Presentations• Student• Student• Student• Student• Student• Student