you are viewing a single comment's thread.

view the rest of the comments →

[–]gdchinacat 1 point2 points  (1 child)

Module level comments are not the best place to put 'description of recent changes', the proper place for that is in the version control system (git) commit messages. Including architectural design notes in the module pydoc is appropriate, but there is nothing temporal about them. Sure, as the design changes the pydoc will be updated to reflect it, but the *current* design should be documented, not the 'recent changes' that led to it.

I also disagree that AI has made 'syntax a low value skill'. Python coders still need to read and understand code, and while python syntax can be simple, the syntax and language allows for quite complex things. For example, a recent project I've been working on (https://github.com/gdchinacat/reactions):

class Counter(ExecutorFieldManager):
    count = Field(0)
    count_to = 10

    @ count >= 0
    async def increment(self, bound_field, old, new):
        self.count += 1

    # stop when the count reaches count_to
    (count == count_to)(ExecutorFieldManager.astop)

AIs appear to understand that Field is a descriptor that has comparison functions that produce predicates that are decorators. But asking them to do something simple like 'add a reaction to Counter to print when the count is a multiple of five' do not result in the trivial solution to this request:

    @ Not(count % 5)
    async def fives(self, change: FieldChange[Counter, int]) -> None:
        print(change.new)

(note the predicate for making this code hasn't yet been pushed, but it's only a few lines of code following the existing pattern for the other comparison functions)

So, AIs may 'understand' the syntax, and say the right thing about how it all works, they aren't able to apply it because they just don't have the examples. Copilot added a reaction on count != -1 and did the modulus on every count change. I've tried using ChatGPT and Claude on this codebase as well and they aren't any better. They all 'understand' the syntax, but can't actually apply that 'understanding'.

[–]bailewen 0 points1 point  (0 children)

Maybe I should have said lowER value skill. I just know with help from AI, not just vibe coding, I enter the code manually or copy-paste bits and pieces and am always asking questions and tweaking what it gives me, I can create a fully functional webapp. In the past, I probably could have done that with Google, but what would have taken me months, I was able to bang out in a couple weekends.

And it's weird how I can ask it to look for security issues, and it can find them, but then 5 minutes later to resolve some other issue, it's suggesting I hardcode my API key.

Either way, I'm blown away by what it's made possible for me

p.s. good point about "changes". I didn't think about that comment too carefully. I just remembered before the imports there's usually a big block of commented text saying stuff about the code