Weekly bookmarks - Issue #24
This post utilizes a score of Array and Enumerable methods to model music notes.
💡Rails tip: Active Record error messages often provide poor UX. Fortunately, they can be easily overridden!
1️⃣Enable full message customization
2️⃣Define attribute error format
3️⃣Provide an arbitrary error message
Result: full control over the error message! 🎉 https://t.co/cwHBzEICng
How do you handle external API calls for your tests?
Hard-coded data? Testing service mocking the API? Something else?
Wow, that’s impressive! The Wix team has edited 7643 error messages to design clear, helpful, respectful and inclusive messaging and error handling. https://t.co/IjlxetDnJg #ux #design https://t.co/CLGYpamNLI
Today’s Staff Engineer Pro Tip™
When you’re pushing many commits over and over trying to debug something (say, it only runs in CI or something), instead the same commit message over and over, try this:
“Debugging: `date`”
Gets you:
Debug Tue Oct 18 10:26:57 PDT 2022
@github opened it's design system called Primer.
✅Design foundations, accessibility, UI patterns, components
✅CSS, React, and ViewComponent implementations
https://t.co/vOQIgsYvJ0
Avoid text input to Active Record queries where you can
Let's take a look at RubyCritic and dig into RubyCritic's reports.
💡Rails tip: strict validation can be used to enforce internal rules
Regular validations don't raise and add user-facing error messages. But not all validations work like that!
Some validations are for internally managed columns, so reporting their errors could be confusing. https://t.co/6P5UxXFg1C