惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
S
Schneier on Security
S
Secure Thoughts
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
P
Proofpoint News Feed
Security Latest
Security Latest
Jina AI
Jina AI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Recorded Future
Recorded Future
T
Tor Project blog
有赞技术团队
有赞技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News | PayPal Newsroom
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
Forbes - Security
Forbes - Security
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
NISL@THU
NISL@THU
C
Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Google DeepMind News
Google DeepMind News
Project Zero
Project Zero
IT之家
IT之家
T
Threatpost
Cyberwarzone
Cyberwarzone
O
OpenAI News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
J
Java Code Geeks
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
月光博客
月光博客
Latest news
Latest news
MongoDB | Blog
MongoDB | Blog
Apple Machine Learning Research
Apple Machine Learning Research

Yusuf Aytas

When Code Is Cheap, Does Quality Still Matter? Why Crouching Tiger, Hidden Dragon Is a Masterpiece Why We Ignore Advice The Mirror Is Part of the Machine When Too Many Maps Overlap on One Person The Work Runs on Different Maps Your Work Introduces You Trial By Fire The Dude Why Headcount Math Lies Capacity Is the Roadmap The Roadmap Is Not the System Torres del Paine W Trek Escaping Status Theater Incentives Drive Everything Scaling Culture Without Dilution What Good Looks Like Why Airport Security Feels Random Why Politics Appear How to Work with Me The Janus Protocol Multi-Horizon Delivery Framework What Good Execution Looks Like Managing Your Manager Why Kingdom of Heaven’s Director’s Cut Is Better AI Broke Interviews Most of What We Call Progress Managers Have Been Vibe Coding All Along Stop Wasting Brainpower Why Over-Engineering Happens Prisoner's Dilemma Climbing No More The Weekly Win Mevlana Candy Brewing Turkish Tea Onboarding Your Engineering Manager Technical Deep Dives Yapay Zekâ Çağında Bilgisayar Mühendisliği Building Remote Teams From Idea to Launch in 2 Weeks Reflecting on Software Engineering Handbook Representing the Business New Manager Survival Guide Take Self Reviews Seriously Chasing Real Respect The Invisible Difference Learning the Johari Window Management is a Lonely Place Simple Task Management AI Balance in Work PIP Manager Insights Engineering Manager Interview Preparation Work-Life Balance as a Manager Bridging the Management Disconnect Tech Hiring Bubble Bursts Traits for EMs Simple Acts of Recognition Matter The Question I Ask Every New Report The Reality of an Employer's Market Bridging Ideals and Reality Hiring Red Flags Why The Godfather Is So Damn Good Subteam Tenets No Fluff Please Losing a Top Performer Balancing Act of Reliability Building Trust in Engineering Teams Ideal Number of Direct Reports Overriding a People Leader’s Decision From Misperception to Promotion Perception vs Perspective Setting Goals From Engineer to Manager Getting Delegation Right Interviewing Your Future Boss Celebrating Our Book in Iceland Operational Skills Needed On Writing Software Engineering Handbook Charlie Munger Quotes Working with Dependencies From Las Vegas to Canyons Navigating Layoffs Handling Competitive Dynamics A Weekend Getaway to Malta Engineering Health Essentials Should Dev Managers Code? Confronting the Life on Pause Winning Eleven Kindness is A Choice Bireysel Katılımcılar ve Yöneticiler Leading from Where You Are The Subtle Art of Listening Coding in Leadership The Power of Consistency The Making of a Leader The Path to Leadership Embracing TikTok Talent Sourcing Journey Leading Self Managing Teams Cracking Coding Bottlenecks
Buggy Code on Production, Survived
Yusuf Aytas · 2013-04-13 · via Yusuf Aytas

Published · 5 min read

Areca is the name of the billing engine I am working on for Turk Telekom. Funny enough, it is also the name of the flowers we bought to freshen the office. We wanted the office to feel more alive, so we carried them around, watered them, and when the time came to name the project, Areca somehow became the project name too.

The project itself is not as peaceful as the name sounds. Turk Telekom already has a billing system written in Oracle PL/SQL, and it runs once a month to generate bills. What we are building is very different. Areca is a near real time billing engine. If a new promotion changes how a user should be billed, the system should reflect that immediately. This is for around 20 million subscribers, so the scale is serious. There is also a deadline. A new law requires Turk Telekom to inform users when they reach 80% of their bill.

We actually started in a good way. The engine looked elegant, and the design looked clean. The trouble started when we began converting the old PL/SQL logic into the new system. That was the point where many bugs started showing up. Things that looked fine at first became much more complicated during implementation. There were many rules, many exceptions, and not much room for mistakes. Under that pressure, some of those bugs made it all the way to production.

Areca - A billing engineAreca - A billing engine

What We Have Done Right

First of all, we are a small team. There are five of us, including our boss, the founder. We spend a lot of time together, not only in the office but also outside of it. We have lunches together, dinners together, and after some point you really get to know how people think. I think this helps a lot. Communication is easier, asking for help is easier, and for me it is also a very good learning environment.

Another good thing is that we did not start completely blind. We analyzed Amdocs in detail, and we also looked at similar tools. This gave us many good ideas about the domain itself. We started understanding concepts like buckets, promotions, accumulators and similar things much better. In that sense, I think we got the basics right.

I also think we got the engine right. We cache many things, promotions and some customer data for example. The cache works well, but it is very big and JVM does not like that very much. Because of that, we came up with offheap caching. I had never used something like that before, but it worked really well for us.

One more important advantage is that we are not guessing all the time. We have access to Turk Telekom’s internal code, so we can actually see how some things work in the existing system. On top of that, engineers from their side also help us when needed. That makes a big difference, because building a system like this without that support would be much harder.

What We Have Done Wrong

We did many things wrong too. First of all, our Scrum meetings were not ending on time. They usually became longer and turned into design sessions. The bad part was not only the time. The bad part was that these discussions were not always useful. Not everybody joined properly, and sometimes people only cared about their own solution.

Another mistake was testing. We did write tests, but not enough unit tests. We trusted ourselves too much. We thought we knew the code, and we thought we could move faster like that. Later we saw that this was a big mistake. When bugs appeared, finding the real reason was not easy at all.

The PL/SQL conversion also brought many problems. Some parts looked easy at first, but they were not easy in implementation. There were many small details and exceptions. Because of deadline pressure, these bugs reached production before we were really ready.

After that, things became harder and harder. We were tired, stressed and trying to fix many things at the same time. When you work like that, you start making more mistakes. That is exactly what happened to us.

A Reflection

In the end, we survived. I say survived because that is really what it feels like. We found the important bugs just in time and managed to keep going. Next time, maybe we will not be that lucky.

Still, the damage was there. After all those fixes, the code was not in a very good shape. It became harder to read, harder to test and harder to change. Sometimes fixing one problem created another one. That is probably the worst part of buggy code in production. You do not only fix bugs, you also fight with the mess left behind.

But I also learned a lot from this period. I learned that a good looking design is not enough. I learned that tests are not something you write only when you have extra time. I learned that being tired changes the way you think and the way you code. And I learned that if a team does not listen to each other well enough, small problems can become very big ones.

So yes, we survived. That is good. But I think the more important thing is this: now we know much better what can go wrong, and next time we should be more ready.