January 18, 2026 Uncategorized No comments
January 18, 2026 Uncategorized No comments
Is there a framework for generating ideas? Do ideas just happen? Today I struggled to come up with ideas for my next blog post. None of my initial ideas truly resonated with me. Next I just started thinking about what my process for coming up with ideas looks like. Usually it is just writing down a bunch of random thoughts until one of those sparks interest in me. But then a realization came to me:
Sometimes ideas come as visualization at a later time – the other day I could not finish a bouldering (climbing) problem, always falling at the last move. I was walking and visualizing myself climbing and different moves and could not solve it. I was walking later in the day and a ‘toe hook’ idea came to me. The next day I went to the gym and simply flawlessly executed.
Similarly today I was looking at my keyboard and struggling to come up with ideas and then it came to me: ideas are not some kind of “magic” that appear from nowhere, but rather they are processes and you can make them happen and come to you. I don’t pretend to have a patent on generating ideas, otherwise I would sit on a pile of billions of dollars, but, anyway, some thoughts:
Step 1: Input Loading. Any idea out there is some variation of previously existing idea, some synthesis of multiple existing ideas, or some application to the new context. We can say that Idea: Idea = Input A + Input B (in a new context). For example my blog post about Global Maximum was a combination of computer science “hill climbing” and my career story.
Step 2: The Constraint. Staring at a blank page is very intimidating because there are way too many degrees of freedom, but having constraints is helpful. One constraint I’m operating under right now is time (it is 6:00AM, I’m at a coffee place, and I have 1h20m to write my blog post). Another type of constraint is topic based (like how I connect athletic performance to software careers, blog post). There are more constraints to come up with “artificially”.
Step 3: Diffuse mode thinking. Everyone knows the cliche about the best ideas coming in the shower. This is actually a known phenomenon called Diffuse Mode thinking. It is a key step in James Webb Young’s technique for producing ideas:
Conclusion
This “framework” might not be complete but I think next time around I will open this blog post to remind me that this is simply a process and I can be in control of it and use techniques.
November 9, 2025 Uncategorized No comments
Have you ever thought about large software systems as organic living organisms? This sounds a bit odd and, maybe, philosophical. Starting with first principles: everything in the world is based on fundamental physical laws. When we think about the organic world we often imagine fuzzy, imprecise, evolving and reproducing things. But when we think about a software program, we often imagine strictly deterministic outputs to given inputs with no typical attributes of living organisms, though on a completely fundamental level both are build with the same basic physical particles and follow same laws. At the level of modelules of even proteins organic world is fairly deterministic similarly to small software systems, but when we get to a system that is built by hundreds of software engineers over a decade that serves millions or billions of requests per day it has more resemblance of a living organism than of that exact deterministic machinery.
I could think of multiple similarities, for instance:
Counterarguments could be things like:
Working for multiple very large companies serving billions of users definitely made me think that large software systems grow beyond human-scale comprehension. Sometimes I think these large systems are organisms and software engineers are part of this organism working on making parts of this organism alive and evolving. Also thinking of an analogy of software engineers looking after a large system as gardeners looking after a living garden. If it’s not looked after properly it becomes messy and bushy.
What does this mean practically? Well, this was just a thought I typed in, so not 100% sure but, maybe, it could mean:
September 14, 2025 AI, Uncategorized No comments
Today I’m Vibe Coding something and inviting you to follow along. This is not a very serious post. The purpose of this blog post is just to see how quickly we can build a NN that plays snake game and if we can improve it:

Steps we we will follow:
Obviously, I need to write a prompt to generate such a game, but being lazy (and not knowing too much about IA) I offloaded prompt generation to GPT:
Generate a good prompt for copilot AI in Visual Code so it generates code for the snake game. Snake game can be the simplest possible terminal based game on a small field.The output was pretty reasonable prompt, which I could have written (but, hey, that takes time). The only thing I updated in the prompt was the very last line to keep track of the score of the game:
# Write a simple snake game in Python that runs in the terminal.
# Requirements:
# - Keep the game as simple as possible.
# - Use a small fixed grid (e.g., 10x10).
# - The snake moves automatically in the last chosen direction.
# - Use WASD keys for movement (no fancy key handling needed, blocking input is fine).
# - Place food randomly; eating food makes the snake longer.
# - The game ends if the snake runs into itself or the walls.
# - Print the field after each move using simple ASCII characters:
# - "." for empty space
# - "O" for snake body
# - "X" for snake head
# - "*" for food
# - Keep the code in a single file, no external libraries beyond Python standard library.
# - Keep it short and readable.
# - Keep the score of the game. The score equals the total number of food eaten.The generated code (with gpt-4o) was 73 lines of code and I could play the game in the terminal: https://github.com/andriybuday/snake-ia/blob/main/snake_game.py
Again, prompt to get the prompt:
Now we need another prompt. This time we want to use pytorch and will be building a simple 2 hidden layers neural network with reinforcement learning. Use large punishment for loosing the game and small rewards for each eaten food. We want to achieve quick learning without too many iterations.
The prompt it generated this time was much more extensive. Here are all of the prompts: https://github.com/andriybuday/snake-ia/blob/main/README.md I then fed that prompt to both GPT-4o and Claude.
Claude generated a much better AI. GPT generated something that couldn’t even get more than one food score, which Claude was in the territory of 10-20 score. Note, that max theoretical score on 10×10 is 99. You can see above a gif showing last few epochs of training and game play of the Claude version.
The code for this version: https://github.com/andriybuday/snake-ia/blob/main/snake_game_ai_claude.py
Ok, so what can be done to make this reach better scores? I asked GPT to recommend some improvements. It gave me general recommendations out of which I created a prompt for prompt:
Generate prompt I can give to Claude to improve performance of the Snake AI, potentially with these improvements: Change head to Dueling DQN, Add Double DQN target selection, Add PER (proportional, α=0.6, β anneal 0.4→1.0), Add 3-step returns, Add distance-delta shaping + starvation cap.To be honest, at this point I don’t know if these improvements make sense or not, but I took the generated prompt and fed it to Claude. And what I got was broken code, which crashes on the “IndexError: Dimension out of range”. I was hoping to run into something like this. Finally. Now I can probably debug the problem and try to find where we are running out of range, but no, I’m sharing the error and stack trace to Claude again. It was able to fix it BUT things got worse, the snake would run into infinite loops.
Turns out generated “upgraded” version is much worse. So I decided to take a different path and get back to simple first version and see what can be updated. The only things I did were increasing training time (# episodes), allowing for more steps for training, and slightly decreasing time penalty. This is the change: https://github.com/andriybuday/snake-ia/commit/796ad35924700dcb73ac6aaecf8df39ec8069940
With the above changes the situation was much better but still not ideal.
Sorry for the abrupt ending, but I don’t really have time to fine-tune the generated NN or create new models to achieve the best results. The purpose here was to play and see what we can get really quickly. Also another purpose of this post is to show that people, like me in this case, who just do Vibe Coding without knowing underlaying fundamentals cannot really achieve best results really quickly. Happy Vibe Coding!
Try it yourself:
git clone https://github.com/andriybuday/snake-ia.git
cd snake-ia
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python snake_game_ai_claude.py
September 7, 2024 Career, Opinion, Success, Uncategorized No comments

Somehow I became a generalist software engineer with a diverse domain experience. I started career with C# and moved to Javascript and then to Java and now C++. I worked for healthcare, online entertainment, nuclear energy, e-commerce, and advertising industries. In this blog post I want to share some of the details of these experiences and conclude on whether being a generalist is better than being a niche engineer.
The very first program I ever wrote was in QuickBasic in grade 6 (1999). The school computer I wrote this was only capable of running some version of DOS. Computers at university ran Windows and I learned to code in C/C++/C# + some more obscure languages (Prolog, Algol, Pascal). In my first job I wrote desktop and mobile solutions using MS technologies, mostly written in C# with WPF & WCF. My next gig was all about performant backend services with a mixed technology stack backing a multi-million user website. At my next job I found myself translating nuclear material accounting code from the 70/80s written in PL/I that ran on mainframe into Javascript or C#. Most engineers who wrote the original PL/I code either retired or died. This job taught me that I can love a dynamic programming language. Then I moved to work for Amazon, it was all about launching new business workflows and scaling it with Java services backed by AWS and ReactJS frontend. Now at Google I mainly write in C++, but from another perspective for me there was a big shift from working on products towards working on infrastructure that supports traffic for billions of users.
Now I want to have a look at all of the same jobs but from a different perspective. The first projects I worked on were for healthcare providers. Honestly, I didn’t give myself much thought about the morbidity of the things, the fact that much of the software was for hospices didn’t bother me as I was operating on the level of tasks. It was only later when I was working on a mobile app for nurses to visit patients at their homes did I internalize what this all was for. Next job probably wasn’t that noble – it was in online entertainment, more specifically sports betting. I even had an account with a competitor and placed small bets on sport events to understand how they do things compared to us. Saving the world from making more atomic bombs? Yep – that was my next job, kind of. On the ground what I was doing was merely software for IAEA (UN) and its agents who went to nuclear facilities and collected nuclear material data, performed different checks and recorded them in the app for later analysis. I got a chance to visit a nuclear reactor and learn how it works. Next gig was about enabling small companies to sell more stuff at Amazon. This was about enabling an entire channel of dropshipping for the India marketplace: loading inventory into Amazon systems, processing customer orders, invoicing, etc. This allowed me to have a good view on how e-commerce works. These days I work on supporting online advertisement from inside by working on infrastructure and tooling that allows other engineers at Google to deliver solutions to show you relevant Ads. I know ads may sound like a bad thing, but the free internet exists thanks to ads. Ads pay for those transatlantic underwater internet cables and all the other things that power today’s internet.
All of the companies I worked for were very different culturally. First job was a very homogeneous environment, all of us were Ukrainians, fairly young and we worked for our American customers who on their side were also culturally similar among themselves. I think communication gaps existed due to time zone differences and English language skills on our side. Next job was maybe half Austrians and another half of East europeans. The product we worked on was our own so I think we cared about its success a lot. I am actually not sure if I fit into this environment culturally, but I thrived on the technical front and delivering results. At the same time this was when I made many new friends who remain friends until now and I even stayed at their home on my recent trip to Europe. The United Nations is definitely a culturally most unusual environment I had to work in, mainly because of the diversity of nationalities and backgrounds. Any day at the UN premises there were people from over 100 different countries, my team alone had people from all of the continents. Something that was a bit less diverse was age, as many of the people who work for the UN are accomplished individuals with some years behind their backs. This was the place of internalizing that not everybody has the same life views on it and it’s all ok. It was extremely fascinating to learn from my colleagues. I would say that on a macro level both Amazon and Google are culturally similar – we are ambitious technically savvy individuals striving to make an impact. Though on another level Amazon is a fast paced, high intensity, customer centric, and deadline driven company whereis Google is more mission driven, long-term oriented, with more emphasis on innovation.
I can probably wear many other lenses to look at my past experiences, such as, Impact, Scale, Learning, Personal Fulfillment, WLB, Collaboration, Communication, etc. But even with the 3 lenses above it is clear that the diversity of technologies, domains, and cultures pushed me to become a generalist software engineer. Arguably, this isn’t necessarily a good thing, being extremely deep into one technology and domain can land you a ludicrously high paying job. I saw people sticking around and climbing corporate ladder rapidly, something that I couldn’t do with all the switched I did, and at the same time I saw directors being laid off just because there is no need for their role any longer. In today’s economies of scale the winner takes all. If you are at the right place and time and win the game – it is all yours. On the other hand, if you are not that “winner”, adaptability gives you an advantage of switching when needed and grabbing at least some piece of the pie or, maybe, a chance to win another game next time. I don’t know what is right, the above was my journey and it continues. What are your thoughts on going broad vs deep in your software engineering career?