00:01
Hello, welcome to this lesson.
00:03
In this lesson, we are looking at the problems that could arise if a very last software system has all global data elements.
00:18
So the first one is that there could be security vulnerabilities because it would become very easy for attackers to target global variables.
00:38
So for example, if there's a, if there's a adjacent data that is called person that has a name, so the name of the person, it has the salary, and some of this is like that you would know want some other parts of the program to be exposed to this because the level of abstraction is not so great.
01:29
Attackers can attack the variable and manipulate it as they want and it would actually cause a huge security issue in the app so the less state is that it would create a problem of using more code you will not be able to reuse some part of the code because the those parts could have certain global variables that that specific to those parts alone and using it and reusing those methods called cost concurrence issue that is if there's a method called make money okay that has a variable x equals to five where x is a global variable and at the same time the make money is being called in another method that it's called probably and one that has also good x, which is six.
02:59
Now, we may not know which of the methods modify the global variable x.
03:06
And at the end, we can expect to get some unspeatable behavior, unexplainable behavior of x because there are several methods that are calling x at the same time.
03:22
And each of them are manipulating and updating the value of x.
03:28
Okay, so it can cause concurrency issue.
03:42
The third one is the maintainability issues.
03:56
Okay, so as the program becomes very large, it would come to a point where the global variables, actually it could be the same...