{"slug": "codeio-sprinkle-determinism-into-your-ai-for-better-prs", "title": "CodeIO: Sprinkle determinism into your AI for better PRs", "summary": "Developer nloum released CodeIO, an open-source C# library that parses a codebase to extract types, properties, and methods and then generates source code from deterministic scripts rather than AI output. The author argues that reviewing a small code-generation script is preferable to reviewing 37 AI-generated DTO classes that may contain errors, and that AI coding makes frameworks with heavy behind-the-scenes \"magic\" less attractive because debugging remains hard even when writing code is cheap.", "body_md": "# CodeIO: sprinkle determinism into your AI for better PRs\n\nI built [CodeIO](https://github.com/nloum/CodeIO), a C# library that makes it really easy to parse your codebase and extract the types, properties, methods, etc.; and makes it easy to generate additional source code based on what it parsed.\n\nI like using it because my AI-generated code reviews can be huge, but if I am using CodeIO I just have to review the core domain logic, the code generation script, and a few example outputs. I don’t have to review all the generated code because it’s coming from an easy-to-read code deterministic generation script rather than an AI. In other words, I would rather review this code:\n\n``` js\nvar codeWriter = new CodeWriter();\n\nforeach(var clazz in DomainClasses)\n{\n\tif (clazz.Attributes.Any(attr => attr.Type.Name == \"HideFromApi\")) continue;\n\n\tcodeWriter.WriteLine(\"public class {clazz.Name}Dto {\")\n\n    foreach(var property in clazz.Properties)\n    {\n        if (!property.Attributes.Any(attr => attr.Type.Name == \"HideFromApi\")) continue;\n        if (!property.IsPublic) continue;\n        \n        codeWriter.WriteLine($\"public {property.Type} {property.Name} {{ get; set;}}\")\n    }\n    \n    codeWriter.WriteLine(\"}\")\n}\n```\n\nI’d rather review that than review 37 DTO classes that are AI-generated and may or may not contain errors. Whereas the script above codifies the rules for DTOs.\n\nA side note: some web frameworks, such as Django, do a lot of magic behind the scenes so the code you manage can be only a few lines. I don’t think that approach is ideal. I would rather be able to step through simple code than have see the debugger jump from one magical middleware to another. But I also don’t want to painfully type out all the code; nobody does, that’s why Django and similar web frameworks do so much magic behind the scenes.\n\nAI coding changes the tradeoff around magic behind the scenes. Writing code is so cheap, but debugging it isn’t a lot easier even in the AI age, so I think web frameworks with lots of “magic” in them are actually disadvantaged compared to frameworks that are more straightforward to debug.", "url": "https://wpnews.pro/news/codeio-sprinkle-determinism-into-your-ai-for-better-prs", "canonical_source": "https://nloum.github.io/blog/codeio/", "published_at": "2026-09-19 11:40:05+00:00", "updated_at": "2026-09-19 11:54:40.532194+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["CodeIO", "nloum", "C#", "Django", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/codeio-sprinkle-determinism-into-your-ai-for-better-prs", "markdown": "https://wpnews.pro/news/codeio-sprinkle-determinism-into-your-ai-for-better-prs.md", "text": "https://wpnews.pro/news/codeio-sprinkle-determinism-into-your-ai-for-better-prs.txt", "jsonld": "https://wpnews.pro/news/codeio-sprinkle-determinism-into-your-ai-for-better-prs.jsonld"}}