Alternative ways to design with functional programming

Click for: original source

Mark Seemann introduces an article series exploring alternative design approaches to a specific problem originally presented by Oleksii Holub. The core issue involves identifying song recommendations from data repositories containing impurities (like unreliable user activity). This series challenges the notion that some problems resist purely functional solutions, particularly those with ‘real-world’ constraints.

Key learnings:

  • Problems often have multiple valid design solutions.
  • Examining alternatives can reveal hidden paths to robustness.
  • Functional approaches can accommodate impure data and operations through various designs.

Seemann stresses the importance of having multiple viable designs for a problem before choosing one. He sees this as crucial for informed decision-making, preventing reliance on potentially suboptimal first solutions due to language constraints or other factors (as seen in his previous “Impureim Sandwich” work). This approach allows CIOs and their technical teams to understand trade-offs better.

The series serves as a catalogue of design options, highlighting how functional programming principles can be applied flexibly even when dealing with messy data. It underscores that the original non-functional solution (the impure recommendation) is just one path among many analyzed here. The key takeaway for executives is understanding this landscape to guide architectural choices effectively. Good read!

[Read More]

Tags python functional-programming web-development code-refactoring