Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barrett-ruth/coding-challenges
https://github.com/barrett-ruth/coding-challenges
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/barrett-ruth/coding-challenges
- Owner: barrett-ruth
- Created: 2024-05-05T18:14:14.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-12T03:04:05.000Z (8 months ago)
- Last Synced: 2024-11-06T21:52:23.216Z (2 months ago)
- Language: Python
- Size: 124 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# coding challenges
collection of John Cricket's [coding challenges](https://codingchallenges.fyi)
implemented in python## wc
`wc` was relatively trivial to implement given python's robust support of file
i/o and CLI arguments via the `argparse` module. From now on, I will implement
the programs both in python and C++ to improve my proficiency in the latter.The only tricky part was incorporating stdin into the program. John
included this as a final "gotcha" - if you designed your program to be modular (i.e.
separating input reading vs. processing ), this last part is trivial. If not,
you have to refactor nearly your entire program.This exercise demonstrates the importance of planning (just a bit) before
coding. While premature optimization is indeed the root of all evil, it helps to
structure your program through minimal abstractions if its structure is
well-defined, as nearly all CLI programs are.