flat assembler
Message board for the users of flat assembler.

Index > Heap > readable names

Goto page 1, 2  Next

Which type of names do you think that are more readable?
Type A
35%
 35%  [ 5 ]
Type B
50%
 50%  [ 7 ]
Other
14%
 14%  [ 2 ]
Total Votes : 14

Author
Thread Post new topic Reply to topic
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Which type of names do you think that are more readable?

Type A:

getHostByName
arrayIndexOutOfBounds
nullPointerException


Type B:

get_host_by_name
array_index_out_of_bounds
null_pointer_exception

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 21 Aug 2007, 10:41
View user's profile Send private message Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
Have a look at interesting Hungarian notation article on wiki.

_________________
Any offers?
Post 21 Aug 2007, 14:23
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
i prefer B, but that is REALLY just matter of preference. More importantly, i would rather stick to standard (eg. i would use type B names for C language, and type A names for Java).

for serious programmer, this shouldn't make too much difference
Post 21 Aug 2007, 18:24
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
yeah asmfan, but I quite dislike Hungarian notation!
vid, java compiler will not give you error if you use Type B names Wink

PS: And it makes difference only when you are serious about programming !
Post 22 Aug 2007, 03:57
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Quote:
vid, java compiler will not give you error if you use Type B names

never said it will

Quote:
And it makes difference only when you are serious about programming !

that is true too Smile
what i meant was that serious programmer would rather stick to standard (of language, of existing project) than use his PERSONAL preference
Post 22 Aug 2007, 08:47
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
agreed Smile
Post 22 Aug 2007, 13:22
View user's profile Send private message Reply with quote
rCX



Joined: 29 Jul 2007
Posts: 166
Location: Maryland, USA
rCX
I use A but think B is more readable. Wink
Post 23 Aug 2007, 22:32
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
call me weird,
i preffer A combine with the "dot" .
B is okay too, but too many _ doesn't seem so nice

host.name
array.indexOutofBound
window.caption
mdiwindow.childHandle
Post 23 Aug 2007, 23:40
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
weird!
Post 24 Aug 2007, 04:49
View user's profile Send private message Reply with quote
rCX



Joined: 29 Jul 2007
Posts: 166
Location: Maryland, USA
rCX
Quote:

call me weird,
i preffer A combine with the "dot" .
B is okay too, but too many _ doesn't seem so nice

hmm... I only use dots for data types, like...

Player.x
Player.y
Player.Speed
Post 24 Aug 2007, 16:31
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Well, sleepsleep's example is exactly that, no?

I was one of the ones that voted Type A, BTW. Actually I use both, normally I use Type B for macros and Type A for variables and strucs/structs names (starting with capital letter in the latter case).
Post 24 Aug 2007, 17:01
View user's profile Send private message Reply with quote
rCX



Joined: 29 Jul 2007
Posts: 166
Location: Maryland, USA
rCX
Quote:

Well, sleepsleep's example is exactly that, no?


Embarassed Oops, I guess you're right. (Newbie moment...)
Post 24 Aug 2007, 22:16
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
my favorite is low case
like:
gethostbyname
clearbuffer
writefile

it is the simplest to write and i'm used to this so it is easy to read too
with some up cases it's kaotic
Post 02 Oct 2007, 09:29
View user's profile Send private message Visit poster's website Reply with quote
DustWolf



Joined: 26 Jan 2006
Posts: 373
Location: Ljubljana, Slovenia
DustWolf
thisTypeOfNotationIsMyFavorite

Why? Simply because if_it_were_like_this it'd never fit in my spacing in code...

Code:
firstOffsetOfSeriesB    dd      0
first_offset_of_series_Bdd      0
    
Post 02 Oct 2007, 11:31
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
I voted the "A".
But you forgot the Pascal/Camel notation. It's almost the same as the "A" type, but with the first letter in Upercase.

PascalCamel:

GetHostByName
ArrayIndexOutOfBounds
NullPointerException
Post 02 Oct 2007, 13:17
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Enko:
You said it!
It's almost the same ( so I forgot it Wink ).

DustWolf:
Nice excuse! Really!
Post 04 Oct 2007, 10:31
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 693
Location: Adelaide
sinsi
I think B is easier to read but a pain in the arse having to use the shift key - I like the idea of using a dot like get.host.by.name
Post 04 Oct 2007, 10:48
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
sinsi:
Nice excuse! Really! You too!

HowDoYouWriteThisWithoutUsingShift?
Oh, I guess you keep on toggling caps lock Shocked Wink

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 04 Oct 2007, 12:35
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 693
Location: Adelaide
sinsi
iusuallywriteitlikethis - yougetusedtoit Cool
Post 04 Oct 2007, 13:04
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
If your programming language is case insensitive, the first one might get you in trouble if you name things similarly. (Not an issue for everyone, though.)
Post 07 Oct 2007, 04:30
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.