Okay like many people so you might have seen the price tag of something
£9.50 and because of that you would have thought that float is great for currency, but what if I told you that float is the worst data type to use for dealing with currency, the reason why it’s not suitable for currency because float can be unpredictable and volatile, say for example you type in
9.50, save it to the database, then fetch it from the database and you might end up getting something like
9.49999999 and that can lead to miscalculation and can be problematic.
The thing with float is that it’s can’t accurately represent the base 10 multiples that we use for money, the more ideal datatype for money would be an integer for example just save £9.50 as 950 in integer and format it as you are outputting it.
Don’t get me wrong float is suitable for many things, like coordination (GPS and Vectors), but currency is not one of them.
How to prepare a Raspberry Pi image file on Windows 10 (WSL2)
- Windows 10 May 2020 Update (build number 10.0.19041) or greater
- This is required for WSL2
- Windows Subsystem for Linux 2 (WSL2)
- version 1 does not support ext4 file system, will not work.
Now we are going to prepare an image file with multiple partitions, let create a 1GB image file using WSL2 terminal.
Recently I’ve been trying out gRPC on the first impression, it was really fun to work with, once I the hang of writing a
.proto file and using the code generator protoc, all I had to do was implement the interface (the one with the
Server suffix) which I find very easy to do with the IDE of my choice (GoLand), just of the case of pressing Alt+Enter and then implementing interface it’s generate the spoiler plates for you so you don’t have to write them yourself; once I got past that, and I got the microservices all up and running, all I had to do was set up the client and execute the method, I didn’t even have to think about serialization as
protoc will take care of that for you which is very nice, all I had to do was write the
Elizabeth Castle, St Helier
I decided to revamp my existing infrastructure to something I can easily manage and set up backups and checkpoints. I was running the now discontinued Antergos which is based on top of Arch Linux which is a brilliant operating system, but it’s not very suitable for the enterprise because they often prefer matured application, with Arch Linux you always get given the latest application it’s too new for the enterprise especially for databases, so I thought it would be better to have a new infrastructure setup.