Adworse Codes Here

Rubyist Elixir Journey

Menu
  • About me
  • Privacy Policy
Menu

Category: We Need To Go Deeper

Sometimes seemingly elementary tasks like cutting a string to a required size lead to a series of beautiful and occasionally scary discoveries: deep rabbit holes and long reads. I like to document such journeys, even returning after a while to what looked like an excellent solution to find out it was less than perfect.

The Curious Case of String.slice/3

Posted on July 16, 2022August 4, 2022 by Dima Ermilov

Slicing a string isn’t tricky, right? Or is it? Elixir works wonderfully with strings. Some edge parts of it could be a little bit confusing though. This one led me to a rabbit hole deep down to IO devices and improper lists.

Say, we have some text data like a company name, some web page to show it, and some database to store it. Say, we’re not the one who designed both the web page and the DB, so they both have 80 characters limit, and there’s nothing we can do about it.…

Read more
Category: We Need To Go Deeper

Recent Posts

  • The Curious Case of String.slice/3
  • Singleton GenServer: Short track to the orphanage

Recent Comments

No comments to show.

Archives

  • July 2022

Categories

  • Learned the Hard Way
  • We Need To Go Deeper
©2023 Adworse Codes Here