A function that's only right on Tuesdays
Why is this Testing meme funny?
Level 1: It’s Always Tuesday
Imagine you have a friend who, whenever you ask “What day is it today?”, they always answer “Tuesday,” no matter what. You wake up on Wednesday: “It’s Tuesday,” they insist. Thursday? “Tuesday!” On actual Tuesday, of course, they say “Tuesday” and happen to be right that day. This meme is joking about a piece of code that behaves just like that friend. It’s a pretend function on a computer that is supposed to tell you the day, but it was written to always say Tuesday every time you use it. The funny part is how the person who made it acts super confident because they only ever tried it on a Tuesday morning, so it seemed correct then. It’s like someone building a little calendar that only has Tuesdays on it and saying “Look, it works great!” – while everyone else realizes that as soon as it’s not Tuesday, that calendar is going to be totally wrong. The humor comes from how obviously silly and flawed that is, and how the person pretends it’s okay. It’s a goofy reminder that just because something works once (or on one specific day), it doesn’t mean it’s a good solution for every day.
Level 2: Works on Tuesday Only
At its core, this meme is highlighting a simple coding mistake: using a hard-coded return value instead of actual logic. The function shown – likely written in Swift (a programming language for iOS/macOS) – is named whatDayIsToday(). A function like this is supposed to tell you the current weekday (Monday, Tuesday, Wednesday, etc.). But instead of calculating or looking up today’s day, the code just return "Tuesday" no matter what. That means if you called this function on Wednesday, it would still give you "Tuesday". In other words, it’s only correct on one day of the week (Tuesday) and wrong on all the rest. The colleague in the chat points that out humorously by saying “it fails 6/7 of the time.” There are 7 days in a week, so if it only works on Tuesday, it’s failing on the other 6 days. Six out of seven failures is obviously terrible for a function whose job is to identify the day of the week!
The context is a Slack conversation – Slack is a popular workplace chat app that software teams use to communicate. We see Brian posting “There, you can use that.” with a code snippet, as if he’s offering a helpful utility function. It’s very likely he’s joking, because no professional developer would seriously think returning “Tuesday” every time is a proper solution (unless Brian really forgot how days work!). The colleague immediately plays along: “it fails 6/7 of the time” – a dry way of saying your function is basically always wrong except today. Brian’s reply “I tried it several times this morning and it worked every time.” continues the joke. Since that morning was Tuesday, of course each try returned “Tuesday” and appeared correct. This line is a playful jab at a common rookie testing mistake: only testing code under one condition and assuming it always works. It’s similar to the classic phrase among developers, “Works on my machine” – meaning I ran it where/when I developed it, and it seemed fine, so any problems elsewhere aren’t obvious to me. In this case it’s more like “Works on my Tuesday.” Brian is basically pretending not to realize why a hard-coded Tuesday is flawed, echoing that naïve confidence.
From a CodeQuality standpoint, this snippet is a big no-no. It’s an example of a CodeSmell – a sign that something is off in the code design. Hard-coding the answer defeats the purpose of having a function. If a junior programmer wrote this unintentionally (maybe they didn’t know how to get the real date in Swift), a reviewer or mentor would immediately correct them. The correct approach would be to use a date/time API or library. For example, in Swift you might use Date() to get the current date and then a Calendar or DateFormatter to extract the weekday name (e.g., “Tuesday”, “Wednesday”, etc.). That way, whatDayIsToday() would truly tell you today’s day each time you call it, not just spit out Tuesday every time.
The humor also lies in how the code is presented and discussed. It’s in a Slack thread with a very casual tone – something like what you’d see in a team’s random or humor channel. Brian starts the day with a cheerful “HALLO How are y’all this morning?” then someone says “Always wondering what day of the week it is.” Brian responds by quickly whipping up this fake solution (the return "Tuesday" code) as if solving the confusion. “There, you can use that,” he says, as if handing over a helpful snippet. It’s deliberately absurd. The colleague and Brian then exchange remarks that show they’re in on the joke: obviously such a function “fails 6/7 of the time,” and Brian’s mock defense that it worked every time (he tried it on Tuesday morning) is just them humorously role-playing a scenario.
For a newcomer or junior dev, the takeaway here is: don’t hard-code values that can change. If you need the current day of the week, retrieve it programmatically; don’t just type one of the days as a constant. Hardcoding leads to bugs – as demonstrated, you’d get the wrong result most days. Also, when testing your code (like writing unit tests or just running it manually), make sure you consider different cases or times, not just one moment. If Brian had tested his function the next day (Wednesday), he’d immediately see it was broken. So the meme is both a joke and a gentle lesson: code should be written to handle all expected scenarios (all days of the week here), and a solution that only works under very specific conditions is not really a solution. The tags like BugsInSoftware and CodeQuality are attached because this scenario exemplifies a bug caused by low-quality (hardcoded) code. And it’s tagged Swift because the code syntax looks like Swift, although the joke would work in any programming language. In short, everyone on that Slack thread knows the function is bad – that’s why it’s funny. It’s a shared understanding among developers that this is something you shouldn’t do, exaggerated for comic effect.
Level 3: Tuesday-Driven Development
This Slack exchange pokes fun at a classic code smell: a function that returns a hard-coded value instead of computing the real answer. In the screenshot, Brian shares a Swift-like snippet:
func whatDayIsToday() -> String {
return "Tuesday"
}
This whatDayIsToday() function always returns the string "Tuesday", no matter what day it actually is. It's a tongue-in-cheek example of poor CodeQuality and a notorious bug pattern. The humor lands because any seasoned developer immediately recognizes that this code only works on Tuesdays. It's essentially a one-day algorithm — correct one day, wrong the other six. The colleague quips "it fails 6/7 of the time," pointing out that on six days of the week this function will give a blatantly incorrect answer (only Tuesday is right).
Why would anyone write such a silly function? In this case, it's clearly a joke. However, it satirizes real-world situations where developers might unconsciously code in assumptions or hardcoded_return_values. For instance, maybe a dev writes a quick fix, like return 42 because they know today's answer should be 42, and forgets to replace it with real logic later. Or they test something on one specific day (or environment) and conclude "it worked every time I tried it" – akin to the infamous "Works on My Machine" syndrome, but here it’s "Works on My Tuesday". Brian’s retort “I tried it several times this morning and it worked every time.” is dripping with ironic humor: of course it did, because it was Tuesday morning when he tested! This line satirically highlights how unit tests and manual checks can be misleading if you only test under a narrow condition (in this case, the same day repeatedly).
From a senior developer perspective, this snippet is a bug waiting to happen (or already happening 6 days a week). It lampoons the idea of temporal bugs — issues that only surface at certain times. Here, the bug is almost a literal time bomb: after Tuesday passes, the code’s 14% success rate plummets to zero until the next week. It’s reminiscent of the saying “Even a broken clock is right twice a day,” except here the function is right once a week. The conversation itself feels like a lighthearted DeveloperHumor moment during a team’s morning Slack chat, perhaps to cheer up the team. But beneath the laughter is an experienced truth: hardcoding values (like always returning "Tuesday") is a bad practice in any language, be it Swift, Java, or Python. It shows a blatant disregard for dynamic data and will lead to BugsInSoftware. A well-designed whatDayIsToday() would call the system’s date API (for example, using Swift’s Calendar or DateFormatter) to get the current weekday, rather than returning a constant.
In broader terms, this meme touches on CodeQuality lessons. Good code shouldn’t make assumptions that only hold true in the developer’s limited context. It’s a gentle reminder that code needs to handle all expected cases – here, all seven days – not just the convenient one. The humor also nods to how misguided confidence can be born from incomplete testing. A junior dev might run this function on Tuesday, see it output "Tuesday", and think “Great, it works!” – much like Brian jokingly does. Meanwhile, a senior dev looks at it and half-jokes, half-cringes, knowing full well the CodeSmell on display. In the daily life of software development, we’ve all encountered something like this: a quick hack or a snippet that “just returns the thing we want right now” which then gets accidentally shipped or forgotten. The result? A bug that appears as soon as reality differs from the coder’s assumption. This meme hits home because it exaggerates that scenario to absurdity. Hard-coded logic like this is the bane of robust software, and any experienced coder has learned (perhaps the hard way) that tomorrow, reality will prove your quick fix wrong. Here, “tomorrow” literally means Wednesday.
So, why is it funny? Because it’s a shared wink among programmers: we’ve all seen code that is technically correct under incredibly narrow circumstances and totally ridiculous otherwise. The Slack thread format adds to the humor – it’s presented as casual office banter. Brian’s deadpan code snippet and follow-up (“There, you can use that.”) mimic that overconfident colleague who proudly delivers a solution that misses the point. The colleague’s response (“it fails 6/7 of the time”) is the dry reality check. And Brian doubling down with “worked every time this morning” just seals the comic timing – he’s pretending not to understand why a function returning the wrong day is a problem, as long as it passed his own unit tests on (this) Tuesday. This entire scenario encapsulates an inside joke about CodeQuality: good software works every day, not just when the developer happens to run it.
Description
A screenshot of a chat conversation, likely Slack, between 'Brian Kendig' and another user whose name is redacted. The conversation begins with Brian asking how everyone is. The other user replies, 'Always wondering what day of the week it is.' Brian then shares a code snippet, written in a syntax resembling Apple's Swift language: 'func whatDayIsToday() -> String { return "Tuesday" }'. He follows up with, 'There, you can use that.' The other user points out the obvious flaw: 'it fails 6/7 of the time'. Brian's final, deadpan response is, 'I tried it several times this morning and it worked every time'. The humor lies in the classic developer trope of 'it works on my machine,' taken to a logical extreme. Brian's flawed testing (only on a Tuesday morning) and his refusal to acknowledge the function's fundamental design flaw is a perfect satire of developer tunnel vision and confirmation bias
Comments
7Comment deleted
This is my new favorite date-time library. It has zero dependencies, is incredibly fast, and has a 100% success rate during the Sprint demo
Hard-code whatDayIsToday() → “Tuesday” and you’ve eliminated flaky tests, DST edge cases, and 6⁄7 of your pager alerts - temporal certainty at the low, low cost of reality
This is the senior engineer's version of 'it works on my machine' - except now it's 'it works on my Tuesday.' The beautiful part is the implicit understanding that when you're deep enough in the trenches, every day genuinely does feel like Tuesday, making this technically a high-availability solution with 100% uptime in production (your mental state)
This is the software equivalent of a stopped clock being right twice a day, except Brian's function is only right once a week. The real tragedy isn't the 85.7% failure rate - it's that he tested it 'several times this morning' and never questioned why it kept returning the same value. Classic case of testing in production on a Tuesday, then shipping to users who inexplicably experience issues Monday through Monday. At least he's consistent with his 14.3% success rate, which is still better than most A/B test conversion rates
Temporal coupling at its finest: a date API with a 14.29% SLO - perfect if your monitoring only runs on Tuesdays
whatDayIsToday() -> "Tuesday" is demo-driven development: green during stand-up, SEV1 by Wednesday - this is why seniors mock time
Temporal CAP theorem mastery: perfect Consistency (Tuesday), total Availability, zero Partition tolerance beyond one day