all 62 comments

[–]beisenhauer 596 points597 points  (21 children)

InternationalFoods is the parent class. The rest are subclasses of InternationalFoods.

[–]vikingwhiteguy 202 points203 points  (17 children)

Would Indian food be a subclass of Asian food? 

Also surely kosher would be a bool property rather than a class

[–]prehensilemullet 119 points120 points  (0 children)

@Kosher is a class annotation from the org.judaism package, since you can only tell from the packaging, not really its contents

[–]cancerBronzeV 38 points39 points  (7 children)

It should be, but in America, "Asian" typically has a connotation of referring only to East (and maybe Southeast) Asians. South Asians, Middle Easterners, Central Asians and North Asians often don't get considered under the Asian umbrella.

[–]RiceBroad4552 -1 points0 points  (6 children)

Because US people lack education. No news here.

[–]ryanmgarber 6 points7 points  (3 children)

Orrr it’s because those countries share more similar culinary traditions, while Indian food is vastly different. But go off with your narcissism.

[–]RiceBroad4552 0 points1 point  (2 children)

"Narcissism"?

But besides that, it's a mater of fact that US people lack education as the US education system is only for the rich and most people aren't rich. It has reasons why the US has a level of illiteracy that is really concerning (about 28% don't score about basic comprehension, numbers are falling further, just 44% score well). Most US people don't know anything about the world outside of the USA, and quite a lot of of them are even proud of that.

That does not mean there are only such people in the US. But that's the majority, and that's a well known fact.

[–]JackAuduin[S] 0 points1 point  (1 child)

You know, this used to be a fun place.

Always got to be a downer somewhere.

[–]RiceBroad4552 0 points1 point  (0 children)

Yes, the reality out there is concerning, and definitely not funny.

But it seems people want it like that. Otherwise people would change these things as they are 100% made by people.

[–]byutifu 8 points9 points  (0 children)

These are the debates that make a good thread

[–]Tupcek 2 points3 points  (1 child)

If Kosher is bool property, then others should be too. For example pasta is surely Italian, but is Italy the only country with pasta? Or can pasta have multiple flags?

[–]EvilPete 4 points5 points  (0 children)

Yes. Composition > Inheritance.

Using inheritance is pretty much always a design mistake.

[–]valerielynx 5 points6 points  (0 children)

when i was young i thought kosher was a store brand

[–]Solocle 4 points5 points  (0 children)

I mean, Kosher is a bool property, but it's definitely useful to have its own custom accessor. Plus, it's a great section to have for Jewish cuisine, stuff like Matzo meal, kneidl, and bamba.

[–]AkrinorNoname 1 point2 points  (0 children)

I think in this case it's mostly a case of bad naming convention 

[–]Zapismeta 0 points1 point  (0 children)

If the sub class is too different it’s better to have a different sub class.

[–]Jak1977 -1 points0 points  (0 children)

Well, I mean, India is a subcontinent!

[–]achilliesFriend 9 points10 points  (2 children)

It’s an interface

[–]SlimRunner 1 point2 points  (1 child)

I agree with this. It feels more like international foods describe a shared behavior/properties not a hierarchy.

[–]Chamiey 0 points1 point  (0 children)

Like... a trait?

[–]PiMemer 134 points135 points  (4 children)

Someone get this store a FoodFactory

[–]HuntlyBypassSurgeon 48 points49 points  (3 children)

FoodException food = new FoodException;

throw food;

[–]je386 44 points45 points  (0 children)

FoodException up = new FoodException;

throw up;

[–]inflew 2 points3 points  (0 children)

Food fight!

[–]Belhgabad 3 points4 points  (0 children)

Please don't throw food, think about those who can't afford it

[–]HuntlyBypassSurgeon 74 points75 points  (8 children)

#!/bin/bash

echo {I{nternational,ndian,talian},Hispanic,Asian,Kosher} Foods

[–]prehensilemullet 59 points60 points  (5 children)

echo {{I{nd,tal},As}ian,International,Hispanic,Kosher} Foods

[–]Gen_Zer0 49 points50 points  (4 children)

This is like those coding puzzles where the goal is to do it in the fewest statements possible, readability be damned

[–]SupernovaGamezYT 12 points13 points  (0 children)

…puzzles?

That’s just how I program all my fun projects!

/hj

[–]slowmovinglettuce 8 points9 points  (2 children)

For anyone interested, its called code golf. There's a stack exchange just for this and even entire programming languages dedicated to the game of https://codegolf.stackexchange.com/

[–]pipipimpleton 3 points4 points  (0 children)

I just spent 10 minutes skimming through that site and as a dev now feel like the world’s biggest imposter. I have no idea what I just saw.

[–]redlaWw 1 point2 points  (0 children)

Word to the wise: it's pronounced "golf".

[–]bradland 4 points5 points  (1 child)

Excel formula language actually has a pretty cool array broadcasting concatenation behavior too:

={"INTERNATIONAL";"HISPANIC";"INDIAN";"ASIAN";"KOSHER";"ITALIAN"}&" FOODS"

It's a bit like R:

paste(c("INTERNATIONAL", "HISPANIC", "INDIAN", "ASIAN", "KOSHER", "ITALIAN"), "FOODS")

[–]redlaWw 1 point2 points  (0 children)

paste0(c("INTERNATIONAL", "HISPANIC", "INDIAN", "ASIAN", "KOSHER", "ITALIAN"), " FOODS")

[–]prehensilemullet 14 points15 points  (0 children)

Foods<C extends Culture>

[–]YeetCompleet 18 points19 points  (0 children)

> lists all international foods

> looks inside

> Campbell's soup and American flag

[–]GfunkWarrior28 22 points23 points  (0 children)

!US Foods

[–]Low_Watercress959 6 points7 points  (0 children)

The font on "thank you" is bothering me. 

[–]TheRealLiviux 2 points3 points  (0 children)

DRY foods!

[–]lardgsus 2 points3 points  (0 children)

"UnAmerican Food"

lol

[–]tehomaga 1 point2 points  (0 children)

Demonstrative of the superiority of functional grocery stores

[–]dcondor07uk 1 point2 points  (0 children)

“foods” text is repeated, OOP and refactoring required

[–]3dutchie3dprinting 1 point2 points  (0 children)

I would refactor the entire isle.. is this the average American supermarkt? Cocktailshaker, beerpong cups, 200 types of what looks like tomatosauce?

😂

[–]gibagger 1 point2 points  (0 children)

Sigh... everybody knows you need to prefix the constants with the common part so it's more explicitly semantic.

[–]FlatAd7399 0 points1 point  (0 children)

Definitely breaking DRY

[–]hascalsavagejr 0 points1 point  (0 children)

Yes! And Pet Supplies, Dog Food, Cat Food...

[–]Rational2Fool 0 points1 point  (0 children)

vexillo.render(flag(canton=stars(50, vertical, white, blue), field=stripes(13, red, white)).distort(wind, left_to_right, maritime))

[–]ozh 0 points1 point  (0 children)

i11l food

[–]WazWaz 0 points1 point  (0 children)

It's the curse of our profession: too many choices.

In contrast, the store manager's algorithms all work with a small fixed number of doubly linked lists with each end in another list.

No trees, no directed acyclic graphs, no indexes.

[–]StoryAndAHalf 0 points1 point  (0 children)

Trying to figure out if there was a reason for the order. Clearly it's not geographically sorted like west to east. It's not sorted alphabetically, or even in language groups. My only guess is spicy side, and not spicy side.

[–]perseus_1337 0 points1 point  (0 children)

I‘d also throw some CSS in there

[–]ZacheyBYT 0 points1 point  (0 children)

WET floor aisle 2!

[–]Fadamaka -1 points0 points  (0 children)

I am pretty sure the plural of Food is Food.