#today-i-learned
4 articles with this tag
Related Tags
-
16 min readBuilding 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 readHow an index made rendering slowI 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 read140 million rows laterAt 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 readTips to improve your testsPeoples' 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...