Found in 8 comments on Hacker News
Took a minute to track that down (Oran is spelled Oram?) https://www.oreilly.com/library/view/beautiful-code/97805965...
gls2ro · 2022-07-16 · Original thread
First, I do agree that Ruby ecosystem could do some things better and IMO in the last year or so there are some good projects happening in this space.

Second, I cannot refute your arguments. That is because I see them more of a personal preference or somehow expectations based on your programming history (I might be wrong of course as I don't know your programming history). As Ruby feels similar with other programming languages I think some kind of expectations of how things should be kick in. But Ruby has a specific design that is for example focused on "brevity" or "beauty" among multiple other thigs.

I worked so far in the last 15 years in multiple codebases in Ruby: large Rails apps, Sinatra apps but also smaller webapps. In all kind of combinations some of them I built and maintained alone and some of them were built in a team.

This being said, I don't remember a time when we have a big name conflict because we used a couple of gems and they were colliding.

I do remember when some colleagues were over using meta-programming too much or changing default behaviour of stdlib. But this can be fixed with coding guidelines and I take imposing coding guidelines over removing these features from Ruby as sometimes they make more sense than anything else.

Regarding ".self" I don't feel the need to use it. Once I got the call hierarchy I prefer not needing to write "self" where it is not needed.

But also in Ruby everything* is an object thus I feel that self is a bit more powerful so it should be used when when it is really needed like when defining methods and you want to indicate where that method belongs.

Regarding having multiple ways of doing the same stuff in stdlib, here we diverge as I prefer this diversity. I really like that we are multitudes in this community so code can be written in multiple ways, it is for me almost like a form of art when I read some case and I see how expressive can it be and how easy it is to get what it does even if it uses a different std method than I normally use.

I think if you want to get Ruby you should start by thinking that Ruby is a programming language created (IMHO) with the intention to let you express yourself but also make it so that other people should easily understand it.

It also worth reading this beautiful essay by the creator of Ruby: https://www.oreilly.com/library/view/beautiful-code/97805965... (sorry I could not find a direct link unwalled) and from there you will get a glimpse of why Ruby is in a specific way and see if you agree or not with that.

For example regarding your point with no leading self, Matz says in that essay "programs should ideally contain no unnecessary information" thus a lot of what you see in Ruby including having prepend instead of "insert(0, object)" is a manifestation of that.

ibejoeb · 2022-05-02 · Original thread
Elegant construction and elegant use can be disjoint. For construction, Beautiful Code is a good read on a bunch of real specimens.

https://www.oreilly.com/library/view/beautiful-code/97805965...

fanf2 · 2022-04-30 · Original thread
There is a chapter by Hank Warren all about popcount in the Beautiful Code book, https://www.oreilly.com/library/view/beautiful-code/97805965... and there is much more along similar lines in Warren’s book Hacker’s Delight https://en.m.wikipedia.org/wiki/Hacker's_Delight

My favourite use of popcount is for packing sparse vectors.

_xrjp · 2021-04-27 · Original thread
I found it, Greg's chapter `The Linux Kernel Driver Model: The Benefits of Working Together` on page 267

- https://www.oreilly.com/library/view/beautiful-code/97805965...

- https://github.com/stormtrooper96/books/blob/master/software...

So I'll definitely give it a read. Thanks!

adriantam · 2020-02-13 · Original thread
This is chapter 1 of "Beautiful Code" (http://shop.oreilly.com/product/9780596510046.do)
wallflower · 2019-11-26 · Original thread
“Beautiful Code” is flawed but it aims towards what you mentioned.

http://shop.oreilly.com/product/9780596510046.do

“The Architecture of Open-Source Applications”

http://aosabook.org

You also might be interested in “Coders at Work”.

https://www.goodreads.com/book/show/6713575-coders-at-work

andyjpb · 2019-04-01 · Original thread
That's great!

If you're interested in more detail about how a VFS (Virtual File System; the bit where it finds the file and then finds the data in the file) works, Chapter 17 (Another Level of Indirection) in Beautiful Code (http://shop.oreilly.com/product/9780596510046.do ) is well worth a read.

It explains how the VFS in FreeBSD works. How disks, partitions, volumes, filesystems, offsets, etc all get orchestrated together so that the Unix "single directory hierarchy" abstraction works as intended even tho' the actual data may be spread around a number of locations (both local and remote).

The concepts and ideas are largely applicable to other Unixes and Unix-like operating systems.

It's also a great example of how elegantly one can express polymorphic code, even in plain C.