oleg_log
1.94K subscribers
1.82K photos
127 videos
9 files
2.7K links
Shelter for antisocial programmers "Oleg"

halp: @olegkovalov
web: https://olegk.dev
fov: @oleg_fov
chat: @oleg_log_blabla
podcast: @generictalks

about: https://t.me/oleg_log/3200
Download Telegram
New format: Monday rant or #monran

Rust 🤦‍♂️ I got a mention in one Rust PR, and oh, these imports (use keyword). See the screenshot in the next post.

Someone smart said that type-driven programming is another dimension of programming (orthogonal to code). For me, Rust's imports add one more dimension (see pic).

I just don't get this unneeded complexity and 40 ways of doing obvious AND SIMPLE stuff. IDE can hide, it buuuut isn't this a way to solve a problem that shouldn't exist at all, mm?

Lovely (even by crustaceans) mod/crate topic I will leave for another Monday 😥
Go if's with init statement #monran

We all know such expression:
if ok := foo(); !ok {
// ...
}


However, some big-brains prefer to squeeze as much as possible in it:
if err := foo(ctx, logger,
user, &pb.MetaData{...},
&payload, whatever...,
); err != nil {
// ...
}


To be honest, I'm jealous. I want to read this code as easily as the author. I have a bad time trying to understand the point of pushing everything inside if and complicated things.

Is the following version not good enough?
err := foo(ctx, logger,
user, &pb.MetaData{...},
&payload, whatever...,
);
if err != nil {
// ...
}


Argh.
Oops, I almost missed #monran post. Putting changelog in README.

Damn, that's completely useless and wrong thing. I don't care that v0.69.420 contains 37 bug fixes and updates node_modules.

I want to see what this project DOES, how to RUN it, where to ASK for help and maybe SPONSOR. Lovely one: check the LICENSE.

So, please, don't put the whole project changelog in README, just KISS.
Late but still #monran: all-in-one CI job.

I don't get it when just 1 job builds all the images and pushes them to the registry. Well, that's simple, right?

But there is at least 1 flaw: you have an incident, 1 service has a bug, you have a fix for it, you just want to deploy the fixit. As you can guess, you can't! You just wait for all other N-1 services to build first. Crazy!

I literally had this situation; we had a 20-minute outage (no user impact, BTW) because we were waiting for a pipeline to build astro-spark-svc, galactus and yada-yada-proxy instead of pushing json-to-json service right after a green build.