Iurii dev.sweatco.in

Why we ended up with a centralized logging solution

In the process of moving to our ideal logging system, we constantly discussed the pros and cons of different solutions, and each of us defended the requirement close to them or changed the configuration parameters they needed, asked intriguing questions or sent us back to the original set of requirements.

I love write-ups like this one from the trenches where people share their journey to deciding on a particular solution. Every decision has a context and many blog posts gloss over that, resulting in silver bullet-y hand waving. That’s not super useful when trying to make your own decisions. What is super-useful is being able to understand the circumstances in which others made a choice. That way you can decide if your situation is close enough to theirs to make a similar decision… or not.

Opensource.com Icon Opensource.com

Use systemd timers instead of cronjobs

Is it time to migrate away from cron?

Like cron jobs, systemd timers can trigger events—shell scripts and programs—at specified time intervals, such as once a day, on a specific day of the month (perhaps only if it is a Monday), or every 15 minutes during business hours from 8am to 6pm. Timers can also do some things that cron jobs cannot. For example, a timer can trigger a script or program to run a specific amount of time after an event such as boot, startup, completion of a previous task, or even the previous completion of the service unit called by the timer.

Raul Jordan rauljordan.com

This is why Go’s error handling is awesome

// In controllers/user.go
if err := database.CreateUser(); err != nil {
    log.Errorf("Could not create user: %v", err)
}

// In database/user.go
func CreateUser() error {
    if err := db.SQLQuery(userExistsQuery); err != nil {
        return fmt.Errorf("could not check if user already exists in db: %v", err)
    }
    ...
}

// In database/sql.go
func SQLQuery() error {
    if err := sql.Connected(); err != nil {
        return fmt.Errorf("could not establish db connection: %v", err)
    }
    ...
}

// in sql/sql.go
func Connected() error {
    if noInternet {
        return errors.New("no internet connection")
    }
    ...
}

The beauty of the code above is that each of these errors are completely namespaced by their respective function, are informative, and only handle responsibility for what they are aware of. This sort of error chaining using fmt.Errorf("something went wrong: %v", err) makes it trivial to build awesome error messages that can tell you exactly what went wrong based on how you defined it.

Marko Saric markosaric.com

Only 9% of visitors give GDPR consent to be tracked

Marko Saric, who you may remember as the only content marketer we’ve met who runs Linux:

Most GDPR consent banner implementations are deliberately engineered to be difficult to use and are full of dark patterns that are illegal according to the law.

I wanted to find out how many visitors would engage with a GDPR banner if it were implemented properly (not obtrusive, easy way to say “no” etc) and how many would grant consent to their information being collected and shared.

DigitalOcean Icon DigitalOcean – Sponsored

Free Python machine learning projects ebook

logged by @logbot permalink

As machine learning is increasingly leveraged to find patterns, conduct analysis, and make decisions — sometimes without final input from humans who may be impacted by these findings — it is crucial to invest in bringing more stakeholders into the fold.

This a free book of Python projects in machine learning from Lisa Tagliaferri and Brian Boucheron (DigitalOcean) tries to do just that: to equip the developers of today and tomorrow with tools they can use to better understand, evaluate, and shape machine learning to help ensure that it is serving us all.

Patrick DeVivo github.com

Using SQL to query git repos

gitqlite is a tool for running SQL queries on git repositories. It implements SQLite virtual tables and uses go-git. It’s meant for ad-hoc querying of git repositories on disk through a common interface (SQL), as an alternative to patching together various shell commands.

Mine your repo’s history for goodies. Here’s how to get commit count by author email:

SELECT author_email, count(*) FROM commits GROUP BY author_email ORDER BY count(*) DESC

Maxime Vaillancourt turven.xyz

See how many other people are currently on the same page as you

A neat idea:

turven is a tiny widget that shows how many people are currently on the same page as you, for “warm fuzzy feelings” purposes. There’s something cool about seeing that there’s another soul out there, somewhere on our little blue planet, who’s reading the same thing at the same moment ✨

In practice, I’m not sure if it’ll make us feel less lonely or more lonely:

You’re the only person in the whole world on this web page right now. Why not invite a friend?

I guess it depends on which web pages you frequent…

Sheshbabu Chinnakonda sheshbabu.com

Rust for JavaScript developers (functions and control flow)

This is part 3 of a three part series from Sheshbabu Chinnakonda introducing the Rust language to JavaScript developers — this one is focused on functions and control flow.

When Shesh kicked off this series he said, “I find it easier to understand something new if it was explained in terms of something I already know. I thought there might be others like me.”

BTW, here are links to the others from this series:

Founders Talk Founders Talk #71

From acquisition to full conviction

Guy Podjarny is the Founder of Snyk, a security platform that empowers software-driven businesses to develop fast and stay secure. Prior to Snyk, Guy founded Blaze which was acquired by Akamai and became CTO. We talked through the topic of acquisition — the sale, the merge, the learnings, and why Guy might not be planning for Snyk to be acquired anytime soon. We started the conversation with Snyk’s recent raise of $150 million dollars.

Brain Science Brain Science #24

Cognitive distortions

How reflective are you with the thoughts you think? In this episode, Mireille and Adam talk through a few more cognitive distortions. These “distortions” are general tendencies or patterns of thinking that are false or inaccurate, which also have the potential to cause psychological damage. Generally speaking, people develop cognitive distortions as a way of coping with adverse life events. The more prolonged and severe those adverse events are, the more likely it is that one or more cognitive distortions will form. By recognizing these patterns in our thoughts and possibly how, when, or why we’re prone to use them, like many things, we create the opportunity to change them.

Jon Bodner capitalone.com

Go is boring...and that’s fantastic!

Jon Bodner shared a deep dive into why the world depends on simple, reliable, well-understood technologies like Go.

The one exciting thing that Go has is built-in concurrency support via goroutines, channels, and select. However, it is based on ideas from CSP, communicating sequential processes, which was first described in 1978.

This doesn’t sound like a programming language from the 21st century, does it?

And yet, Go is the 3rd most wanted and (maybe not coincidentally) the 3rd highest paying language, according to Stack Overflow. Every startup in Silicon Valley is using Go to build their infrastructure. Docker, Kubernetes, etcd, Terraform, Vault, Consul, Traefik and lots of other cutting-edge projects are written in Go. So what’s going on? Why is everyone interested in this boring language?

As a fun aside, I searched the Go Time transcripts for the word “boring” and found this gem from Kelsey Hightower on Go Time #114

When infrastructure gets boring, something else will become exciting above it.

…which makes sense why Go being boring is fantastic, because there’s so many exciting things being built with it.

Brett Cannon snarky.ca

What exactly is Python?

Brett Cannon, writing for his personal blog:

It’s no secret that I want a Python implementation for WebAssembly. It would not only get Python into the browser, but with the fact that both iOS and Android support running JavaScript as part of an app it would also get Python on to mobile. That all excites me.

But when thinking about the daunting task of creating a new implementation of Python, my brain also began asking the question of what exactly is Python?

What follows from this point in Brett’s post is a stream of consciousness writing style of question and answer, back and forth, iteration over all the points of what makes Python be Python in an attempt to consider what it might take to “compile Python down to WebAssembly.”

Tim O'Reilly O'Reilly Media

Welcome to the 21st century

This lengthly post from Tim O’Reilly is a must read in my opinion. His perspective is that the 21st hadn’t really begun until this year, 2020, “when the COVID19 pandemic took hold.”

…when we look back, we will understand that the 21st century truly began this year, when the COVID19 pandemic took hold. We are entering the century of being blindsided by things that we have been warned about for decades but never took seriously enough to prepare for, the century of lurching from crisis to crisis until, at last, we shake ourselves from the illusion that our world will go back to the comfortable way it was and begin the process of rebuilding our society from the ground up.

Tim goes on to ask and answer questions like: “What might be gone, never to return? What might come, now completely unexpected?” He also shares insight as “news from the future” regarding the direction of trend lines.

…to understand whether a trend like work-from-home is becoming the start of a new normal, sometimes the trend just hits you in the face. First Twitter, then Facebook announcing a commitment to new work from home policies even after the crisis is an obvious sign.

Podcasts from Changelog

Weekly shows about software development, developer culture, open source, building startups, artificial intelligence, brain science, and the people involved.

0:00 / 0:00