Skip to content

Blog

Sign here please!

In December my working laptop decided to add some fun to my life, and for whatever reason my commits stopped being signed by me. I discovered it when I tried to merge approved PR for new feature, and Github didn’t allow me to do it.

It’s always confusing when everything worked fine 2 hours ago, you didn’t do anything related to git or configuration of system/IDE — and somehow world changed and now you need to fix it. It’s part of software engineering that I enjoy whenever.

How to start signing commits again (for Github)

  1. Check if you have generated ssh key in your Github account (if you don’t have one — use Github documentation for generating a new one).

  2. Check that your git user is the one you want to sign with

Terminal window
git config user.email
  1. Configure signing commits in git, where path_to_ssh is something like /Users/szaiats/.ssh/id_ed25519.pub
Terminal window
git config --global gpg.format ssh
git config --global user.signingkey <path_to_ssh>
git config --global commit.gpgsign true
  1. Configure allowed signers - put there your information "{email} namespace=git {ssh key}", for example:
Terminal window
touch ~/.config/git/allowed_signers
git config --global gpg.ssh.allowedSignersFile ~/.config/git/allowed_signers
echo "svetzayats@gmail.com namespaces=\"git\" /Users/szaiats/.ssh/id_ed25519.pub" >> ~/.config/git/allowed_signers
  1. Check settings of your IDE. I use vscode and I needed to ā€œEnable Commit Signingā€ to make signed commits from UI; otherwise I need always commit with -S flag:
Terminal window
git commit -S -m "My signed commit"
  1. Verify that everything works
Terminal window
git log --show-signature -1

This one, by the way, helps a lot in debugging why a commit might not be signed. It shows information about problems if there are any.

Also you can check signature verification status on Github — in commits section

New Advent of Code, new attempt

Every year I start solving Advent of Code.

Okay, I was sure that I did it every year, but it looks like I only did it in 2021 and 2022 — and after that I took a break. It seems like moving to a new country, changing jobs, and emigrating can change your memory or perspective.

But nevertheless — I started to solve it this year again. And great part about it that I not only have a awesome time, trying to solve problems and tickling my brain, but also I learn new things.

Discoveries at this moment:

  • The technique (or pattern, or special data structure) of a monotonic stack for solving problems. Basically, it’s a stack (obviously) whose elements are always increasing or always decreasing. I liked the explanation from here (clear example + list of related LeetCode problems) and here (interactive example of building a monotonic stack + when to apply it). I needed it for the Day 3 Part 2 problem, where I had to define the biggest possible number that I could construct from a sequence of numbers.

  • structuredClone method for creating deep clones of values in JS — very handy with arrays and objects. I almost wrote the familiar JSON.parse(JSON.stringify(arr)), but stopped for a moment and searched. I remembered that there is a newer API I can use. Powerful, but with some limitations (as everything good in this world): for example, functions and DOM nodes cannot be cloned with structuredClone. You can find some details about the algorithm on MDN.

Want to learn Russian? Curated list of resources

My American colleague recently asked me for recommendations on how to self-study Russian. I reached out to a friend of mine who teaches Russian as a foreign language professionally in Taipei, and now I’m happy to share a list of useful resources:

Free resources

Textbooks

Also here you can find a collection of free tools and materials https://gratisglobal.com/learn-russian-free/#news-media, but this list wasn’t tested personally by me, my friend or her colleagues. But there is definetely a lot of interesting and useful things.

Apps

  • Babbel+ is surprisingly good for Russian.

Youtube

Books

Do you want to be a team lead? You might have to

I just listened to an episode of The Pragmatic Engineer podcast with Laura Tacho, CTO at DX - it’s a great conversation that I recommend to anyone in the industry.

It advocates for something I truly believe in: measure before making conclusions. But the part that resonated with me the most that probably in 2 years, every developer will operate like a team lead — managing a team of AI agents. So if you’re not aiming to become a lead, you might still need to think like one. Now is a good time to start sharpening your technical depth, code review skills and coordination abilities (actually there’s never a bad time for this).

P.S. And they also shared a great use case for AI: code migrations. Like unit tests, migrations are something most developers don’t enjoy (I believe) — but here AI can really make a difference.

Solved all React challenges on Hackerrank and not satisfied

I read that hakerrank has challenges organized by domain — for example, the React domain — and decided to solve them as part of my interview preparation.

I completed all of them, but not satisfied. Here’s why:

  1. The challenges don’t feel like real interviews. They give you a lot of code, while in actual interviews you often write components almost from scratch.
  2. The tests are not reliable. In one case, I had to remove the key from react element just to make their test pass. Test kept a reference to the element at the start and didn’t update it after re-render. In another challenge, tests used hardcoded outdated dates, so I had to add a weird condition just to pass.
  3. The platform itself has issues. Sometimes my progress wasn’t saved. A couple of times I submitted a solution, saw the ā€œCongratulationsā€ screen, went back to the challenge list — and it showed the challenge as unsolved. I had to redo the solution. Eventually, I started double-clicking the submit button just in case, because I didn’t want to retype everything again.

Overall, I regret the time spent a little, because mostly I fought with tests, not with solving problem. Moreover, challenges turned out to be not so interesting. I liked leetcode experience more.

Hakerrank page with completed challenges