radar

radar

The Elixir Toy Robot (self-published)

:wave: You might remember me as the author of Joy of Elixir: https://forum.elixirforum.com/t/joy-of-elixir-self-published-free/

I’ve got a new book out which shows you how to do the Toy Robot exercise in Elixir:

The first 6 chapters of the book cover how to solve the common part of the exercise. Chapter 7 (coming soon) covers processes and supervision trees while building the foundations of a multiplayer Toy Robot game. Chapter 8 will finish that game.

I view this book as a “sequel” to things like Joy of Elixir, the getting started docs for Elixir or Elixir School. It’s a real (enough) project with real problems and I hope people enjoy reading it and following along.

Let me know what you think in this thread!


Table of Contents

  • Introduction
  • Introducing the Toy Robot
    • Simplifying the problem
    • Creating the application
    • The MOVE command
    • Moving west
    • Moving north and south
    • Moving in the right direction
    • Turn left!
    • Turn right!
  • Catching bugs
    • Finding the bugs within
    • Regression testing the turn_right function
    • Regression testing the move function
    • Regression testing the move_west function
    • Regression testing the move_north and move_south functions
    • Jumping back to the manual test
    • Reflections
  • Placing the robot on a table
    • The Table module
    • The missing link
  • Building our simulation
    • Moving a robot, within a simulation
    • Turning a robot, within a simulation
    • Reporting the robot’s position
  • Reading and handling commands
    • The Command Processor
    • The Command Handler
    • The Command Runner
    • Piecing it all together
  • Building the CLI
    • Reading commands from a file
    • Verifying the robot’s behaviour
    • Conclusion
  • The Toy Robot Game
  • Building a game
    • A single player game
    • Let it crash!
    • The Game Server

Most Liked

radar

radar

radar

radar

This book is now content complete! :tada:

I’ve covered all the content I set out to cover in this book, and so now we’ve got plenty of words covering:

  • How to build an Elixir project from scratch
  • Doctests
  • ExUnit tests
  • GenServers
  • Supervisors
  • Registries

It’s a smidge over 60,000 words, and about 220 pages.

I’m going to spend this next week reading through it myself and making sure everything is as correct as it can be and then I would say this book is done!

narand

narand

Seems interesting! Could you share one or two sample pages from the PDF?

Where Next?

Popular in Books Top

PragmaticBookshelf
Kevin Hoffman edited by Kelly Talbot @KellyTalbot Reality is event-sourced; your mind processes sight, sound, taste, smell, and touch to...
New
PragmaticBookshelf
Alexander Koutmos Bruce A. Tate @redrapids Frank Hunleth @fhunleth edited by Jacquelyn Carter @jkcarter The Elixir programming langua...
New
AstonJ
by Martin Logan, Eric Merritt, and Richard Carlsson Erlang and OTP in Action teaches you the concepts of concurrent programming and the ...
New
PragmaticBookshelf
Frank Hunleth @fhunleth Bruce A. Tate @redrapids edited by Jacquelyn Carter @jkcarter Want to get better at coding Elixir? Write a har...
New
germsvel
:waving_hand: Hi there, I’ve been working on a Test-Driven Development with Phoenix book. It teaches TDD and BDD by building a chat app ...
New
PragmaticBookshelf
Tony Hammond Series editor: Bruce A. Tate @redrapids Developmental editor Jacquelyn Carter @jkcarter Data is everywhere—it’s just not ...
New
kokolegorille
by Ulisses Almeida Elixir’s straightforward syntax and this guided tour give you a clean, simple path to learn modern functional program...
New
AstonJ
by Joe Armstrong A multi-user game, web site, cloud application, or networked database can have thousands of users all interacting at th...
New
peerreynders
by Darin Wilson and Eric Meadows-Jönsson Languages may come and go, but the relational database endures. Learn how to use Ecto, the prem...
New
peerreynders
Don’t forget you can get 35% off the ebook using the code ‘devtalk.com’ :023: This title will be available on or about 2018-11-10
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement