4 ms·
Oh wow, I didn't expect to see this on here! I wrote this one night for fun, and then shoved it on a Raspberry Pi with Nerves, where it chugged away on my desk
by QuinnWilton 6y ago
Oh wow, I didn't expect to see this on here! I wrote this one night for fun, and then shoved it on a Raspberry Pi with Nerves, where it chugged away on my desk for a few months, listing all the devices connected to my network.
The code wasn't very complicated, and it definitely isn't perfect -- I'm not doing any load shedding or applying any backpressure -- but it was a ton of fun to write, and really demonstrated how great Elixir and Erlang are for these kinds of projects.
I didn't keep up blogging, but I did get more involved in open source after this post, and I've been actively coding for fun most nights again. Sitting down and building a small and easily scoped out project really went a long way toward bringing myself out of burnout.
- ecmascript 6y agoPlease add some kind of lighter background, the text today is pretty impossible to read. It looks interesting, but I just cannot stand the site. I get that it's a joke or whatever, but I bounced because of the background. I kinda want to read it, but couldn't.
- bodgix 6y agoThanks for sharing the project. I learned a few nice patterns like returning a specialized handler module from a dispatcher function.
- QuinnWilton 6y agoI'm glad you enjoyed it! Some of these patterns are a little controversial, because they add extra layers of indirection + bloat the code, but I've personally always found that they make Erlang / Elixir much more readable. One of my favourite talks is "Writing Beautiful Code" by Garrett Smith (of "MongoDB is Web Scale" fame), and he walks through refactoring a part of CouchDB (also in Erlang) by using some of these techniques. https://www.youtube.com/watch?v=IdJwECjylB4 https://www.youtube.com/watch?v=IdJwECjylB4