60 likes | 186 Views
This lecture explores the foundational concepts of programming through a structured roadmap. It emphasizes the importance of mathematical models, such as graphs and trees, in simplifying complex problems. The discussion includes informal algorithm sketches, abstract data types, and the transition from pseudocode to executable code. Key criteria for successful programming—ease of understanding, efficient resource use, and adherence to the KISS principle (Keep It Simple, Stupid)—are highlighted. Learn how to write effective algorithms and code that works right and fast.
E N D
Introduction Roadmap to Programming work, right, fast KISS CS 303 – Introducton Lecture 2
A Roadmap to Programming (0) Mathematical Model (Graph, Tree, Set, List, ...) Strips away unimportant details may show that this problem is just like some other problem (already solved? known to be hard? Informal Algorithm Sketch of a program; overall control structure Operates on Mathematical Model CS 303 – Introducton Lecture 2
A Roadmap to Programming (1) Abstract Data Types Mathematical Model Operations from Informal Algorithm Pseudo-Code Almost compiles No resource allocation To be read by humans! CS 303 – Introducton Lecture 2
A Roadmap to Programming (2) Data Structures Representation details Resource (storage) allocation Code Compiles! Executes! CS 303 – Introducton Lecture 2
Criteria • Easy to: • Understand • Code • Debug • Efficient use of Resources • User • Programmer • Computer CS 303 – Introducton Lecture 2
Method - KISS • KISS – Keep It Simple, Stupid! • Make it: • Work • Compiles, Executes • Right • Gets the right answer • Fast • Input (size, conditioning) • Algorithm Complexity • Speed of hardware • Quality of coding CS 303 – Introducton Lecture 2