We love reading, watching, and listening to constantly update our skills and learn new perspectives. Here are some of the exciting pieces we learned from this month.
Demystifying the software engineering test pyramid
This is a great refresher on the "classic" testing pyramid, but also taught me about many other models. Have you heard of the testing trophy? Or the delicious sounding ice cream and cupcake anti-patterns? This article introduced me to those concepts.
Common issues with CSV parsing and solutions to them
The section on converters draws attention to an incredibly-useful and previously unknown to me feature of Ruby's CSV standard library.
A Guide to Mindful Communication in Code Reviews
There are tips galore for both authors and reviewers of code to be found in this article.
Building Bridges as a Technical Leader
Navigating the waters of an organization can be difficult - there's rarely a map. While I don't have a compelling conclusion to this metaphor that says, "something something - build a bridge instead", I do highly recommend reading this post, and the many links it provides, to gain valuable insights on working with others in any company.
How I resolve conflicts in yarn.lock
Resolving merge conflicts can be tricky, especially when they occur in the lock file where intent is not always clear and the file could be thousands of lines long. This article provides a few simple steps to sanely and quickly resolve lock file conflicts.
Custom ordered list number styling
I grimaced when I saw that the designs had a custom style for an ordered list. I brainstormed ways I could do this in a clean and extensible way. Turns out it's much easier than I thought ;).
You're not in the zone
Because ActiveRecord doesn't support PostgreSQL's time
column type out of the box, handling time-of-day logic in Rails isn't as straightforward as I would have expected. This article however provides some interesting - and fortunately very eloquent - solutions using a particlar gem.
Move lines around in vim without copy and paste
Honestly, this doesn't come up that often. But I found it to be a neat little trick that can help you keep track of how things move around when you're trying to remember how things work (and don't need to be distracted by the specifics of managing code in your editor). Plus there's a good quick explanation of map
and noremap
in the comments!
Strong parameter assignment via Pundit
Earlier this month, I was tasked with prohibiting certain types of users from making changes to a subset of attributes on a model. The Pundit gem that we are using for authorization makes this much easier than I have anticipated by allowing a permitted_attributes
method to be defined on the policy that returns the list of allowable attributes. The attributes can then be retrieved from the policy from within a controller.
Contributors
This post originally published on The Gnar Company blog.
Learn more about how The Gnar builds software.
Top comments (0)