Showing posts with label polyglot programmer. Show all posts
Showing posts with label polyglot programmer. Show all posts

Thursday, February 26, 2009

Justification for Functional Programming

It appears that this subject has caught fire in recent years. The interest in St. Louis has resulting in the Lamdba Lounge started by Alex Miller. (Great name by the way). I have started reading (but not finished) Programming Clojure by Stuart Halloway and Programming Scala by Venkat Subramaniam. Additionally I just finshed writing a 10 page article on an introduction to functional programming, which includes 4-5 page on F#. The article is for NFJS who holds the exclusive rights at this time, but I plan to provide a link to it or post it here in its entirity after 90 days.

I should point out that I am no expert in this space, but I have been developing professional for 15+ years with a variety of languages (C, C++, Java, C#, a little Ruby, Perl, Groovy). In the last 6 months I've been "playing" with Scala, Clojure and F#.

The reason for this post is this: http://groovy.dzone.com/news/why-functional-programming. This article has been sent to me a couple of times and has been on twitter several. At this point I will make public comments I made in an email response regarding this subject. The first two subjects were points made via email, which make sense to maintain for this blog post.

The Argument to have UI and DB Support
I don't get the ui / db argument. This indicates an all or nothing mentality, which I would hope the industry could get over. A griffon front-end to a java hibernate db access and clojure rules engine make sense to me. Many of the functional languages provide the ability to produce a UI or interact with the DB, however that isn't really important to me as you will see below, but there are good solutions out there where this isn't really a concern.

Functional Notations and Code Beauty
I may be in the minority... but I could care less for "beauty" of code, I'm interested in less code that adds the same or more value. FP adds several notations that provide a conciseness to code, which is a huge value add. As I was writing up an article on F#... I became frustrated with my other programming languages... for instance: why is a switch in Java/Groovy so limiting. Groovy makes it better... but it is still limiting as you compare it to discriminated unions and pattern matching F#.

Getting Functional Programming
People don't get it yet (referring to the nah sayers)... they are in the battle pits and are lacking the big picture vision. This year quad core laptops are expected to be more common. That trend isn't going to stop. The last decade was all about die size and memory. This next decade is all about cores. The need for concurrency tools is a must. The language trend may be slightly ahead of its time.

I'll post more on this subject in the future... I just felt it necessary to provide some response to the value of functional programming. Frankly I've barely scratch the surface of the value.

Saturday, October 18, 2008

Cooking Chef vs. Polygot Programmer

Occasionally crazy analogies pop up in my head. Sometimes these ideas don't make sense to anyone but me. Let me know if I've gone off the deep end.

So I was thinking what it was like growing up when I didn't have a microwave and how useful that tool is. Then it occurred to me that as useful as it is, there are things I would never put in the microwave. Take for instance a turkey. Perhaps it is possible to cook a turkey in a microwave, but why? You can cook toast on a gas stove as well, but a toaster just seems more appropriate. When playing chef, each tool provides a specific value. Turkey in the oven, toast in the toaster, and butter melting in the microwave.

Stretching this thought into a conversation on technology, I'm reminded of a term Neal Ford is credited with: The polygot programmer.

Why is it that developers and programmers pick camps? Why does an organization limit their technology choices to one or a small handful? When an organization says they are a "Java Shop" or a ".Net Shop", what I hear is "We only use microwaves to cook here". In many of these shops they are doing with code what can be equivalent to cooking a turkey in a microwave. They can get it to work, but it doesn't taste so good!