PragmaticBookshelf
Northwind Elixir Traders (PragProg)
Isaak Tsalicoglou
Built for the curious, this isn’t your average programming book—it’s nearly 500 pages of hands-on mentorship beyond coding, fusing core skills in Elixir, Ecto, and SQLite with business experience and R&D tenacity. Think of it as a $500 course distilled into one powerhouse resource, with tons of learning-by-doing, in a single project. Acquire hard skills in Elixir and database modeling with Ecto’s migrations, changesets, and more, re-imagining a classic database that millions around the world have used before for learning. By fearlessly ditching the “happy path”, this immersive, exploratory, memorable, project-based tutorial helps you confidently tackle real-world projects with Elixir and Ecto.
Built for the curious, Northwind Elixir Traders isn’t your typical programming tutorial. This immersive, project-based adventure reimagines the classic Northwind database, guiding you through Ecto’s migrations, changesets, and queries to model data with real-world edge. Ditching the “happy path,” it’s one ambitious journey—crafting a schema step by step, wrestling with SQLite’s quirks, and automating bulk imports, all while sharpening Elixir skills via side-quests like refactoring and systematic problem-solving. Drawing from the author’s R&D and B2B equipment-trading experience, it’s nearly 500 pages of hands-on mentorship—think Elixir gym crossed with an engineer’s playground.
You’ll transform an Entity Relationship Diagram into code, tame messy data, and unearth insights with queries both simple and complex. It’s not about exhausting Ecto’s every nook; it’s about grokking the essentials through practice, fearless experimentation, and diving into docs when things don’t work according to intuition or expectation. SQLite spices up the challenge, but the skills you’ll build also apply to working with PostgreSQL. Sprinkled with mini-essays from the author’s experience, it builds a gritty mindset to confidently tackle real-world projects—no copy-paste prayers needed. For Elixir newcomers, database dabblers, or those looking to build the data foundation of their Phoenix LiveView app, this is a speed-run in upskilling, wrapped in an enjoyable and unforgettable exploration.
This work was written and produced entirely by the author. We are proud to be distributing it.
Isaak Tsalicoglou is a mechanical engineer, management consultant, and software engineer. After a corporate decade in Machine Learning in turbocharger R&D, development processes, and product management of portable radar devices, since 2020 he has been managing SaaS and B2B trading businesses in Greece, and developing open-source and commercial software in Elixir, Python, Go, PHP, and NextJS.
Full details: Northwind Elixir Traders: Learn Elixir and database modeling with Ecto and SQLite, all in one project by Isaak Tsalicoglou
Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout ![]()
Most Liked
waseigo
Edit: Please note this book is now distributed by PragProg so the contents of the old thread (this post, all the way down to this post) have been merged into this new thread.
Available as PDF and ePub on Leanpub.
Why this book is being written
After reading everything I could get my hands on regarding the use of Ecto and applying what I was learning in my own Elixir and Phoenix LiveView applications, I realized that even the best books, such as “Programming Ecto”, though excellent otherwise, do not reflect the way I prefer to learn.
I started writing this book to provide an alternative take to learning about Ecto, and leave no stone unturned. By not pursuing the “happy path” of how things are done correctly from the start, I decided to start my exploration of Ecto from scratch and deal with all the stumbling blocks as they arise, by trying out what I thought might work, and referring to the amazing documentation to get unstuck.
In truth, I find that this is the way most of us learn something for good; the style of this book is a reflection of that belief, from my own experience learning everything I’ve ever studied that deserves aiming for a solid understanding–and Ecto most certainly deserves this!
About the book
Northwind Elixir Traders isn’t your typical Ecto tutorial. Instead of pursuing the usual “happy path” reflected in the official documentation and “Getting Started” guide, we’ll dive into the complexities and nuances of database implementation, offering a refreshing exploration that goes beyond the ordinary, while also relying heavily on available sources of knowledge to understand how things work from the ground up, while also moving forward without getting caught in quagmires.
Discover the joy of experimentation as we encounter unexpected hurdles and exercize our Elixir skills in figuring out why things don’t work as expected, and how to still get things done, regardless. Through these challenges, you’ll gain invaluable insights into problem-solving and critical thinking with Elixir and Ecto.
For a curious Elixir newcomer delving into the world of building databases for a microservice, a backend, or a Phoenix or Phoenix LiveView app, “Northwind Elixir Traders” promises an immersive learning experience that aims to be both enriching and unforgettable.
What’s inside
The book was first published in a Work-In-Progress state on Leanpub on April 1st, 2024. It iwll continue to be updated every week until the full envisioned scope is realized. The chapters released so far cover the creation of an application with an SQLite3-backed Ecto repository, the overview of the classic Northwind Traders database schema, the first steps of the creation of the database tables, the refinement of table schemas, and the use of schemaless changesets and validation functions.
Here is a non-exhaustive, prospective list of the topics that will be covered in chapters coming soon, some of which are already in development:
- Changesets with schemas (up next!)
- One-to-one, one-to-many, and many-to-one relationships between tables
- Adding data with associations between tables
- Queries in general
- Queries with window functions to summarize data
- Embedded schemas
- Seeding the database
- Grouping multiple repository operations
- Enums for field values
- Custom fields types
- Switching to PostgreSQL
About the author
Isaak Tsalicoglou is a mechanical engineer with extensive experience in developing software tools for engineering and business use cases, and has gone all-in on Elixir since late 2022.
For a limited time only, forum.elixirforum.com readers can get 20% off the minimum price with the following coupon link: https://leanpub.com/northwind-elixir-traders/c/elixirforum
Edit: Many thanks and apologies for catching the 406 error – I have updated the coupon link and it now verifiably works.
waseigo
Hello and welcome to version 1.0 of Northwind Elixir Traders – now with a new subtitle!
Since the last update:
- Chapter 16 was written from scratch. We now have complex (complicated) queries that use Common Table Expressions and
ROWSin a window fragment to perform window-aggregate calculations for rolling and running (sliding and expanding) windows across sequential and unique dates of dataset with triple partitioning–even for those dates that have no orders. There is also a lot of exploration of SQLite’s troubles with complex queries of that kind, as well as a section on profiling database queries with SQLite’sEXPLAIN QUERY PLAN(and with Elixir and Erlang’s:timermodule) to determine what’s causing them to run slow. - Chapter 17 (“Leftover bits and pieces”) was dropped, since it seemed too “poor”, especially for a closing chapter. After reviewing the book in its entirety, I concluded that everything that was supposed to be in there was either truly trivial (
Ecto.Enum, redacting fields, and one-to-one associations) compared to what the book has covered in almost 500 pages, or was always truly beyond the scope of the book (switching to PostgreSQL, which shouldn’t pose an issue given how everything has been implemented). - With a handful of exceptions, now all Elixir, Ecto and SQLite functions have been hyperlinked to their online documentation. I considered hyperlinking the book contents to the git commits, but after trying it out I found that it made already-busy book pages even busier, hindering readability.
With this, the book is now 100% complete!
For those of who have have been asking me for the complete codebase, it’s now available and Apache-2.0 licensed: GitHub - waseigo/northwind_elixir_traders: The official repository of the "Northwind Elixir Traders" book · GitHub. Every code block and every instruction to change something to the code corresponds to a git commit. The commit title is the title of the corresponding code block, or a snippet of the text with the instruction on what to change/remove.
The entirety of the book has now been “replayed”–that’s how the git repo has been built from scratch by following the book step by step. Still, to err is human, so should you get stuck anywhere, please let me know.
Thank you again for your patronage and for those of you who have contributed comments and suggestions, asked questions, and requested clarifications. It has made the book way better than I ever imagined!
The next step in the story of this book is the upcoming episode of the Elixir Mentor podcast (Podcast · Elixir Mentor) with Jacob Luetzow (jacobluetzow). We’ll record it on March 21st.
The next step for me, Elixir, and writing technical books is the upcoming and much shorter Elixir Chatbot Alchemy, in which we will follow a similar exploratory approach to develop a self-hosted chatbot with Elixir, the Ollama REST API, Ecto, and Phoenix LiveView under the severe constraint of getting a decent chatbot working with only CPU-based inference.
If you enjoyed the book (or even if you didn’t!), drop me an email or contact me here–I look forward to hearing what you liked, what you didn’t, and anything else you’d like to share!
Best regards,
Isaak
waseigo
Popular in Books
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance













