That's why school algebra is needed

Usually to the question “why do we need mathematics?” answer something like "gymnastics for the mind." In my opinion, this explanation is not enough. When a person performs physical exercises, he knows the exact name of the muscle groups that are developing. But talk about mathematics remains too abstract. What specific "muscles of the mind" are trained by school algebra? After all, it is not at all like real mathematics, in which great discoveries are made. What gives the ability to look for the derivative of some confusing functions?

Teaching programming to weak students led me to a more accurate answer to the question “why?”. In the article I will try to convey it to you.

That's why school algebra is needed
At school, quite a lot of time is devoted to the transformation and simplification of expressions. For example: 81×2+126xy+49y2 should be converted as (9x+7y)2.

In this example, the student is expected to remember the formula for the square of the sum

That's why school algebra is needed

In more complex cases, the resulting expression can be used for other transformations. For example:

That's why school algebra is needed

converted first to

That's why school algebra is needed

and then, with the refinement (a + 2b) != 0, it turns out like this

That's why school algebra is needed

To achieve this result, the student needs to recognize in the original expression and then apply three formulas:

  • Sum squared
  • Difference of squares
  • Reducing the factors of an ordinary fraction

In an ordinary school in algebra, almost all the time we were engaged in such a transformation of expressions. At the university, nothing has changed significantly in higher mathematics. We were told how to take derivatives (integrals, etc.) and given a ton of tasks. Was it helpful? In my opinion, yes. As a result of these exercises:

  1. The skill of transforming expressions has been honed.
  2. Developed attention to detail.
  3. An ideal was formed - a concise expression to which one can aspire.

In my opinion, having such an ideal, quality and skill is very useful in the daily work of a developer. After all, to simplify an expression, in fact, means to change its structure in order to facilitate understanding without affecting the meaning. Doesn't this remind you of anything?

This is practically the definition of refactoring from Martin Fowler's book of the same name.

In his work, the author formulates them as follows:

Refactoring (n.): A change in the internal structure of software to make it easier to understand and modify without affecting observable behavior.

Refactor (vb): change the structure of software by applying a series of refactorings without affecting its behavior.

The book gives "formulas" to be recognized in the source code and the rules for their transformation.

As a simple example, here is the "introduction of an explanatory variable" from the book:

if ( (platform.toUpperCase().indexOf(“MAC”) > -1 ) &&
    (browser.toUpperCase().indexOf(“IE”) > -1 )&&
    wasInitialized() && resize > 0 ) {
    // do something
}

Parts of the expression must be written to a variable whose name explains its purpose.

final boolean isMacOS = platform.toUpperCase().indexOf(“MAC”) > -1;
final boolean isIEBrowser = browser.toUpperCase().indexOf(“IE”) > -1;
final boolean isResized = resize > 0;
if(isMacOS && isIEBrowser && wasInitialized() && isResized) {
   // do something
}

Imagine a person who cannot simplify algebraic expressions using the formula for the square of the sum and difference of squares.

Do you think this person will be able to refactor the code?

Will he be able to write code that other people understand if he does not have an ideal of this very conciseness? In my opinion, no.

However, everyone learns at school, and a minority becomes programmers. Is the skill of transforming expressions useful for ordinary people? I think yes. Only the skill is applied in a more abstract form: you need to assess the situation and choose a further action so as to get closer to the goal. In pedagogy, this phenomenon is called transfer (skill).

The most striking examples arise during household repairs with improvised means, in the "collective farm" way. As a result, the very “chips” and life hacks appear, one of which is depicted on the KPDV. The author of the idea had a piece of wood, wire and four screws. Remembering the template for the lampholder, he assembled a homemade cartridge from them.

Even when driving a car, the driver is constantly busy recognizing patterns in the world around him and performing appropriate maneuvers to get to his destination.

When you died, you don't know about it, only it's hard for others. It's the same when you haven't mastered math...

What happens if a person fails to master the transformation of expressions? From time to time, I give private lessons to students who were not good at math in school. As a rule, they completely get stuck on the topic of cycles. So much so that you have to do “algebra” with them, but in a programming language.
This is because when writing loops, the main technique is precisely to transform a group of identical expressions.

Let's say the output of the program should look like this:

Introduction
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Conclusion

A trivial program to achieve this result looks like this:

static void Main(string[] args)
{
    Console.WriteLine("Введение");
    Console.WriteLine("Глава 1");
    Console.WriteLine("Глава 2");
    Console.WriteLine("Глава 3");
    Console.WriteLine("Глава 4");
    Console.WriteLine("Глава 5");
    Console.WriteLine("Глава 6");
    Console.WriteLine("Глава 7");
    Console.WriteLine("Заключение");
}

But this solution is far from a concise ideal. First, you need to find a repeating group of actions in it and then convert it. As a result, the following solution will turn out:

static void Main(string[] args)
{
    Console.WriteLine("Введение");
    for (int i = 1; i <= 7; i++)
    {
        Console.WriteLine("Глава " + i);
    }
    Console.WriteLine("Заключение");
}

If a person has not mastered mathematics at one time, then he will not be able to perform such transformations. He just won't have the right skill. That is why the topic of cycles is the first obstacle in the development of a developer.

Similar problems arise in other areas as well. If a person does not know how to use an improvised tool, then he will not be able to show household ingenuity. Evil tongues will say that hands grow from the wrong place. On the road, this manifests itself in the inability to correctly assess the situation and choose a maneuver. Which can sometimes lead to tragic consequences.

Conclusions:

  1. We need school and university mathematics so that we can make the world a better place with the means that we have.
  2. If you are a student and you have problems learning cycles, try to go back to the roots - school algebra. Take a problem book for grade 9 and solve examples from it.

Source: habr.com

Add a comment