become
an
expert
I've been using Ruby for over ten years, and I'm still surprised to find new corners to explore. It wasn't until I came across this book that I realized how deep the string "rabbit hole" went.
They're everywhere!
As devs, you and I create tons of strings. Probably more than any other object on a day to day basis. How much do you really know about strings? How about encodings? How familiar are you with Unicode and UTF-8?
Do you know why this would happen?
'é' == 'é' # => false
Or why this length might be wrong?
'à'.length # => 2
Do you know what dummy encodings are?
Encoding::UTF_16.dummy? # => true
How about what this does?
[128077, 32, 128078].pack('U*')
Do you know how to use an encoding converter?
Encoding::Converter.new('UTF-8', 'US-ASCII')
Walk away an expert!
%q
and *
.
Get the entire story about how best to use heredocs.
to_s
and to_str
.
gsub
is overused and how methods like delete
and tr
can be better.
Encoding::Converter
to fix invalid characters within a string.
become
an
expert
Mastering Ruby: Strings and Encodings is a fascinating and thorough discussion of strings. Aaron discusses the history of character encoding and then goes on to discuss how strings work and how we create and use characters. You may be thinking "huh, a whole book on just strings?" but Aaron does a good job of being informative and entertaining. 👍
The world operates on strings (you're reading one right now). Having a solid understanding of their internals, how to manipulate them, and all the "devil in the details" is incredibly important. Aaron's book is a fantastically informative read on all things `String` related.
I like how the book builds up concepts, layering one on the next. I've learned a lot about encodings, code points and backward compatibility. And the flow of information and content is really well done.
Essential, valuable knowledge for all Ruby devs! I keep coming back to the lessons in this book, even senior devs will learn things. A+, would recommend!
become
an
expert
Hi, I'm Aaron Lasseigne. I've been using Ruby for more than a decade. During that time, I've presented and written about Ruby including 13 articles in Ruby Weekly. I organize the Dallas Ruby Brigade and participate in open source. My most successful contribution is the ActiveInteraction gem with over 1.8k stars on GitHub.
While doing all of this I've gained a strong understanding of Ruby and I'm excited to share what I've learned.