Go Down

Topic: Opine: Shift key shouldn't be used to program (Read 3409 times) previous topic - next topic

pert

The words spelled as they are in the sentence are no more computer code than a store sign that says price = $1.00 is computer code.

The OP's whole point is to blow off the use of capitals. Is there Boolean True, true and TRUE that are the same? Only if you define them to be so and then you have define anything to be "I Haz".
I'm really surprised this could be a controversial subject. The function returns true or false. The function does not return True. There is only one valid way to write the boolean literal true. The words true and false in that sentence are absolutely code.

By your logic we should also capitalize function names if they occur at the start of a sentence: "DigitalWrite() can be used to...". That would be just as wrong as capitalizing true.

GoForSmoke

By my logic, code words in English sentences are not code. Capitalize that.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Henry_Best

By my logic, code words in English sentences are not code. Capitalize that.
Yes. As I originally said, all English sentences begin with a capital letter. There are no exceptions.

pert

You're both saying you also believe digitalWrite() should be capitalized if it is the first word in the sentence?

allanhurst

#49
Feb 12, 2018, 12:25 am Last Edit: Feb 12, 2018, 12:27 am by allanhurst
What are you all arguing about?

Programming languages are a special construct for precise purposes - not at all the same as natural spoken languages.

There is a precise version of natural language -  it's called a legal document. That's pretty hard for a non-specialist to understand as well.

Allan

CrossRoads

"There are plenty of exceptions." he said to to me.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Henry_Best

#51
Feb 12, 2018, 02:36 am Last Edit: Feb 12, 2018, 02:39 am by Henry_Best
if the first is a number?
Quote
1 cat sits in the window.
That would be 'One cat sits in the window.'
Ten green bottles, etc., etc.

GoForSmoke

You're both saying you also believe digitalWrite() should be capitalized if it is the first word in the sentence?
That's because English sentences are NOT source code so it doesn't matter if the D is capitalized.

When you write in loosy languages, you write with loosy rules and you get what has to be interpreted on a per-reader basis.

Code: [Select]

#define TROO 1


There. Now it's all caps, funny spelling and yet TROO becomes usable as code since it is solidly defined as one constant.

Underneath it is all opcodes and binary data. Fool yourself all you want with WhatWouldEnglishDo, it don't do code!
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

GoForSmoke

What are you all arguing about?

Programming languages are a special construct for precise purposes - not at all the same as natural spoken languages.

There is a precise version of natural language -  it's called a legal document. That's pretty hard for a non-specialist to understand as well.

Allan
It's pretty hard to understand how many people are falsely convicted of crimes on the basis of bullshit legal documents.

What do you call a lawyer with an IQ of 50? Your Honor.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

pert

That's because English sentences are NOT source code so it doesn't matter if the D is capitalized.
It absolutely does matter to the beginner trying to use that documentation. I think making documentation user friendly should always take precedence over blindly following English language rules.

ChrisTenone

Clarity should always be the goal of written material, especially if it is instructional.

I think the point is, don't start a prose sentence with a code word that isn't capitalized. Even if it means using a couple extra words. If you are writing about code, consider using a different font for something like digitalWrite.
I'm not disparaging the differently abled. I'm stating the fact that thirty years of junior college has made me mentally retarded.

GoForSmoke

Or they can learn to look up full and proper syntax of every command and literal they are not fully familiar with, a very good way to learn code and not be scatterheads.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

GoForSmoke

Clarity should always be the goal of written material, especially if it is instructional.

I think the point is, don't start a prose sentence with a code word that isn't capitalized. Even if it means using a couple extra words. If you are writing about code, consider using a different font for something like digitalWrite.
Buu buuu buuu but maybe code words should only ever be -in- complete compiled and tested code examples so buu buuu beginners won't ever see code words improperly used and try to do the same.

Just treat em all like Evergreen students, through interpretive dance and feelies.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Robin2

through interpretive dance and feelies.
Aren't "feelies" what are getting the politicians and business leaders into hot water at the moment ?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

GoForSmoke

Look up Evergreen College and the fun they had last year.
Muh Feels! Muh Feels! Muh Lived Experience Knows ALL! Oh, Muh FEEEEELZ!

The insane left has just about met the insane right here, and both are wannabe totalitarians.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Go Up