#code-quality
The latest AI and developer news about #code-quality, with the original source and a short summary.
The latest AI and developer news about #code-quality, with the original source and a short summary.
SlopCodeBench, a UW–Madison benchmark, tests 15 agents on evolving coding tasks and reports that structural erosion increased in 77% of runs.
The SlopCodeBench study found that code generated by AI agents has approximately twice the duplication and complexity of human code, with even the latest models achieving a 0% pass rate on strict tests.
Incomplete code generated by AI appears to work on the surface but hides fatal internal defects, ultimately requiring a rewrite to salvage.
Introduced a Harness Engineering framework combining context management, architectural constraints, and regular cleanup to prevent the degradation of AI-generated code quality.
Broccoli, an open-source tool for LLM-based code quality verification and pattern detection, has been launched.
Alibaba has open-sourced an AI code review tool that it has run internally for 2 years, catching millions of defects.
Yeogiotae's Ad Center team shared how they evolved an AI coding tool from developer-only use into a system usable by QA and planners as well.
AutoScout24 cut its development cycle by about 10x using ChatGPT and Codex.
It is a tool that statically analyzes structural flaws in code generated by AI agents to verify quality.
Good code should be easier to read than to write, and should be designed so that it's hard to use incorrectly.
Injecting excessive logic for the sake of testing can make tests complex and risks missing verification of actual interactions.
Error representations should be unified into one rather than scattered across many, so that the call site stays simple.
Considering the characteristics of Collections and appropriately using Set and Map instead of List can improve code clarity and stability.
Kotlin primary constructors should be kept simple to match the class's properties, with complex logic separated into secondary constructors or factory functions.
Including collection index information in a data model causes data inconsistency during filtering, so such data should only be generated when needed, such as at the UI layer.
This proposes ensuring idempotency in functions to reduce the hassle of state checks and increase code predictability.
This analyzes the concurrency issues that occur when function state is managed as an object's property, and presents two design approaches to resolve them.
Be wary of over-applying the SLAP principle, as it can harm the readability of the main logic.
Implicit dependency relationships within code should be isolated at the function or class level to prevent runtime errors.
During code review, you should examine the caller and callee code together to prevent duplication or omission of conditional filters.
When writing JSON unit tests, you should verify structure abstractly rather than comparing strings directly, in order to increase the flexibility and accuracy of the tests.
Rather than simply applying the Law of Demeter, it is important to understand the boundaries of knowledge from the perspective of information hiding and encapsulation.
Rather than suppressing warnings indiscriminately, you should resolve the root cause or minimize the suppression scope.
Within a function, multiple asynchronous handling methods such as **Future** and **callback** should not be mixed; they should be unified into a single mechanism.