<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Asadbek Kurbonov</title><link>https://advenn.github.io/blog/</link><description>Recent content on Asadbek Kurbonov</description><generator>Hugo -- 0.148.0</generator><language>en-us</language><lastBuildDate>Mon, 24 Nov 2025 22:00:00 +0100</lastBuildDate><atom:link href="https://advenn.github.io/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>When You Can't Find the Bug: Architecting Around Production Issues</title><link>https://advenn.github.io/blog/posts/go-python-architecture/</link><pubDate>Mon, 24 Nov 2025 22:00:00 +0100</pubDate><guid>https://advenn.github.io/blog/posts/go-python-architecture/</guid><description>&lt;p>&lt;em>This is Part 2 of a series. Read &lt;a href="../pandas-vs-polars-in-production/">Part 1: Pandas vs Polars in Production - Performance Comparison&lt;/a> for the background on the Polars migration.&lt;/em>&lt;/p>
&lt;hr>
&lt;p>After migrating from Pandas to Polars, CPU performance improved dramatically—but a memory problem persisted. Despite extensive debugging, I couldn&amp;rsquo;t identify the root cause. So I made a pragmatic decision: architect around it.&lt;/p>
&lt;p>This is the story of splitting a monolithic Python application into a Go orchestration service with Python workers, not because I fully understood the problem, but because I needed production to be stable.&lt;/p></description></item><item><title>Pandas vs Polars in Production: Performance Comparison</title><link>https://advenn.github.io/blog/posts/pandas-vs-polars-in-production/</link><pubDate>Sun, 23 Nov 2025 23:02:39 +0100</pubDate><guid>https://advenn.github.io/blog/posts/pandas-vs-polars-in-production/</guid><description>&lt;p>When performance bottlenecks started affecting my production data pipeline, I decided to test whether Polars could deliver on its performance promises. This is what I learned from migrating a real production workload from Pandas to Polars.&lt;/p>
&lt;h2 id="the-workload">The Workload&lt;/h2>
&lt;p>The application was a data aggregation service running as a Kubernetes pod with the following constraints:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Resources&lt;/strong>: 2 CPUs, 3 GB RAM&lt;/li>
&lt;li>&lt;strong>Execution frequency&lt;/strong>: Every 2-2.5 minutes&lt;/li>
&lt;li>&lt;strong>Data volume&lt;/strong>: 5,000-7,000 rows × 100-150 columns per run&lt;/li>
&lt;li>&lt;strong>Operations&lt;/strong>: Multiple database calls, API requests, DataFrame merges, arithmetic operations (additions, multiplications), and group-by aggregations&lt;/li>
&lt;li>&lt;strong>Web server&lt;/strong>: FastAPI with Uvicorn handling production traffic&lt;/li>
&lt;/ul>
&lt;p>All operations were properly vectorized-no row-by-row iteration. The pipeline combined data from various sources into a single DataFrame, transformed it, and output the results.&lt;/p></description></item><item><title>Converting Wide Excel Tables to Single-Page PDFs with LibreOffice</title><link>https://advenn.github.io/blog/posts/convert-to-pdf-with-libreoffice/</link><pubDate>Fri, 21 Nov 2025 23:42:51 +0100</pubDate><guid>https://advenn.github.io/blog/posts/convert-to-pdf-with-libreoffice/</guid><description>&lt;h2 id="the-problem">The Problem&lt;/h2>
&lt;p>While working on a freelance project, I needed to generate PDF reports from Excel files. The challenge? The Excel files were wide and long. Here we see a sample Excel file around 15 columns containing employee data like ID, name, email, department, job title, hire date, salary, and more.&lt;/p>
&lt;p>I used LibreOffice&amp;rsquo;s CLI utility &lt;code>convert-to&lt;/code> in headless mode to convert the files. The conversion worked, but the result was unusable:&lt;/p></description></item><item><title>Setting Up Telegram Bot on Apps Script</title><link>https://advenn.github.io/blog/posts/setting-up-telegram-bot-on-apps-script/</link><pubDate>Tue, 22 Jul 2025 23:24:14 +0500</pubDate><guid>https://advenn.github.io/blog/posts/setting-up-telegram-bot-on-apps-script/</guid><description>&lt;p>Here is technical side of what I did on development on Apps Script. &lt;a href="https://advenn.github.io/blog/posts/apps-script">main article&lt;/a>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-javascript" data-lang="javascript">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Main webhook handler - receives all Telegram updates
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#66d9ef">function&lt;/span> &lt;span style="color:#a6e22e">doPost&lt;/span>(&lt;span style="color:#a6e22e">e&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">try&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#f92672">!&lt;/span>&lt;span style="color:#a6e22e">e&lt;/span> &lt;span style="color:#f92672">||&lt;/span> &lt;span style="color:#f92672">!&lt;/span>&lt;span style="color:#a6e22e">e&lt;/span>.&lt;span style="color:#a6e22e">postData&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">ContentService&lt;/span>.&lt;span style="color:#a6e22e">createTextOutput&lt;/span>(&lt;span style="color:#e6db74">&amp;#39;Invalid request&amp;#39;&lt;/span>).&lt;span style="color:#a6e22e">setMimeType&lt;/span>(&lt;span style="color:#a6e22e">ContentService&lt;/span>.&lt;span style="color:#a6e22e">MimeType&lt;/span>.&lt;span style="color:#a6e22e">TEXT&lt;/span>).&lt;span style="color:#a6e22e">setStatusCode&lt;/span>(&lt;span style="color:#ae81ff">400&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">update&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">JSON&lt;/span>.&lt;span style="color:#a6e22e">parse&lt;/span>(&lt;span style="color:#a6e22e">e&lt;/span>.&lt;span style="color:#a6e22e">postData&lt;/span>.&lt;span style="color:#a6e22e">contents&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">update&lt;/span>.&lt;span style="color:#a6e22e">message&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">handleMessage&lt;/span>(&lt;span style="color:#a6e22e">update&lt;/span>.&lt;span style="color:#a6e22e">message&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// IMPORTANT: Always return OK with proper content type and mainly proper status code (200&amp;lt;=status&amp;lt;300) to prevent retries
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">ContentService&lt;/span>.&lt;span style="color:#a6e22e">createTextOutput&lt;/span>(&lt;span style="color:#e6db74">&amp;#39;OK&amp;#39;&lt;/span>).&lt;span style="color:#a6e22e">setMimeType&lt;/span>(&lt;span style="color:#a6e22e">ContentService&lt;/span>.&lt;span style="color:#a6e22e">MimeType&lt;/span>.&lt;span style="color:#a6e22e">TEXT&lt;/span>).&lt;span style="color:#a6e22e">setStatusCode&lt;/span>(&lt;span style="color:#ae81ff">200&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> } &lt;span style="color:#66d9ef">catch&lt;/span> (&lt;span style="color:#a6e22e">error&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">console&lt;/span>.&lt;span style="color:#a6e22e">error&lt;/span>(&lt;span style="color:#e6db74">&amp;#39;Error in doPost:&amp;#39;&lt;/span>, &lt;span style="color:#a6e22e">error&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// Even on error, return OK to prevent Telegram retries
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">ContentService&lt;/span>.&lt;span style="color:#a6e22e">createTextOutput&lt;/span>(&lt;span style="color:#e6db74">&amp;#39;OK&amp;#39;&lt;/span>).&lt;span style="color:#a6e22e">setMimeType&lt;/span>(&lt;span style="color:#a6e22e">ContentService&lt;/span>.&lt;span style="color:#a6e22e">MimeType&lt;/span>.&lt;span style="color:#a6e22e">TEXT&lt;/span>).&lt;span style="color:#a6e22e">setStatusCode&lt;/span>(&lt;span style="color:#ae81ff">500&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>By the nature of apps script, &lt;code>doPost&lt;/code> is used when the app received POST request. Telegram sends data via POST to webhook url. So we set up POST listener.&lt;/p></description></item><item><title>Apps Script</title><link>https://advenn.github.io/blog/posts/apps-script/</link><pubDate>Tue, 22 Jul 2025 22:39:19 +0500</pubDate><guid>https://advenn.github.io/blog/posts/apps-script/</guid><description>&lt;h2 id="beginning">Beginning&lt;/h2>
&lt;p>I mainly started freelancing from 2024. At that time I had a client who had accounting/consulting firm, they needed a telegram bot to create template word contracts.
They said they had started doing it but didn&amp;rsquo;t have time to finish it themselves. I saw their code, it was on apps script. At that time I first came across with apps script. I made the telegram with aiogram/python.
btw, I used encoding files with base64, docxtpl to render docx files from template.&lt;/p></description></item></channel></rss>