Today’s exercise was Parallel Letter Frequency. I could have used a lot more explanation on this one. I think they lied. You do need to put the response into a promise, but there is nothing that requires you use a node worker.

I also got warnings for each test about reloading the file because I didn’t have type: module in the package.json file. Of course if I add that to the package.json file the test now fail when they didn’t before. I also wanted to make a worker per file but couldn’t figure out how to do that. I thought the community solutions would show me how, but most of them are outdated/broken and seem to just return a promise instead of using a node worker. I saw one community solution used a node worker and imported with require instead of import. I thought I could try that on mine, maybe it would get rid of the warnings. I did try it, it broke everything. So this exercise is very fragile and easy to spoof a fake solution to.

Unfortunately in a moment of strength I actually did that last night. So today’s actual exercise is Ten Green Bottles. It sounds like it is a real song, but don’t lie to yourself. We all know they are being weenies again. They replaced 100 bottles of beer song with this one because saying the word ‘beer’ might trigger some blue haired weirdo. Anyway I added in support for 0-100 instead of 0-10 in my number to text function for the phantom missing bottles of the original song.

Just four left on the Javascript track. The next two are both refactors (how do you test it was a good refactor) which I find strange since they are both together and the only two I remember being on the track.