rammer
Looks like this person is fake and got banned on Reddit.

Now trolling here

https://www.reddit.com/r/programming/comments/1enuhw5/commen...

susam
Caution: Spoilers in this comment!

Arriving a bit late to the party, but I couldn't resist crafting a quick binary search solution in Python.

  from urllib.request import urlopen, Request
  DICT_URL = "https://grandmasword.com/dictionary.js"
  response = urlopen(Request(DICT_URL, headers={"User-Agent": "Mozilla/5.0"}))
  words = [w.strip('"[];\n') for w in response.read().decode().split("[")[1].split(",")]
  lo, hi, answer = 0, len(words) - 1, ""
  while answer != "d":
      mid = lo + (hi - lo) // 2
      print(words[mid])
      answer = input("after/before/done? [abd] ")
      if answer == "a":
          lo = mid + 1
      elif answer == "b":
          hi = mid - 1
Took a total of 17 guesses to find the solution:

  MALPIGHIAS
  after/before/done? [abd] a
  RUBIFIES
  after/before/done? [abd] a
  TEARERS
  after/before/done? [abd] a
  UNMANLIEST
  after/before/done? [abd] a
  VORTICES
  after/before/done? [abd] b
  UTOPIANIZING
  after/before/done? [abd] a
  VERTICILLASTERS
  after/before/done? [abd] a
  VIROSE
  after/before/done? [abd] a
  VIZARD
  after/before/done? [abd] a
  VOLCANISE
  after/before/done? [abd] a
  VOLUMIZER
  after/before/done? [abd] b
  VOLPINOS
  after/before/done? [abd] b
  VOLITATE
  after/before/done? [abd] b
  VOLCANOLOGICAL
  after/before/done? [abd] b
  VOLCANIZATION
  after/before/done? [abd] a
  VOLCANIZES
  after/before/done? [abd] a
  VOLCANO
  after/before/done? [abd] d
Thanks for sharing this nice game on a fine Sunday evening! It was fun to play both manually as well as programmatically!
layer8
There is some bug in the sorting, because it sorted “vol” after “volatile” for me. It seems to depend on some previous state, though, because I couldn’t reproduce it in a new window.

Edit: See also https://news.ycombinator.com/item?id=41217457.

bbarn
I read the domain name as Grandma Sword. Maybe her next project :)
codingdave
That is cool - it is nice and simple, but fun. The code is clearly from a beginner, but the saved game bit shows that she is a clever beginner - such a pragmatic way to continue a game. I hope she keeps learning and building more.
ErikAugust
Prompt: “You are a 70 year old grandmother learning JavaScript…”
x86a
Maybe I've been ruined by the internet, but a grandma didn't write this.
shepmaster
I hope Grandma has some analytics hooked up to see all the traffic coming in!

A small bug report: the "Share score" button on macOS Safari doesn't offer "copy" as an option for some reason. The same functionality on guess the game[0] has the same limitation, but it also copies to the clipboard automatically. Wordle[1] seems to just copy to the clipboard only.

[0]: https://guessthe.game

[1]: https://www.nytimes.com/games/wordle/index.html

listless
Cool game! I got it but it took a while.

Suggestions, limit to 5 chars and use a Wordle-like interface so your phone can’t suggest words.

I could see this being a legit NYT game.

cornstalks
In the spirit of helping a fellow programmer debug some things:

If you guess a word that isn’t in the dictionary, the text box looks like it’s cleared but my phone’s (iPhone) keyboard’s autocomplete either didn’t pick that up or there’s still some hidden content in the box.

It would be nice if the list was always sorted in totality.

doytch
Reading the code is a joy. I love seeing different approaches to what we all take as givens, such as design.css rather than style.css, or the usage of an `else if (1 == 1)` compared to `else` or even `else if (true)`.

(So I guess, thanks for not teaching her about bundlers and minifiers yet :))

FergusArgyll
SPOILER

view-source gives away the answer for the next 20 days....

sebastiennight
I enjoyed the dichotomic search.

It's a very interesting concept as I'm sure you can extract some interesting insight about the profile of a user from the list of 12+ words they'll come up with. (When looking back at most of mine, they're words that came up in this week's conversations or lyrics of my Spotify playlists)

Like, it might be a fascinating little add-on to have a "Rorschach" LLM-based module attached which looks at the vocabulary you used and tries to sketch out a cold reading about you.

midnitewarrior
Good gameplay! The one strong suggestion I have is to limit the word list to a category that uses common words. I had to resort to look at the word list dictionary in the console to see the possible words, and many of the words were extremely obscure.

I would come up with categories of increasing difficulty. "Colors", "Advanced Colors", "Common Fruit", "All Fruit", etc.

The game mechanic is great and worked flawlessly though!

sir0010010
This was fun, I found the word manually in 12 guesses. I have been a SWE for over a decade now, but have not done enough frontend to know how to make this!
bitwize
One time when I was in the Unix computer lab in college, testing my C skills on a Sun workstation, an old lady sat down at the workstation next to me. She must've been between about 70 and 80 years old, maybe older, and she had a notebook which, as it lay open, I saw C++ code hand-written in it in her spidery, old-lady hand. I thought, huh, well it's never too late to start learning this stuff!

There's also the case of the 80-some-year-old Japanese lady who wrote her own iPhone app, a game about arranging traditional Japanese paper dolls: https://social-innovation.hitachi/en/article/colors-wakamiya...

If you're retired, bored, and have a lot of time on your hands, learning tech proficiency and programming seems a good way to pass the time and help keep your mind sharp. Just as it was for us bored kids back in the day.

edvards
Great game! I would love a hint function though, as I honestly got stuck.
kwhitefoot
I wish that your grandmother had been on the team I worked with. It's rare to see clear code with meaningful comments.
dvh
I found Grandma's Word in 25 guesses

https://grandmasword.com

It was volcano but I only discovered it after finding that Android autocorrect can suggest a word for me.

liberix
Very nice game!

If you like this, check out https://betweenle.com.

Betweenle is based on the same game logic, but gives you very useful visual clues along the way.

blindriver
This is a fun game and it's harder than it looks! I'm impressed! She should produce a random word from the dictionary instead of hard coding it, and keep it going!
FergusArgyll
Great game! looks nice too...

I got reeeealy close (and then asked an llm....)

m4tthumphrey
My 8 year old nephew did it in 3. Absolutely crazy odds!
anoncow
Amazing game. I felt in some scenarios the alphabetical order was incorrect (in my example I got Victory before Very), but very enjoyable!
nisse72
Through completely dumb luck, I guessed only the names of fruit, the answer was a fruit, and got it in 6!
sphars
I like it, pretty simple concept, good execution. I have to admit though, narrowing down a word purely by alphabetization can take a good while. Perhaps letting the player know the length of the target word would help.

Congrats to your grandma for making a game!

TheJoeMan
Would adding an indicator of how many letters I've gotten correct / "locked in" be fun? I don't know if I'm supposed to be trying a new 2nd or 3rd letter after V.
horttemppa
Cool! 10 guesses got me there. Thought it was gonna be impossible.
danparsonson
Great job! Got in 12 :-)

Feature request - colour code incorrect guesses by distance from the solution. You could look up 'Hamming distance' for one approach to that.

firesteelrain
Go grandma! Great job!
phil294
I like it, it's surprisingly fun to play. When played in groups (with changing words), this game would be well suited for non-natives learning English.
101008
The view-source shows the comments on the code and it's really cute. Congratulations to your grandma (and to you, if you have anything to do with it!)
thrdbndndn
Is this a bug? https://i.imgur.com/b5HqHeA.png

Vodka should not be below voice.

chocoboaus2
This put a smile on my face, great work grandma.
cryptofistMonk
Hah, got it in 4 even though my first guess started with 'a' because I didn't know this was binary search yet
ErikAugust
Only took me 6 guesses. This is pretty good, no?
culi
Please don't show your grandma this but

  secretWords = ['test', 'test', 'test', 'horse', 'chocolate', 'garden', 'volcano', 'orange', 'elephant', 'star', 'violin', 'egg', 'pencil', 'forest', 'lamp', 'island', 'potato', 'happy', 'toilet', 'shell'];
robofanatic
I found Grandma's Word in 3 guesses

https://grandmasword.com

zakm
I found Grandma's Word in 16 guesses

https://grandmasword.com

fuzzythinker
got lucky in 4 guesses. The final guess is the first word I thought of that starts with that letter.
exogeny
This was fun. Good job, Eleanor!
interludead
That's awesome! It's inspiring to see her having fun with technology.
lupire
A much needed reboot of Joon Pahk's defunct "Guess My Word".
junon
"voi-" was sorted before "vog-" by the way!
timnetworks
3 guesses. no lies.
iKlsR
The javascript is pretty clean and well commented
enos_feedler
painful to play this game manually. I narrowed it down to what i thought i could guess but ended up just console.log(secretWord).
agiacalone
This is neat! Kudos to your grandma.

Edit: I got it in 18 guesses

sabriel27
This was so fun!! Kudos to your grandma.
sweca
Got the word in 7 guesses! This is fun
zquestz
Damn took me 13 tries. Fun game. =)
allanren
This just doesn't sound real.
mouse_
This game is somehow so compelling
jdeisenberg
This is perfectly wonderful!!!
easeout
Cool game, grandma
efilife
Check the source. No chance a grandma wrote this
awinter-py
grandma sword
kcrwfrd_
Please for the love of God add an “I give up” button T_T
eezing
Got it in 11
xandrius
[flagged]
MrDresden
Very cool.

My own 74 year old surviving parent would never be able to get them selves to even try, as they have spent most of their lives telling reiterating a mantra about how little they know about technology.

It has been a guiding principle of mine to never do that with anything, after seeing the effect it has had on her.

liberalmongo
[dead]
_xerces_
[flagged]
geor9e
time to LLM a binary search

  import requests
  url = 'https://grandmasword.com/dictionary.js'
  response = requests.get(url)
  lines = response.text.split('\n')[2:]
  exec('\n'.join(lines))
  def binary_search(dictionary):
    while len(dictionary) > 1:
        mid_index = len(dictionary) // 2
        mid_word = dictionary[mid_index]
        print(f"Guess this middle word: {mid_word}")
        user_input = input("Did grandma say her word is before or after? (type b or a)").strip().lower()
        dictionary = dictionary[:mid_index] if user_input == "b" else dictionary[mid_index + 1:]
    print(f"Grannys word: {dictionary[0]}" if dictionary else "No words left in the dictionary.")
  binary_search(dictionary)
Solved in 18 guesses! Share score Thank you for visiting my website. There'll be a new word everyday just like Wordle. Kind regards, Eleanor
nsxwolf
Not fun. Feels like I just get closer and closer to some asymptote.
mparnisari
"Voleyball isn't in the dictionary"

Hmmm...

ValleZ
It doesn’t work on phone, sigh