{
  "id": 9457161,
  "title": "Why you should check your gem's lines of code",
  "url": "https://urgent.news/2026/09/24/why-you-should-check-your-gems-lines-of-code",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-24T00:48:47.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://spinel.coop/blog/why-you-should-check-your-gems-lines-of-code/"
  },
  "original_language": "en",
  "account": "In April, the author shared an idea on the Dead Code podcast about using the number of lines of code in gems as a useful metric when evaluating them. The concept is to imagine the implementation in terms of lines of code, then generate a cloc count to see how accurate the estimate was. If the actual lines of code were less than expected, it could indicate interesting implementation that could be learned from. If more lines of code were expected, it might suggest the implementation is more complex than anticipated. The author has been focusing on writing gems with clear concepts to naturally limit complexity, resulting in \"breezy reads\" that can be understood in less than an hour. Examples include ActiveRecord::AssociatedObject and ActiveJob::Performs, both under 100 lines of code. The author found a useful way to categorize gem ideas based on line count, aiming for gems to stay within perceived worth. While lines of code isn't a 100% reliable metric, the author believes the approach has provided useful insights and clarity in evaluating and writing gems.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}