12 ms·
CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaught
- goda90 5y agoI know this is a little off topic, but the title of this post prevents HN from scaling well on mobile.
- loloquwowndueo 5y agoLol did this extremely long word mess up HN’s page rendering on narrow (mobile) screens for anyone else ?
- redmattred 5y agoYup came to comment the same hah
- nojs 5y agoHaha same! Thought it was a CSS change or something.
- monkeybutton 5y agoAnd here I was suddenly feeling older, slightly squinting at the page, wondering if the text was always that small.
- busymom0 5y agoSorry guys, didn't expect that to happen. @dang it can be fixed by adding `word-break: break-all;` to the `a` tag for .storylink class.
- kryogen1c 5y agomoderators dont typically monitor the comments for their name (although sometimes they do). if youd like to help, im sure theyd love to hear from you at hn@ycombinator.com
- busymom0 5y agoI might be wrong but I think dang does monitor his name. I have mentioned him a few times and he swings by. Maybe just coincidence. I did email him too.
- dang 5y agoIt was just coincidence :) - but I did just see your email.
- busymom0 5y agoAny idea why this post was flagged?
- dang 5y agoPossibly because it borked the layout, possibly because it's not necessarily a substantive post. This exact type of submission (long unbroken class name from some codebase somewhere) has been made a number of times in the past too—little is new!
- dang 5y agoOk, let's try that. Thanks for the suggestion! All: if it breaks anything, would you please let us know? (j/k you guys would never not let us know)
- busymom0 5y agoworks well for me so far!
- gorgoiler 5y agoMost titles now have unnecessary line breaks, in the middle of words. From the front page: “A world first: Ocean drone captures video f[break]rom inside a hurricane” “DMV approves Cruise and Waymo for com[break]mercial service in parts of Bay Area” “Facebook Thrives on Criticism of “Disinfor[break]mation”” (I’m using iOS Safari.)
- dang 5y agoAh yes. I knew we'd tried this before! Reverting...
- attheicearcade 5y agoYou want break-word, not break-all. The latter breaks short words unnecessarily.
- dang 5y agoOk, let's try that and see what it breaks :) Edit: done now. I can't shake the feeling that we've been through all this before, and that's why I ended up resorting to whitespace tricks in https://news.ycombinator.com/item?id=20352144 https://news.ycombinator.com/item?id=20352144. But let's wait and see what's broken now...
- attheicearcade 5y agoLGTM on iOS/Safari after clearing cache. Also on Firefox/Linux.
- themodelplumber 5y ago(Is it still the case that if you break words in CSS you get even more mad at CSS? I haven't tried in a while)
- klyrs 5y agoI feel like this post is a subtle troll
- rubyron 5y agoYes. They need overflow-x: hidden and text-overflow: ellipsis on the post title div.
- busymom0 5y agoBetter solution is adding `word-break: break-all;` to the `a` tag for .storylink class.
- emersonrsantos 5y agoThe only thing that I dislike the fast, web version of HN is this desktop layout on mobile, but HN have an API and 100's of mobile clients which work exceptionally well, and a mobile client for HN can be written in hours.
- busymom0 5y agoOP of the post here. I am also the developer of HACK which is a HN client for iOS, MacOS and Android: https://apps.apple.com/ca/app/hack-for-hacker-news-developer/id1464477788 https://apps.apple.com/ca/app/hack-for-hacker-news-developer... https://play.google.com/store/apps/details?id=com.pranapps.hack https://play.google.com/store/apps/details?id=com.pranapps.h... The API for HN is absolute garbage (they admit to it being so too). It's also a read only API and doesn't support actions. My apps rely on scraping the page and then performing actions such as voting, commenting, favouriting, submitting posts etc.
- dang 5y ago"Absolute garbage"? We wouldn't admit to that! Read-onlyness was a design choice at the time and still has its place. The main problem with the API is that it's too low-level—you have to do a bunch of work to reconstruct what actually shows up on an HN page. The next version of the HN API will give a simple JSON representation of each HN URL. Initially it will still be read-only though; then we'll see about whether to extend it to writes.
- busymom0 5y agoSorry, didn't mean admitting to "absolute garbage" in a literal way. Mostly referring to statement such as: > I'm not saying this to defend it - It's not the ideal public API, but it's the one we could release in the time we had. While awkward, it's possible to implement most of HN using it. https://github.com/HackerNews/API https://github.com/HackerNews/API My words may have been a bit too harsh but I still think I have a point. The only thing I could find use of the API was to get the user's details (karma, description, date created etc). Other than that, I ended up relying on scraping. Unfortunately, unless the JSON api offers write access, it won't be of much use for my app's use cases. Lets just hope the JSON Api isn't going to break anything major in the HTML of the site and there aren't any major re-designs of the site in the pipeline.
- varenc 5y agoIf you click “hide” on this story, it’ll be hidden from your home page and sane scrolling on mobile will return!
- tenaciousDaniel 5y agoOh my god that's hilarious. I had no idea why it was rendering as if it was a desktop screen. lol.
- innocenat 5y agoI immediately realised what must have happened and was scrolling down trying to find this news lol.
- mtlynch 5y agoI've read a lot of API documentation but I've never done iOS development. Does anyone have an explanation of the purpose of this variable? This seems like such a distant yet specific relationship type. Does iOS really have a field for this kind of relationship in Contacts?
- banana_giraffe 5y agoYes. There's an option to add "related contact". I'm not sure what triggers the full flow, but normally it shows three options, and eventually you can get a larger list of 15 or so expected options (mother, father, brother, spouse, etc). And an option for "all labels" that leads to the mess hinted at by this constant. I'm not sure what the point is, since you also have an option for a custom label, which even if I wanted to add a link for the "younger cousin (mother's sibling's daughter or father's sister's daughter)", I'd probably type in whatever I call that relationship informally as a custom label before selecting that mess.
- infimum 5y ago> This seems like such a distant yet specific relationship type I don't know much about it (never stepped foot outside EU/NA) but apparently some Asian countries have a pretty intricate system of kinship terms. For example Diagram IV in [1] shows different (Mandarin?) Chinese terms for what we would just call a "cousin" in English. I also found the video by NativLang [2] on the topic pretty interesting. [1] https://ac-journal.org/journal/vol3/Iss3/spec1/huang_jia.html https://ac-journal.org/journal/vol3/Iss3/spec1/huang_jia.htm... [2] https://youtu.be/YOi2c2d3_Lk https://youtu.be/YOi2c2d3_Lk
- mtlynch 5y agoInformative! Thank you!
- deleted 5y ago[deleted]
- waterhouse 5y agoMy first guess is that there exist human languages in which there's a distinctive word for that relation. (French, for example, has "cousin/cousine" for a male cousin or female cousin, which is about halfway there.) I would guess this is used when translating into those languages.
- tony 5y agoWhy not an enum? Is it an API stability thing? https://docs.swift.org/swift-book/LanguageGuide/Enumerations.html https://docs.swift.org/swift-book/LanguageGuide/Enumerations... Looks like someone beat me to this (2019): https://news.ycombinator.com/item?id=20352473 https://news.ycombinator.com/item?id=20352473, the reply to it perhaps gets to the reason why. Something about Objective C's enums being different. See here: https://stackoverflow.com/a/13480621 https://stackoverflow.com/a/13480621
- saagarjha 5y agoObjective-C enums are C enums. Hence the prefix to prevent collisions.
- sp332 5y agoWhy is it the mother's sibling's daughter but only the father's sister's daughter?
- taneq 5y agoI'd imagine it's been added to facilitate some very culture-specific familial relationship term. Those tend to be rooted in ancient history and are often inconsistently (and arguably pointlessly) gendered but still need to be maintained to keep that culture happy.
- notacoward 5y agoI'd guess that, in whatever language this is relevant for, there's a "feminine" marker that is ambiguous wrt whether it modifies parent/father into mother or sibling into sister.
- thaumasiotes 5y agoNo, 妹 means younger sister. The reason that your father's brother's daughter is not 表, while children of any of your mother's siblings are, is very simple: your father's brother's daughter belongs to the same family you do. Your mother's siblings' children, like your father's sisters' children, belong to other families.
- notacoward 5y agoThank you for the explanation. I said it was a guess, and it wasn't too far off; either way it's literal patriarchy embedded into the language. I wonder if people's authoritative tone (and downvotes) would change if they discovered that there was also another language where the distinction was meaningful but based on different reasoning.
- canjobear 5y agoIt stands for the Chinese term biaomei which means those things.
- 5y ago
- RachelF 5y agoreminds me of the old Dell WMI parameter "MaximumFiddlyPlasticPieces"
- akersten 5y agoAt a certain point, it makes more sense to have a family tree diagram with alphanumeric labels for every possible relation cardinality referenced to self, and just encode those as an enum like ContactRelationA4, ContactRelationB1, etc. And just point people to the diagram. The Apple way is just long, impossible to parse (whose Father?) and in general pushes a lot of code smell buttons for me ("not sure what it is, but I'm dang sure it's rotten")
- hn_throwaway_99 5y agoI disagree, though I think a more intuitive name for this would be CNLabelContactRelationYoungerFemaleCousinWithDifferentSurname.
- jon-wood 5y agoYoungerFemaleCousinWithDifferentSurname is encoding a lot of assumptions about how familial relationships work in Western European/American cultures. Looking at all the possible values in that enum to me doesn't scream of a massive code smell, but instead of years of care and attention being given to proper localisation for often wildly different cultures.
- thaumasiotes 5y agoI suspect the relationship is not labeled differently if the surnames are identical by coincidence. (There was once a taboo against two people of the same surname marrying, but it can happen today.)
- vitus 5y agoI actually have an especially weird but related case in my family. My sister married someone whose surname is the same as my mother's maiden name. His mother's maiden name is the same as my surname. One of our parents' first meetings was to get together and make sure they weren't related... But in particular: how do you distinguish between second cousins in that case? (The term in question isn't limited to first cousins, after all)
- 5y ago
- canjobear 5y agoAka 表妹 https://en.wikipedia.org/wiki/Chinese_kinship https://en.wikipedia.org/wiki/Chinese_kinship
- deleted 5y ago[deleted]
- dapids 5y agoHas anyone actually considered this may be a running joke at Apple? I mean yes, their API's can be quite verbose on naming, but this is just hilarious, and probably left that way. Just a thought. To critique a development practice based on the few names that are like this seems a little shortsighted. This type of contact classification is useless, and probably better left to the programmer to design the hierarchy that best suits their design goal.
- joe_guy 5y agoNothing says humor like shipping unfunny jokes to production.
- kall 5y agoI think Apple only considers the end user part of their systems "production". Developer experience is more "best effort".
- busymom0 5y agoHere's more long names: https://old.reddit.com/r/iOSProgramming/comments/pya17f/whats_the_longest_function_name_you_ran_into_in/ https://old.reddit.com/r/iOSProgramming/comments/pya17f/what...
- dapids 5y agoWow congrats, you found a whole of two long names. _clapping_
- hn_throwaway_99 5y ago> This type of contact classification is useless As another commenter mentioned, no, it's not. It's required in Chinese. In English you would just say "This is my cousin", but in Chinese, the word for "cousin" changes depending on the details of how that person is related to you.
- bellyfullofbac 5y ago
- deleted 5y ago[deleted]
- dang 5y agoHNPastRelatedThreadWithSimilarComments: CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter - https://news.ycombinator.com/item?id=20341855 https://news.ycombinator.com/item?id=20341855 - July 2019 (176 comments)
- thunderbong 5y agoSense of humour on HN? Sacrilege!
- indianpianist 5y ago> SenseOfHumourOnHN?Sacrilege! FTFY
- stefanos82 5y agoHAHAHAHA! ^_^ I didn't see that coming!
- andrewxdiamond 5y agoHey dang! Did you change the css to break-word to handle this post on mobile? I noticed that a large number of posts have words in their titles broken in half at the end, and it’s a tad irksome. Do you think you could change it back? Long worded post titles break the page sometimes, but break-word messes with a number of titles all the time.
- dang 5y agoYes—was messing with this yesterday: https://news.ycombinator.com/item?id=28715206 https://news.ycombinator.com/item?id=28715206. The first change was .title a { word-break: break-all; } which definitely has the problem you describe. The second change was .title a { word-break: break-word; } What's not clear to me is whether you're seeing the latter, which means things are currently broken, or if you were seeing a cached version of the css. Can you double check that? If break-word is still bad, I'll take the whole thing out.
- 5y ago
- mastrsushi 5y agoKinky
- xg15 5y agoSo a moderately verbose Enterprise Java class name. I don't see the problem here... :) (jk)
- blunte 5y agoI initially expected this to be an example making fun of Java.
- skytreader 5y agoLook, this class name is pain in the eyes to read, let alone understand, but even I could immediately tell it isn't about Java because the name does not end with at least three design patterns. CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughterSingletonStrategyFactory would be the Java equivalent. Has anyone checked Android's codebase?
- kroltan 5y agoWoah man, do you expose your SingletonStrategyFactory-s to the public? That's risky API design, I would recommend you at least put it behind a Manager, or ideally a ManagerDependencyFactory.
- ryandrake 5y agoIf you're a SeriousEnterpriseProgrammer, you also need a CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughterSingletonStrategyFactoryProxy and CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughterSingletonStrategyFactoryProxyBuilder.
- throwawaybchr 5y agoCalifornia compliant name: CNLabelContactRelationYoungerCousinBirthingPersonSiblingsFrontHoleChildOrParentWithTesticlesFrontHoleSiblingsFrontHoleChild
- lifeisstillgood 5y agoWhat I find interesting here is that this is an english translation of a chinese lineage - a phrase like "uncle" or "second cousin". We have nothing remotely like this - because we don't have those concepts embedded in our society. The fact that Mandarin has these terms but English not only does not have but that we find so ... outrageous it gets on HN, is deeply indicative - family matters so much more that it's affecting the language - and that in turn forces kids to learn the words and thus keep their lineage in mind. As a shallow westerner who hardly talks to anyone outside his nuclear family I may be less "restricted" by my family but I am missing quite a lot. (No I am not trying to make some sweeping comments about culture, or government administrations or "the modern world". )
- deleted 5y ago[deleted]
- hanselot 5y agoWhy have generic mechanisms for referring to things right? Much easier to make up a new word for every single different thing? This just makes mandarin look like an incredibly mal-optimized language to me, but whatever, to each his own. Besides, if you go full-puritan on this you end up with esperanto, and I can't speak that either.
- kongin 5y agoI can't help but think we'd be better off using tree navigation operators and gender as types. Li(ft), do(wn), si(deways), like lisp's car, cdr, caaadr, etc.. And adding m(ale) and fe(male) at the end of the word as types. E.g. paternal uncle would be lim-sim. Maternal grandmother's son's daughter: life-life-dom-dofe. Utterly pointless and ridiculous but so much more sensible than having a dozen different words which contain less information than what we care about.
- euroderf 5y agoMaybe Loglan does it in such a way ?
- 5y ago
- deleted 5y ago[deleted]
- thefr0g 5y agoQuestion to all software architects: At which point do you decide to implement a DSL? Also I see nothing wrong with this except for the hungarian PascalCase…
- kongin 5y agoA while before this point.
- mhh__ 5y agoIf you have a sufficiently smart (TM) metaprogramming system you can just stick things like this in a macro or template then you get the expressiveness but don't have to a write DSL.
- weego 5y agoWhen I finally lose my mind and think that DSLs solve more problems than they create over the medium term and beyond.
- namelosw 5y agoIn case you're wondering it's 表妹. Also, in case you're wondering why it's not symmetrical (mother's siblings vs father's sisters) is because the complementary set is 堂妹 (younger father's bothers' daughter), and your 堂妹's family name is the same as you. 堂妹's literal translation is "younger sisters living in the same hall" make makes sense when considering how people live together back in the days. 表妹's literal translation is "remote/distant/foreign younger sisters" which you might see them less often in the old days.
- vesinisa 5y agoHmm, it might have made more sense to just use the Latin approximations for the Mandarin pronunication of those Chinese ideograms here. So e.g. CNLabelContactRelationBiaoMei.
- namelosw 5y agoI agree, just like exotic words that are wildly accepted (eg. Umami, Zen), they're handy. Though, people might not know the word Biaomei at all and get confused by the codebase: people know the word "Umami" because Japanese food is popular; people know the word "Mujahideen" because they come from political events and news. I wonder what would lead them to Biaomei...
- skissane 5y agoIf I was writing this code, I would have put something like this in the doc comment: > The label for the familial relationship expressed by the Mandarin term biao mei, meaning the contact's mother’s sibling’s younger daughter or the contact's father’s sister’s younger daughter. This label variable will also store the name for that concept in Chinese language varieties other than Mandarin. If the identical concept is found in a non-Chinese culture, this label variable will store the name for that concept in the language of that culture. If they looked up "CNLabelContactRelationBiaoMei" in the documentation and saw the above description, I don't think anyone would be confused.
- tincholio 5y agoThis would be great paired with some code convention limiting line length to 80 columns :D
- SCLeo 5y agoReminds me of HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor in Spring.
- azarovalex 5y agoHere are some more from iOS SDK Longest Objective-C Method Name: initWithEnableFan:enableAirConditioner:enableClimateControl:enableAutoMode:airCirculationMode:fanSpeedIndex:fanSpeedPercentage:relativeFanSpeedSetting:temperature:relativeTemperatureSetting:climateZone: Longest C function name: CMMetadataFormatDescriptionCreateWithMetadataFormatDescriptionAndMetadataSpecifications Longest Enum Constant Name: kCMBufferQueueTrigger_WhenDurationBecomesGreaterThanOrEqualToAndBufferCountBecomesGreaterThan Source: https://github.com/Quotation/LongestCocoa https://github.com/Quotation/LongestCocoa
- HenryKissinger 5y agoAt this point I would name my object something like iwif_eace and leave the longer name in a comment.
- Cthulhu_ 5y agoIt's where the "introduce parameter object" refactoring should come into play. But on the other hand, it works, don't change working code.
- dustinmoris 5y agoI find it crazy how many people are surprised by this label and even more how many people try to ridicule it or dismiss it by saying "why don't you just call it blah...", etc. It's a cultural norm, and it isn't just a Chinese/Mandarin thing, this exists in many other cultures. In India they also have very different words for different relatives and it has long traditional reasons because historically it was (and even still is today) very important to keep good relationships with a big family network because quite frankly in many places life depends on it. For example, if you have a sister and she gets married then you'd address your sister's husband's brother differently than if you also have a married brother. You wouldn't use the same word for your brother's wife's brother. Why? Well traditionally (and still today) if a women gets married then she leaves her family home and moves in with her in-laws. At that point she leaves one family and becomes the "daughter" of another family. She'll be living alongside her husband's siblings and his parents. As a brother you will address them differently and with respect because you want them to be good to your sister and because you are thankful that they are taking care of her now. People should educate themselves more before making stupid comments because it really just shows their complete lack of worldliness, education, ignorance and arrogance. Not attributes which gain you a lot of respect in the world IMHO.
- wayneftw 5y agoThis is conflating two different issues. Nobody here has said that other cultures shouldn't have special designators for various family members. Some even knew the specific term for this one and the Chinese symbol for it. It's perfectly reasonable for programmers to ridicule an unwieldy symbol and offer a shorter replacement. The replacement was to use the same word that is used in that culture instead of trying to describe the concept in English. I don't see ignorance or arrogance in any of that.
- camtarn 5y agoObviously comment order changes, but I literally just needed to look one comment down to find somebody saying "This type of contact classification is useless", and there are a bunch of other similar comments scattered around. I think the GP poster has a good point.
- chatoyance 5y agoDark Helmet: I am your CNLabelContactRelationFathersBrothersNephewsCousinsFormerRoommate. Lone Star: So what does that make us? Dark Helmet: Absolutely nothing.
- sgt 5y agoAgghhhh ugghhhh kaaackooommph
- mkl95 5y agoGives me flashbacks of OpenGL methods like glDrawElementsInstancedBaseVertexBaseInstance
- sandos 5y agoThis must be for the chinese market? I know they have a lot of words for family relations...
- matthew_kuiash 5y agoNeeds templates. That'll fix it.
- lenkite 5y agoThe legion of Apple fans who make fun of Java's long names just have no leg to stand on.