-
Use find_each vs. select or each when needing to process each record via Ruby
The problem: This scenario is a much more practical case of a similar concept with Rails / ActiveRecord count, size, and length. In this case, you’re needing to run ruby code off of either every value from a where method result or a subset that is determined by ruby code. For example, assume that a…
-
Rails / ActiveRecord count, size, and length
When trying to be sensitive to n+1 queries and memory usage, knowing the differences between count, size, and length in ActiveRecord is important. It had been a while since I reviewed the usage, and I wanted to ensure that I hadn’t made some bad assumptions along the way that somehow stuck. The reality is that…
-
Enphase Envoy Solar Array monitoring with a Raspberry Pi to Save $100 or More from Downtime
Using a rasbperrypi to monitor and alert on your solar output