11 ms·
> Apple will offer more price points for apps. Today there are less than 100, but the company is committing to increase that to more than 500 options. I really
by jrockway 5y ago
> Apple will offer more price points for apps. Today there are less than 100, but the company is committing to increase that to more than 500 options.
I really hope they implemented this as an enum, so someone has to wade through:
enum PricePoint {
UNKNOWN = 0;
NINTEY_NINE_CENTS = 1;
ONE_DOLLAR = 2;
TWENTY_DOLLARS = 3;
NINETEY_EIGHT_CENTS = 4;
DEPRECATED_NINETY_SEVEN_CENTS = 5;
TEN_DOLLARS_PER_MONTH = 6;
PORTUGAL_NATIONAL_BALLOON_DAY_2019_SPECIAL_NINTEY_NINE_CENTS = 7;
// 500 lines follow.
}
- mynegation 5y agoLol, 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).
- 5y ago
- 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.
- ianlevesque 5y agoYou kid but they are a list of “tiers” that get localized.
- jrockway 5y agoI kind of assumed. You can't just take the price in dollars and convert it with the exchange rate, because customers don't want to buy a "89.398723 yen" app. It has to be $0.99, £0.89, ¥99, etc. It is interesting that things are not priced in "buying power", but in numbers that aim to most deceive. ("It's not even a dollar!")
- nicolas_t 5y agoSteam is very often priced in buying power. Depending on the country you live in, prices can be half as high as in other countries.
- elliekelly 5y agoWhy don’t more digital platforms take this approach? Are they worried people from higher relative income countries will log in with a VPN and buy it cheaper?
- tinus_hn 5y agoThere’s also the often forgotten fact that in many countries the listed prices include VAT while in others they don’t.
- slumdev 5y agoComplete with spelling errors, semicolons in place of commas, shouting snake case, and unnecessary explicit numbering. Definitely enterprise-grade.
- cyral 5y agoNot complete until it has a poorly documented API with some name like PriceKit, maybe hidden behind an entitlement as well.
- jrockway 5y agoThe explicit numbering is so that you can reorder them to be more "readable" later. I didn't have the heart to do that here, but in the real world, anything goes!
- happytoexplain 5y agoWhen somebody comes along and inserts a new case next to an existing case because they're closely related, you'll be glad the numbers are explicit.
- slumdev 5y agoNegative - if these are going to be treated like keys where the integer value needs to retain the same meaning between builds, then an enum is the wrong abstraction to use.
- inopinatus 5y agoThe real enterprise case is when additions are made for things that aren’t even pricing
- winrid 5y agoBLUE_BANANA_CONCESSION = 9001
- TeMPOraL 5y agoThere's also less enterprisy and more "1990s engineering" variant of this: enum PricePoint { //all the 500+ price points defined above... REGULAR_PRICE = 1023; PROMO1_PRICE = 1047552; PROMO2_PRICE = 1072693248; AUTOHINT_ROUND_99 = 1073741824; AUTOHINT_BUYING_POWER = 2147483648; } Little bit twiddling, and you can encode 3 prices + some flags in an uint32.
- postsantum 5y agoTHREE_FIDDY
- TheNewAndy 5y agoThere is some evidence of this - if you can log in to app store connect (need a developer account) there is this page: https://appstoreconnect.apple.com/apps/pricingmatrix/1539646329 https://appstoreconnect.apple.com/apps/pricingmatrix/1539646... It shows the tiers from 0 (free) to 87 (USD 999). Then come the party tiers: 510, 530, 550, 560, 570, 580, 590 which are just repeats of the other tiers, probably for some good historical reason which I'm not aware of.
- objclxt 5y ago> which are just repeats of the other tiers Those are the price adjusted tiers. They look like repeats in USD, but if you look at other currencies you’ll see they’re different. They’re designed to allow you to offer price points that are scaled according to the market (i.e, 99c in the US, but considerably cheaper than that in India or China).
- TheNewAndy 5y agoMakes sense, thanks.
- tl 5y agoJust note, that link only works for you; if you have a developer account, you'll have to substitute the ten-digit number for one from your apps.
- throwaway287391 5y agoHuh, so $999 is the max -- and here I was all this time thinking the I Am Rich [0] dev had generously chosen an affordable price point. [0] https://en.wikipedia.org/wiki/I_Am_Rich https://en.wikipedia.org/wiki/I_Am_Rich
- pjmlp 5y agoToday I found out we have a national balloon day!