Voice messages are a very convenient way of sending a message to someone, less so when you’re the recipient, you may not be able to listen to a message for many reasons, as it’s a very obvious and intrusive thing.

Wouldn’t be great if a bot could listen to the messages for me, transcribe them, and send me back the text?

A bot on Telegram works like a normal user, only the messages can be either polled for, or received via a web hook as a POST request.

The process to create a bot on Telegram is pretty straightforward: just…

Lately I’ve been working quite a while with JavaScript, React and Redux and more in particular I’ve been trying to do some functional programming.

One of the things that stroke me at first was how functions likefetch are used inside other functions as if they were part of the language, like this:

const getData = url => {

Now, this is fine till you want to test getData while offline, for example. In an object oriented world, I would inject my dependencies through my constructor, how can I do something similar in a functional fashion?

There is a…

Today I was wondering if I could find a more elegant way to compose functions with Kotlin. Let’s imagine we have this:

fun same(val: Int) = val
fun twice(val: Int) = val * 2
fun trice(val: Int) = val * 3
fun composed(val: Int) = same(twice(trice(int)))

That gets the job done, but wouldn’t it be better if there was a way to remove all those brackets and get something more like a pipeline? Keep in mind: the order of execution will be inverse (trice-twice-same), which is not intuitive.

Turns out there is, if we use two awesome Kotlin features: extensions

Daniele Conti

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store