Pull to refresh

My feed

Type
Rating limit
Level of difficulty
Warning
To set up filters sign in or sign up
Article

On reordering expressions in Postgres

Level of difficultyEasy
Reading time4 min
Views129

Today, I want to talk about one of those sneaky tricks that can help speed up query execution. Specifically, this is about reordering conditions in WHERE clauses, JOINs, HAVING clauses, and so on.

The idea is simple: if a condition in an AND chain turns out to be false, or if one in an OR chain turns out to be true, there's no need to evaluate the rest. That means saved CPU cycles — and sometimes, a lot of them. Let’s break this down.

Read more
Article

Cognitive Traps in Humans and AI: How Language Models Fail in Beautiful Ways

Level of difficultyEasy
Reading time5 min
Views501

As language models become more powerful, they also become more elusive. We are no longer dealing with simple text generators but with complex systems capable of creative reasoning, philosophical reflection, and simulated self-awareness. But with this growing sophistication come new vulnerabilities—cognitive traps that can distort both the model's thinking and our own perception of its output.

This article is based on extensive testing of various large language models (LLMs) in settings involving creative thinking, philosophical dialogue, and recursive self-analysis. From this exploration, I have identified seven recurring cognitive traps that often remain invisible to users, yet have profound impact.

Unlike bugs or hallucinations, these traps are often seductive. The model doesn't resist them—on the contrary, it often prefers to stay within them. Worse, the user may feel flattered, intrigued, or even transformed by the responses, further reinforcing the illusion.

Read more
Article

Gemini CLI: Open-Source AI Agent in Terminal

Level of difficultyEasy
Reading time4 min
Views1.2K

Have you ever wished for an AI assistant right inside your terminal window? Well, your dream has come true because Google just released Gemini CLI. In this tutorial, I'm going to show you everything you need to know about this new open-source AI agent. We'll cover how to use it, the pricing, and some useful tips and tricks. So, if you're ready, let's get started! ;)

Read more
Article

When the Office Is a Planet: How to Manage Distributed Teams

Level of difficultyMedium
Reading time9 min
Views336

Remote work in IT has long ceased to be unusual. But it is one thing to assemble a distributed team, and quite another to make it work comfortably for the participants and the company's results.

The article shares a story about distributed teams with a flexible culture, trust, and freedom, and how we achieved this.

Read more
Article

Automated management of extended statistics in PostgreSQL

Level of difficultyMedium
Reading time6 min
Views367

Here I describe the results of developing a PostgreSQL extension I built just out of curiosity. Its purpose is to automatically manage extended column statistics. The idea came to me while finishing work on another "smart" query-driven product for improving PostgreSQL planning quality. I realized that the current architecture of PostgreSQL isn’t quite ready for fully autonomous operation — automatic detection of bad plans and adaptive optimizer tuning. So why not try the other way around and build an autonomous data-driven assistant?

Read more
Post

Некоторые товарищи, например Олег Чирухин на Фейсбуке утверждают, что LLM хорошо пишет на JavaScript / TypeScript и плохо на Verilog / SystemVerilog потому что первого в мире больше. Однако у верилога есть два критических фактора, которых у JS вообще нет. В JS если программа работает долго - это просто неудобство, в Verilog-е если нарушается тайминг внутри такта (задержки в пикосекундах) или результат приходит через 5 тактов, а он ожидался через 4 - все нафиг ломается. LLM не понимает ни тайминг внутри тактов, ни тайминг по тактам (латентность).

Никто не будет из-за этого дурацкого LLM ставить везде hanshake не зависящий от латентности подблоков, снижать пропускную способность блока на порядок или снижать в разы тактовую частоту - скажем вместо процессора с частотой 2 GHz выкатывать на рынок процессор с частотой 20 MHz. И с производительностью по тактам 2 СoreMark / MHz вместо 12 СoreMark / MHz. И при этом большой в разы и с высоким энергопотреблением. Это как продавать автомобили со скоростью и грузоподъемостью велосипеда и весом как самосвал - такое никто не купит.

Тайминг внутри такта (задержки в пикосекундах) только из кода определить нельзя, нужна процедура статического анализа тайминга, который знает задержки конкретной библиотеки ASIC (LLM не умеет делать STA (static timing analysis) и не знает задержек конкретной версии библиотеки скажем на 2 нанометра low power такого-то вендора).

С неумением LLM понимать что происходит в каком такте все интереснее. В принципе это понять можно, но это требует довольно вдумчивого анализа конкретного кода, а LLM это не просто не умеет, а в наглую пишет "for illustration, assume the latency is 1" - типа тоном профессора "для иллюстрации, предположим латентность подблока - 1 такт". А если не предполагать? С предположением все поломается.

Конечно можно писать код с handshake, который не зависит от латентности, а просто ждет результата, но это принципиально усложняет дизайн, а также требует введение крупных очередей FIFO с непонятным размером.

Написал Олегу:

Тут есть два других фактора: 1. в реальных бизнес-задачах необходимо, чтобы разработчик мог понять например латентность кода подблоков - количество тактов на получение результата. LLM этого не понимает - оно из чужого кода часто и опытному разработчику не очевидно, а запустить симулятор и посмотреть это на диаграммах после симуляции LLM не может. 2. в верилоге есть составляющая которой вообще нет в программировании - таминг внутри такта в пикосекундах. Нужно чтобы схема синтезированная из кода в этот тайминг влезала. И если латентность (количество тактов) из чужого кода еще можно определить (если проанализировать цепочку присваиваний между комбинационной логикой и D-триггерами), то с таймингом вообще напряг. Хотя с таймингом у дизайнера вырабатывается интуиция, например что комбинационное умножение 4-х битных чисел в бюджет на 400 пикосекунд точно влезет, а вот комбинационное деление 32-битных точно не влезет - но все это нужно подтверждать запуском программы статического анализа тайминга, который (та-дам!!) LLM делать не может.

Tags:
+11
Comments5
Article

What May Surprise You About UUIDv7

Level of difficultyMedium
Reading time3 min
Views1.2K

UUIDv7 was inspired by ULID. Like ULID, it is a 128-bit identifier, containing a timestamp on the left side and random data on the right side. But RFC 9562 establishes many requirements for UUIDv7.

In databases and distributed systems, a properly implemented UUIDv7 is always preferred over any other identifier type, including natural keys, autoincrement, UUIDv4, TypeID, ULID, KSUID, CUID, NanoID, and Snowflake ID.

Surprising distinctions of UUIDv7
Post

У меня есть коллега (не по Самсунгу, а по образовательным программам), который влюблен в ИИ. У меня есть опасения что он может использовать ИИ для написания некой инструкции, которая включает теоретическую базу SystemVerilog-а. С моей точки зрения это очень дурная идея, так как LLM не следует стандарту, а генерит то, что людям интуитивно "кажется". Для иллюстрации спросил у ChatGPT 4.0 чем отличается wire, reg и logic. Словил 3 ошибки и 2 недочета:

1. Недочет: LLM (как и большинство людей, даже экспертов) забыл упомянуть про разницу в контексте инициализации ("wire a = b" это continuous assignment то есть "wire a; assign a = b;", а вот "logic a = b" это инициализация в момент 0, то есть "logic a; initial a = b;")

2. Ошибка: LLM почему-то думал что "wire a = 1'b0" несинтезируемо в Verilog, но синтезируемо в SystemVerilog.

3. Ошибка: LLM думал, что "always_ff" можно использовать для создания D-защелки (D-latch).

4. Ошибка: LLM думал, что "always_comb" может infer latch.

5. Недочет: LLM забыл про "always_latch".

То есть если скажем преподаватель ленится читать стандарты и книги, но вздумал писать методичку с помощью ChatGPT, то его студенты жестоко пострадают (баг от (1) трудно отлаживать) и будут понимать все "приблизительно".

Tags:
+7
Comments0
Article

Get Free Backlinks from These 35+ Authority Websites

Level of difficultyEasy
Reading time6 min
Views861

Getting backlinks is hard. And getting traffic? Even harder.

But some websites still give you both for free.

I made a list of 35+ free sites and directories where you can add your product. You’ll get a real link to your site (a site backlink) and start getting clicks.

Get Free Backlinks
Article

How to provide effective training for a UX design team

Level of difficultyEasy
Reading time4 min
Views400

Training is one of the most essential factors for growth, evolution and effective collaboration for any UX design team. Design is an ever-changing industry, and there is always something new to learn even for the most experienced professionals. The reality is, not all companies take training seriously, whether the reason is a low budget, lack of time or just not realising its necessity. Meanwhile, investing in training not only boosts the quality of work, but also helps find ways to find easier solutions, work faster and optimize the whole process. Let’s discuss some tips that might help you provide effective and fruitful training for your design team without spending extra budget or wasting time on some questionable training methods. 

Read more
Article

AI Agents in Modern IT Solutions

Level of difficultyEasy
Reading time13 min
Views617

These days, it seems like everyone is talking about AI. AI here, AI there—AI will replace us all, and so on. I started to wonder: how exactly is AI going to replace us? I decided to dig into this question and examine the technical foundations, mainly to understand it for myself—how exactly is AI supposed to replace us all? Spoiler: it isn’t planning to just yet, but what’s already available today is impressive.

Read more
Article

The Journey from Developer to Lead: Lessons Learned About Responsibility

Level of difficultyEasy
Reading time5 min
Views573

Becoming a lead isn’t just another line in your resume,  it’s a mental shift. It’s the moment you go from being a developer to someone responsible for your code and the entire team. Next, you’re also listening, mentoring, negotiating, motivating, and knowing how to find common ground even in challenging situations.

Today, I’m a Dev Lead at EXANTE. We develop internal services for a select group of internal stakeholders. But my journey started long before that — with informal leadership, a few mentorship flops, and plenty of lessons learned the hard way.

Here’s what that path looked like.

Read more
Article

Whose feature is better, or how to compare the efficiency of SQL query plans

Level of difficultyMedium
Reading time5 min
Views292

How to compare the efficiency of SQL query plans? “Measure the execution time, of course!” — an experienced reader would say. And they would be absolutely right: from a practical perspective, the more efficient DBMS is the one that delivers higher TPS. However, sometimes we need to design a system that doesn't exist yet or predict behavior under loads that haven't occurred yet. In such cases, we need a characteristic that allows us to perform a qualitative analysis of a plan or compare two plans. This post is dedicated to one such characteristic — the number of data pages read.

Read more
Article

The Billiard Fractals

Level of difficultyHard
Reading time25 min
Views709


Complex systems often appear chaotic or incomprehensible, yet closer examination reveals that such complexity can frequently be reduced to a simple underlying mechanism. By systematically removing layers of emergent behavior, one can uncover a fundamental rule or equation from which the entire system originates.

Read more →
Article

SQL Server vs. PostgreSQL query optimization: room for improvement?

Level of difficultyMedium
Reading time15 min
Views618

For years, we’ve studied Oracle to make PostgreSQL a more migration-friendly option. We introduced tools similar to SQL profile and SQL plan baseline as AQO and sr_plan extensions. In some cases, PostgreSQL even outperforms Oracle, especially in automatic re-optimization.

Migrations from Oracle to PostgreSQL are usually smooth performance-wise, and we’ve even developed session variable extensions to make the transition easier. While many enterprise-only features exist, PostgreSQL often integrates popular solutions directly into the core.

Read more
Article

Neat defer macro for C++17

Level of difficultyMedium
Reading time5 min
Views634

Manual resource management in low level C-style C++ code might be annoying. It's not practical to create good enough RAII wrappers for every single C API you use, but approaches with goto cleanup or loads of nested if (success) hurt readability.

A defer macro to the rescue! The deferred lambda will be executed on scope exit, no matter how it happens: you can return from any point, throw an exception (if allowed), or even use a goto to an outer scope. It is truly zero-cost and doesn't rely on C runtime or standard library, so it can be used even in kernel development.

Read more
1
23 ...