zemfira.me 🐱

Welcome to my blog! ✨

Here I’m trying to write about things that I’m interested in ʕ◔ϖ◔ʔ

The programming languages I use most are Golang and Python.

I’m a very curious person C:

Things I wish I knew about sqlc

A while back, I was able to convince my team to use sqlc. I already used it on some personal projects, but those weren’t complex queries whatsoever. Using sqlc in a commercial setting allowed me to see some of its limitations, or perhaps the shift in the paradigm that you experience while using it. In this article, I want to show you some hacks I found to be useful. Configuring the project First things first, if you have a lot of packages, here’s a cool trick on how to make sure similar config is reused accross different queries: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 --- version: "2" sql: - engine: postgresql queries: internal/account/repository/query.sql schema: &schema db/postgres/migrations gen: go: &go_gen_opts package: repository out: internal/account/repository emit_enum_valid_method: true emit_all_enum_values: true emit_sql_as_comment: true omit_unused_structs: true overrides: # numeric is decimal.Decimal - db_type: pg_catalog.numeric go_type: import: github.com/shopspring/decimal type: Decimal - db_type: pg_catalog.numeric go_type: import: github.com/shopspring/decimal type: Decimal nullable: true # nullable decimal is valid too, need to add it separately - engine: postgresql queries: internal/order/repository/query.sql schema: *schema gen: go: <<: *go_gen_opts out: internal/order/repository overrides: - column: "order.currency" go_type: import: "gitlab.com/letssay/our/custom/moneylib" type: "Currency" ...

February 12, 2025 · 5 min · Zemfira

Go PGO Workshop

Today I invite you to do a hands-on exercise and check out how PGO works in Golang. This demo is based on this repo, which I encourage you to clone: fira.curie/go-pgo-app. Prerequisites You would need the following tools installed on your machine: Docker or Podman - if you’re using podman, you need to enable insecure registry (see below). kind to provision a local k8s cluster in a container. Helm - for deploying our app, Pyroscope, and optionally Grafana. ohayou - for simulating production load. profilecli - for collecting profile data from the app. Assumptions I assume that you know how to work with git, bash, kubernetes, helm, and docker. If you don’t, you can check out the official documentation and helm documentation. ...

September 21, 2024 · 5 min · Zemfira

My life's manifesto

I’ve created a manifesto of how I see this life so far. I’m convinced that it should be relatively easy to create a system of values for an average person like me, who doesn’t have any higher education, or to that matter any background in philosophy etc. Sometimes I can barely spell basic words. Nevertheless, this is my attempt at that. Don’t deliberately harm others Act in a way that minimizes harm to others unless you’re in immediate danger or defending loved ones from a direct threat. Recognize the difference between actual threats and imagined enemies, and avoid fighting unnecessary battles. Kindness Over Revenge Treat others with kindness, even when they’ve wronged you. Seeking revenge perpetuates negativity, while forgiveness and compassion open the door to healing and positive relationships. Revenge rarely brings closure, but empathy and understanding can lead to true peace. Love, Not Hate Choose love, even when it’s difficult. Hate is rarely constructive and often creates more harm than good. Loving others—especially in trying times—can lead to personal growth and healthier relationships, while hate poisons both your mind and your environment. Forgiveness, Not Weakness Being forgiving doesn’t mean being weak or allowing yourself to be mistreated. It means recognizing that people make mistakes and can learn from them. Letting go of grudges frees you from emotional burdens and allows you to move forward with dignity. Collaboration Over Competition Working together achieves more than working against each other. Healthy competition can be motivating, but collaboration fosters innovation, trust, and long-lasting success. Seek to uplift others instead of seeing them as rivals. Balance Challenge and Rest Push yourself to grow and improve, but don’t neglect self-care. Rest and reflection are as important as hard work. Without balance, you risk burnout and losing sight of what really matters in life. A fulfilled life requires both effort and recovery. Engage in Meaningful Dialogue Always be open to discussion. Speak your truth, but listen carefully to others. Sometimes, they may have perspectives that challenge your own. It’s okay to be wrong and to change your mind when presented with reasonable evidence. Meaningful dialogue promotes understanding and growth. Transcend Ego Let go of the idea of a fixed “self.” You are constantly evolving, and the choices you make today shape who you will be tomorrow. Act with this awareness, knowing that your present actions lay the groundwork for your future self. Don’t let ego-driven decisions cloud your judgment. Be Aware of Bias Understand that you will inevitably have cognitive biases, and be mindful of when you’re cutting corners in your thinking. Constant self-reflection helps you become more honest with yourself and others, allowing for better decision-making and personal growth. Action Over Inaction Tyranny thrives on the inaction of many. If you remain silent or disengaged, you allow destructive forces to grow unchecked. Speak up and participate in shaping the world around you. Even small actions can have meaningful impact, and political engagement is a key part of improving daily life. Protect Your Inner Child Cultivate self-love and protect the vulnerable parts of your soul. Life’s pressures can harden you, but it’s vital to nurture your inner child—your curiosity, creativity, and emotional well-being. Only you can guard these qualities and keep them alive. Collaboration for Growth Human relationships thrive on cooperation, not survival of the fittest. While natural selection may apply in evolution, human societies flourish through collaboration and mutual support. Building trust and positive connections leads to long-term personal and societal growth. On helping fellow human beings Don’t try to help those unwilling to help themselves. Consequently, don’t seek help unless you’re ready to put in the hard work. This is an evolving document. ...

September 20, 2024 · 3 min · Zemfira

How to integrate MobileID to your python project

Abstract This is the second article of the series Estonian Identity Systems. Here we will talk about MobileID service integration. Estonian id systems provide examples in java, .net, and php, but none of these languages collide with my tech stack, so I decided to use python. We will not talk about digital signing in this article but instead, focus on authentication with Web eID. MobileID system is very alike to SmartID from a developer’s perspective. You might want to read the first article of the series “How to integrate SmartID to your python project” if you haven’t done it yet. ...

June 25, 2022 · 5 min · Zemfira

How to integrate SmartID to your python project

Abstract Recently I had a chance to work with Estonian identification systems. It was an interesting experience that I’m willing to share. Estonian id systems provide examples in java, .net, and php, but none of these languages collide with my tech stack, so I decided to use python. We will not talk about digital signing in this article but instead, focus on authentication with Web eID. You can think of the SmartID system as Firebase, but much more complex one. ...

May 8, 2022 · 6 min · Zemfira