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

First Post!

AstonJ

AstonJ

Looks good Ryan, congrats on writing another book :023:

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?

Last Post!

romenigld

romenigld

Nice Ryan, I love your books! :clap:

Where Next?

Popular in Books Top

AstonJ
by Benjamin Tan Wei Hao The Little Elixir & OTP Guidebook gets you started programming applications with Elixir and OTP. You begin w...
New
AstonJ
https://www.packtpub.com/sites/default/files/B04907_MockupCover_Normal.jpg by Kenny Ballou Elixir, based on Erlang’s virtual machine a...
New
kokolegorille
https://www.packtpub.com/application-development/mastering-elixir A new resource, it seems… I did not read it (yet?). Anyone?
New
radar
: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...
New
PragmaticBookshelf
Alexander Koutmos Bruce A. Tate @redrapids Frank Hunleth @fhunleth edited by Jacquelyn Carter @jkcarter The Elixir programming langua...
New
codestirring
Hey Elixir Forum, I’ve written a ebook called the Phoenix LiveView Cookbook which I’ve written in the hopes of distilling the knowledge ...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement