150 likes | 374 Views
The Programming Process. ISAT 252: Programming and Problem Solving. This work is licensed under a Creative Commons Attribution- ShareAlike 3.0 Unported License. Objectives. By the end of this video you should: Have a good idea about how to start new programming projects
E N D
The Programming Process ISAT 252: Programming and Problem Solving This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Objectives • By the end of this video you should: • Have a good idea about how to start new programming projects • Have a sense for the steps typically followed by programmers as they build a new project The Programming Process—ISAT 252: Programming and Problem Solving
The Programming Process • Step 1: Idea Generation • Step 2: Planning • Screen mockups on paper • Flow charts • Pseudocode • Step 3: Documentation • Step 4: Implementation • Step 5: Debugging & Quality Assurance • Step 6: Release & Deploy The Programming Process—ISAT 252: Programming and Problem Solving
Step 1: Idea Generation • What makes for a good idea? • Uniqueness is NOT necessarily important • You care about solving the problem • The scope of the project is feasible (hint: build less) • Example: • My brother-in-law in Japan and I like to talk about cars • It’s not easy for either of us to convert MPG KPL • Solution: a simple program to convert MPG KPL The Programming Process—ISAT 252: Programming and Problem Solving
Step 2: Planning • For GUI programs, start with screen mockups on paper • Why paper? • MUCH faster than using a computer • You don’t get emotionally attached to the design as easily • It’s very easy to crumple up the sheet and start again • Makes it easy to compare alternative designs side-by-side • Example: Mocking up the MPGKPL app on paper The Programming Process—ISAT 252: Programming and Problem Solving
Planning: Paper Mockups The Programming Process—ISAT 252: Programming and Problem Solving
Get MPG Convert MPGto KPL No Ouput KPL Done? Yes Exit Program Planning: Flowcharts and Pseudocode Pseudocode for 'Convert MPG to KPL' Process • Create constants for Liters per Gallon and Kilometers per Mile conversion factors • Make a variable for MPG initialized from the form input • Make a variable for KPL • Perform the calculation and store result in KPL variable Start Program The Programming Process—ISAT 252: Programming and Problem Solving
Step 3: Documentation • One of the most neglected phases of programming! • Why is documentation important? • Forces you to think more clearly write better code • Helps decouple algorithm generation from code generation • Algorithms are in English • Code is in code (frequently not familiar to you) • Not having to think about both at the same time is a huge plus • Allows other to read and follow your code more easily • Especially important for collaborative and/or open-source projects • Allows YOU to read and follow your code more easily • Earn respect from fellow coders and employers The Programming Process—ISAT 252: Programming and Problem Solving
Step 4: Implementation • Coding is alwaysa learning process • Expect to spend about 90% of your time being stuck • Your friends: • Google • Your textbook • Online documentation, e.g. the MSDN Library • Online forums, e.g. Stack Overflow, and Microsoft Forums • Your friends, e.g. classmates, TAs, upperclassmen • Your instructor The Programming Process—ISAT 252: Programming and Problem Solving
Step 5: Debugging & Quality Assurance • Use and test your application • Figure out what’s likely to go wrong • Check the accuracy of calculations/output by hand • Work to make your application bulletproof The Programming Process—ISAT 252: Programming and Problem Solving
Step 6: Release & Deploy • Convert your application into an installable package so others can use it • Distribute it The Programming Process—ISAT 252: Programming and Problem Solving
Summary • Step 1: Idea Generation • Step 2: Planning • Screen mockups on paper • Flow charts • Pseudocode • Step 3: Documentation • Step 4: Implementation • Step 5: Debugging & Quality Assurance • Step 6: Release & Deploy The Programming Process—ISAT 252: Programming and Problem Solving