Why are programming languages different from natural languages?

Prelude

  • for languages using another alphabet (so, in my case, a non-latin alphabet), the unique characters, kanjis, etc.
  • how the language works: the syntax, the grammar, the verbs tenses and other particularities in the language structure
  • lots and lots of vocabulary!

Programming languages are about structure

By the way, xkcd seems to share my view on this, according to his “Formal languages” comic strip… :) (https://xkcd.com/1090/)
Get the list of groceries
FOREACH item in the list
IF you don't have it yet
THEN Take the item
ELSE
Skip the item
Smile to the cashier
Pay the required amount

Are developers a unique kind?

Programming is a bit like a game of Tetris. In this puzzle game, you play with a limited number of possible pieces: it is up to you to create the best structure from this small set of “keywords”! Developers often think of coding like a puzzle to solve with the toolkit at their disposal.

So, are words meaningless in computer science?

The quarrel of comments: structure versus freedom

  • some programmers advocate for it: comments are not as constrained and can therefore be used to make the developer’s intention more explicit, to warn readers of specific choices or even to remind your future self of why you did things that way
  • others cynically say that the code should speak for itself and that if it’s not clear just by looking at the instructions, then your logic is too hard (or flawed) anyway

From Bloom filters to NLP AI models

  • “Bob” is a person, the subject that performs the action
  • “is eating” is the action currently being performed
  • “an apple” is the object of the action, it is what the subject is working on, so to speak
From: http://www.contrib.andrew.cmu.edu/~dyafei/NLP.html#

To conclude…

  1. Google App Maker: https://developers.google.com/appmaker
  2. OpenAI’s website: https://openai.com/
  3. Dr. M. J. Garbade, “A Simple Introduction to Natural Language Processing” (https://becominghuman.ai/a-simple-introduction-to-natural-language-processing-ea66a1747b32), October 2018. [Online; last access 21-September-2020].
  4. I. Wikimedia Foundation, “Kanji” (https://en.wikipedia.org/wiki/Kanji), September 2020. [Online; last access 21-September-2020].
  5. I. Wikimedia Foundation, “Bloom filter” (https://en.wikipedia.org/wiki/Bloom_filter), September 2020. [Online; last access 21-September-2020].
  6. I. Wikimedia Foundation, “Turing test” (https://en.wikipedia.org/wiki/Turing_test), September 2020. [Online; last access 21-September-2020].

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store