The simplest way to make a page collaborative with Hotwire and Rails is to subscribe to changes and broadcast a refresh when relevant models update. But that approach sometimes causes a problem. This post explains the refresh approach, the problem and the fix. The full monty. The problem Let’s assume we’re implementing a game because that is an example I have handy. My little MinesVsHumanit...
To get from Zagreb, where I live, to Vienna, where RubyConf Austria was happening: drive 173km to Graz, take a right and go for another 198km. Sure, I’ve glossed over two country borders and some other details, but that’s mostly it. It’s pretty straightforward, unlike how the conference got me thinking about the future of Ruby conferences. But I’ll get to that. Day 1: The Vienna Ruby Meetup ...
pseudo, adjective: being apparently rather than actually as stated CSS pseudo-classes are like regular classes in that they can be used to select DOM elements. They’re unlike regular classes in that you can’t see them in the HTML. They select elements dynamically, based on their own rules. This is what makes them powerful. I really like them because they let me remove dynamic presentation lo...
The student asked: “Master, what should I pay more attention to, my tests or my code?”. The master said: “I cannot answer you when you ask the wrong question.” The student thought “oh fuck, here we go again”, but just said: “But master, is it not one or the other?” The master said, “If a bridge is suspended from the pillars. Which is more important the walkway or the pillars?” The student t...
Tests grow to thousands All make their claim on fixtures Frozen by demands An ancient Japanese Haiku about a common problem with software test fixtures Act 1: The problem, frozen fixtures Fixtures have a lot going for them: super fast, clearly structured, reusable across tests … That last one is also the source of a common problem in large test suites. Every time you change fixtures you ...