Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Jekuuuuu!

Author
Message
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 18th Aug 2013 23:56 Edited at: 18th Aug 2013 23:57
Hello Jeku,
Have you noticed that when you implemented the code snippet syntax-highlighting (nice feature btw) you did not add // as a comment in dbp?
example:




The gluteus-maximus mammary-gland formally known as OBese87.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Aug 2013 06:43
Because using // for DB comments is user-defined in the IDE, isn't it?

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Aug 2013 14:14
Quote: "Because using // for DB comments is user-defined in the IDE, isn't it?"


Where?



Powered by Free Banners
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Aug 2013 14:28
// is C/C++ / C-like language based, even PHP and others use // for commenting whereas HTML for example is " <!-- --> "

Here is a comprehensive article on most languages...

http://en.wikipedia.org/wiki/Comment_(computer_programming)

to use // I believe the syntax here is...





Those two should be different...

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Aug 2013 17:53
Quote: "Because using // for DB comments is user-defined in the IDE, isn't it?"

Not for DBPro, it is there by default.



The gluteus-maximus mammary-gland formally known as OBese87.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Aug 2013 18:09
I personally dislike it when people use // in DBP. It's just not part of the BASIC standard, REM is the BASIC standard, but since this new way of commenting was introduced into DBP, people have forgotten that.

TheComet

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Aug 2013 18:17
I still use REM and ' when it is not so important...

I keep // for the languages it is meant for...

I can imagine the compiler having to replace // with REM and then onto something else lol

Nabz_32x
17
Years of Service
User Offline
Joined: 25th Oct 2008
Location:
Posted: 20th Aug 2013 19:05 Edited at: 20th Aug 2013 19:30
The most depressing Thing about the // comments are that the dbpro standart Compiler IDE will use it to comment a large block, when you select <comment selection>.
I would rather like the Editor to use remstart and remend for that Option

thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 20th Aug 2013 20:26
I use // for two reasons: clarity and ease of use. In my opinion // is a lot less distracting than REM. // makes a comment very clear and easy to read at first glance. I don't think REM looks as clean, it can be very distracting. my second point is that // is a lot quicker and more intuitive to type than REM - in addition, since // is the comment character for the C languages, it seems to be a more relevant standard and using // out of habit will help if I eventually switch to C#, C++, or any of the other languages that already use this commenting scheme.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Aug 2013 20:44
I agree with thenerd, finding // in code is quicker than REM however I use RemStart/End for blocks and I then use several *** to make them clear, I often use `***something*** to demark code comments as well... making them easier to locate as well...

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Aug 2013 21:42
Quote: "Because using // for DB comments is user-defined in the IDE, isn't it?"


My mistake, I thought there was an option to set the comment characters. Ignore, move along, nothing to see here...

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Aug 2013 00:04
Its not very BASIC like; but I see nothing wrong about using // or even ` instead of rem.

I never use rem; only remstart and remend; only because there is no /* */ like in loads of other programming languages.

I just don't see a logical argument that proves that there is a benefit for using the rem command; not even a trivial benefit. If there is an advantage of using the rem statement, please explain; I would like to know what it is?

Aaron Miller
20
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Aug 2013 00:15 Edited at: 21st Aug 2013 00:15
A potential advantage I see to it is the vague possibility that 'rem' might be easier to type on certain foreign keyboards... But I highly doubt that.

The only other possibility I see is that it might be more aesthetically pleasing to the people using it. e.g., it might be more consistent with remstart and remend.

Personally, I prefer to use // or ` if I code in Dark Basic. I use ` out of habit mostly as I wasn't aware of // when I started. ` is also easier for me to type anyway.

I like /* and */ for comments more than remstart and remend.

Anyway, I think that if it's not highlighted for the DBP language, it should be considered a bug.

Web - Tweets
“I'm going to punch DXGI in the face. Repeatedly.” ~Aras Pranckevicius
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Aug 2013 15:43 Edited at: 21st Aug 2013 15:44
Yeah true, it would be pleasing to some, but by no means for a technical advantage.

Consistent; yet consistently redundant and not very concise. The DOS derived command had its day, now it is the age of the front-slash.

It is kind of cute to see people using it though; especially in a Visual Basic project; quite nostalgic.

Not saying that one programmer is better than the other because of using a different comment statement.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Aug 2013 16:08
Let's turn this into a "because many believe so, it is so" discussion.

It is a fact that // is NOT the standard syntax for BASIC type languages, even if it is believed by over 80% of DBP coders.

If you go and look up what the standard is and how to use it, here's what it says (by the way, this is also stated in the DBC help files):

Commenting in BASIC

Remarks (short "rem")

You can put a REM statement alone on a line, or you can put it on a line following another statement. The REM statement must be the last statement on the line. If it follows another statement, the REM must be separated from that statement by a space.

You can use a single quotation mark (`) instead of REM. This is true whether your comment follows another statement on the same line or sits alone on a line.

NOTE:
You cannot continue a REM statement by using a line-continuation sequence ( _). Once a comment begins, the compiler does not examine the characters for special meaning. For a multiple-line comment, use another REM statement or a comment symbol (`) on each line.

Examples





Anything else is just myth and bad practice.

TheComet

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 21st Aug 2013 17:27
None of the 3D library is standard BASIC either, but that gets syntax highlighting. As if DB cares about standardisation...

make memblock
create bitmap

memblock word()
read word

mousex()
camera position x()

goto hello: print "hello"
hello:
print "hello"

if x = 1 then x = 2



The gluteus-maximus mammary-gland formally known as OBese87.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Aug 2013 18:15 Edited at: 21st Aug 2013 18:18
And comment standardization benefits you in what way?

How do you define bad practice in the context of opting out of rem statements? And what disruption to end users or collaborators do these offenders such as myself cause by not using rem statements?

I want to learn.

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 21st Aug 2013 18:32
Quote: "How do you define bad practice in the context of opting out of rem statements? And what disruption to end users or collaborators do these offenders such as myself cause by not using rem statements?"

If you give your DB code to a non-DB BASIC user, the comments wont work!



The gluteus-maximus mammary-gland formally known as OBese87.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Aug 2013 18:53 Edited at: 21st Aug 2013 18:55
Just for the record, I tend to use // for function seperators; and ` for comments; but my stomach does not permit me to write three characters that do not do anything significantly better than two or one in a 90,000 line program, there is a lot of commenting to do.

Quote: "If you give your DB code to a non-DB BASIC user, the comments wont work!"


Hmm, you are getting there, but that is still a bit thin. Why would you give DarkBASIC code to a non-DarkBASIC user in order for them to compile it with a non DarkBASIC compiler?

Are there not additional hordes of commands in the library that would not work?

I'm think on a large scale here; not quite your average DO : CLS : PRINT "HELLO WORLD" : SET CURSOR 0, 0 : LOOP : REM YIPPEE!

If your proposition was valid; then non-uppercase commands would not work; and TheComet's proposition would declare a huge percentage of all DarkBASIC snippets by the very people on this board as an occurances of bad practice.


A: REM I like to eat fish unt play wit monkey! Wayhay!!
MAKE OBJECT CUBE 1, 10
DO : TURN OBJECT LEFT 1, 1, : LOOP[/b]

B: ` I also like play with monkey and eat fish! Wayhay!!
MAKE OBJECT CUBE 1, 10
DO : TURN OBJECT LEFT 1, 1, : LOOP[/b]

C: // I too haf monkey and heat fish! Wayhay!!
MAKE OBJECT CUBE 1, 10
DO : TURN OBJECT LEFT 1, 1, : LOOP[/c]

I want to understand, I really want to know why the programmer who makes use of format A causes a significant difference in his life, over the one who uses format B and C. I really do.

Either all three examples achieve the same thing; or they do not.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Aug 2013 19:02 Edited at: 21st Aug 2013 19:10
Quote: "[quote]How do you define bad practice in the context of opting out of rem statements? And what disruption to end users or collaborators do these offenders such as myself cause by not using rem statements?"


If you give your DB code to a non-DB BASIC user, the comments wont work![/quote]

The "end user" can be anyone who views or reviews the code, and not sticking to standards can be quite disastrous.

Take this thread for instance, and just look at how many people are not using "rem" and how many aren't aware that there even is a standard. Look at them! That's the damage that has been caused. There's no question about it. Newcomers are going to inherit the habit of commenting with // instead of rem because everyone else is doing it, and they don't know any better, making the situation even worse.

I kind of understand where you're coming from when you say comments aren't a big deal because they don't affect the way code works, and the "end user" (in the sense of the person who is going to play your game) isn't going to care.

That's not the point. A standard is a standard, and it's been made a standard for a reason (namely so this exact discussion never occurs because everyone is vomiting their comments into their code all willy-nilly).

It was a failure on DBP's side to not convey this information correctly. DBC's documentation had it included, but the information has long been lost.

[EDIT]
Quote: "And comment standardization benefits you in what way?"


Discipline.

TheComet

Yodaman Jer
User Banned
Posted: 21st Aug 2013 19:21
Are we really arguing over how to make comments?

This is why we can't have nice things.

I've used both rem and //. I started doing // after learning C#; after a while, it was just a habit and it took more effort to remember to try rem as opposed to // (additionally, when I first started learning C# I kept tying rem by mistake).

Comet, I think you've forgotten that a lot of people who use // for comments probably also do a LOT of coding in Java, C, C++, C#, Objective-C and darn near every other language that supports it. That's probably why most of everyone here is saying it's fine to use it. It is fine, and yes there may be a standard, but what harm is it doing, really? You seem to be the only person here who has a slight issue with it. I understand your points of having standards, but when it's over something this trivial it just seems...pointless.

ionstream
21
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 21st Aug 2013 19:24
Good grief. If it's valid in DarkBasic Pro, then it's valid to have it highlighted. It doesn't have to be standard in BASIC in order to be valid in related languages. We're highlighting Darkbasic, not BASIC.

Yodaman Jer
User Banned
Posted: 21st Aug 2013 19:25
^ This compliments what I was attempting to convey.

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Aug 2013 19:43 Edited at: 21st Aug 2013 19:47
Quote: "The "end user" can be anyone who views or reviews the code, and not sticking to standards can be quite disastrous."


How many times has that happened to you?

You would not use my world editor or other products because I do not use rem statements? You think that because I do not use rem statements, you will not benefit from using my software;

or perhaps I am guilty of breaking even more important 'standards' because of neglecting trivial ones?

Prioritization is my weakness, rather than a strength?

Are there any matters less trivial than rem statements?

Is there enough time in a day for perfection; or do we have to make do with perfecting certain areas, and compromising others; if so then what areas need perfection; do comments?

Oh dear, looks like I've lost a customer; I had better create a rem insertion generator before the review.

Quote: "Take this thread for instance, and just look at how many people are not using "rem" and how many aren't aware that there even is a standard. Look at them! "


There is a difference between knowing the standard, and abiding by it. I see there being no evidence of the people here not knowing what the standards are.

There is also a difference between a man who abides by the standards, and the man that improves the standards. Otherwise, the word progress would not be in the dictionary.

Who could invent if we where bound by standards; we'd be having this discussion in a primitive cave with sheep skin for clothing.

Quote: "Quote: "And comment standardization benefits you in what way?"

Discipline."


What kind of benefit is that? You are disciplined in writing more code?

Anyway I suppose I'm not going to get the answer I do not think exists.

Quote: "That's not the point. A standard is a standard, and it's been made a standard for a reason (namely so this exact discussion never occurs because everyone is vomiting their comments into their code all willy-nilly).

It was a failure on DBP's side to not convey this information correctly."


I respect your views, but in a similar light to what Yodaman Jer was saying, better get the priorities right or by the time you grow old you may realize that a certain standard did really do much good for you after-all; time and energy being spent on sticking to the standards could have been spent being good at something more crucial to the ever changing world in a financial disrupted climate.

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 21st Aug 2013 20:00 Edited at: 21st Aug 2013 20:02
Quote: "Why would you give DarkBASIC code to a non-DarkBASIC user in order for them to compile it with a non DarkBASIC compiler?"

Exactly, you wouldn't.

@comet — Everyone learns that REM is a way to comment in BASIC, it's just that // is an alternative in DBP that some find more convenient. No DBP user is going to be confused by a REM statement.



The gluteus-maximus mammary-gland formally known as OBese87.
Aaron Miller
20
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Aug 2013 20:02 Edited at: 21st Aug 2013 20:02
TheComet, DarkBasic is not standard Basic. Your argument is invalid.

Web - Tweets
“I'm going to punch DXGI in the face. Repeatedly.” ~Aras Pranckevicius
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Aug 2013 20:05
I don't care what commenting convention other languages have. I've never been confused by such a thing when reading code from other languages - all my problems relate to the other stuff such as this:



(taken arbitrarily from the first C++ code I could find).

I'd guess that 99.9% of non C++ coders would be able to identify the comments in that code - even those who've only seen comments in .x files.

Similarly, I couldn't care less what other coders use in DBPro.

It would be nice for the forum code boxes to recognise the same code that DBPro itself recognises. Then everyone, except possibly TheComet, would be happy. Simples.



Powered by Free Banners
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Aug 2013 20:11 Edited at: 21st Aug 2013 20:12
Quote: "TheComet, DarkBasic is not standard Basic. Your argument is invalid."


Go look up commenting in the DBC help files.

Quote: "Oh dear, looks like I've lost a customer; I had better create a rem insertion generator before the review."


I'm not saying that, I'm just saying you should be aware of the consequences of breaking a standard (newcomers and other programmers may take your commenting style on board).

I don't care how you comment your code if it's good, well thought through code. I just want you to be aware.

This discussion could also be about why even bothering to comment code at all, the end user never sees it anyway. It's the same argument with the same answer: because it's a bad habit.

Quote: "There is a difference between knowing the standard, and abiding by it. I see there being no evidence of the people here not knowing what the standards are."


If you know a standard, what motivates you not to abide to it?

Quote: "What kind of benefit is that? You are disciplined in writing more code?"

Quote: "I respect your views, but in a similar light to what Yodaman Jer was saying, better get the priorities right or by the time you grow old you may realize that a certain standard did really do much good for you after-all; time and energy being spent on sticking to the standards could have been spent being good at something more crucial to the ever changing world in a financial disrupted climate."


I should have elaborated more. These two quotes are closely related.

Basically, disciplining yourself to abide to extremely simple things such as correct, detailed comments, indenting your code correctly, giving your variables useful names, using camel-case syntax for variables etc. has an effect on your overall programming discipline.

Are you not indenting your code because there are higher priorities to be concerned about?
Have you decided to use variables such as a, b, c, d instead of useful names because there are higher priorities to be concerned about?

Of course not! (I hope not, at least).

So why should correct comment syntax be any different?

------------------------------------------------------------------------

ABOVE ALL, no matter how you comment, it's essential you're being consistent. Chris, you said you comment with // for separating functions and ` for comments. You have a system you're sticking to, and you're not using different syntax at random times. Fair enough.

Just for the record, I can type "rem" faster than "//" because the keys are far more convenient.

TheComet

Aaron Miller
20
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Aug 2013 20:24
Quote: "Go look up commenting in the DBC help files."

In the case of DarkBasic, the standard is clearly not the documentation. (Rather the implementation; the compiler.) I also was referring to DarkBasic informally as DarkBasic Professional, not Classic.

Web - Tweets
“I'm going to punch DXGI in the face. Repeatedly.” ~Aras Pranckevicius
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Aug 2013 21:47 Edited at: 21st Aug 2013 21:56
OK I had better answer the questions for the benefit of those deciding what side to choose.

Quote: "I'm just saying you should be aware of the consequences of breaking a standard (newcomers and other programmers may take your commenting style on board"


OK, that pretty much cancels out the logical argument about standards and improvements. So we could not agree along those lines; fair enough, newcomers will/may take my commenting style and board, so it is a bad thing for them.

I had better stop posting code that breaks the International-Code-Commenting-Standards-Constortium of BASIC programming society, otherwise newcomers will break the standard.

Quote: "If you know a standard, what motivates you not to abide to it?"


Consequences; circumstance, limitations; that sort of thing. You know, benefits.

Some of examples of standards, and what motivates me to not abide by them:

So what motivates me to break standards..

Based on programming

Thou shall use industry standard C++ for games-development

Flip-that; I want to use DarkBASIC.

Thou shall declare integers with the AS clause

Flip-that; anyone reading my variable names and comments will know what datatypes they are.

Thou shall use boolean variables; for storing boolean values

I'd love to but why the heck do booleans take up so much memory? Flip that!

Thou shall use uppercase, no; thou shall use CamelCase

I will use what ever case has been designated to symbolize what ever namespace or department in my organization in what ever source file I see fit for a given purpose seldom without benefit to the observer.

Thou shall use industry standard content production tools such as Adobe CS

Flip-that; I want to use Blender and the GIMP (OK I actually prefer Photoshop.)

Thou shall use the Then keyword with one chunk of code

Not even Lee Bamber abides to that standard.

Based on computing

Thou shall install standard software solutions
Err, yeah right?

Thou shall use the standard Windows internet browser
Err, yeah right?

Some standards are often broken freely that I tend to abide by


Thou shall not use GOTO commands loop control
Damn right!

Washing of hands, after using the toilet
Damn right!

Quote: "
I can type "rem" faster than "//" because the keys are far more convenient."


Good for you; so can I when both hands are on my keyboard; but you can't beat me in a race typing `

Quote: "Basically, disciplining yourself to abide to extremely simple things such as correct, detailed comments, indenting your code correctly, giving your variables useful names, using camel-case syntax for variables etc. has an effect on your overall programming discipline."


And how does the rem statement play a significant part in that sentence?

Why isn't the word REM in that sentence, highlighted is every other principle known to man assumed to be misunderstood;

maybe, just maybe you did not include it because you deep down know that it is trivial; it is just somebody told you that you must use it or face breaking the standards; direct me to that person so I can have a go at him lol

Anyway, who cares. I've still got above average coding, name variable and commenting standards; loads of new comers have limited issues understanding my snippets.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Aug 2013 21:59 Edited at: 21st Aug 2013 22:02
Quote: "In the case of DarkBasic, the standard is clearly not the documentation. (Rather the implementation; the compiler.) I also was referring to DarkBasic informally as DarkBasic Professional, not Classic."


This quote basically states that the use of non-indented camel-case commands utilizing goto statements instead of loops is ok, just because the compiler allows it.



I would assume DarkBASIC Pro is an official predecessor of DarkBASIC Classic, which abides to the standard BASIC syntax.

@ Chris

That rage post was... beautiful.

Quote: "maybe, just maybe you did not include it because you deep down know that it is trivial; it is just somebody told you that you must use it or face breaking the standards; direct me to that person so I can have a go at him lol"


Of course it's trivial!

I didn't include it because I was comparing it to other standards and trying to emphasize that REM is no different to these standards.

Anyway, you know my view on this subject, and I've said everything I'd like to say about it. I'll leave it at that.

TheComet

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 21st Aug 2013 22:07
Quote: "This discussion could also be about why even bothering to comment code at all, the end user never sees it anyway. It's the same argument with the same answer: because it's a bad habit."

But comments aren't for end users, they are for other coders/the same coder (aka you).



The gluteus-maximus mammary-gland formally known as OBese87.
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 21st Aug 2013 22:31
I just see two clear choices:

-REM, a longer, less visually attractive commenting scheme which is only used in BASIC, a deprecated language

OR

-//, a clean commenting scheme used by the C languages (an industry standard)

Maybe // isn't the standard for BASIC, but it is for a lot of the programming industry so I don't think it's fair to say using // is teaching bad practice.

swissolo
16
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 21st Aug 2013 22:59
Wow you guys sure are throwing down here. Simply put I always use // or occasionally ` because I find REM to be ugly. Its characters distract from the actual comment. End of story.

Aaron Miller
20
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Aug 2013 23:26
Quote: "I would assume DarkBASIC Pro is an official predecessor of DarkBASIC Classic, which abides to the standard BASIC syntax."

The results of my research are contrary to that.

"Where Can I Find A Quick Reference For Standard Basic?" revealed "Dartmouth Standard Basic" is an implementation of the original standard basic, for the most part.
http://bitsavers.informatik.uni-stuttgart.de/pdf/dartmouth/BASIC_Oct64.pdf is the reference manual for Dartmouth (circa 1964).

Here's an example directly from that manual, showing the syntax.


Additionally, here's an example for defining functions.


Now, let's consider some other Basics around today. There's FreeBasic, Blitz3D, Visual Basic, etc... These all have vastly different syntaxes. Sure, "REM" is still a comment marker in all of them, but the code, at the core level, is going to be vastly incompatible. Considering that syntax portability is often not a goal of most Basic programmers, we can conclude that comment syntax portability is also often not a goal. If best practices are defined as "the highest valued common goals," then we can further conclude that comment syntax is not the goal.

Web - Tweets
“Typing is no substitution for thinking.”
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Aug 2013 00:43
Quote: "ABOVE ALL, no matter how you comment, it's essential you're being consistent."


Why is it essential?

I usually use ` but sometimes you'll see // or even rem creeping in. Do I detect a case of OCD here?

OCD

This bit especially:

Quote: "Most people with obsessive-compulsive disorder (OCD) fall into one of the following categories:
◾Washers are afraid of contamination. They usually have cleaning or hand-washing compulsions.
◾Checkers repeatedly check things (oven turned off, door locked, etc.) that they associate with harm or danger.
Doubters and sinners are afraid that if everything isn’t perfect or done just right something terrible will happen or they will be punished.
◾Counters and arrangers are obsessed with order and symmetry. They may have superstitions about certain numbers, colors, or arrangements.
◾Hoarders fear that something bad will happen if they throw anything away. They compulsively hoard things that they don’t need or use.
"




Powered by Free Banners
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Aug 2013 00:59
Quote: "OCD"


Oh come on, that's not OCD. You should recognize a purist when you see one.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Aug 2013 01:35
I guess I should.



Powered by Free Banners
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 22nd Aug 2013 02:09
I tend not to use rem simply because it is textual and gets in the way when reading the actual comment that follows after it.
I did use ` for a long while, and I still do to temporarily out-comment things, but as many others have pointed out, // is so standardized that it just feels natural. And why make it harder on yourself than you have to with thinking about different commenting tokens?

I admit to being greatly more enervated by code looking like this, that can be found quite frequently posted around these forums:


Spacing and intendation far supercedes the choice of commenting symbols in my book; as I hope people see (yet it seems doubtful if everyone does) that code is very hard to read compared to what it could be.
Of course it's up to personal preference, but this kind of standardization is actually very helpful when it comes to having others look at your code / collaborate on writing it.


"Why do programmers get Halloween and Christmas mixed up?"
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Aug 2013 02:16
Jekuuuuuuuu still hasn't fixed it.



Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 22nd Aug 2013 02:29 Edited at: 22nd Aug 2013 02:38
@Comet — I knew you were a fat cartoon cat all along! Where did you get that? The crazy jittering avatar is a bit annoying tbh.
In response, I have gone... Full Manatee!



The gluteus-maximus mammary-gland formally known as OBese87.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 22nd Aug 2013 02:43 Edited at: 22nd Aug 2013 02:53
Worst than anything is the habit of posting huge chunks of code without code tags. As if [Post Message] was the only button available...

sync on
sync rate 60
player=1
wall1=2
wall2=3
wall3=4
wall4=5
enemy=6
make object sphere player,1
make object box wall1,10,2,2
make object box wall2, ...
do
position object player,object position x(player)+upkey()-downkey(),object position y(player),object position z(player)+rightkey()-leftkey()
position camera object position x(player),object position y(player)+20,object position z(player)-40
point camera object position x(player),object position y(player),object position z(player)
if something>Otherthing
DoIt(1,2.9,"test")
myfunc()
else
DoItAnyway(1,2.9, "test")
endif
sync
loop

Ironically sharing a resemblance the official example code!

I always remember my first day using DarkBASIC reading the documentation; there was something peculiarly unin-FORMAT-ive about those examples.

As a learner, did anybody actual understand what was going on with the 3d Maths example? Don't act like you do not know which one I am talking about; I still do not get the purpose of it or what it was supposed to teach me?

How is a new learner supposed to learn anything about such an abominable series of expressive-less command calls in an instantaneous terminal program?

I had nightmares about that particular code example, it scared me off of learning some of the most arguably important commands for motion graphics.

I am a fan of the Dark Source library; it really helped me. I suppose that 3d maths example was used to convince me to buy the real stuff.

Ortu
DBPro Master
18
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 22nd Aug 2013 06:01
I use ` for quick 'informal' comments.
I'll use REM for more important 'formal' comments.
` SOME HEADING --------------------------------- to block out sections

I don't use // in darkbasic pro because honestly I didn't know it was valid syntax in the language until a few months ago and it still just feels weird. I have no problem with it being used though.

I'm gonna be king of the moon dots!
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Aug 2013 12:34 Edited at: 22nd Aug 2013 14:18
Quote: "As a learner, did anybody actual understand what was going on with the 3d Maths example? Don't act like you do not know which one I am talking about; I still do not get the purpose of it or what it was supposed to teach me?"


I'm from the DBC days, the documentation back then was astoundingly good and helpful. But yeah, the DBP documentation is almost worst than documentation for some SMPS transformers.

@ Libervurto - You were working on improving the DBC docs, right? How is that project progressing? It'd be cool to incorporate DBP into it as well, I'm sure it will help newcomers a lot.

(I'll change the jittery avatar when I get home)

[EDIT] This is somewhat relevant: http://thedailywtf.com/Articles/Coding-Practices-MUST-Be-Followed.aspx

TheComet

Login to post a reply

Server time is: 2026-07-03 09:54:13
Your offset time is: 2026-07-03 09:54:13