Coder Social home page Coder Social logo

Comments (1)

ColinKennedy avatar ColinKennedy commented on June 11, 2024 1

This isn't my repository so it isn't my place to say but for what it's worth, docstrings (documentation) are for contextualizing why X or Y function / class is important or point out any risks or input assumptions, etc, or just reasons to use the function.

The linked demo shows auto-created docstrings that simply restate what the code is already doing. A docstring like that is something that you could learn just from reading the source code, itself. IMO such docs are worse than none at all because at least if a docstring is missing, linters like pydocstyle can point out where documentation is lacking so programmers can go back in and improve them.

It'd be a different story if the auto-generated text gave actual insights about the code though. Since neogen uses snippet expansion engines, I could see a use-case where, say, you have a function like:

def foo(bar, fizz, buzz=tuple()):
    """Do blah, I am a description, written by a human.

    Args:
        bar (SomeClass): |Your cursor is here|
        fizz ([TODO:parameter]): [TODO:description]  
        buzz ([TODO:parameter]): [TODO:description]
    """
    for item in buzz:
        # ...

And, using an AI, give it an automated prompt like "given 1. the entire function body and 2. the manually written description, "Do blah, I am a description, written by a human." and 3. SomeClass type, suggest a description for the fizz parameter because that's where my cursor is currently positioned"

A thing like that might be useful. But anyway, this is borderline AGI territory, IMO.

from neogen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.