Taking on the challenge from Tom Scott, this code library sets out to determine what the longest word you can write with a seven segment display.
Take a look at his Youtube Challenge Video. He disallows the following characters: gkmqvwxz. We too will exclude those characters.
To view my tutorial on how I created this codebase please watch it on Youtube.
- Public domain list of English words: https://github.com/dwyl/english-words
- NodeJs: https://nodejs.org/
- Typescript: http://www.typescriptlang.org/
- Seven Segment Font: https://www.dafont.com/seven-segment.font
Since Tom used NodeJs, we will do so too. However, because I like typescript because it keeps a flakey programming language a bit stricter we'll use it to prevent errors. Since this is a just a 'for fun' coding challenge, I'm not going to be doing any tests in this project.
While it's good to get the longest acceptable word, I like to know what words were possible. As such we will be creating an array with all the acceptable words. And then we will create a server and output the word to a web page.
First clone the package
git clone [email protected]:midnite81/longest-word-challenge.git
Then run
yarn
yarn run build:live
alternatively if you don't want to rely on nodemon then you can compile the script first and run with node directly.
yarn
yarn run go