Oh that's such a shame, it was so fun! I wonder what this person's end game was. The site is down now. Why didn't they just release a game? I'd love to keep playing it!
Heh, his sockpuppet (/u/puzzledpenguins) deleted the posts where he claimed this was his favorite game. What I find bizarre is that it would be so easy for him to come up with a reasonable explanation and reply to the reddit/hn comments to make skeptics look like assholes. He just deletes any post where people criticize these shenanigans
yeh, based on their comment/submission history they're coding with chatgpt and now started claiming it's their grandma learning to code? or something? pretty uncool.
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!
textbox.value = guess;
guessWord();
if (document.querySelector(".correct")) {
console.log("Found the word:", guess);
break;
} else if (textbox.placeholder.includes("after")) {
l = m + 1;
} else {
h = m - 1;
}
}
Here's mine in JavaScript, you can paste it in the console.
Thanks! I should have realised that a solution for this could be implemented in JavaScript as well, allowing it to run directly in the web browser. Here is my translation of my earlier Python program to JavaScript:
let lo = 0, hi = dictionary.length - 1
const answer = document.getElementById('guess')
while (document.getElementsByClassName('correct').length === 0) {
const mid = Math.floor(lo + (hi - lo) / 2)
answer.value = dictionary[mid]
guessWord()
if (answer.placeholder.indexOf('after') !== -1) {
lo = mid + 1
} else {
hi = mid - 1
}
}
This solution is quite similar to yours. Thanks for this nice idea!
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.
It seems the previous guess is always placed either one up or one down from the entry box. So if you're guessing "V" words, then type "apple", then "apple" will show after "vodka". So the list is not getting re-alphabatized.
Right. My word was before "wizard," and later I guessed "yesterday," which is after wizard. It put yesterday adjacent to the entry box, before wizard. Same is true for words before the word. Basically, if I make bad guesses, it doesn't list them in alpha order.
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.
It's probably more akin to "my son's first book" being co-authored by both parents and each set of their parents, proofread by sister, and sent to a professional printing house to be sent back on thick glossy paperboard.
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.
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.
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 :))
One reason programmers do this is so that they can make a one character change, e.g. "else if (1 === 1)" -> "else if (1 === 2)" in order to change the logic there. For C programers you see a lot of '#if 0' '#if 1' for this same purpose. Though, given that it's used everywhere, I'm not sure if it's really for that purpose.
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.
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!
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!
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!
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.
I got completely stuck, tries various word solvers, but they seemed to be for cross words or anagrams, but they were no help.
But an actual dictionary / word list unlocked it.
Not sure if using a dictionary goes against the spirit of the game or is expected.
Without it it seems incredibly difficult.
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!
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.
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.
Took me 13 guesses but it is a great game for a few reasons:
- It can work for multiple age ranges by varying word lengths
- It has good replay-ability
- It can be adapted for offline play
- It can be adapted for learners of new languages as well
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.
Not to be negative or anything but a look through the source and it shows some interesting stuff (more info in the reddit post also created and posted by this never used account) but then whois shows that the website is setup to use cloudflare.
Maybe the grandchild is helping her but my mind goes straight to think that it's just a masked self-promotion. Just putting it out there.
About the game: somewhat fun but if you don't know the word, that's it. No really any way to figure out in a rewarding way.
I don’t understand why any of that indicates that a 70 year old couldn’t have created this, unless you think 70 year old people aren’t capable of doing that.
The age isn't really the inconsistency, it's the "only just learning to code" aspect. My first ever webpage was certainly not hosted behind Cloudflare. (I'd also expect beginner resources to point to something like GitHub Pages instead)
I guessed many words I didn't know on Wordle (not a native English speaker), if you are able to reduce enough the letters search space there's going to be only a few options that e.g. make sense phonetically.
I actually misread the original comment but I guess my question is still somewhat relevant so leaving it as it is. You're right that it's easier to just bruteforce it in Wordle.
This was my problem too. If there was a scoring system, it might make sense to buy letters against your score, to help you forward once you're stuck. I got stuck. What the heck goes between Volatile and Vole?
Pasting the <script src one-liner code for page analytics was one of the first things I did when coding my first angelfire website as a 10 year old. I loved seeing the graph of how many daily visitors I got.
I'm gonna bet that my mom has had a website since before you were born*. She was taking fortran classes in the 60s. Your ageist attitude is pretty gross. So what if she had help? Another bet, you can't program without the help of online resources and/or a chatbot either.
* given the dates on your resume, there's a very good chance I'm correct in this
you are being just as rude as the other person, if not more, buddy. There is a much better and constructive way to make this point. Also, the title says that she is "learning to code" so its not unreasonable to say that she probably isn't handling the website stuff... Also, the commenter is making a conjecture about the veracity of OP, not the mother per se.
I am old myself. It is not ability to learn with age that is suspicious it is wanting to share it like this and it would be a clever marketing move.
I will learn new things until the day I can't. I am currently learning the Stan language but I am not going to write a medium article "What happens when an old man attempts to learn Stan?"
I bet you could write that article, regardless of programming experience, and tell a compelling story. Different people share different parts of themselves online, and I think that's okay.
I'd characterize the original comment as a cynical accusation of shilling, so I'm quite curious what you read as "spite" in mine. Must I point out that I, too, use external resources whilst programming?
It's subjective how rewarding it is but you can definitely guess the word if you know, well, words, by doing a binary search and narrowing down the first letters. I have an uneasy relationship with puzzles and I'm not a native speaker but this to me is about as fun and about as infuriating as Wordle or Semantle (try the latter if you didn't already!)
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.
The source fits the pattern of something generated by LLM and even includes comments that were probably part of the prompt.
Doesn't anyone else remember being a beginner? This isn't something I would have made. It has too many extra little nuances. The dictionary is a big clue.
Get the chatter going, get "press", clicks, visitors and players, then potentially ads, or selling the site (for someone else to put even more ads on it), or using it as marketing reference (I made a game viral by lying about it).
Wordle sold for $1+ million. An average word game with a unique hook like "my grandma made it" is well positioned to sell or at least attract a lot of viral traffic.
Anyway, the grandma story has been exposed as fake.
It’s called learned helplessness and is a good indicator for pessimism. There is a book I enjoyed that discusses the issue in depth, called: Learned Optimism, by Martin Seligman. The second half of the book is about how to become less of a pessimist, by addressing learned helplessness.
My mom is the same way. She’s really capable and smart, but she will also stop herself from plugging something in because she’s unsure.
I convinced her that she can figure out any remote and they are designed to be figured out. I told her at most there’s gonna be 5 buttons she doesn’t understand and it won’t break anything to hit them. Most of the buttons are numbers or volume and channel up down, power.
She got that. When her mom was sick and had different tvs because of different circumstances my mom would be like, “I did figure out the remote tho and was able to get the television working.”
I was with my 3 year old niece the other day and she turned on the receiver and then the television and I said , “wow, I’m impressed you figured that out.” And she said , “yeah when grandma watches me she doesn’t know how”. . .
Ever since I was a little kid, teaching the other little kids how to do math, I’ve believed that most people who think they aren’t able to do something aren’t able to do it because they think they can’t.
And I tell myself that every day as I try to learn guitar in my 40’s.
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
Classic LLM hijinks or hacker goofing off on HN? Either might throw `exec('\n'.join(lines))` in a script running on a publicly downloaded file rather than parsing it more directly.
Going from knowing exactly what I want, to it materializing from just from a 60 second conversation in the sidebar of my browser, does give me a bit of a buzz
Now trolling here
https://www.reddit.com/r/programming/comments/1enuhw5/commen...