Coder Social home page Coder Social logo

Code structure about virtual-assistant HOT 9 OPEN

ritwik12 avatar ritwik12 commented on June 30, 2024
Code structure

from virtual-assistant.

Comments (9)

riya-17 avatar riya-17 commented on June 30, 2024 1

@ritwik12 I find the idea of @pavan-pan better. It will increase the understanding of code as well. What do you think @ritwik12 ?

from virtual-assistant.

virajmalia-zz avatar virajmalia-zz commented on June 30, 2024 1

I have been working on reorganizing the code and using a CMake system to build it. Once I have the system running, I will need to re-add some features that were added later (email support etc.). I will try to send a PR by next week.

from virtual-assistant.

RoyMattar avatar RoyMattar commented on June 30, 2024 1

I agree with refactoring/restructuring in this way, where pieces of logic are extracted into separate src files (.c) but only header files (.h) are included.
Including src files is commonly considered bad practice, while the approach proposed here supports modular design, which is better and a lot easier to maintain, scale and test/debug.

I have started working on refactoring the code in this way.

from virtual-assistant.

ritwik12 avatar ritwik12 commented on June 30, 2024

@pavan-pan There's no specific reason as such. it's just that previously it was a single main.c file consisting of all the functionalities. Then later @igo4Jesus in #31 split it in different files for better code readability. If you think something else is better. Please suggest.

from virtual-assistant.

ritwik12 avatar ritwik12 commented on June 30, 2024

@riya-17 I would like your reviews here

from virtual-assistant.

pavan-pan avatar pavan-pan commented on June 30, 2024

My idea is to divide the entire program into modules consisting .c and .h files. So every module is loosely coupled. Instead of adding .c files, .h files are included instead. When the code grows bigger, its easier when everything is organized in modules.

from virtual-assistant.

ritwik12 avatar ritwik12 commented on June 30, 2024

@pawan-pan sure, please go for it and send a PR

from virtual-assistant.

ritwik12 avatar ritwik12 commented on June 30, 2024

@virajmalia That's great, will wait for your PR, Thanks !!

from virtual-assistant.

ritwik12 avatar ritwik12 commented on June 30, 2024

@RoyMattar Thanks for taking interest!!

from virtual-assistant.

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.