Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casperdcl/advent-of-code
Pythonic readable solutions to Advent of Code
https://github.com/casperdcl/advent-of-code
advent-of-code advent-of-code-2020 advent-of-code-2021 advent-of-code-2022
Last synced: about 1 month ago
JSON representation
Pythonic readable solutions to Advent of Code
- Host: GitHub
- URL: https://github.com/casperdcl/advent-of-code
- Owner: casperdcl
- Created: 2020-12-02T15:48:52.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-12T20:31:17.000Z (about 2 years ago)
- Last Synced: 2024-10-11T12:01:22.743Z (3 months ago)
- Topics: advent-of-code, advent-of-code-2020, advent-of-code-2021, advent-of-code-2022
- Language: Python
- Homepage: https://adventofcode.com
- Size: 329 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code solutions
[![Tests](https://github.com/casperdcl/advent-of-code/workflows/Test/badge.svg)](https://github.com/casperdcl/advent-of-code/actions)
Solutions to problems from
([2020](https://github.com/casperdcl/advent-of-code/blob/main/aoc/sol2020/__init__.py),
[2021](https://github.com/casperdcl/advent-of-code/blob/main/aoc/sol2021/__init__.py),
[2022](https://github.com/casperdcl/advent-of-code/blob/main/aoc/sol2022/__init__.py))```sh
conda env create
conda activate aoc
python3 -m aoc --help
```- **maintainability**
+ **readability**: style nearly production-worthy (others can understand easily; avoid amusing code golf)
+ **extensibility**: not logically-over-optimised; if requirements changed (there was a "part 3") then the code doesn't need to be rewritten
- **scalability**: time-complexity-optimised (sane run times even if the input was significantly larger; avoid brute-force just because the input is currently tiny)## Why
Most code I've seen falls into one of these categories:
1. **novice**: e.g. logical inefficiencies, syntactical inefficiencies, unhelpful verbosity
2. **expert**: e.g. code golf, sacrificing extensibility for runtime performance, lacking code comments, unnecessary complexity, overuse of either OOP or functional programmingI strongly believe "[good code](https://xkcd.com/844)" must make none of the above sacrifices, and this repository aims to demonstrate this idea.
Suggestions and pull requests are welcome.