That’s how Enrique’s email introduced the Friday challenge at the end of week 8 at Makers. Week 8 has been Hell Week. It was a beasting. It was hard. It was NodeJS.
Nope. See above. You’ve got a recipe for Hell Week.
I knew that JS was asynchronous - but I didn’t really know it, if you take my meaning. The difference between Sinatra and Express became apparent from the beginning. Where on Sinatra it was fairly easy to get RSpec and Capybara performing tests out of the box, with Mocha it felt like I was contantly and actively fighting against the framework. Callbacks came back unexpectedly or not at all. Tests passed - twice - when they should’ve failed.
The final straw came when we collectively couldn’t get read/write operations working consistently. I suddenly realised how spoiled I’ve been by using Ruby, RSpec et al – these are really mature pieces of software that act as you expect. I feel that Node and Express are amazing - don’t get me wrong. But I’ve found it nigh-on impossible to test them.
And if you can’t test it, then it doesn’t exist.
I’m still pressing on with Node/Express on the side, because I do really enjoy the environment to work in. I just need to slay the Mocha dragon and everything will be fine.
The Ruby refresher that was presented as the weekend work was like a beautiful sorbet - so refreshing after the hard week. As I answered the questions with simple one-liner methods I realised exactly how much I’d learned in the last eight weeks. I feel like I’ve got a firm foothold in the Ruby world.
Now on to the Mocha.