» Conventions.CodingStyle
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Conventions.CodingStyle

French | Italian | Spanish

For better readability and standardization of VVVV related code we should all conform to the coding styles below:

Casing

Definitions

Pascal Casing

 RedHotChilliPeppers

Camel Casing

 redHotChilliPeppers

Classes

  • Pascal Casing
//good
class RedHot
 
//bad
class TRedHot
class redhot

Interfaces

  • start with an I (for Interface) and then Pascal Casing
//good
interface IRedHot
 
//bad
interface RedHotInterface
interface Iredhot

Class Variables

  • start with an F (for Field) and then Pascal Casing
//good
int FChilliPepper
 
//bad
int ChilliPepper 
int FchilliPepper

Local Variables, Function Arguments

  • Camel Casing
//good
int redPepper;
void Foo(int barCode);
 
//bad
int Redpepper;
int RedPepper;
void Foo(int BarCode);

Global Variables

  • start with a G and then Pascal Casing
//good
int GChilliPepper;
 
//bad
int ChilliPepperGlobal;
int GchilliPepper;

Functions

  • Pascal Casing
//good
PlayMusic();
 
//bad
playMusic();

Events

  • start with On.. and then Pascal Casing
//good
OnExplode
 
//bad
Explode
Onexplode

Events Callbacks

  • are named like their corresponding Events
  • end with ..CB
//good
ExplodeCB()
 
//bad
ExplosionCB()
explodeCB()

Braces

  • braces are always in a new line
//good
if true then
{ 
 ...
};
 
//bad
if true then { ... };
if true then {
   ...
 };

Indenting

  • always use 4 spaces

Spacing

  • there is always a single space after a comma or a semicolon, never before
//good
MyFunction(a, b);
 
//bad
MyFunction( a , b );
  • single spaces surround operators (except unary operators like increment or logical not)
//good
a = b;                       
for (int i = 0; i < 10; ++i) 
 
//bad
a=b;                             
for (int i=0; i<10; ++i)

Other Coding Guidlines

Note that certain incompatibilities to the similar guides listed below (which differ among themselves aswell) are deliberate.

Mono Coding Guidlines

.Net Design Guidlines

Sharp Develop Coding Guidlines

anonymous user login

Shoutbox

~3d ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~9d ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/

~10d ago

fleg: hey there! What's the best tool for remote work? Teamviewer feels terrible. Thanks!

~23d ago

joreg: Last call: 6-session vvvv beginner course starting November 4: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~1mth ago

joreg: Missed the last meetup? You can rewatch it here: https://www.youtube.com/live/MdvTa58uxB0?si=Fwi-9hHoCmo794Ag

~1mth ago

theurbankind: When is the next big event, like node festival ?

~1mth ago

~1mth ago

joreg: Join us for the next vvvv meetup on Oktober 17th: https://visualprogramming.net/blog/2024/25.-vvvv-worldwide-meetup/

~2mth ago

joreg: 6 session beginner course part 2 "Deep Dive" starts January 13th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-ii/