This book is new. If you'd like to go through it, then join the Learn Code Forum to get help while you attempt it. I'm also looking for feedback on the difficulty of the projects. If you don't like public forums, then email firstname.lastname@example.org to talk privately.
Part IV: Intermediate Projects
In Part III you learned the basics of data structures and algorithms, but more importantly you learned to audit and test code. You didn't audit and test your own code. You just reviewed mine for defects or deficiencies in ways I dictated to you. The goal of Part IV is to now turn that auditing eye on your own code with a set of challenge mode projects. Your job during these next five projects is the following:
- Conduct a 45 minute hacking session to create the project and get going.
- Audit this first hack using what you learned in Part III to find potential defects and problems in your implementation.
- Then procede to clean up and develop your hack into something official for another 45 minutes.
- And audit that 45 minute session to refine it.
The only difference between these 45 minute sessions and your first batch of projects is you don't need to be as strict about the time. The 45 minutes is only a guide to make sure you don't go too long before reviewing your code. There's no point in reviewing code that is stopped in the middle of a good idea or implementation. Obviously code that's half-done isn't going to be reviewed very well. The key is to work for about 45 minutes, and when you hit a stopping point then review what you've done.
During this section you are to refer back to the checklist from Part III and follow it very strictly. It's good to take a 10-15 minute break before you conduct an audit so that you clear your head and can switch into the critical mode of thinking.
As you work on these projects I will suggest algorithms that you can use in the project when they apply. You don't have to use the algorithms you implemented, but you should try, just to see how they work. Chances are they are not better than Python's existing data structures (lists and dicts) as Python's data structures have been highly tuned to be as fast as possible. It's still a good exercise to try to use algorithms so that you learn when to use them and how to check them.
Tracking Your Defects
Finally, you will be asked to track your defect rates. Just as you did when tracking your features complete in Part II, you will track how many defects you find in your audits and what kind of defects they are. Keep a log in your journal of what you find by creating a grid with the defect type across the top and the time of day on the left. You can also just graph the results directly if you want or use a spreadsheet. Your goal with tracking these defects found is to begin to find out what kind of mistakes you frequently make during your programming sessions so that you can attempt to prevent them or simply watch for them in audits.