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. Microsoft on Multithreading

Microsoft on Multithreading

Scheduled Pinned Locked Moved The Lounge
visual-studiocomdebuggingquestion
62 Posts 39 Posters 0 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.
  • C chaiguy1337

    I quote: "Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist." here[^] :wtf::doh:

    {o,o}.oO( Did somebody say “mouse”? ) |)””’) -”-”-

    M Offline
    M Offline
    Mitch F
    wrote on last edited by
    #3

    They probably mean to not use multiple threads in every single situation. The quote that you have taken is followed by "No matter how well architected, however, no UI framework will ever be able to provide a single-threaded solution for every sort of problem. WPF comes close, but there are still situations where multiple threads improve user interface (UI) responsiveness or application performance."

    C J 2 Replies Last reply
    0
    • M Mitch F

      They probably mean to not use multiple threads in every single situation. The quote that you have taken is followed by "No matter how well architected, however, no UI framework will ever be able to provide a single-threaded solution for every sort of problem. WPF comes close, but there are still situations where multiple threads improve user interface (UI) responsiveness or application performance."

      C Offline
      C Offline
      chaiguy1337
      wrote on last edited by
      #4

      Even so, the sentence seems so absurd to me that I found myself baffled that it would be written at all, regardless of whatever "however" followed it. The solution to multithreading being complicated, IMO, is to make multithreading easier, not shying away from it entirely!

      {o,o}.oO( Did somebody say “mouse”? ) |)””’) -”-”-

      S R 2 Replies Last reply
      0
      • C chaiguy1337

        I quote: "Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist." here[^] :wtf::doh:

        {o,o}.oO( Did somebody say “mouse”? ) |)””’) -”-”-

        J Offline
        J Offline
        Judah Gabriel Himango
        wrote on last edited by
        #5

        I take that as, "If you don't have to write multithreaded programs, don't." That's sound advice.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: No, Not I - A poem by Holocaust escapee, chief rabbi, and Messiah-follower Daniel Zion (audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        G 1 Reply Last reply
        0
        • M Mitch F

          They probably mean to not use multiple threads in every single situation. The quote that you have taken is followed by "No matter how well architected, however, no UI framework will ever be able to provide a single-threaded solution for every sort of problem. WPF comes close, but there are still situations where multiple threads improve user interface (UI) responsiveness or application performance."

          J Offline
          J Offline
          Jim Crafton
          wrote on last edited by
          #6

          Mitch F. wrote:

          WPF comes close,

          Amusing, since WPF is in fact multi-threaded :) Check out the rendering architecture. Grrr, this got hooked to the wrong reply, I meant to the respond to the one above you.

          ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

          1 Reply Last reply
          0
          • C chaiguy1337

            I quote: "Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist." here[^] :wtf::doh:

            {o,o}.oO( Did somebody say “mouse”? ) |)””’) -”-”-

            C Offline
            C Offline
            Chris Maunder
            wrote on last edited by
            #7

            logan1337 wrote:

            when single-threaded solutions exist

            I think I'm going to just quietly rewrite all my use-case requests. No one will notice. "Responsive UI? Nah - we decided against that" "Efficient and speedy multiple network connections? Overrated." The "when single threaded solutions exist" is a kicker of a subtle details here.

            cheers, Chris Maunder

            CodeProject.com : C++ MVP

            G 1 Reply Last reply
            0
            • S Shog9 0

              Surprised? You shouldn't be. Microsoft exists to serve VB programmers. And for the record, i don't mean programmers who use VB - i mean folks that, were it not for the *ahem* ultra-forgiving-rely-on-3rd-party-components-for-anything-even-mildly-difficult existence of VB and kin, would not be able to call themselves programmers.  That's why 99% of applications out there will hang their UIs while doing any sort of computation, even though we've been using a threading-friendly platform for well over a decade now. That's why when, upon encountering a grid control in an application, it's a coin flip as to whether or not it will support even the most basic operations such as sorting and keyboard navigation. Of course you should avoid multithreaded solutions when you don't need them. And you should avoid using a scalpel to trim your finger nails. You also should avoid stating the obvious except when speaking to VB programmers and the mentally-handicapped. :rolleyes: ;)

              ----

              ...the wind blows over it and it is gone, and its place remembers it no more...

              M Offline
              M Offline
              marcotje
              wrote on last edited by
              #8

              dear mister shog, i don't know if you ever been abused by a vb programmer, but what is the f*cking use of the reaction it ads no additional insight in the real question... should multi threading be avoided when possible. so please refrain from talking if it not useful ! (o yeah I'm not only a vb programmer, i do c, c++, c#, java, vb, php) life would be beautiful if other ppl won't try to disrupt the sheer beauty of it. o yeah, I'm a firm believer that a lot of programmers like to make code more complicated, just to make it interesting for other programmers to look at, but has no functional benefit whatsoever. so the sentence is correct only, if it should be in this article .. no it just a good practice to make code as simple as it needs to be. -- modified at 1:52 Friday 16th November, 2007

              N D 2 Replies Last reply
              0
              • M marcotje

                dear mister shog, i don't know if you ever been abused by a vb programmer, but what is the f*cking use of the reaction it ads no additional insight in the real question... should multi threading be avoided when possible. so please refrain from talking if it not useful ! (o yeah I'm not only a vb programmer, i do c, c++, c#, java, vb, php) life would be beautiful if other ppl won't try to disrupt the sheer beauty of it. o yeah, I'm a firm believer that a lot of programmers like to make code more complicated, just to make it interesting for other programmers to look at, but has no functional benefit whatsoever. so the sentence is correct only, if it should be in this article .. no it just a good practice to make code as simple as it needs to be. -- modified at 1:52 Friday 16th November, 2007

                N Offline
                N Offline
                NormDroid
                wrote on last edited by
                #9

                marcotje wrote:

                o yeah, I'm a firm believer that a lot of programmers like to make code more complicated, just to make it interesting for other programmers to look at, but has no functional benefit whatsoever. so the sentence is correct only, if it should be in this article .. no it just a good practice to make code as simple as it needs to be.

                Write me a spreadsheet application from scratch using NO 3rd Party controls. I'll await your simplied version of it.

                WPF - Imagineers Wanted Follow your nose using DoubleAnimationUsingPath

                M 1 Reply Last reply
                0
                • C chaiguy1337

                  I quote: "Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist." here[^] :wtf::doh:

                  {o,o}.oO( Did somebody say “mouse”? ) |)””’) -”-”-

                  L Offline
                  L Offline
                  Leslie Sanford
                  wrote on last edited by
                  #10

                  Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist. I would add that when a single-threaded solution does not exist, try to make your multithreaded solution look as much like a single-threaded solution as possible. This usually involves making sure each thread owns its data and communicates with other threads in a thread safe mannor, i.e. events, messages queues, etc. Beyond that you have to put locks in the appropriate places to protect shared data, which is ok, but the complexity increases fairly quickly in that case.

                  J 1 Reply Last reply
                  0
                  • N NormDroid

                    marcotje wrote:

                    o yeah, I'm a firm believer that a lot of programmers like to make code more complicated, just to make it interesting for other programmers to look at, but has no functional benefit whatsoever. so the sentence is correct only, if it should be in this article .. no it just a good practice to make code as simple as it needs to be.

                    Write me a spreadsheet application from scratch using NO 3rd Party controls. I'll await your simplied version of it.

                    WPF - Imagineers Wanted Follow your nose using DoubleAnimationUsingPath

                    M Offline
                    M Offline
                    marcotje
                    wrote on last edited by
                    #11

                    hahhahaah, just as i said, as simple as need be, don't write a hole framework to display a button with a gradient in it. i'll send an ascii representation of my spreadsheet application ;) |__1__|__2__|__3__| here are the cells ;) haven't you been in a project where base functionality requirements are simple but the implementation of it has completely gone of scope coz the senior was sooo happy with all is generic code libs and framework modules.

                    N 1 Reply Last reply
                    0
                    • J Judah Gabriel Himango

                      I take that as, "If you don't have to write multithreaded programs, don't." That's sound advice.

                      Tech, life, family, faith: Give me a visit. I'm currently blogging about: No, Not I - A poem by Holocaust escapee, chief rabbi, and Messiah-follower Daniel Zion (audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

                      G Offline
                      G Offline
                      gedehuiyi
                      wrote on last edited by
                      #12

                      ditto:)

                      1 Reply Last reply
                      0
                      • M marcotje

                        hahhahaah, just as i said, as simple as need be, don't write a hole framework to display a button with a gradient in it. i'll send an ascii representation of my spreadsheet application ;) |__1__|__2__|__3__| here are the cells ;) haven't you been in a project where base functionality requirements are simple but the implementation of it has completely gone of scope coz the senior was sooo happy with all is generic code libs and framework modules.

                        N Offline
                        N Offline
                        NormDroid
                        wrote on last edited by
                        #13

                        I've worked on a team which developed a spreadsheet similar to Excel, soound like you're a typical hobbyist programming plodding along with simple not to over complicated programs like data entry screens.

                        WPF - Imagineers Wanted Follow your nose using DoubleAnimationUsingPath

                        M 1 Reply Last reply
                        0
                        • C chaiguy1337

                          I quote: "Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist." here[^] :wtf::doh:

                          {o,o}.oO( Did somebody say “mouse”? ) |)””’) -”-”-

                          N Offline
                          N Offline
                          NormDroid
                          wrote on last edited by
                          #14

                          I remember readying something similar from Microsft back in the '90s, targeted at VB programmers.

                          WPF - Imagineers Wanted Follow your nose using DoubleAnimationUsingPath

                          1 Reply Last reply
                          0
                          • C chaiguy1337

                            Even so, the sentence seems so absurd to me that I found myself baffled that it would be written at all, regardless of whatever "however" followed it. The solution to multithreading being complicated, IMO, is to make multithreading easier, not shying away from it entirely!

                            {o,o}.oO( Did somebody say “mouse”? ) |)””’) -”-”-

                            S Offline
                            S Offline
                            Stuart Dootson
                            wrote on last edited by
                            #15

                            Some problems are inherently complicated - if not strictly bounded, concurrency is one of those. If you can bound your concurrency to 'the set of concurrent processes that do not share state' (e.g. like Erlang does), then concurrency is a lot easier. However, multiple threads with shared state and multiple locks? That's going to have defectsw you never even realised could happen.

                            1 Reply Last reply
                            0
                            • S Shog9 0

                              Surprised? You shouldn't be. Microsoft exists to serve VB programmers. And for the record, i don't mean programmers who use VB - i mean folks that, were it not for the *ahem* ultra-forgiving-rely-on-3rd-party-components-for-anything-even-mildly-difficult existence of VB and kin, would not be able to call themselves programmers.  That's why 99% of applications out there will hang their UIs while doing any sort of computation, even though we've been using a threading-friendly platform for well over a decade now. That's why when, upon encountering a grid control in an application, it's a coin flip as to whether or not it will support even the most basic operations such as sorting and keyboard navigation. Of course you should avoid multithreaded solutions when you don't need them. And you should avoid using a scalpel to trim your finger nails. You also should avoid stating the obvious except when speaking to VB programmers and the mentally-handicapped. :rolleyes: ;)

                              ----

                              ...the wind blows over it and it is gone, and its place remembers it no more...

                              K Offline
                              K Offline
                              KaRl
                              wrote on last edited by
                              #16

                              Hear, hear!


                              Change of fashion is the tax levied by the industry of the poor on the vanity of the rich Fold with us! ¤ flickr

                              D 1 Reply Last reply
                              0
                              • C chaiguy1337

                                I quote: "Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist." here[^] :wtf::doh:

                                {o,o}.oO( Did somebody say “mouse”? ) |)””’) -”-”-

                                R Offline
                                R Offline
                                R Giskard Reventlov
                                wrote on last edited by
                                #17

                                A poor quote; perhaps should have been 'Keep it simple, stupid' and not directed at threading. I don't see this as an attack on non-VBers and I don't get the constant sniping at VBers, either. It's just another tool: get over it.

                                home articles for dummies

                                B 1 Reply Last reply
                                0
                                • N NormDroid

                                  I've worked on a team which developed a spreadsheet similar to Excel, soound like you're a typical hobbyist programming plodding along with simple not to over complicated programs like data entry screens.

                                  WPF - Imagineers Wanted Follow your nose using DoubleAnimationUsingPath

                                  M Offline
                                  M Offline
                                  marcotje
                                  wrote on last edited by
                                  #18

                                  depends on you're definition of an hobbyist, been working commercial wise for 26 years now. but he who am i. the problem is that I've had to work with to many coworkers that make judgement on stuff without really knowing what there judging on. assumption is the mother of all fuck-ups.

                                  N N 2 Replies Last reply
                                  0
                                  • R R Giskard Reventlov

                                    A poor quote; perhaps should have been 'Keep it simple, stupid' and not directed at threading. I don't see this as an attack on non-VBers and I don't get the constant sniping at VBers, either. It's just another tool: get over it.

                                    home articles for dummies

                                    B Offline
                                    B Offline
                                    BadKarma
                                    wrote on last edited by
                                    #19

                                    digital man wrote:

                                    A poor quote; perhaps should have been 'Keep it simple, stupid' and not directed at threading. I don't see this as an attack on non-VBers and I don't get the constant sniping at VBers, either. It's just another tool: get over it.

                                    Thats correct VB is a tool while the others are Programming Languages ;P

                                    codito ergo sum

                                    R 1 Reply Last reply
                                    0
                                    • C chaiguy1337

                                      I quote: "Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist." here[^] :wtf::doh:

                                      {o,o}.oO( Did somebody say “mouse”? ) |)””’) -”-”-

                                      R Offline
                                      R Offline
                                      Roger Stoltz
                                      wrote on last edited by
                                      #20

                                      logan1337 wrote:

                                      "Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist."

                                      I suspect that technically there is always a single threaded solution. The problem is that the end user may not like the "solution" since in many cases the UI would become unresponsive. Writing multithreaded applications can be hard and in my humble opinion many "programmers" haven't really understood the basics of it and that causes troubles in terms of applications that hang and so on. I consider multithreading a powerful tool in the programmer's toolbox, but I've also experienced that people doesn't know how to use the tools in the toolbox even if they refer to themselves as programmers. If I need a carpenter and it turns out he doesn't know how to use a screwdriver, I wouldn't trust him to build my house/bookshelf/whatever even if he calls himself a carpenter. On no way is this a malfunction of the screwdriver. All kind of screwdrivers are available on the market and anyone can buy them, but the know-how of how to use the screwdriver isn't included in the purchase of the tool. If the screwdriver manufacturer published a proclamation that said "screwdrivers may damage the head of the screws, use our hammer instead if possible", I would certainly doubt any carpenter that claimed this proclamation to be a good advice since I would conclude that he apparently doesn't know how to use a screwdriver. Of course it's always technically possible to use a hammer instead of a screwdriver, but that would cause unwanted side effects that are obvious to skilled carpenters.


                                      "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                                      "High speed never compensates for wrong direction!" - unknown

                                      M L B 3 Replies Last reply
                                      0
                                      • B BadKarma

                                        digital man wrote:

                                        A poor quote; perhaps should have been 'Keep it simple, stupid' and not directed at threading. I don't see this as an attack on non-VBers and I don't get the constant sniping at VBers, either. It's just another tool: get over it.

                                        Thats correct VB is a tool while the others are Programming Languages ;P

                                        codito ergo sum

                                        R Offline
                                        R Offline
                                        R Giskard Reventlov
                                        wrote on last edited by
                                        #21

                                        What's really sad is you probably believe that.

                                        home articles for dummies

                                        M 1 Reply Last reply
                                        0
                                        • M marcotje

                                          depends on you're definition of an hobbyist, been working commercial wise for 26 years now. but he who am i. the problem is that I've had to work with to many coworkers that make judgement on stuff without really knowing what there judging on. assumption is the mother of all fuck-ups.

                                          N Offline
                                          N Offline
                                          NormDroid
                                          wrote on last edited by
                                          #22

                                          marcotje wrote:

                                          coworkers that make judgement on stuff without really knowing what there judging on

                                          In the VB area, people get into computing without any formal training hence you get this situation which you are describing. Yes I remember walking into a airport with 10+ comms experience and meeting a guy who had 6 months VB user experience to tell me I had to use his sample (copied from a book using the ActiveX comms control) program base I my program mission critical comms software on. Needless to say I blew him out of the water.

                                          WPF - Imagineers Wanted Follow your nose using DoubleAnimationUsingPath

                                          M 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