Was it an Easter egg that made you chuckle? π₯ A hidden gem buried deep in the code? π Or some some truly atrocious lines code? :scared: We want to know! Join the discussion and share the most unusual, unexpected, or downright cringe-worthy moments you've come across while coding.
Follow the DEVteam for more discussions and online camaraderie!
Top comments (8)
Security of a whole portal was based on βRestrictionβ, not βAuthorizationβ. Meaning your access was βrestrictedβ depending on the profile stored in your cookie.
Remove the cookie, remove the restriction. BAM ! You are admin π
While maintaining a BHO (Browser Helper Object) for IE7+ over a decade ago, I found out that:
I also had to correct the same bug in a Silverlight project 96 times because programmers looooove their copy/paste.
Nice to see someone mention Silverlight, when Adobe Flash almost appears to be forgotten.
The Mars Climate Orbiter incident In 1999, when NASA's Mars Climate Orbiter spacecraft was lost in space due to a software error.
The software on the spacecraft used metric units, while the ground-based navigation software used imperial units. This mismatch in units led to incorrect calculations and caused the spacecraft to approach Mars at the wrong trajectory.
That's my favorite example for explaining primitive obsession
β Your types should never be "Int" or "String"
β Use instead "Duration", "Length", "DateTime" ...
refactoring.guru/fr/smells/primiti...
Also the metric system is objectively better than imperial units.
There is (as of 2022 start) way in Android to get the typed key in JavaScript in Chrome.