Code - (Programming|Computer) Language
If you have ever studied a second language yourself and then tried to use it outside the classroom, you know that there are three things you must master:
- how the language is structured (grammar),
- how to name things you want to talk about (vocabulary),
- and the customary and effective ways to say everyday things (usage).
Too often only the first two are covered in the classroom, and you find native speakers constantly suppressing their laughter as you try to make yourself understood. It is much the same with a programming language…. Grammar and vocabulary are properties of the language alone, but usage is characteristic of a community that uses it….the customary and effective ways to structure your code. G. L Steele Jr in Effective Java (2nd Edition)
The limits of my language mean the limits of my world. Ludwig Wittgenstein Tractatus Logico-Philosophicus (1922)
Table of Contents
1 - About
For natural language, see (Natural|Human) Language - Text (Mining|Analytics)
A program, often referred to as source code or just code, is a set of special instructions that tell the computer what tasks to perform.
The rules for valid format and combinations of instructions is called a computer language, sometimes referred to as its syntax (or grammar), much the same as English tells you how to spell words and how to create valid sentences using words and punctuation.
- static languages
Code is read far more than it's written
It's extremely easy to read:
- and explicit code.
With code reuse, your lines of code will start to shrink.
If you encounter a frustration or an unexpected behavior of a language feature, your response should be to add it to the blacklist.
2 - Articles Related
3 - Grammar
Programs are just collections of statements. A statement are made up of one or more token that performs a specific task. This statement tokens made one or more expressions.
The following expressions are the basis building block of any language:
- variables to store data (aka state) during your program’s execution.
- types to defined the type of actions on your value (like math on numbers or output with strings)
- conditionals flow like if statements to make decisions.
- loops to repeat tasks until a condition stops being true.
- functions or class to organize your code into logical and reusable chunks.
- operators to perform basic known operation on value.
- comment to document the code.
The definition on how you write of all this building block is called a grammar.
4 - Static vs Runtime
Our intellectual powers are rather geared to master static relations and that our powers to visualize processes evolving in time are relatively poorly developed. For that reason we should do (as wise programmers aware of our limitations) our utmost to shorten the conceptual gap between the static program and the dynamic process, to make the correspondence between:
- the program (spread out in text space)
- and the process (spread out in time)
as trivial as possible. Dijkstra (1968) - A Case against the GO TO Statement
5 - Turing tarpit
A Turing tarpit (or Turing tar-pit) is any programming language or computer interface that allows for flexibility in function but is difficult to learn and use because it offers little or no support for common tasks.
6 - Documentation / Reference
- Simpson, Kyle. You Don't Know JS: Up & Going (p. 28). O'Reilly Media.