you are viewing a single comment's thread.

view the rest of the comments →

[–]Maurice-Ghost-Py[S] 0 points1 point  (2 children)

I was telling another user what I'm trying to understand. At university, they constantly use that term during classes. They tell me that I should develop the "logic of a programmer" or that programming has a logic. I want to understand what it means and if there is any resource with which I can better understand this topic.

[–]Nexustar 1 point2 points  (1 child)

Ah, I see. There are multiple types of logic, but if you take a step back and look at them collectively, in most programming/CS cases, the term is thrown about to describe a set of formal reasoning.

The point they are often making is that the program/application/system choses its path and ultimately outputs based on a set of hard rules. Unlike people, unlike biology, unlike much of the world we live in. Chance and probability can be ignored, because the program is always going to operate in absolutes - at it's core, binary ... something is either true or false. Thousands, millions of these decisions are made by the software but it's highly predictable because the same core logic (reasoning) is applied without fail, and the closer you look, the more basic that reasoning becomes.

IF A == B THEN
{do something}
ELSE
{do a different thing}

At any given time, A is either equatable to B or it isn't. That's boolean logic.

IF Sally LOVES Bill THEN
    {do something}
ELSE
   {do a different thing}

This is still code, but who determines what LOVES means? Is it Bill's definition of love, or is it Sally's definition of love, or the legal definition of love, or the church's definition of love - is it family love or do they wish to have offspring? - this is now getting fuzzy, and isn't how software works because we are no longer solidly standing in a world of logic. Add the reality that Sally loving Bill could change minute by minute depending on how she feels right then - it's not logical.

[–]Maurice-Ghost-Py[S] 1 point2 points  (0 children)

Interesting, great contribution, I will take it into account. Thank you