# Objectives In completing this project, I have two primary goals: * Finish as fast as possible (while meeting all requirements) * Document what I learn such that I will complete future projects faster than this one # Principles ## Preparation - Measure twice, cut once Writing actual code is the most labor-intensive & challenging part of the project. It's far better to work out all the potential kinks and issues at highest level of abstraction first. Before writing a single line of code, I will go through a systematic process of breaking down the project requirements until I know exactly what code to write, before I write it. This will significantly speed up my work, because it will eliminate many unnecessary bugs and costly refactoring I didn't anticipate. ## Execution - Test repeatedly To ensure I don't build complicated bugs into my code, I will repeatedly test every step, to ensure my code works, before moving on to more advanced steps. ## Execution - Document all code I will thoroughly document my code as I go, so if I have to pause and return to it later, I can quickly get up to speed again. This step also includes writing clear and explicit functions that are optimized for readability. ## Cleanup - Compile quickstart guide for future reference As I go, I will compile a quickstart document that includes all the code snippets and instructions necesssary to quickly build all the standard sections of the app (e.g. setting up Cloud9, setting up Poetry, establishing a database connection), so I don't have to figure it out from scratch in the future. # Implementation ### Review requirements and build visual sketch of database and templates The first step is to review through all the app requirements to ensure I know exactly what is required to meet them. With ths firmly in mind, build a high-level database sketch (crow's feet) and sketch out a high-level view of each page. This will give me a visual understanding of the structure I'm building, as I work towards it. ### Review documentation for relevant software Reviewing the documentation, identify exactly which main software dependencies will be required to build the software. Review through their installation and usage, to ensure I'm refreshed on updated features and best practices. ### Build a quickstart document I add to as I go (and set up hello world) This document will be used by me in the future whenever I'm creating similar apps. It will help me avoid having to remember how to set all these things up in the future. At this point, just add the above steps, along with the installation instructions required to get the app to "hello world" status. As I continue through this process, add instructions and details I will need in the future (or at least links to relevant documentation). ### Build database structure and commands Build a low-level SQL database structure in a ```schema.sql``` file, then write out all the relevant SQL commands I'll need for each database call in the code. While you're at it, set up a Postgres database in Cloud9, populate the database with initial data (save this, so you can use it to pre-start a future database). Run through all the commands you created above, to ensure they produce what you want. While doing this, identify potential N+1 issues and set up your code so it calls as few times as possible on your functions. ### Build template app.py function structure Go through the sketch of pages & database queries above, and write up all the main get/post routes & functions required to fulfill the app. As you go, add detailed documentation to each function describing what it will do. ### Build supporting utils function structure As you complete the above, add a utils, session_persistence, and database_persistence file (and accompanying template language to app.py). Fill in the templates with documented functions (you'll fill in the exact details later). ### Build templates in pseudo-code Likewise, create all the main templates. Set them up with ```jinja``` to extend each other, but only add some text to verify they're working, along with details of exactly what is to be included in each template. ### Build an ordered list of functions to fill out Once all the above is complete, I pretty much have the entire app complete, except I need to add in the actual code/functionality and wire it together. Build a list of everything that needs to be completed, and order it in such a way that I can test and build each component on top of the previous one in a logical order. ### Build all app components with testing and documentation Once all the above is complete, I'll start knocking out the task list and building all the app functionality. At each step, I will do two things: * Test the app, to ensure the specific feature is operating properly * Add thorough documentation to the function, so I can easily know what I was doing when I return to it later