Giter Club home page Giter Club logo

Comments (9)

NielsZeilemaker avatar NielsZeilemaker commented on June 1, 2024

Makes sense, however if we changing this it might be a good idea to see if we can move some methods from dispersy.py to community.py.

For instance, creating an introduction request is clearly something a community is responsible for, not dispersy.py.
Same goes for receiving them etc.

from dispersy.

boudewijn-tribler avatar boudewijn-tribler commented on June 1, 2024

I agree with you, +1 for moving all message related methods from dispersy.py to community.py.

I'd still like your guy's opinion on the naming convention.

from dispersy.

NielsZeilemaker avatar NielsZeilemaker commented on June 1, 2024

I don't mind the create stuff, i guess it makes sense to have such a keyword for methods which create messages.
The dispersy prefix I dislike, i'd rather use the first option for those instead.

from dispersy.

whirm avatar whirm commented on June 1, 2024

I agree with @NielsZeilemaker

from dispersy.

boudewijn-tribler avatar boudewijn-tribler commented on June 1, 2024

I agree with using the first option.

Historically the naming convention for create, check, on, and undo methods was: create_MESSAGENAME, check_MESSAGENAME, etc. given that the Dispersy messages include the word 'dispersy' in their name, all these methods become: create_dispersy_aaa, check_dispersy_aaa, etc. When implemented in disprsy.py I choose to remove 'dispersy' from these method names, I'm not convinced we should do the same when we move this into community.py?

I do agree that having the word 'dispersy' everywhere isn't useful. Should we, to make things consistent, rename the messages themselves? I.e. 'dispersy-introduction-requesy' --> 'introduction-request'? This way we can keep the naming convention while keeping reasonable methods names.

from dispersy.

whirm avatar whirm commented on June 1, 2024

+1

from dispersy.

NielsZeilemaker avatar NielsZeilemaker commented on June 1, 2024

Any progress on this? I think it would improve the readability of Dispersy a lot if we could move some methods from dispersy.py to community.py.

from dispersy.

boudewijn-tribler avatar boudewijn-tribler commented on June 1, 2024

I've pointed Johan to this thread last week when discussing its merits. I'm waiting for him to say yay or nay on the time investment.

from dispersy.

NielsZeilemaker avatar NielsZeilemaker commented on June 1, 2024

Done, most of the dispersy prefixes are gone and all messages have been moved to community.py

from dispersy.

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.