4 ms·
> I worked at the largest Rails shop in the world and this would be rejected in code review. Not sure if this means GitHub or Shopify. Until earlier this year
by mikemcquaid 3y ago
> I worked at the largest Rails shop in the world and this would be rejected in code review.
Not sure if this means GitHub or Shopify. Until earlier this year I worked at GitHub for a decade, leaving as a principal engineer, primarily writing Ruby.
This would not be rejected at code review there unless the Hash had e.g. millions of values and, even then, it might not be a meaningful performance problem in context.
If the Hash is very small and will always be: readability trumps Big-O "performance" when n is very small.
Am I being pedantic and appealing to authority? Yup but, well, you started it and I hate to see helpful "Ruby is nice" comments like the grandparent get crapped on for no good reason.