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. C#/ / .NET Observation

C#/ / .NET Observation

Scheduled Pinned Locked Moved The Lounge
csharpc++csscomtutorial
38 Posts 22 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.
  • N Nemanja Trifunovic

    When I was working with C# before happily returning back to C++ one thing I noticed being *really* abused was the reflection. I understand there are valid uses of reflection/introspection - mostly for the dev tools and code analysis - but creating the complete UI out of some crazy XML files with reflection was simply wrong - it made the application less robust and it would take forever to start.

    Programming Blog utf8-cpp

    M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #9

    Nemanja Trifunovic wrote:

    but creating the complete UI out of some crazy XML files with reflection was simply wrong - it made the application less robust and it would take forever to start.

    :~ :-D Marc

    Thyme In The Country Interacx My Blog

    J 1 Reply Last reply
    0
    • J James R Twine

      As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

      -=- James
      Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
      Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
      See DeleteFXPFiles

      M Offline
      M Offline
      Marc Clifton
      wrote on last edited by
      #10

      protected KeyedList<ViewListenerKey, List<SessionContainerListener>> viewListeners;
      protected KeyedList<ViewListenerKey, ViewKeyData> viewKeyData;
      protected KeyedList<SessionContainerViewListenerKey, List<DataTable>> sessionTransactions;

      Run. Don't walk, run. :-D Marc

      Thyme In The Country Interacx My Blog

      P D 2 Replies Last reply
      0
      • J James R Twine

        As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

        -=- James
        Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
        Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
        See DeleteFXPFiles

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #11

        It does not surprise me that people did not use std::map, most people simply used CArray and didn't move beyond that. Personally, I used std::map all the time, although not for collections of numbers or collections of 5 objects :-) The syndrome is the same in both cases, only a subset of the people using a language are interested in learning to use it well.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        U 1 Reply Last reply
        0
        • C Christian Graus

          It does not surprise me that people did not use std::map, most people simply used CArray and didn't move beyond that. Personally, I used std::map all the time, although not for collections of numbers or collections of 5 objects :-) The syndrome is the same in both cases, only a subset of the people using a language are interested in learning to use it well.

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          U Offline
          U Offline
          User of Users Group
          wrote on last edited by
          #12

          It's not just the abuse of reflection which is abundant but as mentioned blind 'hey it'll handle it for me' CLR collection following and not understanding how expensive those, default and often dev induced, lousy Equality tests are. There is much hacking there and MS attempting to fix by-large an inefficient and at times broken model. It isn't funny, IEquatable, IComparable, casts, boxing even when many think they are avoiding it, virtual dispatch, devs not understanding good hash impls, you name it. I mean it is obvious when a C# guy asks for VB.NET to be converted and vice versa. And I agree whenever a return to C++ is due, it ends up always refreshing. Even if you have no System.Object, KeyValueDictionary generic is involved in hash as well, it makes most of the code involved, or better put modeling/naming with it suck too ( Heck the hash in object is the Java idea, but I'll agree hash has its purposes and at least one dynamic language implementation excels on it). Anyway, after 7 years of working with collections in .NET I think it just shows how badly the entire show is for Key/Value, value vs reference, and runtime binding.. Don't even get me on multiple inheritance, something no matter what runtime zealots say is bad, it just blasts away all key/value attempts to 100% .NET runtime blindess. It is all meant to be about building types, but when you look at it CLR/Java mentality prefers to get a guy thinking he is up and running quick and cool. And after a while you just see the effect it has on software quality: Incorectness/incompleteness, RAM and CPU over-utilisation.

          L 1 Reply Last reply
          0
          • J James R Twine

            As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

            -=- James
            Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
            Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
            See DeleteFXPFiles

            L Offline
            L Offline
            led mike
            wrote on last edited by
            #13

            James R. Twine wrote:

            I have seen LOTS of uses of the Hashtable type

            In Pre .NET 2.0 code. 2.0 introduced Generics and everything collection wise changed drastically. All old collection code should be migrated to using Generics, well there are exceptions of course but as a rule of thumb, just do it. So stop looking at 1.X code. ;P

            led mike

            U 1 Reply Last reply
            0
            • U User of Users Group

              It's not just the abuse of reflection which is abundant but as mentioned blind 'hey it'll handle it for me' CLR collection following and not understanding how expensive those, default and often dev induced, lousy Equality tests are. There is much hacking there and MS attempting to fix by-large an inefficient and at times broken model. It isn't funny, IEquatable, IComparable, casts, boxing even when many think they are avoiding it, virtual dispatch, devs not understanding good hash impls, you name it. I mean it is obvious when a C# guy asks for VB.NET to be converted and vice versa. And I agree whenever a return to C++ is due, it ends up always refreshing. Even if you have no System.Object, KeyValueDictionary generic is involved in hash as well, it makes most of the code involved, or better put modeling/naming with it suck too ( Heck the hash in object is the Java idea, but I'll agree hash has its purposes and at least one dynamic language implementation excels on it). Anyway, after 7 years of working with collections in .NET I think it just shows how badly the entire show is for Key/Value, value vs reference, and runtime binding.. Don't even get me on multiple inheritance, something no matter what runtime zealots say is bad, it just blasts away all key/value attempts to 100% .NET runtime blindess. It is all meant to be about building types, but when you look at it CLR/Java mentality prefers to get a guy thinking he is up and running quick and cool. And after a while you just see the effect it has on software quality: Incorectness/incompleteness, RAM and CPU over-utilisation.

              L Offline
              L Offline
              led mike
              wrote on last edited by
              #14

              User of Users Group wrote:

              and MS attempting to fix by-large an inefficient and at times broken model.

              Mostly the model is broken by the loose nut between the chair and the keyboard.

              led mike

              U 1 Reply Last reply
              0
              • L led mike

                User of Users Group wrote:

                and MS attempting to fix by-large an inefficient and at times broken model.

                Mostly the model is broken by the loose nut between the chair and the keyboard.

                led mike

                U Offline
                U Offline
                User of Users Group
                wrote on last edited by
                #15

                Yeah right, I can see your post below and you are probably not aware (or the guy voting you 5, plenty of those runtime lovers around) most of those Generics still use the hash (and some broken/unchecked runtime comparisons if you prefer), it has nothing to do with 1.1 :) Besides when they initially did that Rotor hack in MSR, many people in languages field (and less broken models) just went: *sigh*. Generics (List and some other bits aside) are so weak in comparison to alternatives by not just C++, it doesn't surprise me to see people believe they are sooo, oh soo 'powerful', or thinking that by default they really eliminate boxing or virtual dispatch (that is the type responsibility and implementing one as complete as MS does for its own, shows you how much bloat is involved to express a simple primitive).

                modified on Thursday, January 31, 2008 3:07:44 PM

                L E 2 Replies Last reply
                0
                • N Nemanja Trifunovic

                  When I was working with C# before happily returning back to C++ one thing I noticed being *really* abused was the reflection. I understand there are valid uses of reflection/introspection - mostly for the dev tools and code analysis - but creating the complete UI out of some crazy XML files with reflection was simply wrong - it made the application less robust and it would take forever to start.

                  Programming Blog utf8-cpp

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

                  Nemanja Trifunovic wrote:

                  but creating the complete UI out of some crazy XML files with reflection was simply wrong

                  (cough)XAML(cough)(gag)(spittle)

                  ¡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

                  P 1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    I have never knowingly used a hashtable in C#, and I stayed as far away as possible from STL when I was doing C++.

                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

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

                    Why? Associative arrays have all sort of legitimate uses. Why wouldn't you use them?

                    ¡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
                    • U User of Users Group

                      Yeah right, I can see your post below and you are probably not aware (or the guy voting you 5, plenty of those runtime lovers around) most of those Generics still use the hash (and some broken/unchecked runtime comparisons if you prefer), it has nothing to do with 1.1 :) Besides when they initially did that Rotor hack in MSR, many people in languages field (and less broken models) just went: *sigh*. Generics (List and some other bits aside) are so weak in comparison to alternatives by not just C++, it doesn't surprise me to see people believe they are sooo, oh soo 'powerful', or thinking that by default they really eliminate boxing or virtual dispatch (that is the type responsibility and implementing one as complete as MS does for its own, shows you how much bloat is involved to express a simple primitive).

                      modified on Thursday, January 31, 2008 3:07:44 PM

                      L Offline
                      L Offline
                      led mike
                      wrote on last edited by
                      #18

                      User of Users Group wrote:

                      Generics still use the hash

                      Yes i reacted to Hashtable and apparently missed the overall point of the thread, oops :doh:

                      User of Users Group wrote:

                      it has nothing to do with 1.1

                      Of course since i missed the point I was talking about this.[^] Generics are the most powerful feature of C# 2.0. Generics allow you to define type-safe data structures, without committing to actual data types. This results in a significant performance boost and higher quality code, because you get to reuse data processing algorithms without duplicating type-specific code. and[^] Collision Resolution in the Dictionary Class

                      The Dictionary class differs from the Hashtable class in more ways than one. In addition to being strongly-typed, the Dictionary also employs a different collision resolution strategy than the Hashtable class, using a technique referred to as chaining. Recall that with probing, in the event of a collision another slot in the list of buckets is tried. (With rehashing, the hash is recomputed, and that new slot is tried.) With chaining, however, a secondary data structure is utilized to hold any collisions. Specifically, each slot in the Dictionary has an array of elements that map to that bucket. In the event of a collision, the colliding element is prepended to the bucket's list.

                      User of Users Group wrote:

                      you are probably not aware

                      If and when that is true, I don't know nor will I ever know everything, I am the loose nut breaking things. You might have read my initial post as excluding myself as the nut causing the problems, not so.


                      Last modified: 31mins after originally posted --

                      E 1 Reply Last reply
                      0
                      • U User of Users Group

                        Yeah right, I can see your post below and you are probably not aware (or the guy voting you 5, plenty of those runtime lovers around) most of those Generics still use the hash (and some broken/unchecked runtime comparisons if you prefer), it has nothing to do with 1.1 :) Besides when they initially did that Rotor hack in MSR, many people in languages field (and less broken models) just went: *sigh*. Generics (List and some other bits aside) are so weak in comparison to alternatives by not just C++, it doesn't surprise me to see people believe they are sooo, oh soo 'powerful', or thinking that by default they really eliminate boxing or virtual dispatch (that is the type responsibility and implementing one as complete as MS does for its own, shows you how much bloat is involved to express a simple primitive).

                        modified on Thursday, January 31, 2008 3:07:44 PM

                        E Offline
                        E Offline
                        El Corazon
                        wrote on last edited by
                        #19

                        User of Users Group wrote:

                        or the guy voting you 5, plenty of those runtime lovers around)

                        actually the guy voting him a 5 may support the statement but not the stance... ;) often cases, most models, in mosts languages, are broken by the nut behind the keyboard. The result is often something that works small but doesn't scale, or that needs rewriting consistently over years, or any number of other things that happen to it. supporting that statement neither supports nor refutes the use of generics, lambda operations or any number of newer language features over the years. Almost anything "can" be used for good, but usually the nut behind the keyboard is holding back either C++ or C# or even any other language you or I or the world can invent. :-D :-D

                        _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                        1 Reply Last reply
                        0
                        • L led mike

                          James R. Twine wrote:

                          I have seen LOTS of uses of the Hashtable type

                          In Pre .NET 2.0 code. 2.0 introduced Generics and everything collection wise changed drastically. All old collection code should be migrated to using Generics, well there are exceptions of course but as a rule of thumb, just do it. So stop looking at 1.X code. ;P

                          led mike

                          U Offline
                          U Offline
                          User of Users Group
                          wrote on last edited by
                          #20

                          Plenty of loose nuts in ASP.NET source, WPF dragging itself, and default provision of method implementation by CLR in many, many types :-) Go on, look at their source, use shift operator on the bits, all in an idea of runtime that is supposed to abstract blitting and bits.. You'll end up with Java or Java IDE feeling when users stress your app, reasons are outlined in that generic, one that cannot even properly compare value types, and frankly that is a disaster, mass-market, language design, Anders Legend-Lover or not. But you knew that anyway..

                          1 Reply Last reply
                          0
                          • J James R Twine

                            As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

                            -=- James
                            Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                            Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                            See DeleteFXPFiles

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

                            Given that I do C++,not C#...when I use STL, I am pretty aware of the big-O characteristics of the different containers - they're specified in the standard, for crying out loud!  C#...dunno - what are the big-O characteristics? I'd presume they are similar to the STL containers...but I really don't know. Also - C#..is it VB6 for the 00's? Not entirely, I'm sure, but I think the VB6 programmers have moved to C# :-)

                            M 1 Reply Last reply
                            0
                            • J Jim Crafton

                              Nemanja Trifunovic wrote:

                              but creating the complete UI out of some crazy XML files with reflection was simply wrong

                              (cough)XAML(cough)(gag)(spittle)

                              ¡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

                              P Offline
                              P Offline
                              Pete OHanlon
                              wrote on last edited by
                              #22

                              Jim Crafton wrote:

                              (cough)XAML(cough)(gag)(spittle)

                              Nay. MyXAML - that's the way. ;)

                              Deja View - the feeling that you've seen this post before.

                              My blog | My articles

                              1 Reply Last reply
                              0
                              • M Marc Clifton

                                protected KeyedList<ViewListenerKey, List<SessionContainerListener>> viewListeners;
                                protected KeyedList<ViewListenerKey, ViewKeyData> viewKeyData;
                                protected KeyedList<SessionContainerViewListenerKey, List<DataTable>> sessionTransactions;

                                Run. Don't walk, run. :-D Marc

                                Thyme In The Country Interacx My Blog

                                P Offline
                                P Offline
                                Pete OHanlon
                                wrote on last edited by
                                #23

                                Marc Clifton wrote:

                                protected KeyedList> viewListeners;protected KeyedList viewKeyData;protected KeyedList> sessionTransactions;

                                Be scared. Be very scared. Generic List Guy's about.

                                Deja View - the feeling that you've seen this post before.

                                My blog | My articles

                                1 Reply Last reply
                                0
                                • L led mike

                                  User of Users Group wrote:

                                  Generics still use the hash

                                  Yes i reacted to Hashtable and apparently missed the overall point of the thread, oops :doh:

                                  User of Users Group wrote:

                                  it has nothing to do with 1.1

                                  Of course since i missed the point I was talking about this.[^] Generics are the most powerful feature of C# 2.0. Generics allow you to define type-safe data structures, without committing to actual data types. This results in a significant performance boost and higher quality code, because you get to reuse data processing algorithms without duplicating type-specific code. and[^] Collision Resolution in the Dictionary Class

                                  The Dictionary class differs from the Hashtable class in more ways than one. In addition to being strongly-typed, the Dictionary also employs a different collision resolution strategy than the Hashtable class, using a technique referred to as chaining. Recall that with probing, in the event of a collision another slot in the list of buckets is tried. (With rehashing, the hash is recomputed, and that new slot is tried.) With chaining, however, a secondary data structure is utilized to hold any collisions. Specifically, each slot in the Dictionary has an array of elements that map to that bucket. In the event of a collision, the colliding element is prepended to the bucket's list.

                                  User of Users Group wrote:

                                  you are probably not aware

                                  If and when that is true, I don't know nor will I ever know everything, I am the loose nut breaking things. You might have read my initial post as excluding myself as the nut causing the problems, not so.


                                  Last modified: 31mins after originally posted --

                                  E Offline
                                  E Offline
                                  El Corazon
                                  wrote on last edited by
                                  #24

                                  led mike wrote:

                                  because you get to reuse data processing algorithms without duplicating type-specific code.

                                  Although this is a good thing for some things, again as mentioned it is often used and abused in areas where use of generics do not save the algorithm because the algorithm cannot truly be generic. The case often used for examples of generics is a sort where identification of a number or string or other data item only requires identification of less than or greater than values, such capabilities existed with overloads, though generics allow for one typing, as do templates, etc. But the actual use in the field would probably be an algorithm for line of site for RF which is highly dependant upon frequency and the algorithm actually has to change at various frequencies along the way. Because the guy behind the keyboard thinks generics are a magical automatic process of saving his algorithm for reuse without any real knowledge of what it does, or how it works, or even if it applies to the process in question that he is coding. Such "magical saving graces" are more danger than savings because of that guy behind the keyboard. magic doesn't save anyone, if anything knowledge does, not lack therein. All of these things are more powerful when you put thought behind them, not when they are advertised as basis for less thought. That is where the danger lies.

                                  _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                                  1 Reply Last reply
                                  0
                                  • J James R Twine

                                    As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

                                    -=- James
                                    Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                                    Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                                    See DeleteFXPFiles

                                    P Offline
                                    P Offline
                                    Pete OHanlon
                                    wrote on last edited by
                                    #25

                                    James R. Twine wrote:

                                    I am not sure if it is the child with a hammer syndrome or not... What do you think?

                                    My concern is more to do with the standard of developer let loose on the language. We keep seeing posts stating "How do I pass value from form 1 to form 2" and it's obvious that the developers aren't even bothering to think. Just because you can do something quickly in .NET it doesn't mean that you can ignore the basics of design. There's nothing inherently wrong with using a hashtable or a dictionary of some type, but there is something wrong with using it where a simple array would suffice.

                                    Deja View - the feeling that you've seen this post before.

                                    My blog | My articles

                                    M 1 Reply Last reply
                                    0
                                    • P Pete OHanlon

                                      James R. Twine wrote:

                                      I am not sure if it is the child with a hammer syndrome or not... What do you think?

                                      My concern is more to do with the standard of developer let loose on the language. We keep seeing posts stating "How do I pass value from form 1 to form 2" and it's obvious that the developers aren't even bothering to think. Just because you can do something quickly in .NET it doesn't mean that you can ignore the basics of design. There's nothing inherently wrong with using a hashtable or a dictionary of some type, but there is something wrong with using it where a simple array would suffice.

                                      Deja View - the feeling that you've seen this post before.

                                      My blog | My articles

                                      M Offline
                                      M Offline
                                      Mustafa Ismail Mustafa
                                      wrote on last edited by
                                      #26

                                      Sadly yes. This is the root of all evil; trying to tackle a problem without understanding what's needed first. Proper design comes after proper understanding and that comes from using your brain. These days, that's becoming as rare as hen's teeth.

                                      "Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "The secret to a long and healthy life is simple. Don't get ill and don't die." Pete O'Hanlon, courtesy of Rama Krishna Vavilala

                                      E 1 Reply Last reply
                                      0
                                      • S Stuart Dootson

                                        Given that I do C++,not C#...when I use STL, I am pretty aware of the big-O characteristics of the different containers - they're specified in the standard, for crying out loud!  C#...dunno - what are the big-O characteristics? I'd presume they are similar to the STL containers...but I really don't know. Also - C#..is it VB6 for the 00's? Not entirely, I'm sure, but I think the VB6 programmers have moved to C# :-)

                                        M Offline
                                        M Offline
                                        Mustafa Ismail Mustafa
                                        wrote on last edited by
                                        #27

                                        Stuart Dootson wrote:

                                        I think the VB6 programmers have moved to C#

                                        No, they either learned what OO is and moved to VB.NET or they got promoted into a position where they say, "back in the old days."

                                        "Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "The secret to a long and healthy life is simple. Don't get ill and don't die." Pete O'Hanlon, courtesy of Rama Krishna Vavilala

                                        1 Reply Last reply
                                        0
                                        • J James R Twine

                                          As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

                                          -=- James
                                          Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                                          Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                                          See DeleteFXPFiles

                                          R Offline
                                          R Offline
                                          Rocky Moore
                                          wrote on last edited by
                                          #28

                                          Now that we have LINQ, I can see the List<> types getting some heavy abuse. Too easy with LINQ to sort, group, calcuate, etc all from a simple List<>. Of course, LINQ works with other objects, but I got a felling some developers will think list about the needs of an app and head straight for simple, quick to implement solutions.

                                          Rocky <>< Blog Post: Handy utility app that is always on my machines! Tech Blog Post: Moving on up with Windows Live stuff and Plus!

                                          U 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