|
|
|
|
|
by rurounijones
4790 days ago
|
|
Reading that article I cannot help but think the entire thing is misguided. 10 lines of code? Yes Easier to read? Hell no. If you have to sacrifice readability and idiomatic ruby for LOC then I think the entire premise is void and a lot of the advice misguided. |
|
The goal isn't to write pleasant code; it's to explore what's possible with the language, even if you should be slapped for using the techniques in a real project. Reducing LOC is akin to code golf; the shortening is an ends to itself, and sites like codegolf.com are essentially competitive problem solving with a very strange goal.
Tangentially: In a different subject, there was an ad hoc competition to write the shortest science fiction story.
One example is Knock, by Fredric Brown: "The last man on Earth sat alone in a room. There was a knock on the door..."
Another is Cosmic Report Card: Earth, by Forrest J. Ackerman. The entirety of the story is "F".