Ok so let’s review the first day.
We started off by discussing goals, personal and professional. Then we worked on the movie library exercise. We spent some time trying to complete the exercise then we began refactoring a little bit.
We implemented a custom RSpec matcher.
Then we spent a little bit of time talking about load paths and coming up with a file loading strategy that allowed us to move files around at will without having to constantly update our load strategy.
We used irb to understand $LOAD_PATH and $:. $: is just a short hand for $LOAD_PATH We talked about unshift is just a method on Array that adds an new item to the start of an array. So when you $:.unshift something you’re actually just adding a new path to the start of the load path array so that items from that path are used first.
We came up with a strategy where we create convention of adding any sub directories of our lib folder to the load path.
We learned how to adapt blocks and specifications using modules and block_given? We created a specification contract to have a matches? method. We created the CompositeMatch class. We created a matcher module that can be mixed in to our specification to be able to add additional behaviour like “or”.
We later discussed recording macros in vim and pasting them into a file to be able to edit the macro. JP says he has scripts and conventions that he uses to read macros in from a file that he can reuse throughout his projects.
We then moved on to build a internal dsl for building queries. We started building the Where class as our gateway to building a query api.