This is an effort to automate my workflow to solve daily coding problem sets from https://www.dailycodingproblem.com/
- Skeleton for documentation on README
- Defined Desired Outcome
- Defined Project Requirements
- Defined Proposed Procedure.
- Updated commit message in Current Progress (###)
Everyday, I work on 1-3 problems on a Daily Coding Problem set. I work on the single problem that was released today. With 100s of problems having been released before I joined, I add to my practice by working on some past problems as well, randomly selected out of problems I haven't visited before.
Everytime I attempt a problem, I take some time to do the following:
- Explore and understand the problem.
- Design and develop an algorithm.
- Write some code to implement the algorithm.
- Write some code to test the algorithm.
- Write some code to adhere to edge cases.
- Read over the solution (if available) and implement that as well.
This process is well structured and follows an orderly routine. Therefore, to cut out some workflow-related machinery, I want to automate some of the above steps by adding some skeleton code and space to outline my thoughts.
A successfully written program will:
- Prompt me to get how many problems I want to solve today.
- Access today's DCP along with any additional ones based on number of problems.
- Parse the DCP email to extract the problem.
- Create a text file for algorithm design.
- Prompt me to get which languages I want to use to write an implementation and generate development files based on that response.
- Generate some comments onto those development files.
- Add test functions to the development files.
- Develop a README to display success and results.
In order to complete this project, here is the suggested flow:
- Figure out how to access my Gmail inbox for DCP emails.
- Parse a DCP email for key information.
- Determine file creation and naming scheme.
- Determine file content structure (testing code, driver code, comments, etc.)
- Add essential I/O
- Determine output scheme for README file (potential wrapper code for executing git commands?)
- The I/O flow has been built in
script.sh - Figured out how to interface with the Gmail API and have tokens and other essential information saved.
- Successfully accessed and parsed a target email from the Gmail inbox.
- Designing a database to locally store problems so that the query isn't so big everytime a connection is made to Gmail.
- Elected to using SQL for database management, the structure is pretty simple and a table format should make for easy data entry and access.
- A Promise mechanism must be utilized to pull the sheer of volume of emails from Gmail without stalling.