Dimensional analysis in Rust: how not to crash "Mars Climate Orbiter"

Software is complicated: ensuring that old features keep working, while holding the bugs away, is an every day’s fight. Thankfully, there are many (too often unknown) gems, either built in the language/compiler or as third-party libraries. Some time ago, I introduced SymPy, which allows one to use symbolic maths in Python, and do things such as solving equations or integrating functions. In this article, I will introduce you another nice library, for Rust this time: uom (units of measurement). Read the 1129 words...

Symbolic maths in Python: Attacking a castle with SymPy

While working on my Moon lander guidance software, I am making several small prototypes to test ideas. One of them involves testing several control laws (of the acceleration), which implies quite a lot of manual calculations (to integrate to obtain the velocity and position). Doing these calculations by hand is tedious and error prone, and I thought about using a symbolic math program. Usually, a programming language can not manipulate variables without predefined values, but I found a Python library which can: SymPy. Read the 2028 words...

Software quality notes: nested "for" loops considered harmful

While working on Exomars as a software engineer, I was notified an issue to fix. I thought it was an interesting one, and spent some moments to think about how it could have been prevented in the first place. I care about code quality, and always try to build reliable software. For this purpose, I do not believe in rockstar developers (we are all fallible humans), but rather in (automatically enforced) processes and tools. Read the 1135 words...

Hello World with Rust and WebAssembly

For the second part of my Rust & WebAssembly journey, I will write a basic hello world project. Note: you can jump to the demo by clicking here. This will give me the opportunity to demonstrate how to write a simple Wasm module in Rust. I will focus on a simple frontend and ignore the backend: no complicated GET or POST requests, no websockets, etc. This article will present how to build a simple game, such as Matt’s Pont. Read the 3047 words...

Introduction to Rust and WebAssembly

In this article, I would like to talk about two technologies I’ve been playing with recently: the Rust programming language and the WebAssembly standard. I’ll start by presenting each of these two technologies and which problems they are trying to solve. Then, I’ll explain what are the advantages of a Rust-powered Wasm module, and why it can be useful. Finally, I’ll provide links to interesting documentation. WebAssembly Since many years, client side web applications, implemented in JavaScript, have been becoming larger and larger. Read the 1227 words...