Go 1.16 was released last month, and it contain some interesting new features. Among them, one that recently caught my eye is the embed package — which provides the ability to embed static files into the binary compiled with
There were already some libraries from the community that allowed to achieve this, but the release of this native package might bring a more idiomatic way of embedding files into Go programs.
How can this be useful? A good example that first comes to mind would be a simple configuration file that your program needs to read when starting…
I’ve been a big advocate of Elixir for a few years now, and even though I’m not currently using it for my daily job, I still enjoy using the Phoenix framework to build web applications.
I wrote in a previous tutorial on how to build interactive, real-time features thanks to Phoenix Channels and Presence. Phoenix’s LiveView is a relatively “new” feature that has been released for almost a year now, and I wanted to experiment with it, and see how I could use it to build a small project.
In a previous post about Elixir, I wrote about how to work with collections such as lists and tuples — and talked a bit about streams as well. In this post, I will focus a bit more about this last kind of enumerable data.
We will see how streams differ from the regular
Enum functions, and how to use them through basic examples. We will also look at a more complex use case by building a web crawler, streaming links from parsed HTML pages.
But first, what are Elixir streams? According to the documentation:
In the first two parts of this tutorial, we built the foundations to allow Riders to request a Ride, and Drivers to accept them. This was all done by leveraging features from Phoenix Channels.
In this last part, we’re going to use another feature of Channels, called Presence, to display nearby Drivers on the map. From the official documentation:
Phoenix Presence is a feature which allows you to register process information on a topic and replicate it transparently across a cluster. It’s a combination of both a server-side and client-side library which makes it simple to implement. …
This is the second part of a tutorial about building a small ride-sharing backend with Elixir and the Phoenix framework. Feeling lost? You might want to read part 1 first.
In the previous part, we bootstrapped the project with the authentication endpoint. Now, we’re going to dive into the main feature: real-time matching between Drivers and Riders.
Phoenix Channels allows us to send real-time messages between senders and receivers over HTTP. We’ll usually do it through a websockets connection, although the library also supports long polling. Clients connect to a socket, much like they would with a “native” websockets server…
Real-time is everywhere now. It doesn’t matter which kind of application you want to build — a chat, a shared documents service like Google Docs, a social mobile app with push notifications, a live game, or a live news feed, real-time features are more and more needed in modern applications.
Elixir/OTP is a really good platform whenever you want to build backend systems with real-time features, thanks to the Erlang VM foundations. A famous example of applications using such real-time features are ride-sharing applications like Uber or Lyft. …
Elixir is a language I love to work with, both for personal projects and for my day-to-day job. That is the case for many reasons — such as the performance of the Beam VM, the OTP platform that allows to design robust, fault-tolerant software — and also because of the language itself, which enforces functional programming in order to create more predictable code.
One of the keys to get the best from functional programming — as in many other languages — is the correct use of data structures that come built-in with the language.
One of the most mysterious aspects of the Ruby object model is the existence of singleton classes. Maybe you also read about metaclasses or eigenclasses, they are actually all referring to the same thing. Still, the “official” name being singleton classes, I will use this term through this post.
You actually don’t need to understand much of singleton classes (or to even know they exist at all) to write decent and useful Ruby code. Though, as they form an essential part of the Ruby object model, it is always an interesting — and sometimes powerful — knowledge to have.
'Hey, let’s try this place for lunch. It looks nice’
'Wait! Let’s check on Google or TripAdvisor first to read the reviews'
That was me with my friend, last weekend, trying to find a new place to have breakfast at. How many times did this conversation happen between friends or colleagues when somebody wanted to try a new place? Sounds familiar?
An article last year in the New York Times quotes marketing studies showing that, while most people do care about reading product reviews online, they actually give more importance to negative reviews to guide their decision-making. …
Hello, fellow programmer.
So, you clicked to read this post. I guess you had some reason for doing so.
Maybe you clicked, hoping to discover the key to your next professional success, learning the new shiny language for which everyone will want to hire you in six months. Or maybe you were just pissed off reading another clickbait on a so-called “best” programming language, ready to scroll right at the bottom of the article to insult me. …
Software engineer based in London / Technical coach @makersacademy / Previously @stuart @dicefm & @oncetheapp / Studied @gobelins_paris / Hungry learner.