Do you like heavily nested loop-ridden code? Me neither! Here's the good news: your code doesn't have to be that way. Functional programming can help! In this talk we'll cover how you can banish `for` and `foreach` loops from your code by better understanding the most common and accessible functional programming concepts: `map`, `filter`, and `reduce`. We'll draw out concrete examples in PHP that will let you filter down complex data (like arrays of fetched posts) in simpler ways than you may have thought possible. We'll show practical refactorings of hard-to-follow code into better functional PHP and JavaScript. We'll also cover what functional programming is---it's more than just the "function" keyword---and how it can unlock whole new ways of thinking about the code we write.

Comments

Comments are closed.

Great presentation but it was whipping by pretty fast until I pulled up the slides and followed along.

Flatmap! Say what!!! I loved the whole talk!

Wade Wendorf at 11:43 on 9 Mar 2018

Very well done presentation. I've already seem some spots to optimize my code using this. I use the concepts a little bit, but I can see where I can make much better use of it now. Thank you!

Mark J Williams at 12:53 on 9 Mar 2018

I’ll be refactoring all my code Monday

Noah Bratzel at 12:53 on 9 Mar 2018

I enjoyed this talk. It was a whole lot of things that I need to spend a lot more time trying out. I think it could have been more targeted towards people with no knowledge of these concepts by slowing down and covering them more slowly and thoroughly.

Brian Skorseth at 13:00 on 9 Mar 2018

Very useful with a fresh approach I hadn't encountered before. Would have liked a little more time to read through the code just so I could understand what the "before" and "after" were doing. Being able to access the slides on my own resolves most of that though.

Brian Fenton at 13:11 on 9 Mar 2018

Good info, I wish more people did this. Some useful examples & memorable phrases.

Great talk introducing functional concepts using examples familiar to PHP developers. I think a bit more time focusing on the functional concepts than defining functions would be beneficial. Discuss defining closures with used variables, skip the rest of the ways to define functions, most should be familiar with them IMO.

I loved this! “Throwaway” variables always bugged me when I started to learn how to code. This is really an important core fundamental that every PHP developer should learn and use. The talk was very well-presented and moved at a perfect pace. While it may have been a litttle quick, it felt like we covered just the right amount of breadth and depth for an introduction.

Maggie at 13:24 on 10 Mar 2018

Very useful! Learned a few tricks that I would love to try somet ime!

Well done. Found some useful content that I plan to put to use.