Haiku Generator


My name is Caj and I’m following the Full-Stack engineer path.

For this project, I decided to do a Haiku Generator. I wanted to extend the project so it had support for the traditional 5-7-5 syllables way of writing Haikus. But I didn’t quite figure out how to pull it off so this will have to do for now. :smile:

I found the main task of the project quite easy, but it was hard to extend the way I wanted it and I did many iterations during the day. It took me about an hour to finish the main goal, but I spent all day on the syllables problem :joy:

The project is available at Github

Thanks for any feedback :smile: !

1 Like

Hi Caj

I had the exact same idea and developed it so it was interesting to see your approach. :smiley: I think it’s cool you went with objects, I went with arrays and nested arrays and regretted not starting out with objects because I wanted to have a value for syllables for also for conjugated forms of the words. Instead I ended up with a bunch of different arrays.

I found that the hardest was actually figuring out the linguistic syntax and how word can combine. It took my about a week of working 3-4 hours to figure it all out. If you wanna see my version it’s here and a webpage for it here, also did a little HTML and CSS cause I was learning about that simultaneously…

Code might not run in Visual Studio terminal because it refers to an HTML document, so it needs a browser.

1 Like

Hi Michael!

Wow, that’s so cool! I do agree with you that the hardest part is the linguistic syntax.
It’s a project I aim to go back to once I have some more time on my hands and more coding experience.
I’ll be sure to check out your project for some inspiration, it looks really good! :smiley:

Yeah, syllable counting is the main reason I wanted to go with objects, it’s a shame I couldn’t get it to work quite right in the end. :frowning: