Go Down

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

mattlogue

I'll Whine I suppose later in bar sport. Here is a copy and paste from REFERENCE

Returns
True or false.

See the problem?

Reference > Language > Functions > Communication > Serial
serial

No caps on that s header

I'm mad, because True isn't, TRUE isn't, but true is, yet high isn't and HIGH is. That, to me, is inconsistent. How is TRUE any different type of symbolic reference class from HIGH? I want discussion and I have it. Therefore, despite my ignorance, the post isn't without it's own merit.
Just because I live in the states don't mean I care


Henry_Best

I'll Whine I suppose later in bar sport. Here is a copy and paste from REFERENCE

Returns
True or false.

See the problem?
All English sentences should begin with a capital letter.

allanhurst

#33
Feb 09, 2018, 12:58 am Last Edit: Feb 09, 2018, 11:18 am by allanhurst
I had to use Relay Ladder Logic  years ago for a project on a PLC.

That certainly twisted my brain till I got the idea....   


I've used Pascal, but you need  loads of little assembly bits to deal with i/o....


Perhaps PL/M, RTL/2, FORTRAN etc should be passed over in silence - but they did the job.


Whatever it takes, and what you've got handy and are familiar with.

Allan

pert

Since a link was not forthcoming, I did some searching for the incorrect reference page. Google doesn't make this easy but I did discover some pages with a similar issue and reported them here:
https://github.com/arduino/ArduinoCore-arc32/issues/584
However, I didn't find a page with the exact wording "True or false." so I believe there is still an outstanding page with the incorrectly capitalized true. @mattlogue, I'd still appreciate it if you would post a link to where you found that so I can try to get it fixed.

All English sentences should begin with a capital letter.
No, not in this case. You don't capitalize code. true != True.

GoForSmoke

The words that work have all been defined. You can define more.

What -doesn't- work in programming are Robert's Rules of Order or The Little, Brown Book. Those are for writing English, a loose language made for loose minds to exchange loose ideas with. If it could be used for programming, it would have already.

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.

ardly

...English, a loose language made for loose minds to exchange loose ideas with. If it could be used for programming, it would have already....
The world is not black and white it is probabilistic and chaotic. Our main computer languages are exacting and precise but to solve some tasks fuzzy logic, neural nets etc. are being turned to. In future I expect we will communicate with AIs (program them) using English or perhaps a language developed by an AI but I bet that language will be capable of ambiguity because the real world is ambiguous.
"Facts do not cease to exist because they are ignored" - Aldous Huxley

GoForSmoke

Hope you're going to be happy with ambiguous results then. Or just the same old same old as one size fits all.

Don't expect garbage to turn into anything but garbage.
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.

ardly

...Don't expect garbage to turn into anything but garbage.
Agreed Garbage In Garbage Out, but if the input is valid then there can be several different ways to process it and get useful output.

Hope you're going to be happy with ambiguous results then. Or just the same old same old as one size fits all.
It is our current programming languages that really only deliver "one size fits all" results.
That is absolutely perfect for calculations, production line control and so on where you can precisely specify the problem but that is not always easy to do.

When I started programming I wrote my code with great attention to detail, making sure every character was correct, just because it took so long to get the results back from a compile. Now I throw in pretty scrappy code, get the compiler results back instantly, and then tidy up the errors. I can spend more time concentrating on the program rather than the syntax.

I think that is analogous to how computer languages might develop.

Imagine an AI that can communicate in, say, English, but has a vast data store and high speed brute force processing power.

You give it your rather vague requirements. Perhaps not as vague as some of the questions raised on this forum :)
It quickly responds pointing out key ambiguities in your requirements (compile errors) and giving you several possible solutions ranked by how AI matches them with your requirements. You pick the best fit, clear up some of the ambiguity and iterate towards a final solution. The end result is not ambiguous and not one size fits all.

"Facts do not cease to exist because they are ignored" - Aldous Huxley

Henry_Best

No, not in this case. You don't capitalize code. true != True.
That's code, not a plain English sentence, as was quoted.

Robin2

Imagine an AI that can communicate in, say, English, but has a vast data store and high speed brute force processing power.

You give it your rather vague requirements.
Like a regular Google search ?

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

pert

That's code, not a plain English sentence, as was quoted.
The words true and false in the quoted sentence are Boolean literals returned by a function, definitely code.

ChrisTenone

It depends on what your definition of code codes to.
Atmosphere carries combustion vapors to places where they will do good instead of harm - Mike Faraday's 'History of a Candle': https://www.youtube.com/watch?v=6W0MHZ4jb4A

Whoops ::)

GoForSmoke

Agreed Garbage In Garbage Out, but if the input is valid then there can be several different ways to process it and get useful output.
It is our current programming languages that really only deliver "one size fits all" results.
That is absolutely perfect for calculations, production line control and so on where you can precisely specify the problem but that is not always easy to do.

When I started programming I wrote my code with great attention to detail, making sure every character was correct, just because it took so long to get the results back from a compile. Now I throw in pretty scrappy code, get the compiler results back instantly, and then tidy up the errors. I can spend more time concentrating on the program rather than the syntax.

I think that is analogous to how computer languages might develop.

Imagine an AI that can communicate in, say, English, but has a vast data store and high speed brute force processing power.

You give it your rather vague requirements. Perhaps not as vague as some of the questions raised on this forum :)
It quickly responds pointing out key ambiguities in your requirements (compile errors) and giving you several possible solutions ranked by how AI matches them with your requirements. You pick the best fit, clear up some of the ambiguity and iterate towards a final solution. The end result is not ambiguous and not one size fits all.


I made most of my money writing expertise into systems. Often I had to become "the expert" and invent the system that worked.

Most of the first expert programs I knew and even the first I wrote to spec are Q&A designed to get problems slotted down to a known problem and solution. I've made much more sandbox-approach programs since but at heart they work the same.

I have yet to see an AI that can get out of its own box of rules. There has to be programmers to make new rules for new situations. It's not there yet and I for one don't want to see humanity turned into the domesticated, dependent pets that people will if they have do-it-all-for-you AI's.
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

The words true and false in the quoted sentence are Boolean literals returned by a function, definitely code.
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".
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