r/softwareengineer • • 22h ago

Mindset in the AI transition

0 Upvotes

Today, I’ve been doing some thinking. Lately, I’ve been working extensively with coding agents—even for writing Python scripts, a language I consider myself quite comfortable with. I’ve also been exposed to a lot of DHH's "AI hysteria" content.
As a result, a number of questions won’t leave my head:
"Will I be replaced by AI?"

"Were all the years of learning and effort worth anything?"

"Even if I remain in software development, will I be as valued as I was before?"

Previously, I felt real pride in my ability to write code that would often run right away without bugs—and I had a lot of fun doing it.
It’s true that my ability to write code manually is becoming less useful. At this point, agents can often understand my intent well and parse large volumes of code in a fraction of the time it takes me. They also make it easier to write in more complex, robust languages like Rust. Because of this, I don't quite know what to expect from the future or how to orient myself.
Even though I’m not particularly afraid of losing my job—since I’m protected by the labor laws of the country I work in (it's almost impossible to fire someone in France)—I feel those same policies could become a huge drag on tech companies. Being forced to retain programming staff who might eventually become redundant could make European firms less competitive against, say, US rivals. Even if comparing the EU tech industry to the US is already a stretch, these rigid labor norms could put it at an even greater disadvantage.
I could go on, and I'm drifting a bit from my initial concerns. While I don’t have clear answers yet, one analogy comes to mind.
People compare the current AI revolution to the Industrial Revolution at every turn—and this reflection won't be an exception. Certainly, the transition from manual labor in the fields to operating machinery shares a lot with the shift from manual coding to agentic workflows. Using a scythe manually requires significant skill, has its own learning curve, and demands physical conditioning. The same goes for coding and the cognitive skills it requires. Of course, you don't study reaping for six years before looking for a job, but you get my point.
Manual farm work may not have been as well paid as programming is today, which I think comes down to how accessible the skill is to the general public. Reaping a harvest with a scythe is clearly easier for the average person to pick up than writing code; not everyone is wired to spend their life working with something as abstract as programming. Today’s high tech salaries are the result of consumers' willingness to pay (directly or indirectly) for well-marketed products built by a limited pool of developers. In a parallel universe, farmers might be the highest-paid workers if very few people could actually do the job while everyone depended on it.
However, what is dramatically different between these two transitions is the scope of potential work. Earth has a finite amount of fertile land. Farmers are limited by the acreage they own, not to mention the number of people they can realistically distribute their produce to. Even with modern transportation, farmers still occasionally suffer from overproduction, and their output capacity is far from having exponential potential. Consequently, a large number of manual laborers were replaced by a dramatically smaller number of machine operators.
When it comes to software, the situation is different. People are essentially insatiable when it comes to digital consumption. Software can be distributed globally with virtually no limits, and logistics and storage costs are negligible by comparison. Lowering production costs doesn't just lead to churning out more copies of a few products; it leads to higher quality and greater variety, because cheaper development means projects need a much smaller audience to be profitable. Look at Blizzard, for example, reviving previously abandoned projects like *Heroes of the Storm* and committing to unusually ambitious new ones. In many cases, the AI revolution could spark a wave of niche projects tailored to specific tastes. Because of this, I’d argue that mass layoffs aren't a certainty—at least not across all domains.
On the other hand, recreational coding will likely survive, much like the need for physical exercise remained after manual labor was automated. We still need to exercise our brains just as we need to exercise our bodies. For many, diving into abstract computer science concepts or solving LeetCode challenges will remain a rewarding pastime. After all, people still run even though they can drive, play instruments even though they can stream music, and cook even though they can order takeout.

What do you think? What is your internal dialogue regarding all the progress in agentic coding? Looking for thoughts and ideas to help calming voices in my head.


r/softwareengineer • • 7h ago

You added caching to improve performance. But what happens when the cache expires?

0 Upvotes

Caching is one of the most common ways to improve performance. But implementing a cache doesn't automatically mean your system is protected from performance issues.

One of the common problems is Cache Thundering Herd (Cache Stampede).

Imagine a frequently accessed cache entry expires. Hundreds or thousands of concurrent requests suddenly try to retrieve the same data from the backend, potentially overwhelming it and causing a spike in latency, CPU, and resource consumption.

There are several mechanisms to mitigate this:

  1. Cache Locking (Single-Flight)

Allow only one request to refresh an expired cache entry while other requests wait for the result.

2. Stale-While-Revalidate

Continue serving the stale cached value while refreshing it in the background.

3. TTL Jitter

Randomize cache expiration times to prevent large numbers of entries from expiring simultaneously.

4. Probabilistic Early Expiration

Refresh cache entries probabilistically before they expire, spreading refresh operations over time.

5. Background Refresh / Prewarming

Refresh frequently accessed entries proactively before they expire.

6. Stale Fallback

If the backend is unavailable or the refresh fails, serve an expired value for a limited period instead of failing the request, when the data allows it.

Caching can significantly improve performance, but it can also introduce a new bottleneck if it isn't designed to handle concurrency, expiration, and backend failures properly.

Caching scenarios should be part of your performance test strategy. Test not only with a warm cache, but also cache expiration, cache misses, and concurrent refresh scenarios to understand how your application behaves under pressure.

The takeaway for performance engineers: Don't just load test your application with a warm cache. Test what happens when your cache expires under load.


r/softwareengineer • • 8h ago

Lesson learned: Putting AI in the driver's seat

45 Upvotes

I'm a software engineer, and I was experimenting with AI while building a side project.

Initially, I chose the tech stack and reviewed almost every piece of code generated by AI. Over time, I became more confident in AI's capabilities and gradually stopped reviewing the code myself. Instead, I focused on whether the actual requirements were being implemented and relied on AI code reviews.

After almost two months without proper manual code reviews, I casually decided to look at the codebase.

I was shocked by what I found.

Unnecessary complexity everywhere.

Too many comments explaining things that shouldn't have been complicated in the first place.

Multiple database tables created for relatively simple requirements.

Token consumption going through the roof.

Increasingly difficult to work with smaller-tier models.

Endless AI review comments followed by expensive remediation cycles.

AI subscription costs going up significantly.

Application performance degrading over time.

Even the test cases were a problem. I asked AI to generate proper test coverage, but eventually, the test code became larger than the actual implementation.

I was primarily using Claude. To regain control of the repository, I also subscribed to Codex and Gemini and used them to review and simplify the codebase.

I started removing features that I never actually needed. Many of those features existed simply because AI suggested them and could implement them easily.

Thankfully, I didn't have any paying customers yet. Otherwise, this could have been a much bigger problem.

Lessons learned

Never blindly trust an AI agent. Its confidence doesn't guarantee the quality of its implementation.

The developer must always be in control. AI can write the code, but architectural and technical decisions should remain with the developer.

Don't add features just because AI can implement them. Every feature comes with maintenance and operational costs.

Question AI recommendations. Some of the recommendations that sound like improvements can introduce unnecessary complexity.

Keep reviewing the code. AI code reviews are useful, but they are not a replacement for understanding your own codebase.

Set a strict AI budget. If subscription and token costs keep increasing, question the return brutally. Be your own CFO.

My biggest takeaway: AI has made implementation incredibly easy, but maintaining control over the software has become even more important.

Have others experienced something similar? How do you ensure AI-assisted development doesn't turn into AI-managed technical debt?


r/softwareengineer • • 15h ago

Me siento vacío

4 Upvotes

Hace unos años, me encantaba crear proyectos para la comunidad; ahora me siento bastante mal porque, desde enero de este año, no he podido se me ocurra ninguna idea. ¿A alguien más le ha pasado una situación así? ¿Cómo la resolviste?

Además, he intentado aprender nuevos lenguajes de programación, pero pierdo el interés después de como una semana. También he estado trabajando ejercicios en plataformas como Codewars o LeetCode, y me siento súper vacío e idiota cuando no puedo resolverlos.