Hacker News new | ask | show | jobs
by debo_ 3674 days ago
Hi, I'm the editor of 500Lines. Thanks for posting this! A few notes:

- Code golf was strictly discouraged throughout the review process. When authors were faced with implementing functionality poorly to fit more in, we generally cut scope instead.

- 500 lines was selected as a limiting criteria because it is easy to specify and understand. You will see that the chapters written e.g. with Clojure do "more" (for some definition of more), but that does not make the lessons learned in the other chapters less interesting.

- The "or less" moniker is grammatically a bit offensive but sounds cute on paper, so we kept it.

- If you'd like to learn more about the philosophy or story behind this volume, Ruby Rogues hosted us a little while ago: https://devchat.tv/ruby-rogues/256-rr-reading-code-and-the-a...

- The print version of this book (and the official launch on aosabook.org) should happen sometime in the next 4-6 weeks. You can follow this issue if you'd like to know when that happens: https://github.com/aosabook/500lines/issues/212

6 comments

Skipping over the semantics of the title, and the war over the languages (btw, all programs can be written in one APL line), I thank you and the other authors for your work.

If you are looking for other things to write, I'd like to suggest a simple editor and a text translator to go from one markup to another, which at the end could be combined to be a WYSIWYG editor.

So you don't have to look it up too:

Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that implements a certain algorithm.

How can one contribute to this project? I personally ascribe to the belief that there's no better way to learn something than by implementing it yourself and would like to grant what help and background in writing and development I have.
I think the project should highlight quality, meaning review burden, but I think everyone should be encouraged to do their own 500 line repositories and share them (call me crazy but something like hashtags wouldn't be a bad thing for these sort of themed repositories)
The first thing I looked through, the pedometer/ directory, has a project that itself may be <500 lines, but is using compressed versions of JS libraries like highcharts.js & jquery.js.

Don't you think including huge external libraries like that defeats the spirit of showing things that are 500 lines or less?

To me it seems actively good to include examples that use well-developed libraries, to show the types of tools and abstractions that one can build on. Restricting oneself to a language's standard library may give the false impression that anything worthwhile requires a large bootstrapping effort.

That said, it would be fun to provide, e.g., a 500-line graphing library to show how one might begin building something like highcharts.

I would think not. Is the interesting part of the problem drawing charts? If not, it makes perfect sense have that abstracted away somewhere else.
I don't think so. Would you rule out things like the python standard library?

Though external library size can be important, does it come into play when talking about your own code structure?

Only if you assume it to be bug free in a way that your code will never expose.
This book(and indeed the rest)is neat! Great work, looking forward to the finished copy.
Will this ever be able as a git book?
I want to know as well