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
https://github.com/happi/theBeamBook A short and personal history of the book I, Erik Stenman (Happi), started writing this book back ...
New
collegeimprovements
by @whatyouhide and @idlehands Elixir offers new paradigms, and challenges you to test in unconventional ways. Start with ExUnit: almost...
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
jack-s9
Simplify and streamline your Elixir Phoenix Deployments. Deploy with tools that are easy to use, maximize Elixir’s features, and have ex...
New
PragmaticBookshelf
Bruce Tate @redrapids edited by Jacquelyn Carter @jkcarter OTP is the heart of the rapidly growing Elixir, the functional language at th...
New
CinderellaMan
Hands-on Elixir & OTP: Cryptocurrency Trading Bot by Kamil Skowron Want to learn Elixir & OTP by creating a real-world project...
New
PragmaticBookshelf
Kevin Hoffman edited by Kelly Talbot @KellyTalbot Reality is event-sourced; your mind processes sight, sound, taste, smell, and touch to...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36820 110
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44265 214
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement