Jump to content


Photo

Api Changes


  • Please log in to reply
4 replies to this topic

#1 gangsta

gangsta

    Colonel

  • Forum Members
  • PipPipPipPipPip
  • 2,203 posts

Posted 24 January 2003 - 11:47 PM

Ok from now on I'll post these kinda things to the mailing list but I am working on CVS tonight. Anyway, I was commenting code when I came across these incorrectly named methods in the xenocide::datastorage::Base class.

getSoldiersPIN()
getEngnieersPIN()
getScientistPIN()

all these functions return a list of PINs to the calling function so the changed names are

getSoldierPINs()
getEngnieerPINs()
getScientistPINs()

This gives each function the correct meaning in english now.
Posted Image

#2 red knight

red knight

    Xenocide Project Leader

  • Xenocide Inactive
  • 3,310 posts

Posted 25 January 2003 - 03:39 AM

Ok from now on I'll post these kinda things to the mailing list but I am working on CVS tonight.  Anyway, I was commenting code when I came across these incorrectly named methods in the xenocide::datastorage::Base class.

getSoldiersPIN()
getEngnieersPIN()
getScientistPIN()

all these functions return a list of PINs to the calling function so the changed names are

getSoldierPINs()
getEngnieerPINs()
getScientistPINs()

This gives each function the correct meaning in english now.

getSoldierPINs () suggest me about a soldier with multiple PINs, maybe its my poor english...

getSoldiersPINs () suggest me about getting the PINs from the soldiers (semanticly not good, given the fact that every soldier have a unique Personal Identification Number).

getSoldiersPIN () suggest me about getting the Personal Identification Number of all the soldiers. (That's the semantic idea of the method anyway).

Greetings
Red Knight
Sourceforge Nick: flois - Federico Andres Lois
Visit my blog at: flois.blogspot.com

Posted Image

Pookie cover me, I am going in.

#3 gangsta

gangsta

    Colonel

  • Forum Members
  • PipPipPipPipPip
  • 2,203 posts

Posted 25 January 2003 - 10:55 AM

we can do getSoldiersPINs() too it probably would be better. but getSoldierPINs() can work too and means to get PINs of type Soldier. Either way it is important to have PINs in plural form to show you getting a list of PINs instead of just one. I'll change to the former since it is more specific. :)
Posted Image

#4 Guest_stewart_*

Guest_stewart_*
  • Guests

Posted 25 January 2003 - 12:07 PM

Nuts and Bolts things like this are good for the mailing list, but more general stuff should be talked about here, good call Gangsta.

#5 red knight

red knight

    Xenocide Project Leader

  • Xenocide Inactive
  • 3,310 posts

Posted 25 January 2003 - 12:23 PM

we can do getSoldiersPINs() too it probably would be better.  but getSoldierPINs() can work too and means to get PINs of type Soldier.  Either way it is important to have PINs in plural form to show you getting a list of PINs instead of just one.  I'll change to the former since it is more specific. :)

Ok then...

Greetings
Red Knight
Sourceforge Nick: flois - Federico Andres Lois
Visit my blog at: flois.blogspot.com

Posted Image

Pookie cover me, I am going in.