Ted Neward goes through a code kata with several programming paradigms in the latest Working Programmer column. Being a coding polyglot is all the rage nowadays, and understanding multiple paradigms is essential to being a well-rounded developer. Ted goes through procedural style, modifies it to be object-oriented, demonstrates how to use meta and then dynamic programming. Finally, he makes it more functional. The proposed solution adds an aspect of functional programming, but it can be taken further.
A collection of articles and resources of interest to the modern software developer
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs
Showing posts with label Code Katas. Show all posts
Showing posts with label Code Katas. Show all posts
Friday, September 2, 2011
Making It More Functional | KodefuGuru
Making It More Functional



Multiparadigmatic .NET, Part 10: Choosing an Approach | The Working Programmer
The Working Programmer - Multiparadigmatic .NET, Part 10: Choosing an Approach



In my last column (Part 9 of this series), I suggested that any time an article series gets close to double digits, the author is either pretentious enough to think his readers are actually interested in that subject that many times in a row, or he’s just too boneheaded to come up with a new topic. Readers are left to speculate as to which of those two cases are at work here.
Nevertheless, commentary from the field has made it clear that despite the dangers of traversing into double-digit territory, one more article on multiparadigmatic design seems necessary to try to tie all the individual elements together—to demonstrate how to use each of these different paradigms and choose among them for a real-world problem. “Real-world,” for our purposes, means non-trivial enough to hint at how the approach might be useful for problems that aren’t as simple as those chosen to solve in a magazine article.
Trying to create such a problem turns out to be more difficult than it might appear; either the idea is too complicated, with too many distractions in it to get a clear view of the solutions used; or the idea is too simple, allowing for too little variation in its implementation to illustrate how the different paradigms might each be used to solve it. Fortunately, to get started we can make use of some work that has already been done—in the form of Dave Thomas’ “Code Katas.”
Subscribe to:
Posts (Atom)