• AA5B
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    17 days ago

    Tried it, liked it. Code base is only tens of thousands of lines, relatively modern, with good test coverage

    I have generally not been happy with ai contributions but a lot of it is establishing the ground rules, the priorities, and establishing good opportunities for human evaluation before committing a change. This ruleset takes care of all of these and I especially like the evaluation opportunity! Iterating through ai chat would not get here anywhere near as fast or as predictably

    It successfully detected the same classes to focus on as a report on cyclomatic complexity. Thats a win because they used different criteria to find the same focus area, confirming each other and my own more subjective opinion. It was also useful to have reduced cyclomatic complexity as an objective measurable success criteria - refactoring doesn’t usually have that.

    The shortcoming was most of the suggestions were not acceptable and needed varying amounts of manual coding, but that’s more strictly on the ai than this rule set. I was able to add rules to reject some of these but mostly not. I consider this a success if the ruleset because it established good opportunities for evaluating and rejecting the ai suggestions

    I ended up with code that successfully reduced cyclomatic complexity in the three outlying classes, when my time box ran out.

    1. Worst class is lower complexity but still not maintainable. Most suggestions were unacceptable but I do like one of the ideas it just couldn’t deliver on - passed this back to the original coder. This is still my only “red” on the cyclomatic complexity graph.
    2. Second worst is lower complexity and ai delivered some good refactoring. It passed a threshold to change from “yellow” to “light green” on the cyclomatic complexity chart and now is visibly more testable and maintainable .
    3. Third worst it made some minor improvements to slightly reduce complexity , but the ai suggestions were mostly stupid. I already have a backlogged task with a specific refactoring that should do much better - and is specifically needed for a new feature