Net-Negative Cursor
a year ago
- #productivity
- #AI-development
- #Rust
- AI-generated code changes can be worse than useless, making developers net-negative productive.
- Cursor Editor's example of AI-generated Rust code for reading a length-delimited string contains flaws: useless length validation and questionable sanitization.
- The length validation is redundant because the maximum value of u16 (65535) is already enforced by the type, leading to unreachable code.
- The sanitization code is inefficient (unnecessary allocations) and unclear (uses decimal numbers instead of character literals).
- Sanitization decisions are application-specific and can break functionality if not carefully considered.
- Programming involves many decisions; AI tools currently fail to provide context or rationale for their suggestions.
- The example shows that AI tools can introduce subtle bugs, requiring extensive review and discussion.
- Effective AI tools should help resolve less important decisions correctly and flag decisions needing review.