How a Fixed-Width Button Can Get Your Company Trending on Reddit for All the Wrong Reasons: A Front-End Developer Tale

Jennie Kim Eldon
Udacity Eng & Data
Published in
2 min readApr 11, 2016

Last week, one of our company’s marketing pages was featured on Reddit in a thread that generated over 5,000 points in a day. Unfortunately, this is why:

Within minutes of seeing the thread, one of our front-end engineers submitted a PR, and we merged the fix. But by then, it was too late. Because internet.

By the end of the day, there were hundreds of comments on the OP’s screenshot. Some of my favorites:

“Lesson 1: Avoiding Fixed-Width Buttons” — xintox5

Have you tried turning it off and turning it on again? — _I_suck_at_this

in fairness, it says “a beginner’s guide” — v_krishna

“Learn Mor”

What lessons can you take from our public embarrassment?

Prune stale code

The particular code that generated this gross visual error had been repurposed from an outdated page, rather than recreated or refactored to meet the needs of a new use case (it was actually fixed padding widths that did us in). It is very, very easy to fall into this trap, especially if you’re dealing with large amounts of legacy code. Don’t make the same mistake we did. Take the extra time to scrap old code and start fresh.

Test rigorously across mobile devices

It’s not enough to test only on the latest Android devices and iPhones. Your team should have a systematic series of tests across a defined subset of devices — either using physical devices or emulations (Chrome Dev Tools is your BFF). For code reviews, confirm that content has been tested on all common devices and screen sizes before LGTM-ing. You would never approve a PR that failed a unit or integration test, would you? This is no different.

Keep perspective

Yes, this was bad. It was very bad. But in the grand scheme of things, it’s not that big of a deal, as long as we learn from such mistakes. As one of the military vets on our team commented, “No one died.” Which is true because, contrary to popular belief, you can’t actually die of embarrassment.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in Udacity Eng & Data

from the engineers and data scientists building Udacity

Written by Jennie Kim Eldon

Senior Product Manager @udacity, learning enthusiast, programmer, cool mom

Responses (1)

What are your thoughts?