Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Can Your Programming Language Do This?

Can Your Programming Language Do This?

Scheduled Pinned Locked Moved The Lounge
htmlcomalgorithmsfunctionalhelp
25 Posts 14 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kevin McFarlane
    wrote on last edited by
    #1

    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

    E J P J W 6 Replies Last reply
    0
    • K Kevin McFarlane

      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

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #2

      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

      P 1 Reply Last reply
      0
      • K Kevin McFarlane

        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

        J Offline
        J Offline
        J Dunlap
        wrote on last edited by
        #3

        ...and it's made by Microsoft. ;-P

        1 Reply Last reply
        0
        • K Kevin McFarlane

          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

          P Offline
          P Offline
          Paul Watson
          wrote on last edited by
          #4

          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

          Shog9 wrote:

          eh, stop bugging me about it, give it a couple of days, see what happens.

          D 1 Reply Last reply
          0
          • P Paul Watson

            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

            Shog9 wrote:

            eh, stop bugging me about it, give it a couple of days, see what happens.

            D Offline
            D Offline
            David Stone
            wrote on last edited by
            #5

            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

            P 1 Reply Last reply
            0
            • D David Stone

              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

              P Offline
              P Offline
              Paul Watson
              wrote on last edited by
              #6

              Yeah 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

              Shog9 wrote:

              eh, stop bugging me about it, give it a couple of days, see what happens.

              1 Reply Last reply
              0
              • K Kevin McFarlane

                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

                J Offline
                J Offline
                Jeremy Falcon
                wrote on last edited by
                #7

                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

                D 1 Reply Last reply
                0
                • K Kevin McFarlane

                  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

                  W Offline
                  W Offline
                  wout de zeeuw
                  wrote on last edited by
                  #8

                  Abstraction of looping, don't foreach/iterators do that for you? Doesn't sound like a spectacular insight to me. :doh:

                  Wout

                  D 1 Reply Last reply
                  0
                  • J Jeremy Falcon

                    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

                    D Offline
                    D Offline
                    Dustin Metzgar
                    wrote on last edited by
                    #9

                    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.

                    J 1 Reply Last reply
                    0
                    • W wout de zeeuw

                      Abstraction of looping, don't foreach/iterators do that for you? Doesn't sound like a spectacular insight to me. :doh:

                      Wout

                      D Offline
                      D Offline
                      Daniel Grunwald
                      wrote on last edited by
                      #10

                      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?

                      J J N W 4 Replies Last reply
                      0
                      • D Daniel Grunwald

                        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?

                        J Offline
                        J Offline
                        Jeremy Falcon
                        wrote on last edited by
                        #11

                        Daniel Grunwald wrote:

                        Every real programming language should have anonymous methods

                        Why?

                        Jeremy Falcon

                        D 1 Reply Last reply
                        0
                        • D Dustin Metzgar

                          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.

                          J Offline
                          J Offline
                          Jeremy Falcon
                          wrote on last edited by
                          #12

                          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

                          1 Reply Last reply
                          0
                          • J Jeremy Falcon

                            Daniel Grunwald wrote:

                            Every real programming language should have anonymous methods

                            Why?

                            Jeremy Falcon

                            D Offline
                            D Offline
                            Daniel Grunwald
                            wrote on last edited by
                            #13

                            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.

                            J 1 Reply Last reply
                            0
                            • D Daniel Grunwald

                              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.

                              J Offline
                              J Offline
                              Jeremy Falcon
                              wrote on last edited by
                              #14

                              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

                              J 1 Reply Last reply
                              0
                              • D Daniel Grunwald

                                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?

                                J Offline
                                J Offline
                                Josh Smith
                                wrote on last edited by
                                #15

                                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[^]

                                1 Reply Last reply
                                0
                                • E Ennis Ray Lynch Jr

                                  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

                                  P Offline
                                  P Offline
                                  peterchen
                                  wrote on last edited by
                                  #16

                                  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

                                  E 1 Reply Last reply
                                  0
                                  • P peterchen

                                    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

                                    E Offline
                                    E Offline
                                    Ennis Ray Lynch Jr
                                    wrote on last edited by
                                    #17

                                    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

                                    P 1 Reply Last reply
                                    0
                                    • D Daniel Grunwald

                                      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?

                                      N Offline
                                      N Offline
                                      Nemanja Trifunovic
                                      wrote on last edited by
                                      #18

                                      Daniel Grunwald wrote:

                                      Does anyone know what kind of anonymous method/closures support C++0x is going to get?

                                      Lambdas.[^]

                                      Programming Blog utf8-cpp

                                      D 1 Reply Last reply
                                      0
                                      • K Kevin McFarlane

                                        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

                                        J Offline
                                        J Offline
                                        Joe Woodbury
                                        wrote on last edited by
                                        #19

                                        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

                                        K D 2 Replies Last reply
                                        0
                                        • J Jeremy Falcon

                                          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

                                          J Offline
                                          J Offline
                                          Joe Woodbury
                                          wrote on last edited by
                                          #20

                                          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

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups