> so hopefully you can refresh a few times and get a fresh one every time
If you randomly sample from only 60 quotes, then after 10 refreshes there will be a greater than 50% chance of at least one repeat, and by 20 refreshes it's up to 95%. This is an example of the birthday paradox[1].
On the flip side, if someone wants to see all 60 quotes, they will have to refresh the page an average of 281 times, mostly (~80%) seeing quotes they've already seen before. This is an example of the coupon collector's problem[2].
The way to avoid both these problems is to shuffle the quotes into a random order, just once, and remember that order. The first time a user comes to the page, start at a random index in that shuffled list, and from then on, simply move to the next item in the list. Every user will get a unique set of random quotes, but will see no repeats until the list is exhausted, and will be guaranteed to be able to see all available content in just 60 refreshes.
Frustrating without a way to get to the list of works, because it's not clear when you've seen them all.
You start having to guess how many there are, based on how many you have seen and how many have repeated, and the distance between seeing ones you haven't yet seen before.
A problem made worse, the more quotes there are, as if you have N quotes, then you expect to see the one you see the most often approximately e.ln(N) times ( iirc, for large N ).
( Or put another way: given N items, you expect the gap between discovering the penultimate one and the last one to be N. )
I'd be interested to know what everyone's favorite opening lines of all time are. (bonus - to see how much of it you can quote without looking :)
For me, its:
Whann that aprill with hir shoures soote,
The drought of march hath perced to the roote,
And zepherus eek with his sweete breath,
inspired hath in every holt and heth,
the tendre cropes, and the sonne hath in the ram,
hir halve cours ironne,
Than preketh hem natur in hir courages,
and longon folk to gon on pilgrimages.
Somehow that has always stuck with me, I'm sure I'm missing parts, but from the first time I ever heard these lines the just imprinted themselves like a song to me.
"The war tried to kill us in the spring" from The Yellow Birds always stuck with me, for its complete decoupling of the war from the men who had come thousands of miles to fight it.
** ETA the full opening:
“The war tried to kill us in the spring. As grass greened the plains of Nineveh and the weather warmed, we patrolled the low-slung hills beyond the cities and towns. We moved over them and through the tall grass on faith, kneading paths into the windswept growth like pioneers. While we slept, the war rubbed its thousand ribs against the ground in prayer.
Really cool idea! Add a possibility to send you tips for other books. Here is mine: "As GREGOR SAMSA awoke one morning from uneasy dreams he found himself transformed in his bed into a gigantic insect" Metamorphosis by Franz Kafka
obligatory note that there's no great single translation for Ungezeifer. Vermin, pest, insect, arthropod, spider, bug, mouse, "animal unfit for sacrifice" all fit https://en.wiktionary.org/wiki/Ungeziefer
After trying a lot, I only saw lines from books written originally in English.
Therefore, I assume I'll not see my favorite:
> Muchos años después, frente al pelotón de fusilamiento, el coronel Aureliano Buendía había de recordar aquella tarde remota en que su padre lo llevó a conocer el hielo.
My translation:
"Many years later, in front of the firing squad, colonel Aureliano Buendía would remember that distant afternoon when his father took him to discover ice."
> so hopefully you can refresh a few times and get a fresh one every time
If you randomly sample from only 60 quotes, then after 10 refreshes there will be a greater than 50% chance of at least one repeat, and by 20 refreshes it's up to 95%. This is an example of the birthday paradox[1].
On the flip side, if someone wants to see all 60 quotes, they will have to refresh the page an average of 281 times, mostly (~80%) seeing quotes they've already seen before. This is an example of the coupon collector's problem[2].
The way to avoid both these problems is to shuffle the quotes into a random order, just once, and remember that order. The first time a user comes to the page, start at a random index in that shuffled list, and from then on, simply move to the next item in the list. Every user will get a unique set of random quotes, but will see no repeats until the list is exhausted, and will be guaranteed to be able to see all available content in just 60 refreshes.
[1]: https://en.wikipedia.org/wiki/Birthday_problem
[2]: https://en.wikipedia.org/wiki/Coupon_collector%27s_problem
Make sure you fingerprint every user to make sure they're using the right index value /s
Frustrating without a way to get to the list of works, because it's not clear when you've seen them all.
You start having to guess how many there are, based on how many you have seen and how many have repeated, and the distance between seeing ones you haven't yet seen before.
A problem made worse, the more quotes there are, as if you have N quotes, then you expect to see the one you see the most often approximately e.ln(N) times ( iirc, for large N ).
( Or put another way: given N items, you expect the gap between discovering the penultimate one and the last one to be N. )
I cheated and looked at the source:
There are 60 quotes.
So expect ~280 refreshes to collect 'em all.
I'd be interested to know what everyone's favorite opening lines of all time are. (bonus - to see how much of it you can quote without looking :)
For me, its: Whann that aprill with hir shoures soote, The drought of march hath perced to the roote, And zepherus eek with his sweete breath, inspired hath in every holt and heth, the tendre cropes, and the sonne hath in the ram, hir halve cours ironne, Than preketh hem natur in hir courages, and longon folk to gon on pilgrimages.
Somehow that has always stuck with me, I'm sure I'm missing parts, but from the first time I ever heard these lines the just imprinted themselves like a song to me.
"The war tried to kill us in the spring" from The Yellow Birds always stuck with me, for its complete decoupling of the war from the men who had come thousands of miles to fight it.
** ETA the full opening:
“The war tried to kill us in the spring. As grass greened the plains of Nineveh and the weather warmed, we patrolled the low-slung hills beyond the cities and towns. We moved over them and through the tall grass on faith, kneading paths into the windswept growth like pioneers. While we slept, the war rubbed its thousand ribs against the ground in prayer.
From memory: The sky was the color of a TV tuned to a bad channel
Close! (I had to look it up.) "The sky above the port was the color of television, tuned to a dead channel." (Neuromancer, William Gibson)
> "I was born in the City of Bombay… once upon a time." > Midnight's Children > Salman Rushdie · 1981
Ok so I guess it is literally just openings of famous literary works, and not great first lines
Like "Gregor Samsa woke up and thought ‘Ewwwww’"?
https://medium.com/luminasticity/great-first-lines-93a0b3d7d...
For reference, a famous Irish coffee-table (read: bathroom) book in a similar vein:
https://www.abebooks.com/Said-Duchess-First-Lines-Gemma-OCon...
And from a cursory few refreshes I didn't see the obvious one come up:
"It was a bright cold day in April, and the clocks were striking thirteen." Orwell, 1984
It’s there.
This reminds me how much weight a great opening sentence carries. Some of them are memorable decades later because they establish the tone immediately
Either that or they’ve been repeated by the audience so often as to lose all their appeal.
English literature heavily overrepresented
Really cool idea! Add a possibility to send you tips for other books. Here is mine: "As GREGOR SAMSA awoke one morning from uneasy dreams he found himself transformed in his bed into a gigantic insect" Metamorphosis by Franz Kafka
obligatory note that there's no great single translation for Ungezeifer. Vermin, pest, insect, arthropod, spider, bug, mouse, "animal unfit for sacrifice" all fit https://en.wiktionary.org/wiki/Ungeziefer
It was a dark and stormy night.
What about making it a daily style game where you have to guess which book the opening is from?
It would be fun if you had to guess what book it’s from
After trying a lot, I only saw lines from books written originally in English.
Therefore, I assume I'll not see my favorite:
> Muchos años después, frente al pelotón de fusilamiento, el coronel Aureliano Buendía había de recordar aquella tarde remota en que su padre lo llevó a conocer el hielo.
My translation:
"Many years later, in front of the firing squad, colonel Aureliano Buendía would remember that distant afternoon when his father took him to discover ice."
>I assume I'll not see my favorite
Your favorite was the first I saw. Just FYI.
Nevertheless, García Márquez preferred Rabassa's English translation to his original!
There's an okay Netflix mini series of it, FYI.
this is nice, simple idea, but nice. I think the style of the site is also appropriate for what this is :)
wonderful project thanks for making it :)