TIL, 2018-02-14, Adding SSL to the Blog
- SSL on the blog: Reference, Reference, CloudFlare
- CSR: Certificate Signing Request. Nothing on Github pages + custom domain? Sad. I just used CloudFlare.
- So CloudFlare is being used as a DNS but no idea how to turn on the SSL for CF.
- Turns out I just needed to wait for a bit hehe. Also I like CF better than Namecheap’s interface.
- Upgraded nokogiri gem in TIL. Should I just lock version numbers for all gems? I’ve had bad experiences with this in Node, but IT’S NODE.
- What’s weird is that when I updated Bundler and did
bundle installagain, it didn’t update the
bundled_with. I needed to actually do something that will change
Gemfile.lockfor a re-bundle to occur.
- Read a brilliant article on the Art of Manliness blog re: focusing. I actually practiced it while reading the Smalltalk book.
- Comparing time Reference
- You can do
- You can compare both first with
2 * 60.
- You can do
Smalltalk Best Practice Patterns
- Did Matz or Ruby/Rails core team read this? I know DHH did. Much of the principles are in Rails.
- Shortcut Constructor Method: Show how an object can be created.
- Converter Method: Defining methods on objects to convert them from one class to the other.
- Converter Constructor: Same as Converter, but static class.
- Query methods: Predicate method. Better to use
statusif there are only 2 statuses.
- Comparing methods: Create a method that accepts another object of the same class as the argument, and code the logic to compare the two.
- Reversing Method: Create another class that makes another method look cool.
- Method Object: If there is a method with a lot of local vars, you can create a new object with those local vars as instance vars, then pass the original object in.
def price PriceCalculator.new(self).process.
TIL, 2018-02-13, Interactor and Flexbox Froggy.
Musings Looking into interactor gem. Interactors solve conditional hell issue in service objects. It has before, after, and around hooks,...