Jump to content

  • Log In with Google      Sign In   
  • Create Account

l0calh05t

Member Since 16 Dec 2000
Offline Last Active Today, 01:44 AM

Posts I've Made

In Topic: Do you usually prefix your classes with the letter 'C' or something e...

08 June 2016 - 02:24 PM

 

Actually, m_ for members and g_ for globals helps quite a bit while reading a lot of unknown code.


The problem is that this kind of convention is brittle. It encodes information about scope into the variable name, but if you refactor to change scope the encoding is wrong and the variable must be renamed.  Forget or neglect to rename the variable and now you've got misleading information.

 

A far more robust convention is to require the use of this-> for members and to require full namespace naming for globals.  The compiler can then help you by catching incorrect usage.  In an ideal world C++ would have had these requirements from the outset.

 

this, a thousand times this (pun absolutely intended). I sometimes wish c++ had gone the same route as python or rust with an explicit self/this parameter. which could also enable things like templates based on the reference qualifiers of the object.


In Topic: short making of animations for my game - mocap system in livingroom

24 May 2016 - 05:18 AM

What kind of (low cost?) mocap system are you using there? How much post-processing (smoothing jitter and other cleanup) was required?


In Topic: Any good ideas on how to get the "ideal line" of a track?

15 April 2016 - 05:12 AM

You could have a look at this PhD thesis https://stacks.stanford.edu/file/druid:zn992vv3694/Theodosis_thesis-augmented.pdf


In Topic: Naming conventions, software documentation and version control

29 March 2016 - 03:25 AM


Simple. They find className.doSomeThing() more readable than class_name.do_some_thing().
That's it, and it's a perfectly valid reason.

 

IMO it is the opposite. But to each their own. Personally I think in many cases it was just "inherited" from the Java coding standard, because that was one of the most popular/well known of the codified standards.


In Topic: Wheel camber angle

24 March 2016 - 06:49 AM

the change in camber angle will depend on the type/geometry of the suspension. it is generally not linear.


PARTNERS