GithubHelp home page GithubHelp logo

Comments (4)

yudhastyawan avatar yudhastyawan commented on August 11, 2024

for the variable, I prefer vectorstring instead of vectorString. Then, the previous commit follows this type of code.

from angka.

yudhastyawan avatar yudhastyawan commented on August 11, 2024

I am a fool with this issue. We should care more about this naming convention, especially how people would do in C programming. Let me standardize this naming for our C library code.

Naming Convention

No. definitions prefix/suffix examples
1. variables - local (trivial) - i,n,a,b,... ii,nn,aa,bb,... (if a trivial var name is long, then consider to be a local var)
2. variables - local (descriptive) - (camelCase) variable,variableFoo,...
3. variables - global g_ g_variable,g_variableFoo,... (don't use global variabel except for critical purposes)
4. variables - constant c_ c_variable,c_variableFoo,...
5. pointer p_ p_variable,p_variableFoo,...
6. array r_ r_variable,r_variableFoo,...
7. struct s_ s_name,s_name_foo,...
8. union u_ u_name,u_name_foo,...
9. enum e_ e_name,e_name_foo,...
10. struct (member) - variable,r_variable,variableFoo,...
11. union (member) mu_ mu_variable,mu_variableFoo,...
12. enum (member) (except e_bool) AGX_ AGX_VARIABLE,AGX_VARIABLE_FOO,...
13. function agx_ agx_name_function(),...
14. macro AGX_ AGX_VARIABLE,AGX_VARIABLE_FOO,...
15. typedef (struct, union, enum) Agx (PascalCase) AgxName, AgxNameFoo...
16. typedef (data types) _t variable_t,p_variable_t, p_variableFoo_t,...

agx_, Agx_, and AGX are used for the Identity of our library code and avoiding conflicting names in C programming.

The Further Idea

agx = the data manipulation
agv = the data visualization
agc = the applied cases (seismology, etc.)
aga = the animation
agtk = gtk+3 support

from angka.

yudhastyawan avatar yudhastyawan commented on August 11, 2024

For the file name, we can use lowercase with _, such as: agx_matrix.c, agx_vector.h, agx_name_foo.c.

from angka.

yudhastyawan avatar yudhastyawan commented on August 11, 2024

the name of a function should not use the abbreviation or the difficult name. Keep the function readable.

from angka.

Related Issues (13)

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.