Tag Archives: link

Golang’s sync.Map internals

Great article on the topic — https://victoriametrics.com/blog/go-sync-map/index.html. The whole series of articles is solid, so please take a look if you are interested. Let me share the most important insights. How it works Internal structure is:

MVC, MVP, MVVM, MVVM-C, and VIPER architecture patterns comparison

Great diagram comparing MVC, MVP, MVVM, MVVM-C, and VIPER architecture patterns from ByteByteGo: They also provide the following description: — MVC, the oldest pattern, dates back almost 50 years — Every pattern has a «view» (V) responsible for displaying content and receiving user input — Most patterns include a «model» (M) to manage business data …

Read more

Maps internals in Go

Idea Map is passed as a value, but it consists of a pointer to hmap which has all the details on map implementation. So, if you change/add to map, it will be reflected everywhere. And that’s why you cannot assign to an uninitialized map (no memory allocated, no hash seed generated yet). runtime/map.go

Buckets …

Read more

Backup your Spotify playlists and activity

* http://www.spotmybackup.com/ Simple tool to export all your data into a file. Also you can import it into your account. So it could be used to backup your Spotify data (uses json format, only track ids, no titles). * https://www.tunemymusic.com/ It allows to transfer data between different music services and also export to a csv …

Read more

Outline — simple and powerful vpn on your server

https://getoutline.org/ Just a couple of mouse clicks, and it will create a new droplet on DigitalOcean for you (or any other provider from the list). Very easy to install, and works good so far.

Integration tests with testcontainers-go

Here is the go library that simplifies integration tests with docker containers — https://github.com/testcontainers/testcontainers-go. That’s how you can use it to test sql — https://github.com/testcontainers/testcontainers-go/blob/master/docs/examples/cockroachdb.md. Project documentation — https://golang.testcontainers.org/features/docker_compose/ The idea is to prepare the environment, build your app, then make requests and check the DB state.

Test Push Notifications

https://github.com/onmyway133/PushNotifications

env-file parser for Goland

You can use env-file parser for running and debugging your app in Jetbrains’ products like Goland. It’s pretty simple and works. https://github.com/Ashald/EnvFile

What is teamlead’s first duty

Sarah Mei «We think awful code is written by awful devs. But in reality, it’s written by reasonable devs in awful circumstances.» (source) So, teamlead is there to improve circumstances.

Nice list of image resizer libs in go

With speedtests and other nice things. https://github.com/fawick/speedtest-resize I tried these two: https://github.com/disintegration/imaging https://github.com/bamiaux/rez They are quite the same talking about file sizes and imaging is muuch easier to use.