Heyo all o/
Just finished my Mixed Messages portfolio project.
I decided to create a fake fact generator.
- Randomly select a sentence structure from a predefined array.
- Replace keywords in the sentance structure with a randomly selected word, from the category represented by said keyword. (Nouns, Verbs, Adverbs etc.)
- Log the sentence to the terminal with a randomly selected prefixed and suffix.
After 4-5 hours, I had finshed and it came out better than I hoped!
Head over to the gitHub Repo to see some exmaples and check the script out for your self.
I had a lot of fun making this, and feel free to share any hilarious results you get here!
And don’t forget to let me know what you think. Thank you! <3
Thank you for the detailed response!
- This is a great suggestion! While I knew I would need to manually update the value, I hadn’t thought about the variable name being confusing in the future. Will defiantly remember this for future projects!
I will probably go back and change the name to arbitrary year or add a comment, since Date class is a little out of scope for this project.
- To tell the truth I hadn’t considered this.
While I do not expect to be using this project in anything else, or expanding it in the future, that doesn’t mean others won’t!
- I actually played around with this idea, but since I didn’t think I would ever need to use
KEYWORDs with out replacement I with went with no template-style syntax to save my self some key strokes.
- Actually tried putting the data into a JSON file and reading from it, but with the self imposed dead line I decided to scrap it and keep the data in the same file. Will put this on a to-do list once the course goes over Node.JS/Back-end in more detail!
Thank you again! Wish I could like your post more than once!
About item 3. As software developer you have to think ahead. You do not know what users will do with your app. And they will do very strange things in my expirience) So using
KEYWORD without replacement is not the strangest thing)
This is only advice for future projects)