CSC151.01 2007S, Class 02: An Introduction to CSC151 Admin: * Due: HW 1 * I have started to respond to your questions. When appropriate, I've also posted my responses to a Web page. * EC: Thursday, 11 a.m., Johanna Meehan on vocation (or lack thereof). * EC: Thursday, 4:15 p.m., John David Stone on the game of life. * Reading for Wednesday: The DrScheme programming environment. * Attendance Overview: * Lessons from PB and J. * Common parts of an algorithm. * About the course. * Lab. * Some administrative details. /Old Lessons from PB&J/ What might you have learned from this exercise? * Know your data - E.g., we had to know that the jelly jar had a pop-open lid (or might have a pop-open lid) and the direction in which the twisty-tie was oriented. * Be precise - ambiguity leads to doom * Incorrect or vague instructions can lead to infinite computation * Be particularly careful about these instructions * Working in teams often leads to better solutions * It can still be fun when things go wrong * Computers are SENTIENT AND MALICIOUS /New Lessons/ * It's very strange to describe something when the thing you're talking to lacks both basic knowledge and common sense * Know what basic knowledge your audience (the computer) has * If you're not precise, things can be a disaster. * There's more than one way to solve a task. * We may then need to compare different solutions/algorithms. * Algorithms often describe a process or a sequence, * If something goes wrong early, the errors propagate * It is often better to write an algorithm in parts, and test each part in turn. /Alternate Lessons: What we see in many algorithms/ * An algorithm typically takes INPUT and produces an OUTPUT value * We NAME the intermediate values when we write algorithms, and we try to choose good and unambgiuosus names Named values are called "variables" * We SEQUENCE operations in algorithms * Some sequencing is implicit, rather than explicit * We TEST conditions and make different decisions based on those conditions * We REPEAT activities, often until some state is reached * We break complex algorithms into SUBROUTINES * Subroutines can be used in multiple situations * Know and rely on some BASIC OPERATIONS /What is CSC151?/ * A first course in computer science * First course: No prior experience necessary * Computer science: Algorithms * For assigned solutions * We hope for other problems, too * Why should a liberal arts student take 151? * Writing algorithms well requires very different thoguht processes * Small details have overwhelming import * Need to balance small and big pictures * Think carefully about process * How do we help you learn this stuff? * Labs, labs, and more labs * Collaborative * "There's more to life than CS" /Lab/ * Issues: * When the computer refuses to start Firefox/Iceweasel, ask for help. * Obligatory "joke" * If computer science is the study of precise instructions, why don't computer science faculty write labs that are precise, clear, and work for every circumstance?