Sign in

Senior developer

This is a follow up of the 2018 article, Building a Python package, and a docker image using Pipenv. Pipenv has been donated to the Python Packaging Authority and did not gain much traction, probably because it predates the PEP 518 that gave us the pyproject.toml as a replacement of the infamous setup.py file.

The aim of using Poetry is to solve the same issues the old fashioned way has: requirements.txt files, virtual environments, version pinning, etc. The big win over Pipenv is that pip 19 natively supports pyproject.toml, hence it will be the only file you manage.

Let’s start…


The following article was presented during the Hashicorp Romandie User Group, June the 4th 2020. The goal was to show what was done with Nomad in the context of a bank with quite a lot of application to be migrated away from WebSphere. Most of them are relatively old and required first to be moved to GitLab. Developers are introduced to new practices, this is what is currently done.

The plan

The goals from day one were making things as simple as possible for the people as well as setting up some automation whenever possible. The breaking change from the current situation…


Terraform is about managing a desired state, and an observed state so changes can be expressed in a descriptive way and be applied on the required changes only. Any changes modifies a big JSON file representing the observed state and it's recommended to keep track of that file, e.g. we use Git.

It's all nice and warm until you start to manage resources to are persisting sensitive values in that big JSON state. Secrets in Git are a big no-no and you should have tools like git-secrets set up. Here are some solutions for you.

Storing the state, elsewhere, e.g…


For the first time in my career, I have been put in a supporting position sitting around GitLab, its continuous integration and a lot of legendary (a.k.a legacy) software (mostly Java). It’s quite hard to get into those old pieces of code, to make them build in the new settings, or add the continuous integration configuration. Those things had been needed for years. How to respect the conventions (or lack of) they used back then? EditorConfig comes to the rescue.

Artwork by Kat On (source https://treyhunner.com/editorconfig-slides/)

What is EditorConfig

Simply put, it’s a configuration file informing the text editor how to manage some files. You need at least one…


Despite all the fuss around Java8 (old LTS) end of life and Java11 (current LTS) licensing model, there is good reasons to move away from Java8 when it comes to containers.

End of Public Updates of Java SE 8

Java SE 8 is going through the End of Public Updates process for legacy releases. Oracle will continue to provide free public updates and auto updates of Java SE 8, until at least the end of December 2020 for Personal Users, and January 2019 for Commercial Users.

https://www.oracle.com/technetwork/java/java-se-support-roadmap.html

The main reasons are that Java8 cannot propertly read the memory limitations from…


In my past and current journey using the quite enjoyable Go programming language, there is one thing that bite me and stuck as an unhappy experience. The fact that you cannot always trust the == nil idiom.

Go fmt/print.go source code reads.

// If it's a nil pointer, just say "<nil>". The likeliest causes
// are a Stringer that fails to guard against nil or a nil
// pointer for a value receiver, and in either case, "<nil>" is
// a nice result.
if v := reflect.ValueOf(arg); v.Kind() == reflect.Ptr && v.IsNil() {

Which is a workaround to recover from…


If you follow the very prolific Kenneth Reitz, you might have already started using pipenv, the Python Dev Workflow for Humans. If you don’t, give it a try, as it hides away many of the issues of Python development, like setting up a virtual env or juggling with the requirements.txt files.

The goal here is to setup a basic Flask web application.

# hello_world/__init__.py
from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
return "Hello World!"

if __name__ == "__main__":
app.run()

That will be our “Hello world” application. Now starts the hard part, using Pipenv.

# creating the Pipfile…


For long enough I’ve been able to avoid using Microsoft Word as much as possible. Since I got the chance to get acquainted with John MacFarlane’s pandoc I don’t see any reason to come back. I’ll present you some tooling using vim, make, pandoc, and some extensions to pandoc to produce great report, article, issue from Markdown.

Let’s get started with a simple Markdown document with some metadata formatted in YAML.

---
title: My first report
author: Yoan Blanc <yoan@dosimple.ch>
---
Hello world

Okay, let’s turn this into a PDF file via latex.

$ pandoc -t latex -o hello.pdf hello.md


So, you’ve built a great Python web application using Flask, Django, aiohttp, or Falcon. The next issue you could be facing is probably the setup regarding the deployment. We will explore how to use docker-compose to deploy a WSGI application using uWSGI and NGINX.

Container vs Virtual Environment

As Kelsey Heightower mentioned during his last PyCon keynote: don’t use system Python.

Python has become a central part of many UN*X distributions. Hence you don’t want to mess with your system Python. A Docker container is a great way to have a specific Python version.

Virtual environment for Python are gorgeous for development but…


Following last year’s article on Slack, here is how to create a bot for Discord. We will go through a minimalist bot that does close to nothing. Most of the provided examples using libraries like discord.py hide asyncio away. Here we will make it explicit how it works under the hood. Be aware that this is not the easiest way to build a bot but a step-stone to understand what complete libraries do for you.

All you need is a Discord account, Python 3.6 or higher and a way to install packages, e.g. pip or conda. The examples are using…

Yoan Blanc

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