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.
  • 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
              • N Nemanja Trifunovic

                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 Offline
                D Offline
                Daniel Grunwald
                wrote on last edited by
                #21

                C++0x gets real closures? Cool... I guess C++ keeps being a real programming language then :-D

                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?

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

                  Interesting, I'll have to keep an eye on that one!

                  Wout

                  1 Reply Last reply
                  0
                  • E Ennis Ray Lynch Jr

                    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 Offline
                    P Offline
                    peterchen
                    wrote on last edited by
                    #23

                    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

                    1 Reply Last reply
                    0
                    • J Joe Woodbury

                      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 Offline
                      K Offline
                      Kevin McFarlane
                      wrote on last edited by
                      #24

                      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

                      1 Reply Last reply
                      0
                      • J Joe Woodbury

                        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

                        D Offline
                        D Offline
                        David Patrick
                        wrote on last edited by
                        #25

                        I voted you a 5 .. if I could I would have made it a 10 !! (K)eep (I)t (S)imple (S)tupid ... an old cliche ... but as true today as ever.

                        Rocket science is more fun when you actually have rockets - US Navy ad

                        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