Afte years of development in python, here are my go-to approaches for building any (desktop/ web) application.
+----------------------------+--------------------------------+
| UI and File Management | User management (if web-hosted)|
+----------------------------+--------------------------------+
| |
v v
+--------------+ +-------------+
| Extraction / | --> | Processing |
| Compaction | | |
+--------------+ +-------------+
| |
v v
+-------------------------------------------+
| Subroutines / Small Functions |
+-------------------------------------------+
- Big files requiring heavy libraries (e.g., Excel, SnP, PDF)
- Files needing asynchronous handling (e.g., large CSV files and frequently cross-referenced)
- Files with sparse data (e.g., sparse matrices)
- Extract files into smaller-sized data objects
- Extract and store in a lightweight, easily accessible format (e.g., Pickle)
- Trim the data: keep it small, compact, and accurate
- Ensure data writing is reliable and error-free
- Use objects for encapsulating data when:
- Input and processing are large
- e.g. - classes, import-able files in python
- break tasks into as many moderately sized chunks as possible
- Helps in debugging
- Lets user focus on only one section, instead of getting overwhelmed
- use subprocess, functions/subroutines
- Tasks require small execution time but depend on large libraries
- Libraries are not supported on all PCs (e.g., ARM Windows)
- If processing takes a long time - Show a progress bar to keep the user informed
- Data is sensitive and impacts cost or timeline
- Always ask the user to verify the data
- Use AI for:
- For quick access to tutorials
- Verify approaches and ideas
- Understanding and implementing new domains (libraries, languages)
- For new trends, explore forums and experiment