|
newton.saber wrote: Have you read the book? Not yet.
newton.saber wrote: Do you like TED Talks? Yup. This one[^] is my current favorite.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: This one[^] is my current favorite.
Adding that one to my watch list.
Thanks.
|
|
|
|
|
|
Duncan Edwards Jones wrote: also the RSA Animate[^] series
Yes, I've seen those on TED also and they are great.
Didn't know about that site though. Thanks.
|
|
|
|
|
Never heard of TED Talks... Looks interesting.
Public speaking isn't my strongest point... Even when I know the subject. Even when it's just about my day. And even when I picture the audience naked
I'd love to work on it, but I'm not much in a situation where I have to speak publicly (last time was at school, that didn't go so well...).
|
|
|
|
|
You are so lucky you've never heard of them.
Because it's going to be a whole new favorite thing for you to experience.
Watch Jane McGonigal (one of my favorites) about How Gaming Can Make Our Lives Better.
https://www.youtube.com/watch?v=5t3y7EeBhxg[^]
It's quite inspirational.
|
|
|
|
|
|
I've seen that one and I know you are kidding.
That is an odd one isn't it? It's just silly.
|
|
|
|
|
I kid you not, this is really working.
And I find the talk fascinating : This guy is talking about modifying a habit that billions of people have genuinely acquired, which brings a lot of question about mass effect and tradition learning. Why do we all do that wrong ? Is this because we were taught to do so, or because it is related to the way the human being works ? How come nobody ever changed that in the evolution of using shoes ?
The impact is emphasized by the fact that it is something a lot of people is doing instinctively (or not) every day and by the fact it is such a simple thing.
|
|
|
|
|
|
newton.saber wrote: if you really know something you can probably speak clearly about it and explain it. Actually, I've found that to rarely be the case.
People who know things really well might as well be speaking a foreign language, a lot of the time.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Agreed. I write some training on occasion and the hard part is not to get caught up on the nuances of the subject matter and focus on getting the point across where the person can be functional. Also when you're training someone who has no exposure to your subject matter it can be extremely hard to get the person to relate. As my old English teacher said, "Make the abstract concrete."
|
|
|
|
|
newton.saber wrote: Do you like TED Talks?
I liked TED the movie.
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
So I'm reading this book about Haskell[^] and the author creates a function that converts an int to a lower case letter. The function is called 'int2let'. If I did that in any of the major languages today (and probably a few non-major languages as well) I'd probably be lynched by an angry mob of (non-Haskell) programmers.
Well, maybe that's why Haskell isn't that popular yet...
Other than the function naming Haskell is pretty awesome though. I'm not sure if I'll ever be able to use it in a real project though.
For the enthusiasts
One of the things that amazed me is currying functions.
--function definitions
add x y = x + y
incr = add 1
--usage
add 5 5 -- result 10 (duh)
incr 5 -- result 6 How cool is that? add x actually returns a function that expects y and thus incr returns that function.
Can be practical when working with lambda's or partial application (like in the example).
|
|
|
|
|
Haskell also has a function to convert human hair into fingernails. It's called Hair2Fingernails. It's almost as valuable as the int2let. int2let is amazing and no one should question that ever.
|
|
|
|
|
for a good laugh!
|
|
|
|
|
Are you mocking the mighty Haskell? Well, I guess it deserved it
|
|
|
|
|
Pretty standard for a functional language..
If you like that, pointless point free style will blow your mind.
|
|
|
|
|
Nit-picking corner:
Your code example shows partial function application, not currying. They're related, but not quite the same thing.
Currying and partial application is easy* in C#, once you've got your head around the concept:
Currying and Partial Function Application - MSDN Blogs[^]
Currying vs partial function application - Jon Skeet's blog[^]
public static class FunctionalExtensions
{
public static Func<A, Func<B, R>> Curry<A, B, R>(this Func<A, B, R> f)
{
return a => b => f(a, b);
}
public static Func<B, R> Apply<A, B, R>(this Func<A, B, R> f, A a)
{
return b => f(a, b);
}
}
Func<int, int, int> add = (a, b) => a + b;
Func<int, int> incr = add.Apply(1);
Func<int, Func<int, int>> curriedAdd = add.Curry();
There's a bit more ceremony, as C# isn't as good at inferring argument types as most functional languages, but it's still usable.
* For certain values of "easy".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: Nit-picking corner:
This is exactly as I would expect from a functional programmer.
Yes, I'm kidding.
But we're all thinking it about functional programmers. Admit it.
|
|
|
|
|
Nobody calls me a "functional programmer" and gets away with it!
Except that one guy who called me a "functional programmer" and then ran off. He got away with it.
But most people who call me a "functional programmer" don't get away with it.
Well, actually, that guy who got away with it was the only one who ever called me a "functional programmer".
After today, only half the people who ever called me a "functional programmer" will have gotten away with it.
(Bonus points if you can identify the reference!)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: (Bonus points if you can identify the reference!) Sounds like something I heard back in Quahog...
|
|
|
|
|
To quote Weenie and the Butt, "We Have a Weiner"!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Would you prefer to be known as a dysfunctional programmer?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|