#today-i-learned

4 articles with this tag

Related Tags

  • 16 min read
    Building Simpl息
    This week I went for a coffee with a friend. As we talked the topic of hobbies came up. I mentioned that I was having a lot of fun working on a toy project over the past week, and then I showed it to him. Him: So you are dabbling in React? Me: No, this is just Rails. Him: Which libraries did you...
  • 8 min read
    How an index made rendering slow
    I noticed that a view I was working on was rendering much slower than I would expect it to. The view showed a list of events, together with the person that generated the event and the device that the event belongs to. It took nearly half a second to render 25 events, while other similar pages...
  • 6 min read
    140 million rows later
    At work, as part of a project I’m working on, I wanted to add a new reference to a table. ”Simple enough” - I thought. Spoiler alert, it wasn’t. Adding a reference from one table to another is straight forward in Rails. You create a migration using rails generate and then write in it something...
  • 6 min read
    Tips to improve your tests
    Peoples' test suites often get out of hand. Having thousands of tests that run for hours on some CI should be a thing of the past. There doesn't exist code that's too hard to test or code that can't fail. You shouldn't waste your time waiting for your test suite, or chasing some bug you are...