9 ms·
Lol, few things trigger my OCD more than misspelled words in identifiers. I legit missed important use case while amending legacy system just because someone de
by mynegation 5y ago
Lol, few things trigger my OCD more than misspelled words in identifiers. I legit missed important use case while amending legacy system just because someone decided to have “priveleges” in the variable name. I hope all those ways to spell number 90 are part of the joke.
- alfalfasprout 5y agoOh yeah it's especially wonderful if it's too late to fix the spelling mistake lol.
- simlevesque 5y agoI feel like being proactive about these things is one of the most important parts of my job.
- hashkb 5y agoAnd everyone saying "backslash" is on the inside of an awesome joke too.
- banana_giraffe 5y agoI'll just leave this here for you: https://datatracker.ietf.org/doc/html/rfc7231#section-5.5.2 https://datatracker.ietf.org/doc/html/rfc7231#section-5.5.2
- jrockway 5y agoThat's a good one. Since legacy code is less likely to change than the English language, I just call it a "referer" in writing unrelated to HTTP. That way, I'm never confused. (Everyone else? Good luck.)
- inopinatus 5y agoI once saw this implemented as a regex. Unfortunately the regex was refer*er. “Tests pass, ship it”
- exikyut 5y agoThe tests clearly did not include spinning up an HTTP server and actually using the correctly-spelled header (as per correct English), then.
- dqv 5y agoI don't know enough about overflows, but that could theoretically be exploited, right? referrrrrrrrrrrrrrrrrrrrrrrrrrrer
- zeusk 5y agoinb4 refeer (should've used referr?er)
- xmprt 5y agoI also feel like this is a buffer overflow waiting to happen. If somehow someone makes the header length way longer than expected (eg. referrrrrrrrrrrrrrer).
- jsjohnst 5y ago? is 0 or 1 instances of the preceding character, so referrrrrrrrrrrrrrer wouldn’t match /referr?er/, only referer or referrer. Proof: https://regex101.com/r/s56ebD/1 https://regex101.com/r/s56ebD/1
- jrockway 5y agoThe key is to write out the enums to long-term storage as the names instead of the numbers, that way nobody can ever fix your spelling mistakes.
- dhosek 5y agoThere are lots of ways for spelling errors to get reified. They can also end up in a data interchange XML schema (I bumped into that one at a previous job where it seemed like an obvious and trivial fix to correct the spelling of a class name and discovered that it had ended up in a company-wide data interchange schema which could not be practically fixed).
- btilly 5y agoThe most important example of that class of error is REFERER. It should have been spelled REFERRER. But nobody caught it, and you really can't change something that is part of the HTTP standard...
- mixmastamyk 5y agoEarly header compression.
- saagarjha 5y agoTook a leaf out of the UNIX creat/umount handbook, clearly.
- int_19h 5y agoumount() is actually legit - early C limited extern identifiers to 6 chars (or rather it would allow more than that, but the rest would be silently ignored for linking purposes), hence why we also have strlen() etc. creat() is weird because create() would fit that constraint just fine, so there's no obvious reason as to why it had to be shortened. The 1978 K&R C book actually notes it with [sic].
- croddin 5y agoI was just trying to debug something today and noticed how the referer HTTP header is spelled wrong and that is the spec while there are several other headers that spell it referrer. Crazy!
- dehrmann 5y agoHave fun naming the variable you use for referer.
- aroman 5y agodo you actually have OCD or are you just using this as a figure of speech?
- monocasa 5y agoAs a dev with dyslexia, I apologize. I've for sure committed some sins there in places that are nasty to fix.
- hurflmurfl 5y agoWell, pasting the enum example into IntelliJ highlighted the spelling mistakes and suggested replacing NINTEY and NINETEY with NINETY. I think this is how my dyslexic colleague works too - copy pasting instead of writing and looking for various wiggly lines in code editor.
- monocasa 5y agoYeah, spell check in editor is killer, and I work in strongly typed languages so it's a compiler error if I misspell a variable name is another big one. It doesn't catch everything however.
- gambiting 5y agoIn a triple A game I worked on, the PlayStation button enums were CROSS, SQUARE, TRIANGLE, and...... CRIRCLE. Would drive me absolutely livid. But of course no one was allowed to fix is since it was already in a few different games, countless script files, network-controlled configs etc.....
- bumblebritches5 5y agoDumb, they should've just added a CIRCLE = CRIRCLE option
- hnlmorg 5y agoI feel your pain. A company I work for has a weird name that doesn't follow the rules of English spelling correctly (I can't say more without giving away the company name). This was an intentional decision and poses enough of a problem for guests visiting the company. But the absurd thing is this company decides to double down on it's troubles by naming all of it's projects using the same broken rule as the company title. Often these projects will be common English words re-spelt in the style of the company name. So now I'm often finding myself misspelling common words because of this stupid company name. And all of this is intentional too! Drives me nuts.
- etrautmann 5y agoGoogol?
- wiether 5y agoThat's what code reviews are for :)
- deleted 5y ago[deleted]
- UglyToad 5y agoThis reminds me when I was learning to code I was working through the Project Euler problems in python, one of them has you write code to do something with the English words for numbers. I wrote my code and was fairly confident it was correct, submit the answer and it is rejected, spend the next few hours trying to find the logic error. Of course it's because English is ridiculous and it's "forty" instead of "fourty".
- bradleyankrom 5y agoIn an old code base I worked in, someone misspelled “params” as “parms.” Always made me want a sandwich.
- maxwell 5y agoSounds like a lisper. https://duckduckgo.com/?q=site%3Apaulgraham.com+parms https://duckduckgo.com/?q=site%3Apaulgraham.com+parms
- InitialLastName 5y agoI worked with a (home-rolled at the company, but long before my time with no compilation documentation) comms library that had functions named "receive" and functions named "recieve". Even better, the library was called into as a COM object by a Visual Basic Script script, and the misspelled corner case only got hit rarely. Figuring out that the problem was the correctly spelled function call was a joy.
- chopin 5y agoI rarely work with Excel. A couple of days ago I had the joy to need to apply a function with multiple parameters. The formula parser complained with an error message which meant nothing to me. I finally figured out that I needed to use semicolons as separator for the function arguments (I am from Germany). Who in his right mind does THIS? I tried to change the separator in Windows setting, to no avail.
- tambourine_man 5y agoMagento 1.9X used to have a typo in the database that lasted for years because so much stuff already relied on it and it wasn't user facing. I do not miss those days.
- BitwiseFool 5y agoYou're going to love this: U+FE18 ︘ PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET: bracket is spelled incorrectly. https://en.wikipedia.org/wiki/Unicode#Anomalies https://en.wikipedia.org/wiki/Unicode#Anomalies
- mikey_p 5y agoI once fat-fingered a `rails new APPNAME` command and didn't catch it for several months. Not impossible to change, but also not really critical either.
- sgerenser 5y agoEven worse than misspelled is when it’s inverted polarity! Like uninitialized=true means that it IS initialized. I’ve seen something similar to that in multiple jobs.