Our great sponsors
-
tinygrad
Discontinued You like pytorch? You like micrograd? You love tinygrad! ❤️ [Moved to: https://github.com/tinygrad/tinygrad] (by geohot)
-
FizzBuzz Enterprise Edition
FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz made by serious businessmen for serious business purposes.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
music-explorer
A music scraper, navigator, archiver, and cataloger for people looking for new sounds.
For an excellent code base to see DRY in action, look at tinygrad: https://github.com/geohot/tinygrad
I believe it has a potential to be a great alternative to pytorch.
I love watching GeoHot's Twitch streams as he goes to the extreme to simplify the codebase, and the end result is amazing.
```
With your example I had to think for about 1-2 min before it made sense. If the codebase is full of clever stuff then I have to spend hours understanding all of the clever things before I can make changes. If everything is simple then it's easy to change.
If you want to see where overengineering leads you then take a look at this project. https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
It is satire but I have absolutely worked in places that write code like that.
Good programmers know that it's 10x times harder to read code than write it, so they deliberately keep it simple so that they can read it later.
```
With your example I had to think for about 1-2 min before it made sense. If the codebase is full of clever stuff then I have to spend hours understanding all of the clever things before I can make changes. If everything is simple then it's easy to change.
If you want to see where overengineering leads you then take a look at this project. https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
It is satire but I have absolutely worked in places that write code like that.
Good programmers know that it's 10x times harder to read code than write it, so they deliberately keep it simple so that they can read it later.
Sure. Related. It's an art.
Here's some code I wrote earlier, probably a good example
https://github.com/kristopolous/music-explorer/blob/master/w...
It's self contained, not very big, not trying to be fancy, as direct as possible