Plurrrr

week 14, 2020

Dependency Injection in Go using Fx

But as your software grows, you start feeling the growing pains – your main function starts becoming more and more convoluted. You start having all sorts of small bits and pieces plugged in here and there – healthchecks, database setup code, metrics, tracers, external API connections, etc etc.

And what if your application grows into a microservice architecture? What do you do when you have five different microservices demanding the same bunch of setup code, specific to your environment?

In this article, I will introduce you to Fx. It’s a Go framework which solves both problems outlined above using dependency injection.

Source: Dependency Injection in Go using Fx, an article by Preslav Mihaylov.

Brachypelma smithi eating

Just before 1PM I gave a a mealworm, Tenebrio molitor, to my Brachypelma smithi. This was the second time it ate in my care, the previous time was last Saturday.

Brachypelma smithi eating a mealworm
Brachypelma smithi eating a mealworm, Tenebrio molitor.

I probably schedule a weekly feeding for this little one.

Ladybird Beetles

In the early evening Adam and Alice collected ladybird beetles, Coccinella sp. in order to release them on the insect hotels we bought recently.

Coccinella spp on an insect hotel
Ladybird beetles, Coccinella sp., resting on an insect hotel.

Several of the beetles ran away from the insect hotels and most likely won't stay.

Buying Plants

Before noon, Esme and I went to garden centre "De Carlton", which is just a short ride from our house. I was not sure if the place wou ld be open but it was. I wanted to buy two orchids, Phalaenopsis sp. And after looking around for a while Esme fell in love with a large specimen of Monstera deliciosa.

Guzmanias on display
Guzmania plants on display.

When I found out it was only 5 euro to have the large plant delivered I decided to buy it as displayed standing inside a nice basket.

Monstera deliciosa in our living room
Monstera deliciosa in our living room.

On our way back, Esme spotted a large branch. In "De Carlton" they have a large branch hanging with plants and lamps attached to it. She wants something like this above our dining table. Despite the branch being large and heavy she insisted on carrying it on her bike while walking.

Moth Orchid Phalaenopsis sp. flowering
Moth Orchid Phalaenopsis sp. flowering.

Past 4pm the two orchids and the Monstera were delivered home. I took photos of the Monstera in its new location, and a photo of each of the orchids against a white background.

Moth Orchid Phalaenopsis sp. flowering
Moth Orchid Phalaenopsis sp. flowering.

The branch Esme took is probably going to be a weekend project. I can't wait to see it in place.

Don’t repeat my mistakes while developing a ML library

A while ago, I took a project where the goal was to develop a Natual Language Processing (NLP) library that would support multiple pre-trained embedding methods (BERT, Elmo, Word2Vec, etc.) — similar to Hugging Face’s transformers but with more models and support for multiple languages. The library should take a document corpus on the input and transform it into an aggregated embedding for each document. The library should be developed in Python 3 and the goal was to integrate it into an online platform for Machine Learning. In the development process, I’ve made many mistakes and I am sharing it with you, so you don’t repeat them. Most importantly I learned a lot!

Source: Don’t repeat my mistakes while developing a Machine Learning library, an article by Roman Orac.

Tarantula rehousing

In the afternoon I rehoused my smallest tarantula, a Chromatopelma cyaneopubescens, from the plastic container it came in when I bought it to a much higher plastic container; 0.65 litre or 0.17 gallon. This species likes to web a lot and with a few twigs, which easily fit in the higher container, I could provide more anchor points.

Chromatopelma cyaneopubescens new terrarium
Chromatopelma cyaneopubescens in its new terrarium.

In the above photo you can see the spider resting on top of some of its old webbing (left) which I transferred when I rehoused the tarantula. You can also see the 1mm holes I drilled for cross-ventilation. I also drilled four 1mm holes in the lid. The substrate to the right is kept slightly moist as this species prefers a dry climate. I used all substrate that came in the original container, which in this new container adds up to a depth of nearly 4cm or 1.57 inches.

How to SSH Properly

SH is a powerful tool which often grants a lot of access to anyone using it to log into a server. In this post, I’m going to talk about a few different ways that you can easily improve the security of your SSH model without needing to deploy a new application or make any huge changes to user experience.

Source: How to SSH Properly, an article by Gus Luxton.

I Am Switching to JS

After 5 years of using Go I am finally moving on. Go has served me well and has been the best language I could have possibly used for the longest time, but it is now the moment for me to let it Go.

Over time Go has not failed to show me its limitations and its issues, to the point where I decided to switch to something more future proof and with a more thriving community.

I don’t want to write this post as a list of things that pushed me away from my previous language, I find that kind of post sterile and of very little use for the readers, this is just a post on what I find great in JavaScript and what made me decide to switch.

Source: I Am Switching to JS.

Falsehoods programmers believe about time

I have repeatedly been confounded to discover just how many mistakes in both test and application code stem from misunderstandings or misconceptions about time. By this I mean both the interesting way in which computers handle time, and the fundamental gotchas inherent in how we humans have constructed our calendar – daylight savings being just the tip of the iceberg.

In fact I have seen so many of these misconceptions crop up in other people’s (and my own) programs that I thought it would be worthwhile to collect a list of the more common problems here.

Source: Falsehoods programmers believe about time, an article by Noah Sussman.

The iPad at 10: Emerging from the Shadow of the iPhone

The 10th anniversary of the iPad isn’t a destination, it’s just an arbitrary point from which to take stock of where things have been and consider where they are going. To do that, it’s instructive to look at more than the endpoints of the iPad’s history and consider what has happened in between. Viewed from that perspective, the state of the iPad ten years later, while at times frustrating, also holds reason for optimism. No single product in Apple’s lineup has more room to grow or potential to change the computing landscape than the iPad does today.

Source: The iPad at 10: Emerging from the Shadow of the iPhone, an article by John Voorhees.

How to Use any() in Python

As a Python programmer, you’ll frequently deal with Booleans and conditional statements—sometimes very complex ones. In those situations, you may need to rely on tools that can simplify logic and consolidate information. Fortunately, any() in Python is such a tool. It looks through the elements in an iterable and returns a single value indicating whether any element is true in a Boolean context, or truthy.

Source: How to Use any() in Python, an article by Alex Ronquillo.