11 ms·
Show HN: My 70 year old grandma is learning to code and made a word game
- codingdave 2y agoThat 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.
- interludead 2y agoFun is the key
- edvards 2y agoGreat game! I would love a hint function though, as I honestly got stuck.
- jayemar 2y agoOr even a "give up" button because I'm definitely stumped
- Hnrobert42 2y agoOnce you get it, you are going to erupt!
- theginger 2y agoI 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.
- horttemppa 2y agoCool! 10 guesses got me there. Thought it was gonna be impossible.
- erikig 2y agoTook 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
- sphars 2y agoI 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!
- ValleZ 2y agoIt doesn’t work on phone, sigh
- doytch 2y agoLooks like the developer is aware there may be limitations. > <!-- When the player pressed Enter it should start the guessWord. Need to test on phone -→ Hopefully a new version will be released free of charge for current customers.
- ValleZ 2y agoOh, there is a readable JavaScript inside!
- icambron 2y agoFWIW, it worked fine on my phone. Brave on an iPhone
- ValleZ 2y agoYep, likely my iPhone to blame
- thrdbndndn 2y agoIs this a bug? https://i.imgur.com/b5HqHeA.png https://i.imgur.com/b5HqHeA.png Vodka should not be below voice.
- Fannon 2y agoIs it always the same word? My word is between Vodka and Vomit :D
- AndrewOMartin 2y agoDid you guess a word which was already excluded? Maybe the arrangement of words assumed only "valid" guesses
- geor9e 2y agoIt means you guessed "vodka" after she already told you the word was after "voice"
- _xerces_ 2y ago[flagged]
- shepmaster 2y agoI 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 https://guessthe.game [1]: https://www.nytimes.com/games/wordle/index.html https://www.nytimes.com/games/wordle/index.html
- Retr0id 2y agoGrandma is a Cloudflare Analytics user, apparently.
- midnitewarrior 2y agoGood 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!
- doytch 2y agoReading 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 :))
- seeknotfind 2y agoOne 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.
- roblh 2y agoI’m a big fan of tacking on “&& false” or “|| true” as well.
- figmaballs 2y ago[dead]
- xandrius 2y ago[flagged]
- kragen 2y agospoiler warning! don't look at the source if you're going to play the game because the number of possible valid words is short
- geor9e 2y agoI see 279496 valid words in dictionary.js …ooooh I see the 20 secretWords now
- dan_manges 2y agoI 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.
- wwilim 2y agoMy dad is 64 and he can still use AutoCAD like he's playing piano
- Retr0id 2y agoThe 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)
- Kiro 2y ago> 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. What does this mean? You could say the same thing about Wordle.
- tarl0s 2y agoI 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.
- layer8 2y agoThere 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 https://news.ycombinator.com/item?id=41217457.
- TheJoeMan 2y agoIt 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.
- matt_morgan 2y agoRight. 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.
- rossdavidh 2y agoGrandma's First Bug report
- boxed 2y agoI had a similar issue. Void sorted before Vogue. Breaks the game totally as far as I can tell.
- cvarjas 2y agoIt might not be sorted intentionally as part of the challenge of the game.
- FergusArgyll 2y agoGreat game! looks nice too... I got reeeealy close (and then asked an llm....)
- geor9e 2y agotime 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
- tills13 2y agoI mean that's literally how to play this game whether you intend to or not
- another-dave 2y agoI thought my manual binary search off the top of my head in 16 guesses was probably poor but if it beats a coded version, I'm happier now lol
- robertclaus 2y agoClassic 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.
- jessekv 2y agoNevertheless, it is somewhat curious that "dictionary.js" is nearly valid python.
- jessekv 2y agoSo you didn't want to have fun playing the game, but also didn't want to have fun coding a solver? I understand the former, but not the latter... :D
- FergusArgyll 2y agoSPOILER view-source gives away the answer for the next 20 days....
- geor9e 2y agoIt's okay, according to the source comments the only player is her friend Caroline
- mouse_ 2y agoThis game is somehow so compelling
- cornstalks 2y agoIn 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.
- liberalmongo 2y ago[dead]
- exogeny 2y agoThis was fun. Good job, Eleanor!
- bbarn 2y agoI read the domain name as Grandma Sword. Maybe her next project :)
- wongogue 2y agoA refreshing new fantasy RPG.
- naltroc 2y agothe quest for perfect length yarn
- ivanjermakov 2y agoMy first entered word was "sword" so I read it same as you
- cheschire 2y agoI read this in Sean Connery’s voice.
- MrDresden 2y agoVery 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.
- nyjah 2y agoMy 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”. . .
- mattmaroon 2y agoEver 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.
- NavinF 2y agoThis website was likely not made by a 70 year old grandma judging by how it was promoted on reddit. https://www.reddit.com/r/programming/comments/1enuhw5/my_70_year_old_grandma_learned_how_to_code_and/lh955kp/ https://www.reddit.com/r/programming/comments/1enuhw5/my_70_... https://www.reddit.com/user/Ruth_Ellaer https://www.reddit.com/user/Ruth_Ellaer https://www.reddit.com/user/puzzledpenguins https://www.reddit.com/user/puzzledpenguins
- deleted 2y ago
- TheJoeMan 2y agoWould 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.
- junon 2y ago"voi-" was sorted before "vog-" by the way!
- dvh 2y agoI found Grandma's Word in 25 guesses https://grandmasword.com https://grandmasword.com It was volcano but I only discovered it after finding that Android autocorrect can suggest a word for me.
- tartakovsky 2y agospoiler alert -- no need to share the answer, it takes the fun away for others
- firesteelrain 2y agoGo grandma! Great job!
- zakm 2y agoI found Grandma's Word in 16 guesses https://grandmasword.com https://grandmasword.com
- agiacalone 2y agoThis is neat! Kudos to your grandma. Edit: I got it in 18 guesses
- anoncow 2y agoAmazing game. I felt in some scenarios the alphabetical order was incorrect (in my example I got Victory before Very), but very enjoyable!
- ErikAugust 2y agoOnly took me 6 guesses. This is pretty good, no?
- BubbleRings 2y agoWhy not delete your spoiler message until tomorrow please?
- yreg 2y agoI got it in 5, but it's pure luck based, right? The optimal strategy would be to do a binary search which would take longer than 5.
- lupire 2y agoA much needed reboot of Joon Pahk's defunct "Guess My Word".
- 101008 2y agoThe 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!)
- interludead 2y agoThat's awesome! It's inspiring to see her having fun with technology.
- susam 2y agoCaution: 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!
- yismail 2y agolet l = 0; let h = dictionary.length - 1; const textbox = document.querySelector("input"); while (l <= h) { const m = Math.floor((l + h) / 2); const guess = dictionary[m]; const textbox = document.querySelector("input"); console.log("Guessing:", guess); 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.
- susam 2y agoThanks! 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!
- kwhitefoot 2y agoI wish that your grandmother had been on the team I worked with. It's rare to see clear code with meaningful comments.
- sweca 2y agoGot the word in 7 guesses! This is fun
- liberix 2y agoVery nice game! If you like this, check out https://betweenle.com https://betweenle.com. Betweenle is based on the same game logic, but gives you very useful visual clues along the way.
- kcrwfrd_ 2y agoPlease for the love of God add an “I give up” button T_T
- m4tthumphrey 2y agoMy 8 year old nephew did it in 3. Absolutely crazy odds!
- nsxwolf 2y agoNot fun. Feels like I just get closer and closer to some asymptote.
- ErikAugust 2y agoPrompt: “You are a 70 year old grandmother learning JavaScript…”
- phil294 2y agoI 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.
- awinter-py 2y agograndma sword
- enos_feedler 2y agopainful to play this game manually. I narrowed it down to what i thought i could guess but ended up just console.log(secretWord).
- eezing 2y agoGot it in 11
- sir0010010 2y agoThis 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!
- iKlsR 2y agoThe javascript is pretty clean and well commented
- jdeisenberg 2y agoThis is perfectly wonderful!!!
- mparnisari 2y ago"Voleyball isn't in the dictionary" Hmmm...
- phatskat 2y agoIt’s got two L’s - volleyball works without issue
- mparnisari 2y agoAh! Thanks
- danparsonson 2y agoGreat 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.
- fuzzythinker 2y agogot lucky in 4 guesses. The final guess is the first word I thought of that starts with that letter.
- robofanatic 2y agoI found Grandma's Word in 3 guesses https://grandmasword.com https://grandmasword.com
- x86a 2y agoMaybe I've been ruined by the internet, but a grandma didn't write this.
- timnetworks 2y agoIt'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'm just jealous to granma doesn't understand DNS
- easeout 2y agoCool game, grandma
- efilife 2y agoCheck the source. No chance a grandma wrote this
- timnetworks 2y ago3 guesses. no lies.
- chocoboaus2 2y agoThis put a smile on my face, great work grandma.
- bitwize 2y agoOne 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-masako/ 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.
- blindriver 2y agoThis 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!
- aae42 2y agoThen you can't compete with friends and family, sending links, spreading the game...
- blindriver 2y agoShe can change it like Wordle and change it based on day...
- listless 2y agoCool 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.
- nisse72 2y agoThrough completely dumb luck, I guessed only the names of fruit, the answer was a fruit, and got it in 6!
- zquestz 2y agoDamn took me 13 tries. Fun game. =)
- culi 2y agoPlease 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'];
- sabriel27 2y agoThis was so fun!! Kudos to your grandma.
- rammer 2y agoLooks like this person is fake and got banned on Reddit. Now trolling here https://www.reddit.com/r/programming/comments/1enuhw5/comment/lh955kp/ https://www.reddit.com/r/programming/comments/1enuhw5/commen...
- notfed 2y agoHuh. OP's only two comments on HN are both in connection with someone named (go figure) puzzledpenguin
- amatecha 2y agoyeh, 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.
- agmater 2y agoMust be lonely, even making up fake code comments: > /* This makes the words flip over like in Wordle. Ask Gary if we can change it to letter by letter like wordle */
- NavinF 2y agoHeh, 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
- cdrini 2y agoOh 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!
- sebastiennight 2y agoI 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.
- allanren 2y agoThis just doesn't sound real.
- cryptofistMonk 2y agoHah, got it in 4 even though my first guess started with 'a' because I didn't know this was binary search yet