4 ms·
Ask HN: What code makes you happy?
Perhaps a clean code sample? A library where the code seems to read as naturally as if you wrote it yourself?
- bwackwat 10y agoCode with few dependencies! I am not a fan of app-generators or specialized overweight package managers. Folks take enough advantage of yum/apt.
- rer 10y ago> I am not a fan of app-generators Does a compiler count as a kind of app-generator?
- askafriend 10y agoNo code is the only type of code that makes me happy.
- tmaly 10y agoCode that runs for a decade without issue
- cwt 10y agoCode that replaces/relieves humans.
- mbrock 10y agoForgive the narcissism but I quite like the main function here: https://github.com/mbrock/klatch/blob/master/Klatch/Embassy/Embassy.hs https://github.com/mbrock/klatch/blob/master/Klatch/Embassy/... And also this (incomplete) test suite for a language interpreter: https://github.com/lessrest/koko/blob/master/test/Tests.hs https://github.com/lessrest/koko/blob/master/test/Tests.hs Other than that I really love well-written shell scripts that do their job.
- 3ch1dna 10y agoNarcissism forgiven. That is petty code. Readable, followable code is definitely on my top sexy list. I want to be able to read it like a story and not have to guess at obscure conventions someone made up to keep their job proprietary.
- mbrock 10y agoI really like it when the entrypoint function itself tells the basic story of how the program works. Too many entrypoints are a combination of verbose boilerplate and obscure setup of "handler managers" and "event factories" and god knows what. Often I look at a main function and it just seems to kind of start... something... and I have no clear idea of where to look for the code that actually does anything.
- kj01a 10y agoTaylor written in Swift. https://github.com/izqui/Taylor https://github.com/izqui/Taylor
- bbcbasic 10y agoLBH UNCCL
- navyad 10y agoIntuitive code, which tell itself what is supposed to do. When someone saw the code, they should be able to know what is happening. Another thing which will make me happy is to defines clear interfaces which can be extensible for any future change.