Live data from Hacker News

500 Lines or Less (2016)

aosabook.org

1–10 of 45 posts

Re: 500 Lines or Less (2016)

#9
Hmm. I get the sentiment (500, i.e. not too short, not too long), but 500 lines will mean different things for different people and different programming stacks. It literally can mean 50000 vs 500 "lines of knowledge" required. I'm not sure why would you name your book like that.

Consider: 500 lines of defensively written web server C++ code. 500 lines of C driver code. 500 lines of assembly. 500 lines of php script. 500 lines of java server app. 500 lines of c# .net desktop app. 500 lines of electron javacript code.

When I imagine the amount of a "useful program" I can write in 500 lines of C (or other low level statically typed language) while using minimal amounts of library code versus the "useful program" I can write in 500 lines of Javascript while using maximum amounts of Electron library code (i.e. all the functionality of chromium + node + electron), the difference is staggering ( try writing a cross platform video player in C vs Electron.. ). That doesn't mean Electron is better, especially if you need maximum resource budget usage or maximum control.

It's never about the number of lines, it's how you use them ;)

Re: 500 Lines or Less (2016)

#10
One of my goals is to rewrite all software for developing software, with each application at about (or less than) this sweet spot.

Database, version control, runtime type system (Lua), proto-like serialization, code refactoring, parsing library... The list goes on.

About the only heavy thing will be the text editor, and I'm still keeping that at a few thousand lines (+ a small core data structure library).

When you cut requirements you can make things small and easy to understand. I'm only concerned about big-O and keeping things simple :)

http://github.com/civboot/civlua

Post reply on HN