I’ve been working on my first Phoenix project recently. I found it very annoying to have to add an aliases for every model I want to interact with in
iex. There’s an easier way…
Recently I wanted to add basic text search to an application I as working on. It took me a while to figure out the right way to index columns for
LIKE lookups, especially for indexing compound columns. Here’s how I did it.
Just over six months ago, I set myself a challenge to use Vim as my primary text editor for 30 days. I succeeded, and haven’t looked back since.
RSpec is great for writing tests in
ruby, providing a nice DSL for testing expected behaviour. However, as a test suite grows, you may find yourself writing a lot of boiler plate and even duplicating specs. RSpec’s
shared_examples_for can be a good way to DRY up some of these cases. I couldn’t find much documentation on using it, so wrote a short about it.