TwistingTwists

TwistingTwists

Journal : Designing Elixir systems with OTP

This is my Journal for readings on Designing Elixir Systems with OTP.

Will post chapter 01 tomorrow! Stay tuned!

Most Liked

AstonJ

AstonJ

Nice one TT! Another book I am interested in reading at some point! :003:

TwistingTwists

TwistingTwists

Chapter 01

Concepts / RE-Thinks:

DFTwBLWB : Do Fun things with Big Loud Worker Bees - acronym to think about layering application.

DFT = for building blocks of project

BLWB = for letting components work together.

Why layers?

  1. Testing each component with SIMILAR functions together (because they are grouped together! )
  2. Healing - supervisors
    1. the concept is (called lifecycle) as simple as turn-off the TV and restart to fix it!
    2. So, shut down CLEANLY (note,emphasis)!

Managing state :

  1. recursion and message passing to manage state.
    • This is new! = message passing is usually an advanced concept and not ‘generally’ used to manage state, unless - Elixir or MVC model.
TwistingTwists

TwistingTwists

Chapter 02 : Know Your Elixir Datatypes

Types and pro-cons

DataType Properties Pro Cons
Atoms are integer + constant + NOT garbage collected use = name concepts + constant tables type lookup NOT convert user-input to atom
Arrays = NOT in Elixir! - random access is cheap + traversing O(n) +
Lists NOT arrays! + singly linked-lists + pattern matching on head is O(1) Appending at END of lists or LARGE lists
Maps random access O(log n) => useful for heavily edited data use MapSet when only Keys (uniqueness)
Strings are binaries => efficiently stored + copy is a FULL copy (unlike lists) DO NOT LET processes hold references to long string => may cause memory leaks + NOT use long strings for storing info + DONT concatenate
Tuples fixed length data structure use for tagging data + read chunks of data like csv slow append => don’t edit (if need to, use Maps)
Functions send function to data, NOT data to function
PATTERN matching allows multiple dimension inheritance (sort of) => better than inheritance!!

Where Next?

Popular Community topics Top

Tommy
So I have enough money to last a year. Realistically I’m still going to have to work part time painting. I’m so done with it though! I h...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
mafinar
I am going to dump my thoughts, methods, codes, experiences and rants while learning OCaml into this thread. This is probably the 5th or...
New
RobertKielty
My overall initial first impressions of this book are very good. I will document my local spacemacs setup to as I work through the book.
New
mafinar
TL;DR I am reading “Domain Modeling Made Functional” and discussing and keeping a journal of what I learned from it, any co-readers welco...
New
TwistingTwists
This is my Journal for readings on Designing Elixir Systems with OTP. Will post chapter 01 tomorrow! Stay tuned!
New
adamaiken89
Anyone is interested in a classical textbook for algorithms can go and check that.
New
AstonJ
With Tailwind now the default CSS framework shipped with Phoenix we thought it would be nice to run this book club on the Elixir Forum. ...
New
AstonJ
With AI set to play a big role in our industry Elixir users are lucky to have Nx, so we’re running our Nx related book club on Genetic Al...
New
alvinkatojr
https://fs.blog/mental-models/ I’ve been reading Farnham Street for a while, and this topic is the recommended starting point for new re...
New

Other popular topics Top

Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1050 21151 394
New
AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
New
AstonJ
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting: asdf install erlang 23.1.2 Configure failed. checking ...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New
PragmaticBookshelf
A concise guide to MySQL 9 database administration, covering fundamental concepts, techniques, and best practices. Neil Smyth MySQL...
New
Fl4m3Ph03n1x
Background Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New