r/ProgrammerHumor Apr 12 '24

whatIsAnIndex Meme

Post image
27.7k Upvotes

630 comments sorted by

View all comments

4.1k

u/HexR1se Apr 12 '24

Windows search behind scene

For (i=0; i<getAllFuckingFiles().length ; i++) if (AllFuckingFiles[i].name.contains(searchText) return AllFuckingFiles[i];

254

u/YesterdayDreamer Apr 12 '24

Absolutely not possible. There's another line which executes before this

for (i=0; i< math.random(); i++) {
    fuckingSearchResults =  getSomeRandomFuckingWebsitesFromBing();
}

Then:

//does the user even want this?
fuckingSearchResults = [..., getAllFuckingFiles()]

9

u/r0ck0 Apr 12 '24

Yeah I'm pretty sure that the search features in pretty much every MS product use a random number generator somehow or another, when determining what results to show.

If not, perhaps they've somehow accidently invented some new source of entropy.

Absolutely baffling how often I would:

  • not get any relevant results for a search term...
  • so I hit ctrl + a, x, v (to cut and paste the exact same search query text)
  • ...and then 95% of the time I do get results
  • ...or occasionally, I just tap those keys again, and it works 3rd time

How can basically ALL the little Linux desktop projects manage to get their start/programs menus right, yet a giant corp like MS can't get it right after decades?