» 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

~2h ago

joreg: PSA: This wednesday 11pm vvvv.org will be moving servers. If everything goes according to plan we should be back within a few hours.

~10h ago

joreg: Also as every 2 weeks: This Tuesday: Free introduction to the all-new #vvvv: free-vvvv-intro-workshops-this-summer-in-berlin followed by the regular vvvv meetup

~11h ago

skyliner: anyone at usbynight?

~12h ago

joreg: Reminder: This wednesday in #berlin: Getting Started with Data Visualization: https://nodeforum.org/announcements/workshop-getting-started-with-data-visualization/ vvvv #creativecoding #dataviz

~3d ago

joreg: @eglod vvvv is international! wenn du hilfe auf deutsch brauchst, dann komm am besten in unseren deutschen chat: https://riot.im/app/#/room/#vvvv-at:matrix.org

~3d ago

eglod: In allen möglichen Sprachen gibt es VVV. V4 ist deutsch, warum nicht in deutscher Sprache. eglod

~3d ago

eglod: In allen möglichen Sprachen gibt es VVV. V4 ist deutsch, warum nicht in deutscher Sprache. eglod

~4d ago

joreg: Reminder: First #vvvv meetup in #hamburg this friday: vvvv-hamburg-meetup-1 Hope to see some of you there!

~7d ago

AKa-visuals: Hi guys. Everyone guess when xenko engine would be avaliable to play around in vl ... Isnt?