Category Programming

Minimized Cave Generation with Cellular Automata

Featured Image for Minimized Cave Generation with Cellular Automata

Yesterday I wrote a cellular automaton based procedural caves generator algorithm that fits in a business card. The algorithm itself is not new. I already did it in C++, Rust, Javascript and many more languages. It is my personal approach to “Hello World”: when I want to try a new language, write a PCG algorithm in it.

Typescript Unit Test for Web Applications

Featured Image for Typescript Unit Test for Web Applications

You know, I quite enjoy TypeScript. It is not my favorite language ever, I am more a functional type of guy, but it is the best way to bring order into the JavaScript mess without too many hassles. Moreover, it is the language in which I prototyped my Astronomical Calendar Generator. Now that I’m working on extending it, I want to keep using TypeScript and stop falling in my usual decision paralysis.

I needed to trust my gut feelings: Kotlin and Android

Featured Image for I needed to trust my gut feelings: Kotlin and Android

In this year top-5 promising languages list, I put Kotlin in fifth place among the languages that you should definitely check in 2017. This week Google I\O announced that Kotlin is now an officially supported language for Android Development. I like to be right in my forecast. However, I need to be honest. Back then, I didn’t know well why I put it there. I just had some kind of ethereal intuition.

How to build rusqlite on Windows

Featured Image for How to build rusqlite on Windows

Yesterday I spent way more time than needed for compiling this dependency on Windows. The problem is that the error was not informative enough and hard to google, and, mostly, that there is no standardized way to look for installed libraries in Windows. Just to be clear, there is no reliable way to use pkg-config on Windows as in Unix-like systems. The problem The rusqlite crate is an ergonomic binding of SQLite in Rust.

Any news from Clojure front?

Featured Image for Any news from Clojure front?

Some days ago, I was cleaning my Code folder from old snippets and test projects when I found an old Clojure package I did to test some Clojure feature. I remember that I kept the project sleeping in my Code folder because I thought that it would come in handy when Clojure 1.9 would be released. However, I left that project stub back in February 2016, more than a year ago.

Most Promising Programming Languages of 2017

Featured Image for Most Promising Programming Languages of 2017

Another year, another 5 promising programming languages you should keep an eye on in 2017. As usual, I’d like to write the warning I put here every year: in this list, you will not find programming languages for hiring purposes, but for very long-time investments and for pure programming fetish. So, now that you know what I am talking about, here we go with the top 5 for 2017. Top 5 Promising Programming Languages for 2017 Rust Here we go, again.

How to build a Telegram SpyBot

Featured Image for How to build a Telegram SpyBot

Internet/Tech literate people continuously talk about privacy. The majority of people, however, do not care. This is hard to digest for the first group of people, but it is the truth and we should start considering this fact to make things better in the future.

Why I’m talking about this? Because, in the last weeks, I’ve found an extremely easy way to spy any Telegram group. It is not a dark market secret (in fact it is perfectly documented in the Telegram Bot API), but works perfectly because nobody cares. While every internet and privacy activist is talking about how Google, Facebook and Yahoo are spying on our email, telegram bots that are actually logging all the messages in all the groups in plain text. They are bot, by unknown programmers, without ToS, without anything, reading all your messages and potentially storing them who knows where.

So, I will explain to you how to build a Telegram SpyBot. Hopefully you can use it to teach some privacy lesson to your friends.

Python for Practical Statistics

Featured Image for Python for Practical Statistics

These days were a bit busy. I want to break the silence with an interesting link to a video. This is an interesting and fun to watch talk coming from the last PyCon. It talks about “practical statistics”, that is, how you can try to produce (or validate) a model when you can not compute the analytic model of a phenomenon. Many of the technique he describes can be used to any language, so it is suitable even if you do not program in Python.

My view on Elixir and Clojure

Featured Image for My view on Elixir and Clojure

Elixir and Clojure are two uprising and fun functional languages. As you know, I talked about both of them in the article on the most promising languages of 2016, and, in fact, they are the only real functional languages I mentioned in there. At the time, I didn’t really explore these two languages in deep, and in fact, I think I was a bit too hard on Clojure. During this half year, I had the opportunity to go deeper in Clojure and my opinion on the languages increased accordingly.

TypeScript Binary Heap

Featured Image for TypeScript Binary Heap

Yesterday I converted a Binary Heap data structure in TypeScript. The original code is here, in the Eloquent JavaScript online book by Marijn Haverbeke. In short, a Binary Heap is a common data structure for a priority queue. We want to put inside the queue many values (or an object) and you want to extract the smallest value (or the object with the smallest score) in the most efficient way.