Curing the Common Loop (With Collection Pipelines)

Comments

Comments are closed.

Jane Nguyen at 15:55 on 17 Sep 2016

Thank you for the real time demo. Nice to see you making the changes in real time and talking through the logic.

Ian Littman at 18:01 on 18 Sep 2016

Solid presentation, solid live coding. Didn't capture my attention too much as I've done some of the Refactoring To Collections tutorials before as part of a previous local meetup, but sounds like things were eye-opening for many attendees, and it's good that folks now have a tool for more fluent, maintainable code going forward.

As an aside, while the closure-and-collection method of dealing with stuff *is* slower than for loops everywhere, for data sets that aren't in the thousands (or hundreds of thousands, depending on complexity), you're not gonna care. This is by someone who should be in Micro-Optimizers Anonymous :p

Excellent examples of when to improve and how to improve our code, and thank you for the coding in live!

Ben Shoemaker at 07:21 on 19 Sep 2016

Glad I heard this. The ideas of replacing for loops, conditionals and temp vars with array_map, array_filter, and collection pipelines makes sense, albeit it seems a bit foreign to read at first. Thanks!