I decided to build a resource monitoring tool in Rust for Raspberry Pi, starting with the monitoring of component temperatures since I have previously written one in Python. In this post, I’ll break down the code related to the temperature monitor (which can be found here) to a more detailed level than usual since you need to be more exhaustive in how you write the code in Rust than in comparison with Python. The advantage of having this application written in Rust instead of Python is that it will need less computer resources to run. At the end of this post, the source code for both the temperature monitoring app and the full resource monitoring app can be found.
Explanation and simulation of the Monty Hall (Three Door) Problem
The Monty Hall problem (also known as the Three door problem) concerns what decision to take in the following scenario: There are three doors, with a prize behind one of them. You get to choose one door, then one of the other doors which doesn't have the prize behind it is opened. And now you have to choose whether you want to change door to the one that is left closed (which you didn't select in the beginning) or keep the door which you selected in the beginning. What do you do?
Learning the basics of Java by writing an RSA-app
Due to the similarities of Python and Java, and Java being so widely used, I wanted to learn at least the basics of the language. I recently took a university course in Java, where one part of it consisted in writing an application which had to meet certain criteria of complexity – other than that, you were free to choose the project yourself. Below, I’ll briefly discuss the RSA-encryption app I wrote and what my impression of Java is. RSA-encryption is explained in this post.
A short description of RSA-encryption
The RSA cryptosystem is an asymmetric encryption/decryption scheme. It being asymmetric means, to put it simply, that the decryption is not a "reversed" encryption that can be worked out by knowing how information is encrypted.