Pixels, Promises, and Panic: Horror Stories of Production Nightmares

Rate this content
Bookmark

Join me for "Pixels, Promises, and Panic" as we delve into the world of frontend mishaps. We'll share 4-5 real-life horror stories from the trenches of web development. From baffling browser bugs to cringe-worthy code catastrophes, these tales are a mix of humor and caution. Whether you're a seasoned developer or just starting out, these stories will entertain, enlighten, and remind us all of the unexpected twists and turns in the world of coding.

This talk has been presented at C3 Dev Festival 2024, check out the latest edition of this Tech Conference.

FAQ

The main topic of Nechu Dan's talk is how to make mistakes and get away with them.

The speaker of the talk is Nechu Dan, who usually introduces himself as Dan Nechu.

Software bugs are called 'bugs' because in 1947, a team of computer scientists at Harvard discovered an actual bug stuck to the motherboard of a malfunctioning computer. The term was made popular by Dr. Grace Hopper, one of the inventors of COBOL.

Nechu Dan views software bugs as inevitable, comparing them to Bugs Bunny who always finds a way to outwit challenges. He emphasizes the importance of making sure that bugs do not disrupt production services.

Nechu Dan learned the importance of thoroughly testing and stress-testing features, as well as avoiding rash decisions with user accounts. He also highlighted the need for alert systems to catch outliers.

Nechu Dan faced a $50,000 bill from Google Cloud because a project was mistakenly billed to his personal account instead of the company's account. It took two weeks to rectify the billing error.

A CSS button in a checkout form showed a loading state that never went away, causing users to think it was non-functional and resulting in a significant revenue loss.

Nechu Dan's team accidentally took down their own app by pushing a change that caused excessive server-side redirects, leading to a denial of service by their firewall.

Nechu Dan advises that the person who created the issue should be responsible for writing the postmortem. If multiple teams are involved, dedicated individuals from each team should collaborate on the document.

According to Nechu Dan, a common mistake junior developers make is not thoroughly checking their code beyond the specific feature they are implementing, which can lead to breaking other parts of the application.

Neciu Dan
Neciu Dan
28 min
15 Jun, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
The Talk covers the importance of preventing and dealing with bugs in software development, with the speaker sharing their experiences and solutions. They discuss the impact of bugs on user experience and revenue, the importance of stress testing and implementing alerts, and the surprising impact of CSS. The speaker also emphasizes the importance of simplicity, monitoring, and refactoring, as well as the need to address security threats and learn from failure. They provide tips for writing postmortems and highlight common mistakes to avoid, especially for junior developers.

1. Introduction to Bugs Bunny

Short description:

Welcome to the last talk of the day. I'm here to talk to you about how to make mistakes and get away with it. Bugs are the leading cause of serious issues for developers. They bypass tests and wreak havoc on users. Bugs bunny is inevitable, but we can prevent them from breaking our production service. Let me share my experiences and solutions to help you avoid making the same mistakes. I have 4 or 5 stories to tell. I've been a front-end engineer for 12 years and worked on all three big frameworks.

Welcome to the last talk of the day. Like Daniel introduced me, my name is Nechu Dan. I usually introduce myself as Dan Nechu, but that was a mistake because on Twitter, it doubled the N, so I decided that doesn't look good, so I switched it up.

I'm here to talk to you about how to make mistakes and get away with it. That's my title of the talk. We have usually in production, we have issues, outages, downtime, service failure, technical stoppages, and system breakdowns. These are all serious, serious issues and problems that are affecting millions of developers everywhere. And, at the route of all this, what is the leading cause of these terrible issues that keep developers from sleeping at night? Well, it's actually bugs.

These ferocious little rascals bypass all our tests and manual quality assurance, they go to production, and they wreak havoc on our users, causing churn, loss of revenue, and frustrating users every day. Or these are bugs but developers like to call them little oopsies. But who here knows what they're actually called bugs? A couple. I assume they're called bugs because they're gross and scary, so why not call them spiders or snakes? They're scary, deadly, and more dangerous than bugs, or something really, really scary like clowns.

The reason is that in 1947, at Harvard University, a team of computer scientists saw that their big very big computer was not working correctly. After tinkering with it a little bit on the software and finding nothing, they opened the computer up and what they saw inside was one bug that was stuck to the motherboard. This also was made popular by the story of Dr Grace Hopper who was one of the inventors of COBOL. Personally, I don't find bugs scary because I usually like to call them bugs bunny. The reason for this is, think about it, bugs bunny never gave up. He always outwitted Elmer Fudd and found a way to get what he wanted. He repeatedly changed duck season to rabbit season and tricked Elmer Fudd into shooting himself in the face. It is the same with bugs. No matter how much you try, how many people you throw at it, how many automated tests you write, they usually find a way to be clever and make us the developers shoot ourselves in the face. So bugs bunny is inevitable. That's why it is our job as engineers to make sure he doesn't get too fat and break into our production service and eat all our carrots. So that's why I'm here today. I want to talk to you about all the times that bugs bunny tricked me into shooting myself in the face. I have four or five stories depending on the time. Each of these solutions had an obvious solution in hindsight, but thinking about it and implementing some of these practices might help you not make the same mistakes that I did.

So about me, I've been a front-end engineer for 12 years. I was born in Romania, but I live in beautiful sunny Barcelona. I like to write tech articles, and I worked on all three big frameworks.

2. How 20 Children Broke the Leaderboard

Short description:

I joined the company with little programming knowledge and got involved in building multiple projects. We developed a browser game for kids, but a bug allowed them to cheat the leaderboard. The issue caused a backlash from parents and the media, but we eventually fixed it. This experience taught me the importance of stress testing and implementing proper alert systems.

My first story is when I joined the company as a total programming noob, I knew a lot of things like data structures, dynamic programming, how to reverse a linked list, and all sorts of things that were absolutely useless when I started my first job. So as for web development, I knew just how to position things with position absolute all over the place, but the company that I worked at had a lot of projects and very few developers, so immediately I got stuck building and building, building a lot of projects, and got my hands dirty.

So we usually, this company was an outsourcing company, and we liked to do browser games. So there we were building this fantastic gaming experience, a point-and-click game that helped children learn about the benefits of milk. So the game itself was very straightforward, even for seven or eight-year-old kids. You had three little games, and a milk cart would appear, and then if the child saw milk, he had to click it, he got points. If he clicked multiple milks in a row, he got double the points, and he could create a streak. Now these were three mini games, and outside you had a leaderboard that showed the top 20 scores that the children could do. And they all tried to build it.

Now one tricky mechanic about these games is as you moved around, it kept the same score, and if you paused, you can restart it in another game. What I didn't count on is how driven seven-year-olds would be to be at the top of the leaderboard, especially considering there were no prizes, this was just for a fun game, and it was a game before we knew about gamification, like duolingo habits, and all the fancy stuff that we know now. Back then, we added the leaderboard just for fun. We tested the game for months, but after a week after launching, we came back to work to our surprise to see the leaderboard like this. The score were in the billions.

So immediately, we think, okay, it's one person who created 20 accounts who cheated. He found a way to send it with Postman the results or something, the score, and update the values in our database. So we assumed the worst and discussed it with our client and banned all 20 people from the leaderboard, or as we consider one person. So everything was fine for a couple of days, the quiet before the storm, and then we got bombarded with emails and calls from clients, from the news, because all of them were blaming us for making 20 children cry from the same class, because when we banned them, obviously the entire school saw that they were no longer in the leaderboard, and then they started calling them cheaters, and then they started crying, and they told their parents in turn, and the only thing scarier in this world than a pissed-off mother with a crying child is actually 20 pissed-off mothers with crying children.

So they banded together, called the company, called the news, and went after us, and it took some time for the shitstorm, let's say, to actually reach us, the small company that built the game. So when we did, we actually found out what happened. So a child, 7-year-old, found out that if he paused the game while he had the streak going and then started and paused and started and paused, his score would double. And the first thing he did of course is he became first in the leaderboard, then he went to his friends and bragged about it, and then his friends started doing the same thing and became a competition who can get the best score by doing this trick that they found out. And we actually thought they were hackers, but in reality they were just gaming the system. And of course, once I found the bug, fixing it was just one line of code, a wrong put if statement that verified some local score with the database score. So one line of code made 20 children cry. So that code was written in PHP. So we can actually say that PHP makes even young children cry, not just adults. So in the end we fixed it, we apologized, we restored the accounts of the top 20 children, but gave them adequate scores, and then we let the friendly competition continue. Now what did I learn from all of this? So first of all, you need to test-stress everything. We could have easily prevented this if we had an alert system that alerted us if one score was an outlier above the median.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top Content
Today's Talk discusses the importance of managing technical debt through refactoring practices, prioritization, and planning. Successful refactoring requires establishing guidelines, maintaining an inventory, and implementing a process. Celebrating success and ensuring resilience are key to building a strong refactoring culture. Visibility, support, and transparent communication are crucial for addressing technical debt effectively. The team's responsibilities, operating style, and availability should be transparent to product managers.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
Remix Flat Routes – An Evolution in Routing
Remix Conf Europe 2022Remix Conf Europe 2022
16 min
Remix Flat Routes – An Evolution in Routing
Top Content
Remix Flat Routes is a new convention that aims to make it easier to see and organize the routes in your app. It allows for the co-location of support files with routes, decreases refactor and redesign friction, and helps apps migrate to Remix. Flat Folders convention supports co-location and allows importing assets as relative imports. To migrate existing apps to Flat Routes, use the Remix Flat Routes package's migration tool.
Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
A Practical Guide for Migrating to Server Components
React Advanced 2023React Advanced 2023
28 min
A Practical Guide for Migrating to Server Components
Top Content
Watch video: A Practical Guide for Migrating to Server Components
React query version five is live and we'll be discussing the migration process to server components using Next.js and React Query. The process involves planning, preparing, and setting up server components, migrating pages, adding layouts, and moving components to the server. We'll also explore the benefits of server components such as reducing JavaScript shipping, enabling powerful caching, and leveraging the features of the app router. Additionally, we'll cover topics like handling authentication, rendering in server components, and the impact on server load and costs.
Power Fixing React Performance Woes
React Advanced 2023React Advanced 2023
22 min
Power Fixing React Performance Woes
Top Content
Watch video: Power Fixing React Performance Woes
This Talk discusses various strategies to improve React performance, including lazy loading iframes, analyzing and optimizing bundles, fixing barrel exports and tree shaking, removing dead code, and caching expensive computations. The speaker shares their experience in identifying and addressing performance issues in a real-world application. They also highlight the importance of regularly auditing webpack and bundle analyzers, using tools like Knip to find unused code, and contributing improvements to open source libraries.

Workshops on related topic

Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Featured Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.
Integrating LangChain with JavaScript for Web Developers
React Summit 2024React Summit 2024
92 min
Integrating LangChain with JavaScript for Web Developers
Featured Workshop
Vivek Nayyar
Vivek Nayyar
Dive into the world of AI with our interactive workshop designed specifically for web developers. "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" offers a unique opportunity to bridge the gap between AI and web development. Despite the prominence of Python in AI development, the vast potential of JavaScript remains largely untapped. This workshop aims to change that.Throughout this hands-on session, participants will learn how to leverage LangChain—a tool designed to make large language models more accessible and useful—to build dynamic AI agents directly within JavaScript environments. This approach opens up new possibilities for enhancing web applications with intelligent features, from automated customer support to content generation and beyond.We'll start with the basics of LangChain and AI models, ensuring a solid foundation even for those new to AI. From there, we'll dive into practical exercises that demonstrate how to integrate these technologies into real-world JavaScript projects. Participants will work through examples, facing and overcoming the challenges of making AI work seamlessly on the web.This workshop is more than just a learning experience; it's a chance to be at the forefront of an emerging field. By the end, attendees will not only have gained valuable skills but also created AI-enhanced features they can take back to their projects or workplaces.Whether you're a seasoned web developer curious about AI or looking to expand your skillset into new and exciting areas, "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" is your gateway to the future of web development. Join us to unlock the potential of AI in your web projects, making them smarter, more interactive, and more engaging for users.
Building a Shopify App with React & Node
React Summit Remote Edition 2021React Summit Remote Edition 2021
87 min
Building a Shopify App with React & Node
Top Content
WorkshopFree
Jennifer Gray
Hanna Chen
2 authors
Shopify merchants have a diverse set of needs, and developers have a unique opportunity to meet those needs building apps. Building an app can be tough work but Shopify has created a set of tools and resources to help you build out a seamless app experience as quickly as possible. Get hands on experience building an embedded Shopify app using the Shopify App CLI, Polaris and Shopify App Bridge.We’ll show you how to create an app that accesses information from a development store and can run in your local environment.
Build a chat room with Appwrite and React
JSNation 2022JSNation 2022
41 min
Build a chat room with Appwrite and React
WorkshopFree
Wess Cope
Wess Cope
API's/Backends are difficult and we need websockets. You will be using VS Code as your editor, Parcel.js, Chakra-ui, React, React Icons, and Appwrite. By the end of this workshop, you will have the knowledge to build a real-time app using Appwrite and zero API development. Follow along and you'll have an awesome chat app to show off!
Hard GraphQL Problems at Shopify
GraphQL Galaxy 2021GraphQL Galaxy 2021
164 min
Hard GraphQL Problems at Shopify
WorkshopFree
Rebecca Friedman
Jonathan Baker
Alex Ackerman
Théo Ben Hassen
 Greg MacWilliam
5 authors
At Shopify scale, we solve some pretty hard problems. In this workshop, five different speakers will outline some of the challenges we’ve faced, and how we’ve overcome them.

Table of contents:
1 - The infamous "N+1" problem: Jonathan Baker - Let's talk about what it is, why it is a problem, and how Shopify handles it at scale across several GraphQL APIs.
2 - Contextualizing GraphQL APIs: Alex Ackerman - How and why we decided to use directives. I’ll share what directives are, which directives are available out of the box, and how to create custom directives.
3 - Faster GraphQL queries for mobile clients: Theo Ben Hassen - As your mobile app grows, so will your GraphQL queries. In this talk, I will go over diverse strategies to make your queries faster and more effective.
4 - Building tomorrow’s product today: Greg MacWilliam - How Shopify adopts future features in today’s code.
5 - Managing large APIs effectively: Rebecca Friedman - We have thousands of developers at Shopify. Let’s take a look at how we’re ensuring the quality and consistency of our GraphQL APIs with so many contributors.
0 To Auth In An Hour For Your JavaScript App
JSNation 2023JSNation 2023
57 min
0 To Auth In An Hour For Your JavaScript App
WorkshopFree
Asaf Shen
Asaf Shen
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.js backend + Vanilla JS frontend) to authenticate users with One Time Passwords (email) and OAuth, including:
- User authentication – Managing user interactions, returning session / refresh JWTs- Session management and validation – Storing the session securely for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.