Pull to refresh
1024K+

Programming *

The art of creating computer programs

1 140,76
Rating
Show first
Rating limit
Level of difficulty

The AI Code Passed Every Test. Then Two Requests Arrived at the Same Time

Level of difficultyHard
Reading time16 min
Reach and readers2.2K

AI-generated code often looks cleaner than code written by a tired developer at 2 a.m. It has sensible names, neat layers, comments, tests and even error handling. The problem starts when the code meets something the prompt forgot to mention: two requests at once, a repeated webhook, a cancelled task or a database failure halfway through an operation.

This article is about bugs that stay invisible during a normal code review. I took several ordinary backend tasks, generated working solutions and then tried to break them with timing, retries and bad input. The code compiled. The tests were green. Some of it was still unsafe.

Read more

How to measure development performance

Level of difficultyMedium
Reading time5 min
Reach and readers1.7K

My name is Anton Omelianenko and I’m head of software development. A manager runs a team so that it delivers results for the business. To judge how well people are handling their work, a manager needs data and a system for assessing it. In software development this is harder than it looks.

This article covers three questions: why classic metrics fail when assessing developers, how to measure performance properly and what to do when an employee may not be working only for you.

Read more

I Logged Every Time a Senior Developer Said No in Code Review

Level of difficultyHard
Reading time11 min
Reach and readers2.2K

A normal code review comment usually sounds harmless.

Rename this variable. Move this method. Add a test. Remove the duplicate condition. But sometimes an experienced developer leaves a much shorter comment: No.

Not maybe. Not could we simplify this. Just a clear rejection of the entire approach.

For a junior developer, this can feel strange. The code compiles, tests pass, the implementation is readable, and the ticket requirements seem complete. Why throw it away?

I started saving such cases after one of my pull requests was rejected for the third time in a week. The goal was not to prove that the reviewer was wrong. I simply wanted to understand what experienced engineers noticed before everyone else.

Over several months, I collected review discussions from backend services, internal tools, queue consumers, APIs, and data-processing jobs. I removed comments about formatting and naming. Only full design-level rejections remained.

The result was a small catalogue of professional paranoia.

And honestly, most of it was useful.

Read more

I Deleted 18,347 Lines of Python Code Without Removing a Single Feature

Level of difficultyHard
Reading time24 min
Reach and readers3.5K

Deleting code sounds easy until the code belongs to a running product.

A function may have no direct callers but still be loaded through a plugin registry. A serializer may look duplicated but quietly preserve an old field name used by one customer. A command may not appear in analytics because it runs from cron at 3:10 a.m. on the first Sunday of each month. Python makes this even more fun because imports, decorators, entry points, reflection, monkey patches, and strings can all become hidden edges in the dependency graph.

The project in this story was a multi-tenant reporting backend written in Python. It accepted events, stored normalized records, generated reports, exported CSV and JSON files, and delivered them through HTTP, email, and object storage. Nothing huge. Around 140 API endpoints, 46 background tasks, PostgreSQL, Redis, and a queue.

The repository contained 62,914 lines of Python excluding tests and migrations.

That number was not the actual problem. The problem was that a small change in report filtering could require edits in the API schema, a service class, a repository, a filter translator, a query builder, an export adapter, and several nearly identical tests. The system had layers, but the layers did not reduce complexity. They distributed it.

The first plan was a rewrite. Fortunately, that plan died before production did.

Instead, the question became much simpler: How much code can disappear while externally observable behavior remains unchanged?

That wording changed the whole project.

Read more

Six Months Without ChatGPT: The Experiment That Rewired the Way I Write Code

Level of difficultyHard
Reading time13 min
Reach and readers2.7K

At some point, ChatGPT stopped feeling like a tool and started feeling like a reflex.

Need a parser? Ask ChatGPT.
Strange exception in a background worker? Ask ChatGPT.
Forgot how a lock behaves under contention? Ask ChatGPT.
Need to rename a method? Apparently, that also required artificial intelligence.

Nothing looked wrong on the surface. Tasks were moving. Pull requests were getting merged. The code usually worked. Sometimes it even looked cleaner than what I would have written from scratch. But there was a small problem. A few days later, I often could not explain why a certain solution was built that way. I remembered the task, the final code, and maybe the prompt. The reasoning in between was missing.

That bothered me more than I expected.

So I set a simple rule: for six months, no ChatGPT, no Copilot Chat, no AI-generated code pasted into production. Documentation, source code, issue trackers, books, debuggers, profilers, and search engines were allowed. AI assistants were not.

The experiment started as a way to test my own dependence. It ended up changing how I design APIs, debug systems, read unfamiliar code, and even write comments.

Read more

The globally optimal, eighth, and fastest type of bytecode interpreters

Level of difficultyHard
Reading time14 min
Reach and readers4.6K

Совершать невозможное и раздавать пинки здравому смыслу — в этом и состоит жизнь членов Гуррен-Дана! (C) Камина

This article enters into a technical debate with a 2015 article by Atakua, whose approaches I am attacking. Atakua explores 7 types of bytecode interpreters, but does so disrespectfully - the fastest turns out to be binary translation, which is essentially no longer a bytecode interpreter, but a form of Ahead-Of-Time compiler. This binary translation translates bytecode into machine code, which is a chain of calls to compiled service routines. The very same ones that are responsible for executing each opcode in a bytecode interpreter.

But Atakua didn't squeeze all the possible speed out of bytecode interpreters. So this article is a tutorial: how to write a bytecode interpreter that can outperform JIT/AOT compilation in speed. Interested? Read on!

A benchmark is included. There will be a bit of hardcore and not a single AI-generated image!

Read more

The Reverse Junior or Debunking the Main Myth of Vibe-Coding

Level of difficultyEasy
Reading time16 min
Reach and readers2.3K

Yesterday (November 27), Habr hosted an 'Author's Fireside Chat'.

It was very interesting, and one of the speaker's statements struck me. It was that AI can help write simple pieces of code but doesn't work with complex things. Thus, large language models are likened to a junior programmer.

I decided to write an article about it this morning, drawing on my knowledge and experience in computational mathematics (I used to do modeling in the past, and for the last few years, I've been teaching computational mathematics at MIPT). Let me know what you think.

I think this is the main myth of vibe-coding. It's exactly the opposite — AI is often good at writing quite complex things and retrieving important information that is difficult to find on your own. But it gets confused in the most elementary things. It's a reverse junior.

The problem is that this is a dangerous illusion, and I will now clearly explain why, and how it can be dangerous. Brew some coffee and get ready for a debunking that might save your millions, your career, or even human lives in the future.

Read more

Beware the letter 'M'. The strangest bug of my life

Level of difficultyMedium
Reading time5 min
Reach and readers1.6K

On a Friday evening, a colleague, let's call him Avenger, asked if I had ever encountered a problem where a route returns 400... but "if you change the name to something very different," then everything is okay. At first, I didn't pay attention to the word "very". Maybe the route registration is duplicated somewhere? Or Avenger mixed up GET and POST. Or is there some general bug in handler creation?

Welcome

C++: How We Ended Up with a 2 MB Hello World

Level of difficultyMedium
Reading time4 min
Reach and readers1K

It would seem that modern C++ offers so many possibilities... Let's try to dissect all this immense power, starting with the first step in any programming language — "Hello World".

How do compiler implementations greet a newcomer who has just written their first lines of code?

Find out how we got here

The gradient that changed after publishing: reading color from 16-bit screenshots on iOS

Level of difficultyMedium
Reading time6 min
Reach and readers4.4K

Some users reported that the gradient behind a picture in a story looked one way before publishing and a different way after — but only for screenshots. The culprit: iPhone screenshots are 16 bits per channel, while our color extraction only understood 8. Here’s the debugging story and the fix — byte order, component layout, and turning two adjacent bytes back into one 16-bit value.

Read more

The Problems with C++ and Its Evolutionary Dead End

Level of difficultyEasy
Reading time3 min
Reach and readers12K

C++ has trapped itself in an evolutionary dead end due to backward compatibility and UB, and the only realistic successor capable of displacing it in large codebases will be a transpiler that generates C++ and enables gradual, low-risk adoption.

Это перевод на английский язык статьи моей статьи Ахиллесова пята C++ и будущая р̶е̶ эволюция

Read more

GitHub Copilot AI Agents for Beginners: Setup & First Agent in 5 Mins

Level of difficultyEasy
Reading time4 min
Reach and readers6.7K

In this article, I’ll show you how to unlock the full power of GitHub Copilot agents inside VS Code. There are actually three main types of Copilot agents-most people only know about one, but I’m going to show you all of them. By the end, you’ll be able to create custom agents that act as your own specialized “sub-agents.”

Read more

Async Logging Is Not a Silver Bullet — What Actually Limits Performance

Level of difficultyMedium
Reading time4 min
Reach and readers5.5K

Async logging is often treated as an obvious optimization.

It isn’t.

It just moves the cost somewhere else.

This idea sounds simple: synchronous logging blocks, async logging doesn’t — so it must be faster.

But once you look at what actually happens inside the system, the picture becomes very different.

Libraries like Quill are built around asynchronous pipelines. Others, like spdlog, support both synchronous and asynchronous modes. Some systems — including logme — deliberately mix synchronous formatting with asynchronous output.

Despite these differences, they all run into the same fundamental constraints.

Read more

How to run the new RexGlue recompiler for Xbox 360

Reading time2 min
Reach and readers5.1K

Build the project as follows:

This command is for downloading from GitHub: https://github.com/rexglue/rexglue-sdk

Warning: You can download a pre-built .exe file, which will allow you to decompile the game in C++ (but building it is unlikely). Furthermore, versions are updated frequently, and the latest versions (with more instructions) are worth building.

Prepare the necessary directory.
Specify it as REXSDK in the global variables.

Sometimes the project won't compile in x64, so it's worth adding these lines to CMakeList.txt.

Enable Windows developer mode to download the necessary packages.

And in the /thirdparty/libsmpack folder, enter the following commands.

Then the necessary updates for the package will be downloaded.

Try adding additional parameters here. If it doesn't compile, then:

And finish the build:

Testing

To test the tool, use the following commands:

Add it to the assets/default.xex folder (you'll need to create it and add it to the project that rexglue will create).

This video can be useful for installing clang-cl and preparing default.xex from an Xbox 360 ISO image (which was dumped).

The program will display all missing instructions and replace them with placeholders (but it's best to create an issue with the required instructions, and once they're implemented, return to the project).

Don't forget to support the developers with well-deserved stars and share with your friends. Also, subscribe so you don't miss the next part, which will explain how to run the recompiled project.

Read more

Mandelbrot set. 32-bit TrueColor. 60 FPS. 80-bit long double. OpenMP. Supersampling 2x2 (4 passes). Color rotation

Level of difficultyMedium
Reading time4 min
Reach and readers5.5K

Mandelbrot set. 32-bit TrueColor. 60 FPS. 80-bit long double. OpenMP. Supersampling 2x2 (4 passes). Color rotation. I want to say. This is the most necessary thing in the Universe. The most profound. And now, in my entire life, I finally started writing code and did it. Quite complex. And the most beautiful. Download and see! It's an executable file, on GitHub.

github: Download Latest Version Windows And Source code

Read more
1
23 ...