1 00:00:00,000 --> 00:00:04,766 [MUSIC] 2 00:00:04,766 --> 00:00:10,180 Hi, I'm Kenneth, the Treehouse Python teacher, and I have a secret to confess. 3 00:00:10,180 --> 00:00:13,650 Some developers program because it makes our other jobs easier. 4 00:00:13,650 --> 00:00:15,940 Or, maybe we do it because it's a good way to make money. 5 00:00:15,940 --> 00:00:18,290 Or, it scratches a problem solving itch. 6 00:00:18,290 --> 00:00:19,280 But, for a lot of us, 7 00:00:19,280 --> 00:00:23,470 myself definitely included, we do it because it makes us feel really cool. 8 00:00:23,470 --> 00:00:27,660 I mean, we type a few words, and we get a neat website or application that does so 9 00:00:27,660 --> 00:00:29,090 much for us. 10 00:00:29,090 --> 00:00:33,460 Honestly, this magic is a big part of what I like about functional programming. 11 00:00:33,460 --> 00:00:34,530 Functional programming, 12 00:00:34,530 --> 00:00:38,980 sometimes abbreviated as FP, is one of a few major approaches to programming. 13 00:00:38,980 --> 00:00:41,620 You've probably used two of the others already. 14 00:00:41,620 --> 00:00:44,450 Procedural programming is where most of start out. 15 00:00:44,450 --> 00:00:48,280 Your program just works its way from top to bottom evaluating each line. 16 00:00:48,280 --> 00:00:51,050 Maybe there are some functions, but they're used for repetitious work. 17 00:00:51,050 --> 00:00:54,020 And you've probably come across object-oriented programming 18 00:00:54,020 --> 00:00:57,980 where concepts are broken up into objects, and then those objects have attributes and 19 00:00:57,980 --> 00:00:58,849 methods that do the work. 20 00:01:00,040 --> 00:01:03,820 Both of these approaches are useful in their own ways, and we've done, 21 00:01:03,820 --> 00:01:06,760 and will continue to do, both of them here on Treehouse. 22 00:01:06,760 --> 00:01:07,820 Functional programming though, 23 00:01:07,820 --> 00:01:10,380 is a slightly different approach to programming. 24 00:01:10,380 --> 00:01:13,900 We're gonna talk more about the rules of functional programming in the next video. 25 00:01:13,900 --> 00:01:17,600 But I want you to understand, despite what you might see in more fanatical blogs or 26 00:01:17,600 --> 00:01:20,030 guides on the Internet, or in other languages. 27 00:01:20,030 --> 00:01:22,580 In Python, functional programming is just another set of 28 00:01:22,580 --> 00:01:24,620 tools to keep in your pocket for problem solving. 29 00:01:25,650 --> 00:01:27,300 Just to set some expectations, 30 00:01:27,300 --> 00:01:30,990 this course is going to be a bit more theory heavy than other courses. 31 00:01:30,990 --> 00:01:34,650 We'll still be writing plenty of code, but we have to establish some ground rules and 32 00:01:34,650 --> 00:01:37,990 approaches up front so that we can get the best benefit from our code. 33 00:01:39,080 --> 00:01:42,870 Also, many of our examples will be more about here's a useful approach 34 00:01:42,870 --> 00:01:46,240 then us working together one step at a time to solve a final problem. 35 00:01:47,270 --> 00:01:50,570 I found over the years that functional programming usually isn't an end 36 00:01:50,570 --> 00:01:51,780 in and of itself. 37 00:01:51,780 --> 00:01:55,860 It's just another superpower to use when you need to do a lot of amazing work with 38 00:01:55,860 --> 00:01:56,830 just a bit of code.