Can Your Programming Language Do This?
-
One of his better ones. "Short" and to the point without his usual overbearing arrogance. First class functions are lovely in JS.
regards, Paul Watson Ireland FeedHenry needs you
eh, stop bugging me about it, give it a couple of days, see what happens.
Paul Watson wrote:
First class functions are lovely in JS.
There's lots about JS that's lovely. :) (Then again, there's stuff that isn't too. But look at the future[^].:cool: )
225 years ago, we set an example for the rest of the world by creating a country where everyone could vote...
Well, except for women and black people, but we fixed that!
-Adam Duritz, of Counting Crows -
Paul Watson wrote:
First class functions are lovely in JS.
There's lots about JS that's lovely. :) (Then again, there's stuff that isn't too. But look at the future[^].:cool: )
225 years ago, we set an example for the rest of the world by creating a country where everyone could vote...
Well, except for women and black people, but we fixed that!
-Adam Duritz, of Counting CrowsYeah some dead cool stuff in that presentation. I just hope certain browsers with more share than is good for my heart don't get left behind again.
regards, Paul Watson Ireland FeedHenry needs you
eh, stop bugging me about it, give it a couple of days, see what happens.
-
Joel on Software writes: Without understanding functional programming, you can't invent MapReduce, the algorithm that makes Google so massively scalable. The terms Map and Reduce come from Lisp and functional programming. MapReduce is, in retrospect, obvious to anyone who remembers from their 6.001-equivalent programming class that purely functional programs have no side effects and are thus trivially parallelizable. The very fact that Google invented MapReduce, and Microsoft didn't, says something about why Microsoft is still playing catch up trying to get basic search features to work, while Google has moved on to the next problem: building Skynet^H^H^H^H^H^H the world's largest massively parallel supercomputer. I don't think Microsoft completely understands just how far behind they are on that wave. http://www.joelonsoftware.com/items/2006/08/01.html[^]
Kevin
He makes it sound like functional programming is the only way to write code that's truly scalable in a global environment. Sometimes I wonder just how much crack he's been smoking.
Jeremy Falcon
-
Joel on Software writes: Without understanding functional programming, you can't invent MapReduce, the algorithm that makes Google so massively scalable. The terms Map and Reduce come from Lisp and functional programming. MapReduce is, in retrospect, obvious to anyone who remembers from their 6.001-equivalent programming class that purely functional programs have no side effects and are thus trivially parallelizable. The very fact that Google invented MapReduce, and Microsoft didn't, says something about why Microsoft is still playing catch up trying to get basic search features to work, while Google has moved on to the next problem: building Skynet^H^H^H^H^H^H the world's largest massively parallel supercomputer. I don't think Microsoft completely understands just how far behind they are on that wave. http://www.joelonsoftware.com/items/2006/08/01.html[^]
Kevin
Abstraction of looping, don't foreach/iterators do that for you? Doesn't sound like a spectacular insight to me. :doh:
Wout
-
He makes it sound like functional programming is the only way to write code that's truly scalable in a global environment. Sometimes I wonder just how much crack he's been smoking.
Jeremy Falcon
I agree. He's simplifying the secrets to Google's success down to how they do they're coding.
Logifusion[^] If not entertaining, write your Congressman.
-
Abstraction of looping, don't foreach/iterators do that for you? Doesn't sound like a spectacular insight to me. :doh:
Wout
The Ecma-335 (the CLI spec) says something about System.Threading.Parallel.ParallelFor, ParallelForEach etc. It's not implemeted in .NET 2.0, but if you look at the spec, it'll be using C# anonymous methods. Every real programming language should have anonymous methods and closures. (sorry, Java, VB and C++) Does anyone know what kind of anonymous method/closures support C++0x is going to get?
-
The Ecma-335 (the CLI spec) says something about System.Threading.Parallel.ParallelFor, ParallelForEach etc. It's not implemeted in .NET 2.0, but if you look at the spec, it'll be using C# anonymous methods. Every real programming language should have anonymous methods and closures. (sorry, Java, VB and C++) Does anyone know what kind of anonymous method/closures support C++0x is going to get?
Daniel Grunwald wrote:
Every real programming language should have anonymous methods
Why?
Jeremy Falcon
-
I agree. He's simplifying the secrets to Google's success down to how they do they're coding.
Logifusion[^] If not entertaining, write your Congressman.
So far I haven't seen one real benifit to functional programming. As it seems to me, the only difference I see (besides a different way of thinking) is extra overhead.
Jeremy Falcon
-
Daniel Grunwald wrote:
Every real programming language should have anonymous methods
Why?
Jeremy Falcon
Huh, ok, mainly because they allow you to structure your code more the way what you want to do instead of the way the computer should do the work. When you know closures (I'm talking about anonymous methods capturing variables of the outer method), they make a lot of tasks easier - every from looping over filtering or converting data to multi-threading. I don't need them very often, but they are incredibly useful in many situations.
-
Huh, ok, mainly because they allow you to structure your code more the way what you want to do instead of the way the computer should do the work. When you know closures (I'm talking about anonymous methods capturing variables of the outer method), they make a lot of tasks easier - every from looping over filtering or converting data to multi-threading. I don't need them very often, but they are incredibly useful in many situations.
Daniel Grunwald wrote:
I don't need them very often
Then why is it a requirement of a real programming language?
Daniel Grunwald wrote:
but they are incredibly useful in many situations.
Name one, because I can't see how they are that much more useful.
Jeremy Falcon
-
The Ecma-335 (the CLI spec) says something about System.Threading.Parallel.ParallelFor, ParallelForEach etc. It's not implemeted in .NET 2.0, but if you look at the spec, it'll be using C# anonymous methods. Every real programming language should have anonymous methods and closures. (sorry, Java, VB and C++) Does anyone know what kind of anonymous method/closures support C++0x is going to get?
Daniel Grunwald wrote:
The Ecma-335 (the CLI spec)
I think that you are one of the handful of people alive who refer to the CLI spec by the name applied to it by the standards commitee. :omg:
:josh: My WPF Blog[^]
-
But I think his success and the obvious self-righteousness of any good programmer blind him on occassion. I nearly laughed out loud at some of his assumptions in his pricing piece.
A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
While it was (IMO intentionally) strongly simplified, Ididn't find it as "laughable" in the sense of "so wrong it's laughable". Care to explain?
Some of us walk the memory lane, others plummet into a rabbit hole
Tree in C# || Fold With Us! || sighist -
While it was (IMO intentionally) strongly simplified, Ididn't find it as "laughable" in the sense of "so wrong it's laughable". Care to explain?
Some of us walk the memory lane, others plummet into a rabbit hole
Tree in C# || Fold With Us! || sighistThe cost of the development of a product, and the future maintenance play a vital role in determining the proper pricing strategy. Although, in a simplistic, model you can assume standard supply and deman policies the fact is you have to take into account cost to market cost before you develop the product and before you market it along with the size of the target market and the expected draw of the target market. The analysis makes wild assumptions about future sales but is done after the design. Seems funny, I laughed. "Maybe it cost you $250,000 to develop the software in the first place, but that's a sunk cost. We don't care about that anymore, because the $250,000 is the same whether you sell 1000 units or 0. Sunk. Kiss it goodbye. Set any price you want, the $250,000 is gone and therefore not relevant any more." -Joel Q. In the land of Enterprise database systems how much do you pay for a database? A. Whatever Oracle wants you to pay.
A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
-
The Ecma-335 (the CLI spec) says something about System.Threading.Parallel.ParallelFor, ParallelForEach etc. It's not implemeted in .NET 2.0, but if you look at the spec, it'll be using C# anonymous methods. Every real programming language should have anonymous methods and closures. (sorry, Java, VB and C++) Does anyone know what kind of anonymous method/closures support C++0x is going to get?
Daniel Grunwald wrote:
Does anyone know what kind of anonymous method/closures support C++0x is going to get?
-
Joel on Software writes: Without understanding functional programming, you can't invent MapReduce, the algorithm that makes Google so massively scalable. The terms Map and Reduce come from Lisp and functional programming. MapReduce is, in retrospect, obvious to anyone who remembers from their 6.001-equivalent programming class that purely functional programs have no side effects and are thus trivially parallelizable. The very fact that Google invented MapReduce, and Microsoft didn't, says something about why Microsoft is still playing catch up trying to get basic search features to work, while Google has moved on to the next problem: building Skynet^H^H^H^H^H^H the world's largest massively parallel supercomputer. I don't think Microsoft completely understands just how far behind they are on that wave. http://www.joelonsoftware.com/items/2006/08/01.html[^]
Kevin
What about the reverse situation, which I've actually encountered more often: having to argue with developers who insist on using their "tremendous knowledge" to make software much more complicated than it has to be. (In one case, our resident PhD insisted that we use a very complicated algorithm to do tricky lookups of some data stored in static tables. I insisted we use a very simple--less than twenty lines of code simple--algorithm. He kept writing on the board the speed equation for both. Only problem is that he forgot that a) the vast majority of lookups wouldn't be worse case and b) his bulky algorithm tended to cause paging which erased all the performance advantage when tested with real world data. [This wasn't an isolated incident and he soon so annoyed everyone with nonsense like this my boss fired him.]) One thing I don't get is the claim that everyone else is plaing catch up to Google. I use Google out of habit, not because its results are that much better than anyone elses. Seems to me that Google's success is largely a marketing one, not a technical one. (Besides which, Googles approach is still basically brute force; I method I highly approve of, by the way.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
Daniel Grunwald wrote:
I don't need them very often
Then why is it a requirement of a real programming language?
Daniel Grunwald wrote:
but they are incredibly useful in many situations.
Name one, because I can't see how they are that much more useful.
Jeremy Falcon
Jeremy Falcon wrote:
Name one, because I can't see how they are that much more useful.
Anonymous methods can be very useful when doing complex sorts and/or lookups. One advantage, at least in the C# version, is that you have visibility to all the variables in the current scope. Having said that, I do agree that this isn't a requirement of a "real programming language" since even in the above case, I could have solved the same problem using non-anonymous methods which just a little more coding. (And for anything but trivial code I would since I find it more readable.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
Daniel Grunwald wrote:
Does anyone know what kind of anonymous method/closures support C++0x is going to get?
C++0x gets real closures? Cool... I guess C++ keeps being a real programming language then :-D
-
The Ecma-335 (the CLI spec) says something about System.Threading.Parallel.ParallelFor, ParallelForEach etc. It's not implemeted in .NET 2.0, but if you look at the spec, it'll be using C# anonymous methods. Every real programming language should have anonymous methods and closures. (sorry, Java, VB and C++) Does anyone know what kind of anonymous method/closures support C++0x is going to get?
Interesting, I'll have to keep an eye on that one!
Wout
-
The cost of the development of a product, and the future maintenance play a vital role in determining the proper pricing strategy. Although, in a simplistic, model you can assume standard supply and deman policies the fact is you have to take into account cost to market cost before you develop the product and before you market it along with the size of the target market and the expected draw of the target market. The analysis makes wild assumptions about future sales but is done after the design. Seems funny, I laughed. "Maybe it cost you $250,000 to develop the software in the first place, but that's a sunk cost. We don't care about that anymore, because the $250,000 is the same whether you sell 1000 units or 0. Sunk. Kiss it goodbye. Set any price you want, the $250,000 is gone and therefore not relevant any more." -Joel Q. In the land of Enterprise database systems how much do you pay for a database? A. Whatever Oracle wants you to pay.
A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
IMO: The development cost itself rarely affects the price nowadays - but of course it determines whether the project should be done at all. I guess Joel started at the point where every truly successful startup finds itself at the beginning: a cool product and no plan. At this point, you have to forget all those long nights of hard labour and the love and sweat you put into it, i.e. how great you think the product is. At least that's how I understood it. And of course, for 2.0 one has to do a little more planning :)
Some of us walk the memory lane, others plummet into a rabbit hole
Tree in C# || Fold With Us! || sighist -
What about the reverse situation, which I've actually encountered more often: having to argue with developers who insist on using their "tremendous knowledge" to make software much more complicated than it has to be. (In one case, our resident PhD insisted that we use a very complicated algorithm to do tricky lookups of some data stored in static tables. I insisted we use a very simple--less than twenty lines of code simple--algorithm. He kept writing on the board the speed equation for both. Only problem is that he forgot that a) the vast majority of lookups wouldn't be worse case and b) his bulky algorithm tended to cause paging which erased all the performance advantage when tested with real world data. [This wasn't an isolated incident and he soon so annoyed everyone with nonsense like this my boss fired him.]) One thing I don't get is the claim that everyone else is plaing catch up to Google. I use Google out of habit, not because its results are that much better than anyone elses. Seems to me that Google's success is largely a marketing one, not a technical one. (Besides which, Googles approach is still basically brute force; I method I highly approve of, by the way.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
Joe Woodbury wrote:
having to argue with developers who insist on using their "tremendous knowledge" to make software much more complicated than it has to be. (In one case, our resident PhD insisted that we use a very complicated algorithm to do tricky lookups of some data stored in static tables. I insisted we use a very simple--less than twenty lines of code simple--algorithm.
An old friend of mine with over two decades of programming experience writes: My first "Cut The Crap" moment came when I was drafted on to a multi-user word processing project. I had observed the team working for several months and had been impressed by the amount of flow charts that had been produced to design the system. I had never drawn a proper flow chart myself, with all those different symbols. I was told to take over a specific component - Form Design. Apparently it just needed "finishing off". I must have been pretty naive at the time to believe this line. I got the source code listings and started having a look (at that time you rarely viewed code online). It all seemed very complicated as I traced the program flow through the different blocks of code. After about two hours I was still confused, so I approached the guy who had produced the code: "I'm sorry Trev, but I can't find any code that does anything, it just seems to jump around testing different state variables" "Yep, that's right, I've coded all the program flow but not any of the actions" I checked through the code again. After a few minutes I saw what was happening. The "state variables" were nothing to do with the document state, or editing state, or anything really useful. It was to do with handling the "multi-user" events and returning the program to the right state to process the next user event. "In module#1, goto module#1, in mode#23, goto bit responsible for mode#23, in state#12, goto bit handling state#12, in substate#6, goto bit handling substate#6" ...and so on ...and on.. Bloody Hell! There is no way that this project could ever work if such complexity was needed just to handle a keyboard click. It was certainly more complex than I could handle. And what the hell was the rest of the team of experienced programmers doing going along with this crap? About a week later, I showed the team leader three lines of code - THREE LINES OF CODE - that achieved what the previous pages of junk attempted to approximate to, simply to be able to remember where a specific user was when the