Based in New Orleans, this is a blog by Justin Alcon. His posts explore family, art, nature, and technology through photos and prose.

Learning Elixir with Hangman and the Coding Gnome

Learning Elixir with Hangman and the Coding Gnome

I had some great fun taking the Elixir for Programmers course at coding gnome and I wanted to point out some of the cool bits. As the Phoenix/Elixir stack is the new hotness at my workplace, and I love to learn a new tech, I’m all in on Elixir. I decided to take a course before jumping into our domain code, and (spoiler alert) going to the conference in Denver at the end of the month. So what was cool about this course?

First it is accurately named ‘for programmers’. It assumed knowledge of common coding principals and practices, giving it the feeling of learning from a trusted peer who respects the learner. To quote Dave’s tageline: “You're a programmer, so you don't need spoon feeding with the conventional drivel about "this is an integer." No. You need to know what's different, and you want to know quickly.”

The differences and similarities to languages and frameworks that I had previously used were exciting. Starting with similarities, I’ve had some very successful projects in my career use Ruby on Rails and Phoenix Elixir has some great similarities that make me comfortable. The syntax for inserting forms, decorating modules, migrating database schema and more is familiar in a very good way. I feel like this makes me able to get things going a bit faster when they use things that worked well in the past.

The differences from other things also made me excited about being able to do somethings more easily than I had seen in the past. The two most notable to me immediately were the ability to split functionality into services that include and speak to each other easily and live page. See my follow along code here.

The game was implemented in a way that it not only worked, but it would scale for many games to be played at the same time. This is achieved easily by using supervisors and agents, so that one dictionary could provide random words to new games, and new games could easily spawn and keep up with their own tally.

This made it so that we could easily create three types of clients for the game, a text client, a form based HTML client, and a live page based HTML client ‘B2’. This last one was the most interesting to me as the live page feature of Phoenix made it really easy to handle events in the front end without writing javascript, by treating all these actions as messages to be handled and using the pattern matching and functional programming to address these events regardless of origin. The first class of functions, and truly functional approach of the framework are making the tech really fun to learn, and making me able to build things very quickly.

I am hoping to join a Social and Pleasure Club

I am hoping to join a Social and Pleasure Club

About The Hard Thing About Hard Things

About The Hard Thing About Hard Things