Python for Absolute Beginners Transcripts
Chapter: The big ideas of software development
Lecture: Big idea: Algorithms

Login or purchase this course to watch this video and the rest of the course contents.
0:00 What is an algorithm?
0:01 In terms of computer programs, it's really just
0:04 the little parts of your program that have to make decisions
0:08 or control the flow of what your application is doing.
0:11 Well, first we're going to check and see if a user
0:13 is logged in.
0:14 If they're logged in, we're going to then get their courses
0:16 and show them here.
0:17 If they're not, we're going to tell them, Hey
0:19 you have to log in first, or redirect them over to a page
0:23 that is the unauthenticated page.
0:25 Something like that might be how it works on the website.
0:28 Programs are not usually made up of the algorithm
0:31 that makes up the program.
0:32 There's a bunch of little parts.
0:34 And each little part generally has its own algorithm.
0:36 Sometimes these are very formalized.
0:39 Sometimes they're just kind of thinking through
0:41 to the decision-making.
0:42 So for example, if we want to get really formal
0:45 we're not going to do that too often in this course
0:46 but we could look at this.
0:47 This is Euclid's algorithm for finding the GCD
0:50 great common divisor, of two numbers.
0:53 Take two inputs and you say, Is B zero?
0:56 No. Is A greater than B? No.
0:59 And then you have the steps and you go through it.
1:01 Most algorithms as we think about them in modern programming
1:06 it's not generally this low level but sometimes.
1:09 Often, you'll find the building blocks that we use
1:11 are built out of algorithms themselves
1:14 and we can just use them.
1:15 We don't have to deal with the low-level details.
1:18 But that's what an algorithm is.
1:20 Sometimes this is almost used as a negative word
1:23 in today's world.
1:25 It has algorithms have political bias
1:28 or algorithms have racial bias or they have these
1:30 other problems that are unfair or inaccurate.
1:34 And that's true but all that really is saying
1:37 is programs sometimes, when people decide how they think
1:42 or the data that they use, is imperfect and it has problems.
1:46 But an algorithm itself is just this neutral thing.
1:49 It's just kind of this decision-making process.
1:51 Take these things as inputs, do this sort of test
1:54 carry on in this way or that way.