{"slug": "readability-in-the-age-of-ai-assisted-programming", "title": "Readability in the age of AI-assisted programming", "summary": "A developer is building a code formatter called sfmt to improve the readability of TypeScript code in the age of AI-assisted programming. The project addresses issues such as IDE screen space, diff noise from formatting, and inconsistent formatting rules. The developer has identified common readability problems and is designing a set of deterministic formatting rules, drawing from popular tools and linters.", "body_md": "With the recent shift toward AI-assisted programming, the readability of code\n\nhas become even more important. AI agents can read and modify code much faster\n\nthan humans, but they are not as good at understanding the intent of the code.\n\nAdding human reviewers to the process can help, but given the volume of code\n\nbeing written, it is crucial to have code that is easy to read and understand.\n\nI'm working on a project that aims to improve the readability of TypeScript\n\ncode. These are some of the problems that I have identified as making code less\n\nreadable.\n\nModern IDEs have a lot of features that are controlled from the IDE window.\n\nThese controls occupy a lot of screen space, leaving less space for the code\n\nitself.\n\nThis becomes worse when the IDE is used on a laptop or when source code control\n\noperations are performed, such as viewing diffs or resolving merge conflicts.\n\nA typical IDE window now has a file tree, a code editor, and an AI agent or chat\n\npanel. Additional tasks such as viewing diffs or resolving merge conflicts can\n\nresult in the code editor being split into multiple panes, leaving very little\n\nspace for the code itself.\n\nWhen code is modified, the diff shows all the changes made to the code. However,\n\nsometimes the changes are not directly related to the change being made, but are\n\ntriggered by formatting rules.\n\nA method rename can change the line length, triggering formatting rules that\n\nalter code unrelated to the change being made. This can even change the\n\nindentation of large code blocks, making it difficult to understand the actual\n\nchange being made.\n\nAn important factor in readability is code density. Long lines with many\n\nstatements and expressions are hard to read.\n\nWhen code is not spaced properly, it becomes difficult to identify control\n\nstructures and understand the flow of the code.\n\nDevelopers writing or modifying code for others to read are generally willing\n\nto follow formatting rules. However, when the rules are too complex, they can\n\nbe difficult to follow, resulting in inconsistent formatting, frustration, and\n\nlost productivity.\n\nWhen code structures are formatted in different styles, it becomes difficult to\n\nidentify control structures and understand the flow of the code.\n\nThis can be caused either by a lack of formatting rules or by rules that are not\n\ndeterministic (i.e., the same code structure can be formatted in different\n\nways).\n\nThere are common solutions and mitigation actions that can be taken to address\n\nthese problems:\n\nI've started with the first step, which is to design a set of formatting rules\n\nfor TypeScript and implement them in a code formatter: [sfmt](https://github.com/AlexandriteSoftware/asljs/blob/main/sfmt/README.md).\n\nI'm building it by studying popular formatting tools and linters for TypeScript\n\nand adding custom rules on top of them. Some of the tools that I have learned\n\nfrom are:\n\nIf you are interested in this project, please check it out and provide feedback\n\nor subscribe for updates. If you prefer to follow along and want to support the\n\nproject, I would appreciate [a star on GitHub](https://github.com/AlexandriteSoftware/asljs/blob/main/sfmt/README.md).", "url": "https://wpnews.pro/news/readability-in-the-age-of-ai-assisted-programming", "canonical_source": "https://dev.to/alex_netkachov_5306c2df5d/readability-in-the-age-of-ai-assisted-programming-4b35", "published_at": "2026-08-14 13:05:31+00:00", "updated_at": "2026-08-14 13:36:00.121627+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["TypeScript", "sfmt", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/readability-in-the-age-of-ai-assisted-programming", "markdown": "https://wpnews.pro/news/readability-in-the-age-of-ai-assisted-programming.md", "text": "https://wpnews.pro/news/readability-in-the-age-of-ai-assisted-programming.txt", "jsonld": "https://wpnews.pro/news/readability-in-the-age-of-ai-assisted-programming.jsonld"}}