What is programming logic and computational thinking?

Asked

Viewed 527 times

25

Lately I’ve been looking at some programming courses and I’ve noticed that they talk about a lot of things like frameworks and tools and focus little on the language itself, and that’s led me to question something about programming logic, and one basic question that came to me on this path was about computational thinking.

I have not found any course that addresses this in a way that is not superficial, let alone books (I haven’t found any more I think you should have) about computational thinking and logic.

Therefore, I would like these doubts to be resolved.

Doubts

  1. What would be this such of programming logic and computational thinking?
  2. What relationship does one have with another?
  • 6

    I hope that good answers come and not achismos (which will be properly negative). The theme is too good to be wasted.

  • That’s a great question. However, it opens space for answers of the type 'achismo' (which I do not think wrong, since the question gives loopholes for subjective answers). We should not encourage and influence good responses on the basis of the threat. The negativity will happen naturally on the part of those who do not like the answer or the question. It is only my humble opinion.

  • @Jason-Theinternship. any question you can answer oriented to achism ;)

  • 1

    @cat, yes. Only for some this is synonymous with negativity.

  • ... But not all questions make room for answers based on achism. For example: How much is 1 + 1 ? For this question there is only one answer. The guy might even answer that it’s not 2. He would try to argue a lot. But in the end the vast majority of people know the right answer.

  • 6

    @Jason-Theinternship. has a question that is only achism, then we close. There is a question that is "exact". And there are the ones that are "good subjective", that are treated in that post. In these cases, it is enough to deny what comes with a problem. About negativation, it is not a threat, it is part of the model of the site. I as a user (mod has no voting privilege) descend the negative into crap if the person does not tidy up, which is to help people who come here to learn. Who offends with negative did not understand the model of the site (nor should participate in serious thing to start conversation).

  • 6

    But one thing is basic and by the time I have website I can talk with ease. The people who really make the good part of the site have no problem with the model of negativizing wrong and positive (and even reward) good thing.. Usually who creates a lot of case here and the goal has "rap sheet", is user who does not think of the collective (I would say about 80% of cases). But I’m not going to dwell any longer on the comments because I’m starting to get a lot off the topic, I’ve dealt with the negatives and the problematic staff here at the finish line and in other posts.

  • Okay, Bacco. I get it. So there can be answers and subjective questions (which is still an achism), as long as they’re good. Great. I understand your discretion to close questions, but don’t forget to at least look again to see if the user edited. Other than that, I have nothing to complain, my opinion has already been given and no truth is absolute.

  • ... Like you, I also lower my finger on the negative when I see answers or questions with arrogant and arrogant content, which run out of context. For me, arrogance and arrogance are also criteria.

  • 6

    @Jason-Theinternship.your vote, your rules. (as long as it does not violate the rules of the site, of course - there are those of the site, which is not a "public service", or whoever is not content with the rules can find another place or make a site "better" kk :)

  • Look at the irony, Baccão. kkkkkkkkkkkkkkkk.

Show 6 more comments

5 answers

15

Look, this question is very deep and the answer can be exhaustive, let’s try to summarize it in a way that is quite complementary:

Do you know or have heard of Assembly?

I’ll put a little bit of code in here, it might be fun:

MOV AH,01h      ;Função 1 do DOS (leitura de caractere)
INT 21h         ;lê 1o caracter, retorna código ASCII ao registrador AL
MOV BL,AL       ;move o código ASCII para o registrador BL por enquanto
INT 21h         ;lê 2o caracter, retorna código ASCII ao registrador AL
                ;--- Impressão dos 2 caracteres, na ordem invertida ---
MOV AH,02h      ;Função 2 do DOS (escrita de caractere)
MOV DL,AL       ;move o código ASCII do 2o caractere lido p/ DL
INT 21h         ;imprime o caractere cujo codigo está em DL
MOV DL,BL       ;move o código ASCII do 1o caracter lido p/ DL
MOV AH,2h       ;função 2h, imprime caracter
INT 21h         ;imprime o caractere cujo codigo está em DL

This excerpt (which can be found in the UFES booklet) shows how to write a code that enters with two characters and prints the same in reverse order.

What happens here is basically an assimilation to the human brain, of how things are allocated, in the computer it is necessary to indicate directly (point out exactly where information will be allocated in memory), computational thinking is this and, if you stop to think, is something very limited and gives the impression that the machine is an extremely dumb thing... And that’s exactly it, she’s!

That’s where programming logic comes in.

In programming logic, when we go to higher-level languages, we are offered conditions that abstract these numerous and complex cases of machine language, which however complex it may seem, is something very simple compared to the machine language, which boils down to electric states (on and off, represented by 1 and 0, binary language, which you definitely know what it is). These high-level language conditions, such as C, C++ or C# (which look like low-level things if purchased from Python, PHP...) are, for example, if’s, Else’s, variables and various other functions that languages offer.
These simpler-to-read features facilitate the man-machine relationship, which enables us to create more complex functions and make the computer more powerful.

A simple comparison of these forms of thought is for example the ENIAC, which was programmed purely with binary language, did not even have the potential of a modern calculator, the thinking of machines today is of a completely different potential and its power of thought (made possible by the new computational techniques that arise) has an evolution that, according to computer science, doubles its power every two years, which is frightening in a way.

I hope you have solved your doubts, if there is something that has not elucidated you just ask. See you.

10

Computational thinking is a strategy to model solutions and solve problems efficiently

Computational thinking can be organized in four stages:

  1. Decomposition: dividing the issue into smaller problems and therefore easier.

  2. Patterns: identify the pattern or patterns that generate the problem.

  3. Abstraction: ignore the details of a solution so that it can be valid for several problems.

  4. Algorithm: stipulate order or sequence of steps to solve the problem

Basically, the idea is to reformulate problems that appear to be difficult to solve and turn them into something capable of being understood, focusing, for this, in each of its phases, in order to deal with the uncertainties that often surround them

Programming Logic is the technique of developing logical sequences to achieve a given goal, a sequence of steps to achieve a given goal. Programming logic is basically about building algorithms that will be transformed into computer programs.

7

  1. Imagine the computer as the most methodical person in the world. Programming logic is how you tell this person to do the activities you want. Computational thinking is the way you think to solve a particular problem. Both are interesting for the development of logic even in learning.

  2. The two relate to how Man and Machine come together to create a "script" that can solve a problem.

7

The term Computational Thinking is the process of understanding how to solve a problem.

To resolution of this problem can be by computer or human being, being this a stage optional within Computational Thought, since it may have an end in itself.

And how can the computer solve? With some programming logic.

Explanation

The computational thinking process initially involves the problem to be solved and the understanding of the ways it can be solved.

There are 2 ways to characterize this process. First, using the "Quatro Cs"

  1. decomposition: dividing a problem or complex system into smaller, more manageable pieces.

  2. pattern recognition: look for similarities between and within problems

  3. abstraction: focus only on important information, ignoring irrelevant details

  4. algorithms: develop a step-by-step solution to the problem, or the rules to follow to solve it

Or the "Three As":

  1. Abstraction: formulation of the problem
  2. Automation: expression of the solution
  3. Analyzing: implementation of the solution and evaluation

Note that both are very similar.

In the 2 characterizations above, the stage involving programming logic is always the last one, which involves the final development of the planned solution and its execution. But as I said at the beginning, the execution stage is optional.

Even though it is optional, programming logic is a popular and effective means of teaching Computational Thinking.

Practical example

If you, for example, are in your home and want to find a friend. You know he is in the Mall. How to get to him? This is your problem.

For this, you need to consider the transport to be used, the available routes, the best route (safer, economical, fast, known, etc.). After considering all this, you draw the ideal route and follow it step-by-step.

In this example above, planning is computational thinking and following directions is expressed by programming logic.

5

A computer is capable of only a handful of basic operations. The Turing machine was the first model of a computational machine, and there is still no computer inherently more capable than the Turing machine.

It’s easier, nowadays, to model an elementary computer as a very basic RISC processor. There are academic models with only one instruction, but a model with half a dozen instructions is already much easier to understand.

Programming logic is the formal method of representing a program. One can use a higher-level formalism, which will then be compiled/interpreted/translated into a lower-level formalism.

Computational thinking is to "put yourself in the place of the computer", analyze a problem and break it into small elementary pieces, which can be expressed in programming logic, and finally can be processed by a computer.

To do this, it is worth using the techniques specified in the other answers, and also worth the creativity and "instinct" of the programmer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.