impl fmt::Display for Blog

Unmarshal complex JSON objects, in Go

6 minute read Published:

Deep dive into the Hell of Unmarshalling...
If you work a lot with APIs in Go, it may happen you have to work with complex JSON responses… Ok, let’s talk about that using a simple example. Imagine you have to work with the following data structure, which represents a Person data structure (like a real person, no trap) with the following characteristics: the name of a Person object: a string; the dog’s name of the Person object (if it exists): a Dog structure that contains only a string, which is its name; the age of the Person object: an integer; the last time the data structure has been updated: a datetime type.

2019, as minimalistic

4 minute read Published:

So.
I became fed up with my electronic materials. The way we evolve, as city dwellers, implies sometimes to adopt a non-minimalistic approach to live: * to have one device to make only one thing, * to have different devices that can be used to make the same thing, * to buy expensive things based on good ads, * to buy expensive things based on what you can do (and finally things you will never do), …

Struct embedding trick to avoid duplicate code

2 minute read Published:

When you are writing go code, and try to make it more flexible, most of the time you are looking for interfaces. A go interface is a good solution to make your code more flexible, or scalable, and is also a way to achieve polymorphism. As the official go documentation discusses about interfaces, interfaces are “named collections of method signatures”. So, to implement an interface on different structs, you have to implement each interface’s method for a given struct.

`go mod`: manage all your dep as a single unit

5 minute read Published:

A simple example of how to use Go modules
Generally, when you want to package your go app, you are creating different packages, inside the same project. The problem is, if you want to use a single internal package, you simply can’t, because you have to import the entire package in order to user a single and very simple feature inside. But, sometimes, you don’t want to use a single extenal package. Indeed, you just want to use a certain number of packages to do a task, and all compatible between them.

Medium_posts

1 minute read Published:

I wrote a few articles for DernierCri about Big Data and Software Development on Medium. If you are French (because the articles are written in French), do not hesitate to read them ;) For your information, I will not use Medium anymore to write blog posts. Also, I will work on blog post translation for those.

The `go build` constraints

4 minute read Published:

Or how to make your program OS agnostic... at compile time
Credits to @ashleymcnamara. Recently, I started to use termui in order to build and run a modular dashboard on the terminal. This dashboard will display my daily todo list, some informations about my git projects/repositories, some daily news, etc… I use everyday: a macbook pro, and a GNU/Linux laptop - so, two different operating systems. Even if macOS and GNU/Linux share similar parts, those systems are strictly differents, and I will have to compile the dashboard for each one.

The 'intelligence' problem in 'artificial intelligence'

3 minute read Published:

Too dumb for you.
The more I listen AI enthousiastic people, the more I can differenciate them in ‘10’ very different groups: * people who think that AI is a synonym of “strong black magic”; * people who are amazed by AI because “come on dude… it’s just maths!”. There is something wrong with “Artificial Intelligence”… I don’t speak about some tech, just the term. Let me explain why, in three different points.

Pyenv

7 minute read Published:

A brief overview of a good Python package manager
I write Python code each day, for personal and professional projects. As I am working on multiple Python projects, old and fresh ones, I have to use different Python versions for those projects, from 2.7.2 to 3.7.0. Also, I want to switch the Python version of my projects very easily and quickly, in case of we have to upgrade the Python version of the software. I am a macOS user, and I use a lot HomeBrew.

It's all about community

4 minute read Published:

People are everything
It’s on - my first blog post for 2018! All my best wishes for this new year, about love, health, and love (quoting Patrick Sebastien, “love is everything”). Ok, let’s talk about something more serious… Today, I want to talk about Rust. Yes, Rust, again. But this time it’s not about something I discovered, implemented or anything along the lines… You know, during the two last years, I tried to “promote” this programming language everywhere, because I strongly believe in Rust.

Rustfest, an amazing experience

2 minute read Published:

In Rust, We Trust
RustFest is an European event to attempt general talks about Rust, and to meet people from the Rust community. RustFest is a two-days event. The first day is a series of talks from the Rust team (in Mozilla) and, predominantly, the Rust community about: the past and the future of the programming language, POCs, how to deal with macros, awesome new projects like 3D games, a gently introduction for developing 2D games (and how easy is it), why a company choosed to move their tech stack to Rust, etc.