Alex Koutmos

Alex Koutmos

@akoutmos.bsky.social

Get your hands dirty πŸ’» πŸŽ™οΈ Podcast: http://beamrad.io πŸ“™ Book author: http://akoutmos.com/top/books ⌨️ Elixir libraries: http://hex.pm/users/akoutmos πŸ“ˆ SaaS founder: http://eaglemms.com

1.1K followers16 following184 posts

βš—οΈ Elixir Tip #51 - Debugging with dbg βš—οΈ Sprinkling IO.inspect calls everywhere to debug a pipeline? Just slap dbg/2 on the end and you'll see the result of every single step! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #50 - Integer utilities βš—οΈ The Integer module has some handy functions for splitting numbers into digits and converting between bases. Great for checksums, bit flags and anything hex! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #49 - Date ranges βš—οΈ Date.range/3 makes iterating over dates a breeze, and you can even provide a step. Combine it with Date.day_of_week/1 to count up business days in a month! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #48 - Infinite streams βš—οΈ Streams are lazy, which means they can be infinite! With Stream.unfold/2 and Stream.iterate/2 you can generate sequences and only compute what you actually need. #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #47 - Enum zip_with βš—οΈ Enum.zip_with/3 lets you combine multiple enumerables element by element using a function of your choosing. No more zip followed by map! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #46 - Monitoring processes βš—οΈ Want to know when another process dies without crashing along with it? Unlike links, monitors are one-directional. You simply get a :DOWN message in your mailbox! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #45 - Controlled concurrency βš—οΈ Task.async_stream/3 lets you process an enumerable concurrently while keeping a cap on how many tasks run at once. Great for not hammering that rate limited API! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #44 - Enum split_with βš—οΈ Need to split a list into two based on some condition? Instead of calling Enum.filter and Enum.reject, you can do it in a single pass with Enum.split_with/2! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #43 - Validating options βš—οΈ Ever had a typo in an option silently ignored? Keyword.validate!/2 lets you set defaults and raises if any unexpected options are passed in. Perfect for library authors! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #42 - Unicode aware strings βš—οΈ Elixir strings are UTF-8 encoded binaries and the String module is fully Unicode aware. Be careful though, the number of characters and the number of bytes are not the same thing! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #41 - Base encoding βš—οΈ The Base module makes it easy to encode and decode binaries using Base16, Base32 and Base64. It even supports URL safe encoding for when your data needs to live in a URL! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #40 - Hashing with :crypto βš—οΈ Need to compute a hash or verify a webhook signature? No need for a 3rd party library, the Erlang :crypto module has you covered! #ElixirLang #Erlang #Livebook

Alex Koutmos reposted

Fresh new release of jump_credo_checks is out now (v0.6). πŸŽ‰ Highlights: - Big improvements to the Oban Pro best practices check - A new check that catches places where your code modifies a struct *before* passing it to a changeset (with surprising results!) github.com/Jump-App/cre... #ElixirLang

github.comGitHub - Jump-App/credo_checks: A collection of opinionated Credo checks aimed at improving code quality and catching common mistakesA collection of opinionated Credo checks aimed at improving code quality and catching common mistakes - Jump-App/credo_checks

βš—οΈ Elixir Tip #39 - Working with nested data βš—οΈ Deeply nested maps can be a pain to update. Luckily Elixir ships with get_in/2, put_in/2 and update_in/3 so you can reach right in and make your changes! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #38 - Counting with frequencies βš—οΈ Before you reach for Enum.reduce to count occurrences of items, check out Enum.frequencies/1 and Enum.frequencies_by/2. Counting things has never been easier! #ElixirLang #Erlang #Livebook

Alex Koutmos reposted

The BEAM handles millions of connections with ease. Raw CPU work is another story. David Klemenc (BlueOcean) on what to do when your bottleneck is computing, not waiting. Watch: https://youtu.be/vqi-JCO_Ia8 Next: Code BEAM Europe 2026, 21-22 Oct, Haarlem NL - codebeameurope.com

βš—οΈ Elixir Tip #37 - Enum chunk_every βš—οΈ Need to batch up some work or compute a sliding window? Enum.chunk_every/4 has you covered. Here is a 3 period moving average in a single line! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #36 - Side effects with tap βš—οΈ Ever wanted to log or inspect something in the middle of a pipeline without breaking the chain? Kernel.tap/2 runs your function and passes the original value right along! #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #35 - Pipe anywhere with then βš—οΈ The pipe operator always passes the value as the first argument. But what if you need it somewhere else? Kernel.then/2 to the rescue! #ElixirLang #Erlang #Livebook

Biggest Winner Last Friday from the "Mag 7" was $TSLA πŸ“ˆ Will this trend continue today or will there be a reversal? See how Tesla's returns compared with the remaining Mag 7 stocks. #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #34 - Parsing options βš—οΈ The Elixir standard library offers a convenient way of parsing CLI arguments and casting them to the appropriate types. #ElixirLang #Erlang #Livebook

How is the "Volume King" $NVDA doing? πŸ“ˆ Nvidia continues to dominate trading volume and is one of the most closely watched names in the stock market. Here’s a look at its latest candlestick action and key price moves traders are watching. #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #33 - URI parsing βš—οΈ The URI module provides you with a plethora of functions for dealing with URIs. You can parse URIs, encode/decode query params, and generate strings from structs! #ElixirLang #Erlang #Livebook

Same CEO two different companies: Is there a relation between $TSLA $SPCX? Elon Musk is the CEO of Tesla and SpaceX. Is their performance related? How will that evolve in the future? Let’s see their current 15-, 20-, 30-, and 50-day stock return correlations. #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #32 - Dealing with Zip files βš—οΈ Did you know that out of the box Erlang provides utilities for dealing with Zip files? Take a look and see how easy it is to deal with Zip archives! #ElixirLang #Erlang #Livebook

Biggest mover last Tuesday from "Mag 7" was $META with a percent change of 3.24% πŸ“ˆ Seeing all the "Mag 7" 30-day standard deviations, which one seems the riskiest to you? #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #31 - Structured Logs βš—οΈ Did you know that your log statements can be structured either by using a keyword lists or by using maps? #ElixirLang #Erlang #Livebook

Biggest laggard last Monday from "Mag 7" was META πŸ“‰ See their current 30-day zero-benchmark Sharpe ratios. Will this trend continue today or will there be a reversal? #ElixirLang #Erlang #Livebook

A little peak into what you can do with the latest version of Explorer πŸ˜‰. Using the `rle_id` function you can take the recession time series from FRED and create start/stop markers for each recessionary period. Working with time series data using Explorer and Elixir is 😍. #ElixirLang #Erlang

βš—οΈ Elixir Tip #30 - @derive inspect protocol βš—οΈ Did you know that you can implement your own version of the inspect protocol for your structs? Using the derive attribute you can specify which fields from the struct are visible when inspecting the struct. #ElixirLang #Erlang #Livebook

Biggest Winner Last Friday from the "Mag 7" was $MSFT πŸ“ˆ Will this trend continue today or will there be a reversal? See how Microsoft's returns compared with the remaining Mag 7 stocks. #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #29 - IEx Sigil Help βš—οΈ If you are looking for the IEx help docs for sigils...you may be sad to see an error by inputting h ~s :(. Instead, you should pull up the help docs by doing h sigil_*! #ElixirLang #Erlang #Livebook

How is the "Volume King" $NVDA doing? πŸ“ˆ Nvidia continues to dominate trading volume and is one of the most closely watched names in the stock market. Here’s a look at its latest candlestick action and key price moves traders are watching. #ElixirLang #Erlang #Livebook

Same CEO two different companies: Is there a relation between $TSLA $SPCX? Elon Musk is the CEO of Tesla and SpaceX. Is their performance related? How will that evolve in the future? Let’s see their current 15-, 20-, 30-, and 50-day stock return correlations. #ElixirLang #Erlang #Livebook

Biggest mover last Tuesday from "Mag 7" was $AMZN with a percent change of -1.34% πŸ“‰ Seeing all the "Mag 7" 30-day standard deviations, which one seems the riskiest to you? #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #26 - Project Priv Dir βš—οΈ You can conveniently package arbitrary files along with your libraries and applications using the priv dir and fetching the path using the Erlang standard library. #ElixirLang #Erlang #Livebook

Biggest laggard last Monday from "Mag 7" was AAPL πŸ“‰ See their current 30-day zero-benchmark Sharpe ratios. Will this trend continue today or will there be a reversal? #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #25 - Balzing fast read only store βš—οΈ Erlang comes with a special storage mechanism called persistent term. Think ETS but even faster! But only use it for reading data that never changes :). #ElixirLang #Erlang #Livebook

Biggest Winner Last Friday from the "Mag 7" was $NVDA πŸ“ˆ Will this trend continue today or will there be a reversal? See how Nvidia's returns compared with the remaining Mag 7 stocks. #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #24 - Erlang phash2 βš—οΈ Did you know that you can hash any term in and clamp it to an integer range? In other words, you can get a consistent integer value given any input. Useful for partitioning and retrieving data πŸ˜‰. #ElixirLang #Erlang #Livebook

How is the "Volume King" $NVDA doing? πŸ“ˆ Nvidia continues to dominate trading volume and is one of the most closely watched names in the stock market. Here’s a look at its latest candlestick action and key price moves traders are watching. #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #23 - Custom Inspect βš—οΈ If you are ever in need of custom debugging output when inspecting a struct, you can write your own Inspect protocol implementation with just a few lines of Elixir! #ElixirLang #Erlang #Livebook

Same CEO two different companies: Is there a relation between $TSLA $SPCX? Elon Musk is the CEO of Tesla and SpaceX. Is their performance related? How will that evolve in the future? Let’s see their current 15-, 20-, 30-, and 50-day stock return correlations. #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #22 - Erlang math module βš—οΈ If you are ever in need of some mathematical related functions don't reach for a 3rd party library until you take a look at the Erlang :math module! #ElixirLang #Erlang #Livebook

Biggest mover last Tuesday from "Mag 7" was $AMZN with a percent change of -2.02% πŸ“‰ Seeing all the "Mag 7" 30-day standard deviations, which one seems the riskiest to you? #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #21 - Simple stream data processing βš—οΈ The Enum and Stream modules complement each other quite nicely and can be used for easy and effective data processing. Take a look at how you can stream process a CSV file! #ElixirLang #Erlang #Livebook

Biggest laggard last Monday from "Mag 7" was NVDA πŸ“‰ See their current 30-day zero-benchmark Sharpe ratios. Will this trend continue today or will there be a reversal? #ElixirLang #Erlang #Livebook

βš—οΈ Elixir Tip #20 - Using ETS for storage βš—οΈ If you are dire need of some performance gains take a look at ETS! But be careful since the ETS table lasts only as long as its parent process. #ElixirLang #Erlang #Livebook

Biggest Winner Last Friday from the "Mag 7" was $AMZN πŸ“ˆ Will this trend continue today or will there be a reversal? See how Amazon's returns compared with the remaining Mag 7 stocks. #ElixirLang #Erlang #Livebook