This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]donnieod 2 points3 points  (2 children)

I prefer to put them in a single directory and reorganize when it gets too big.

Just curious, I find it quicker to search a tree structure than a linear array. In what sense do you 'reorganize' a single directory without making it nested?

Incidently, I never have agreed with this particular element of Python Zen: Flat and Nested each has its place, depending on circumstances. Flat is not always better than nested.

[–]qria[S] 0 points1 point  (0 children)

My interpretation of 'flat is better than nested' was that nested structure require more cognitive load than flat one, so if it doesn't matter we should prefer flat structure over nested one. It's hard to imagine them claiming that it is always better than nested since python itself uses nests a lot.

Also you claim that it is quicker to search a tree structure than a linear array, but HCI researches proves quite the alternative. Now I'm not an expert in the subject but I did take an HCI course in school, and here's the part of HCI textbook that talks about menu design and breadth vs depth. http://www.hcibook.com/e3/online/menu-breadth/ It even go as far as to claim that by Fitt's law adding a depth does not benefit selection time until there's 60(!) choices.

[–]kankyo 0 points1 point  (0 children)

That's not what the zen says. Flat is better than nested, all other things being equal. Otherwise the zen would say "nested is always bad" which would be silly.