<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alexey Yuzhakov on Medium]]></title>
        <description><![CDATA[Stories by Alexey Yuzhakov on Medium]]></description>
        <link>https://medium.com/@sibprogrammer?source=rss-f88b51058739------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bSm3-tGk9QJJn_6ppjt08g.jpeg</url>
            <title>Stories by Alexey Yuzhakov on Medium</title>
            <link>https://medium.com/@sibprogrammer?source=rss-f88b51058739------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 01:07:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sibprogrammer/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Moving to the UK: My Journey to the Global Talent Visa and New Opportunities]]></title>
            <link>https://sibprogrammer.medium.com/moving-to-the-uk-my-journey-to-the-global-talent-visa-and-new-opportunities-ea0dba6eeb26?source=rss-f88b51058739------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea0dba6eeb26</guid>
            <category><![CDATA[immigration]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Alexey Yuzhakov]]></dc:creator>
            <pubDate>Mon, 28 Oct 2024 20:53:56 GMT</pubDate>
            <atom:updated>2025-01-15T09:14:23.036Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*YCb_yjl59_DKfy96-BdoVA.jpeg" /><figcaption>Listen up! This is London, Baby :)</figcaption></figure><p>Hello! My name is Alexey Yuzhakov. My journey with technology began back in the 1990s, when I was a teenager. What started as a hobby eventually turned into a career. I’ve gone from being a programmer to an architect and engineering team lead, and now I hold a UK Global Talent Visa. After nearly three decades in tech, my passion for my work has helped me and my family relocate to the United Kingdom. I remain dedicated to my calling and am excited to explore new opportunities. Below, I’d like to share my story!</p><h3>Career in Tech: From Programming Passion to Leadership Roles</h3><p>My passion for programming began when I was 10 years old. Despite tough times, my parents bought me a ZX Spectrum in 1993. I started learning Basic and then moved on to mastering assembly language. Since then, programming has been more than just a job — it’s been my hobby.</p><p>My tech career began in 2001, when I was a student and started writing commercial software. Later, I became a developer and worked for various companies.</p><p>Nineteen years ago, I joined Plesk (a WebPros holding company), where I progressed from a programmer to an architect and eventually became an engineering team lead. For the last 15 years, I’ve been leading development teams. Although my current role is more focused on team management, I still try to find time to write code, including for personal pet projects.</p><h3>My Approach to Career and Technologies</h3><p>In one way or another, I’ve been writing code for over 30 years now. I’ve transitioned from developing desktop and mobile apps to working on web projects and cloud infrastructures. I try not to tie myself to any single programming language or framework — what’s most important to me is solving problems and achieving results.</p><p>I’ve studied and continue to explore various technologies, keeping up with new trends in the industry. Whenever I face a challenge, whether it’s project management, programming in a new language, or implementing machine learning, I take a fundamental approach (reading up extensively on the subject) and stay focused on the end goal. This combination has often helped me solve complex problems.</p><h3>Moving to the UK: A New Chapter</h3><p>I had been putting off the idea of moving to the UK, even though opportunities came up several times. However, after living in Bulgaria for the last two years, I realized that I felt more comfortable in an English-speaking environment. The idea of moving to the UK was sparked by a conversation with a friend who had already made the move. He told me about the Global Talent Visa and its advantages, including the freedom from being tied to a specific employer, which I found very appealing.</p><p>When I began looking into the requirements for the Global Talent Visa, I decided to seek help from Immigram. They helped me understand how to properly prepare and submit my documents. The requirements for the visa can be a bit ambiguous, and Immigram provided invaluable assistance in structuring my application and gathering the necessary recommendations. With their help, I submitted my application to Tech Nation and received approval within a week.</p><h3>Bumps Along the Way and Final Success</h3><p>The application process turned out to be quite lengthy — it took me about two months to gather all the necessary documents. It wasn’t just about collecting paperwork; it was crucial to present my achievements from recent years in the right light.</p><p>The experts at Immigram helped me at every stage — from selecting which achievements to highlight to writing recommendation letters. In the end, I successfully completed the process and received the long-awaited visa in January 2024.</p><h3>New Life and Future Plans</h3><p>My family and I moved to London in March 2024. I drove from Sofia in our car, covering more than 2,500 kilometers across eight countries. I’m currently still working for Plesk/WebPros, as the holding has a division in the UK.</p><p>The move has opened up new opportunities for me — there are many large tech companies and startups here, and I have ideas for new projects that I want to develop alongside my main job.</p><h3>About Collaboration with Immigram</h3><p>Overall, I’m very satisfied with my collaboration with Immigram. They helped me navigate each stage of the application process and minimized potential errors. Thanks to their support, my family and I now live in the UK, ready for new challenges and opportunities.</p><p>You should give it a try, too. If you’re considering moving and want to know if you qualify for the Global Talent Visa, be sure to take the <a href="https://immigram.pro.typeform.com/scoring?utm_source=ambassador&amp;utm_medium=3556972100">test</a> on Immigram’s website. This could be the start of your new journey!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea0dba6eeb26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Go Binary Optimization Tricks]]></title>
            <link>https://sibprogrammer.medium.com/go-binary-optimization-tricks-648673cc64ac?source=rss-f88b51058739------2</link>
            <guid isPermaLink="false">https://medium.com/p/648673cc64ac</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[go]]></category>
            <dc:creator><![CDATA[Alexey Yuzhakov]]></dc:creator>
            <pubDate>Fri, 07 May 2021 03:42:02 GMT</pubDate>
            <atom:updated>2021-05-07T03:42:02.026Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*346_FqVSpJ0M73Fr" /></figure><p>If you’ve ever tried to write a <a href="https://golang.org/">Go</a> program, you probably noticed the size of the final binary (it’s huge). Of course, in the age of Gigabit links and Terabyte drives, it is not a big deal. But some situations force you to keep the size as small as possible. At the same time, you prefer to stick with Go instead of switching to C or some other language. So I’m going to explain the possible ways to reduce the size of Go binaries.</p><h3>Victim Trepanation</h3><p>To begin with, I want to provide a bit of context. I have a daemon (long-running process) that performs quite simple operations. Similar programs (in the way they work) are <a href="https://github.com/digitalocean/do-agent">DigitalOcean Agent</a> and <a href="https://github.com/aws/amazon-cloudwatch-agent">Amazon CloudWatch Agent</a>, that collect the metrics and send them to central storage. Our daemon is doing a little bit of a different job, but it doesn’t matter.</p><p>Some other facts about the daemon:</p><ul><li>Written in Go (and there is no reason or desire to re-write it in a different language)</li><li>Installed on a lot of different machines</li><li>Requires periodic updates</li></ul><p>At the beginning of the research, the size of Go-binary was around <strong>11</strong> MB.</p><h3>Let Me See You Stripped</h3><p>A compiled binary contains the debug information. In my case, this debug information is not necessary because there is no ability to debug the code on the destination machines anyway (they are out of my control). So we can remove the debug information by compiling the binary with appropriate flags or using the strip utility. The process is called “stripping” and should be familiar to Linux developers (you can find the description of the flags in the output of go tool link):</p><pre>go build -ldflags &quot;-s -w&quot; ./...</pre><p>After this procedure, the size of the binary becomes <strong>8.5</strong> MB. So the debug information costs me +30% of the size in my particular case.</p><h3>Compression</h3><p>The next trick is to use compression. Of course, we can create a gzipped tar archive and distribute it. The solution works. The destination machines can decompress such archives.</p><p>Another way is to use special packers that can decompress and launch the binaries ‘on the fly’. Perhaps the most famous packer is <a href="https://upx.github.io/">UPX</a>. I first became acquainted with it more than 20 years ago in the epoch of dialup modems and small-as-possible exe-files distribution. And UPX is still alive, has a community, and continues evolving. I missed the point in time when UPX started to work with Go binaries ‘out of the box’, but now it works without any additional steps required. According to the project’s history, it seems like it had happened four years ago, so the approach is rather mature.</p><p>Let’s try to pack our binary using UPX:</p><pre>upx agent</pre><p>It took 1.5 seconds to compress, and we’ve got a binary which is <strong>3.4</strong> MB in size. Excellent result!</p><p>If we check the packer options, we will discover such things as --brute and --ultra-brute. Let’s try the first one:</p><pre>upx --brute agent</pre><p>The final size of the binary is <strong>2.6</strong> MB. It is four times less than the initial size of the binary! But the payoff for that is a much longer time for compression. It took 134 seconds. That’s pretty long.</p><p>Let’s try the option --ultra-brute:</p><pre>upx --ultra-brute agent</pre><p>The size of the binary is the same: <strong>2.6</strong> MB (in fact, it became a little bit smaller: minus 8 Kb). But it took an additional 11 seconds to compress, and the final time was around 145 seconds.</p><p>The thought that I want the speed like in the first case and the size like in the last case continued to bother me, and I found another approach:</p><pre>upx --best --lzma agent</pre><p>I got a <strong>2.6</strong> MB binary, and it took only 4 seconds!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/0*vnHvEJDgELkDTA5d" /></figure><h3>Fat Dependencies</h3><p>The modern ecosystems allow the addition of external dependencies easily, and Go is not an exception here. It is rather easy to add some “necessary” dependency to solve a small task, thus increasing the binary size inappropriately.</p><p>There is a good but often ignored practice to organize the monitoring of distribution size. If you have a chart that traces the revisions and the distribution sizes, it is very easy to find out the impact of changes on the size of binaries.</p><p>In my case, the problem was related to the <a href="https://sentry.io/welcome/">Sentry</a> integration dependency. If you’ve never heard of Sentry before, it is a service that allows you to collect information about the errors happening in your application. Such types of systems are usually integrated to increase the quality of the application and automatic tracking of errors that occurred during production use. Let’s go back to my problem with fat dependencies. Let’s check the influence of Sentry dependency. We will start with our original binary that was <strong>11</strong> MB in size. Without “stripping”, just by removing the Sentry dependency, the size of the binary fell to <strong>7.8</strong> MB. After “stripping” its size became <strong>6.2</strong> MB. 2 times less than the original one, and even without compression!</p><p>Of course, automatic error tracking is a good thing and I want to keep it. But in my case, it’s cheaper and easier to organize a separate HTTP endpoint that will act as a proxy to Sentry (to avoid direct integration).</p><h3>Compression Once Again</h3><p>Now we have a binary without fat dependences. So let’s try the compression once again:</p><pre>upx --best --lzma agent</pre><p>The final size of the binary is <strong>1.9</strong> MB! I want to remind you that we started with an 11 MB binary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/0*oedkLgR4ZKsm6ILU" /></figure><p>The penalty for a small size will be the time needed to launch the binary because it needs to decompress it first. Brief checks using the time utility show a 170–180 milliseconds slowdown. In the context of a long-running daemon, it is almost invisible and not a problem at all. But it would help if you keep this aspect in mind.</p><h3>Alternatives</h3><p>What else can you do if you want more?</p><p>One of the possible solutions to the problem of delivering updates with minimal size is binary patches. For example, Google Chrome utilizes this <a href="https://dev.chromium.org/developers/design-documents/software-updates-courgette">concept</a>. There are bsdiff/bspatch utilities, which help to organize such processes. In my case, the bspatch utility is absent on the destination machines, so I considered not using the approach for production (at least for now). But preliminary experiments have demonstrated good results in terms of the size of patches (they are relatively small).</p><p>Another option (I mentioned it briefly in the beginning) is to choose another programming language. If the smallest size is the main goal, we will end up with C. I’d prefer not to rewrite my code in C because Go brings me more joy.</p><p>One more option is <a href="https://golang.org/doc/install/gccgo">gccgo</a>. If the destination machines are similar to each other, we can use this option and get a dynamically linked Go binary. The size of the binary will be small enough.</p><p>That is not my case (the destination machines have different OSes), but I did the experiment:</p><pre>go build -compiler gccgo -gccgoflags &quot;-s -w&quot; ./...</pre><p>The conditions are not equal to our original experiment (this is another VM and another OS). Anyway, right from the beginning, I got <strong>1.8</strong> MB binary! But dynamically linked. After applying the UPX compression, we’ve got… <strong>284</strong> Kb binary! Awesome! Don’t forget about the similarities of destination machines during the distribution. Otherwise, there is a high probability of getting the following error:</p><pre>./agent: error while loading shared libraries: libgo.so.16: cannot open shared object file: No such file or directory</pre><p><a href="https://tinygo.org/">TinyGo</a> is one more exotic option. Unfortunately, I can’t compile the current project using it due to a bunch of errors. But I successfully compiled a little bit simpler project without issues. The final binary will be dynamically linked and have a smaller number of dependencies than in the case of gccgo usage (so it will be more portable).</p><p>If you have a significant amount of platform-dependent code, <a href="https://golang.org/cmd/go/#hdr-Build_constraints">build tags</a> can help you to reduce the size. The rules can be more complex than simple naming of files like _windows.go or _linux.go. The profit highly depends on the particular situation. In my case, it is almost absent because there is only one destination platform: Linux x86_64 (Mac and ARM support is just an experiment).</p><h3>Docker</h3><p>Sometimes Go binary is distributed as a Docker container. For example, to achieve full isolation from the host system. In my case, there is another daemon that is distributed exactly in this way. So the optimization should be applied for the Docker image as well. There is a quite popular trick with <a href="https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#use-multi-stage-builds">multi-stage build</a>:</p><pre>FROM golang:1.15 as builder</pre><pre>ARG CGO_ENABLED=0</pre><pre>WORKDIR /app</pre><pre>RUN apt-get update &amp;&amp; apt-get install -y upx</pre><pre>COPY go.mod go.sum ./<br>RUN go mod download</pre><pre>COPY . .<br>RUN make release</pre><pre>FROM scratch</pre><pre>COPY --from=builder /app/server /server</pre><pre>ENTRYPOINT [&quot;/server&quot;]</pre><p>Each phase starts with a FROM directive. In the first phase, all the dependencies exist to prepare the binary. After that, the FROM scratch directive helps us create an empty image. We just copy the prepared binary there and set the entry point for launch.</p><p>The command make release consists of go build and upx calls. As a result, we’ve got a 1.5 MB Docker image (the size is a little bit smaller because we are talking about a little bit of a different daemon). If we try to build everything in one phase using a golang image, the size will be huge: 902 MB.</p><h3>Conclusion</h3><p>We started with <strong>11</strong> MB binary and ended up with <strong>1.9</strong> MB, so we reduced the size of the binary by <strong>six</strong> times. Stripping the binary and packing it using UPX is a very efficient way to reduce the size. But don’t forget about fat dependencies. In my case, it played a significant role. If the destination environments are homogeneous, take a look at gccgo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=648673cc64ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>