Created
December 1, 2025 02:18
-
-
Save amrutnrp/e8e8ab7761e47d4afb35dab2a29ff388 to your computer and use it in GitHub Desktop.
Revisions
-
amrutnrp created this gist
Dec 1, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,87 @@ # Best Known Methods (BKM) - for Python App development Afte years of development in python, here are my go-to approaches for building any (desktop/ web) application. ### Framework / Structure ``` +----------------------------+--------------------------------+ | UI and File Management | User management (if web-hosted)| +----------------------------+--------------------------------+ | | v v +--------------+ +-------------+ | Extraction / | --> | Processing | | Compaction | | | +--------------+ +-------------+ | | v v +-------------------------------------------+ | Subroutines / Small Functions | +-------------------------------------------+ ``` ### **Extract the Input files when** - 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 --- ### **Data Storage** - 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 --- ### **Encapsulation** - Use **objects** for encapsulating data when: - Input and processing are **large** - e.g. - classes, import-able files in python --- ### **Modular Code** - 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 --- ### **Use Web-Hosted Apps When** - Tasks require **small execution time** but depend on **large libraries** - Libraries are **not supported on all PCs** (e.g., ARM Windows) --- ### **Processing Considerations** - If processing takes a long time - Show a **progress bar** to keep the user informed --- ### **Use Deterministic Programming When** - Data is **sensitive** and impacts **cost or timeline** - Always **ask the user to verify the data** --- ### **When to use AI** - 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 ---