Anyone using or trying to promote FP at his workplace? Sharing the experience will be interesting. If a manager asks, "who uses FP?", then these links might help in giving a fitting reply:
On Jan 24, 7:06 pm, Vijay Mathew <vijay.the.sche...@gmail.com> wrote:
> Anyone using or trying to promote FP at his workplace? Sharing the > experience will be interesting. If a manager asks, "who uses FP?",
I have had "interesting" negative experience, but concerning colleagues. When I mentioned FP to colleagues (at more than one company at Bangalore) they looked at me as if I had lost my mind. I have spoken with the Java crowd and most of them are apparently happy with OOP because it secures their CTC. It is sure that I was speaking with the wrong people, but what is really interesting is that managers are not "reaching out" beyond traditional technologies despite those same things serving them poorly.
I have understood that it makes more sense to talk to potential early- adopters -- whose who have a problem to solve and know that traditional technologies won't serve them well, people who are willing to bet on you. This looks like a Catch-22 situation but I hope the situation will improve. I have also noticed that telling people "who uses FP" isn't that effective. When you create effective solutions (even though only a prototype) for the problems they face, they start paying you a lot of attention.
> I have also noticed that telling people "who > uses FP" isn't that effective. When you create effective solutions > (even though only a prototype) for the problems they face, they start > paying you a lot of attention.
I agree with that and that's what I try to do, whenever I get a chance to develop a prototype or write some tool for the internal use of the company.
> > I have also noticed that telling people "who > > uses FP" isn't that effective. When you create effective solutions > > (even though only a prototype) for the problems they face, they start > > paying you a lot of attention.
> I agree with that and that's what I try to do, whenever I get a chance > to develop a prototype or write some tool for the internal use of the > company.
> -- Vijay
> -- > You received this message because you are subscribed to the Google Groups > "bangalore-fp" group. > To post to this group, send email to bangalore-fp@googlegroups.com. > To unsubscribe from this group, send email to > bangalore-fp+unsubscribe@googlegroups.com<bangalore-fp%2Bunsubscribe@google groups.com> > . > For more options, visit this group at > http://groups.google.com/group/bangalore-fp?hl=en.
> The question is do OOP coders realize that they are doing functional > programming when they find FP in their standard languages?
No they (the majority of them) don't! Not at least until they are told. I have had fun writing functional style code in Java and see OOP fanatics scratch their heads looking at them. They can sense it's fundamentally different from their imperative approach but they remain in WTF-zone not being able to appreciate why I code the way I do. I generally make my point with these:
- Interfaces are better than classes for establishing contracts - Inheritance generally sucks - Single responsibility principle is a good thing - Slim interfaces are better for design fitness (I turn major and higher order functions into slim interfaces) - Immutable is better than mutable (lockless) - Decorator, Strategy and Template patterns are good - The "static" keyword is generally bad - You want coffee? Don't start a kitchen here - get/use a vending machine. Use dependency injection.
From where I stand, most of those features are not native to FP; and are also usually quoted as best-practice for OO design. Maybe I'm just not getting the way you code, an example might help.
On Mon, Jan 25, 2010 at 9:12 PM, Shantanu Kumar <kumar.shant...@gmail.com>wrote:
> > The question is do OOP coders realize that they are doing functional > > programming when they find FP in their standard languages?
> No they (the majority of them) don't! Not at least until they are > told. I have had fun writing functional style code in Java and see OOP > fanatics scratch their heads looking at them. They can sense it's > fundamentally different from their imperative approach but they remain > in WTF-zone not being able to appreciate why I code the way I do. I > generally make my point with these:
> - Interfaces are better than classes for establishing contracts > - Inheritance generally sucks > - Single responsibility principle is a good thing > - Slim interfaces are better for design fitness (I turn major and > higher order functions into slim interfaces) > - Immutable is better than mutable (lockless) > - Decorator, Strategy and Template patterns are good > - The "static" keyword is generally bad > - You want coffee? Don't start a kitchen here - get/use a vending > machine. Use dependency injection.
> Regards, > Shantanu
> -- > You received this message because you are subscribed to the Google Groups > "bangalore-fp" group. > To post to this group, send email to bangalore-fp@googlegroups.com. > To unsubscribe from this group, send email to > bangalore-fp+unsubscribe@googlegroups.com<bangalore-fp%2Bunsubscribe@google groups.com> > . > For more options, visit this group at > http://groups.google.com/group/bangalore-fp?hl=en.
> They can sense it's > fundamentally different from their imperative approach
OOP done right isn't really all that imperative, you know. All the points you mention that you use while writing OOP that aren't appreciated by 'OOP fanatics' are perfectly standard OOP best practices. If they aren't doing all of what you describe, they have no business considering themselves any good at OOP. Throw a copy of 'Refactoring' at them and hope for the best.
> The "static" keyword is generally bad
I would go so far as to say the only reason you'd mark something static is as step one of an extract class refactoring.
Shantanu Kumar wrote: >> The question is do OOP coders realize that they are doing functional >> programming when they find FP in their standard languages?
> No they (the majority of them) don't! Not at least until they are > told. I have had fun writing functional style code in Java and see OOP > fanatics scratch their heads looking at them. They can sense it's > fundamentally different from their imperative approach but they remain > in WTF-zone not being able to appreciate why I code the way I do. I > generally make my point with these:
> - Interfaces are better than classes for establishing contracts > - Inheritance generally sucks > - Single responsibility principle is a good thing > - Slim interfaces are better for design fitness (I turn major and > higher order functions into slim interfaces) > - Immutable is better than mutable (lockless) > - Decorator, Strategy and Template patterns are good > - The "static" keyword is generally bad > - You want coffee? Don't start a kitchen here - get/use a vending > machine. Use dependency injection.
> > They can sense it's fundamentally different from their imperative > > approach
> OOP done right isn't really all that imperative, you know. All the > points you mention that you use while writing OOP that aren't > appreciated by 'OOP fanatics' are perfectly standard OOP best > practices. If they aren't doing all of what you describe, they have > no business considering themselves any good at OOP. Throw a copy of > 'Refactoring' at them and hope for the best.
On Jan 26, 12:01 am, Saager Mhatre <saager.mha...@gmail.com> wrote:
> From where I stand, most of those features are not native to FP; and are > also usually quoted as best-practice for OO design.
That's right.
I find it feasible to write functional style code which is also good OO, which is what I try to adopt using Java. While making a case for my coding style, I only mention the good OO characteristics to OO folks.
> Maybe I'm just not getting the way you code, an example might help.
On Jan 26, 12:20 am, "C. K. Ponnappa" <ckponna...@gmail.com> wrote:
> > They can sense it's > > fundamentally different from their imperative approach
> OOP done right isn't really all that imperative, you know. All the > points you mention that you use while writing OOP that aren't > appreciated by 'OOP fanatics' are perfectly standard OOP best practices.
That's true.
> If they aren't doing all of what you describe, they have no business > considering themselves any good at OOP. Throw a copy of 'Refactoring' at > them and hope for the best.
I have found OOP fanatics ("OO is the best" crowd) to be bad at OO (ironic), and those who know good OO are generally appreciative of FP.
> The "static" keyword is generally bad
> I would go so far as to say the only reason you'd mark something static > is as step one of an extract class refactoring.
Was going through liliput (tried to pick a small codebase) and I'm not sure I'd refer you're code to too many people as 'good' OOP.
There's definitely some good qualities in there, but a lot of the code remains declarative/FP-ish. Although that's not a bad thing, I'd say an OO thought process would evolve a significantly inverted dispatch model.
And for someone who hates statics jwebmvc seems to have one too many static utils.
On Tue, Jan 26, 2010 at 11:30 AM, Shantanu Kumar <kumar.shant...@gmail.com>wrote:
> On Jan 26, 12:01 am, Saager Mhatre <saager.mha...@gmail.com> wrote: > > From where I stand, most of those features are not native to FP; and are > > also usually quoted as best-practice for OO design.
> That's right.
> I find it feasible to write functional style code which is also good > OO, which is what I try to adopt using Java. While making a case for > my coding style, I only mention the good OO characteristics to OO > folks.
> > Maybe I'm just not getting the way you code, an example might help.
> -- > You received this message because you are subscribed to the Google Groups > "bangalore-fp" group. > To post to this group, send email to bangalore-fp@googlegroups.com. > To unsubscribe from this group, send email to > bangalore-fp+unsubscribe@googlegroups.com<bangalore-fp%2Bunsubscribe@google groups.com> > . > For more options, visit this group at > http://groups.google.com/group/bangalore-fp?hl=en.
On Jan 27, 11:01 am, Saager Mhatre <saager.mha...@gmail.com> wrote:
> Was going through liliput (tried to pick a small codebase) and I'm not sure > I'd refer you're code to too many people as 'good' OOP.
> There's definitely some good qualities in there, but a lot of the code > remains declarative/FP-ish. > Although that's not a bad thing, I'd say an OO thought process would evolve > a significantly inverted dispatch model.
> And for someone who hates statics jwebmvc seems to have one too many static > utils.
Thanks for the review - the whole thing is still in alpha, so I guess it has many more rough edges. :-) I moved the JWebMVC code base over to form Taimen. JWebMVC is deprecated now. One of the chief design goals for JWebMVC/Taimen has been to be 100% compatible with Clojure. Declarative-ness seems to be the closest one can get in Java to emulate "lazy evaluation" as in FP - I guess that explains my bias towards it.