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. Other Discussions
  3. The Weird and The Wonderful
  4. A disturbing new trend?

A disturbing new trend?

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasequestioncsharpcomdata-structures
57 Posts 33 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.
  • P PIEBALDconsult

    When I first learned BASIC in the '80s, the only structure available was the array, so we had to use that and build up more complex structures, but that's just not necessary with C#, OOP, and Collections. So I am saddened to these posts from the last few days: "Int32[] playerNumbers, String[] playerLastName, Int32[] playerPoints" -- Arrays how to delete multiple entries[^] "Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints" -- Cannot convert type int[] to int[^] "Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints" -- delete method not deleting[^] "Array carPark[10][2];" -- What Is Wrong With The Code And Why Doesnt It Run When I Try To Run It In C#[^] Those first two are the same member, the third probably is as well. The fourth is at least using a two-dimensional array, but he obviously copied it from somewhere and has no idea what it is. Oh, sweet Bob, they keep coming... "public string[][] Select(string query)" -- How to return array or list 2 dimensional from SQL Query[^] WTF!? "ProcessDelete(Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints )"

    M Offline
    M Offline
    Member_5893260
    wrote on last edited by
    #46

    It's worse than the '80s. Pascal and C had complex types at the end of the '60s. Even Fortran had a complex type (a pair of integers) in 1957...

    1 Reply Last reply
    0
    • M Marc Clifton

      PIEBALDconsult wrote:

      When I first learned BASIC in the '80s, the only structure available was the array,

      Then C introduced the struct. Then C++ decided struct should have methods, and called it a class and added all sorts of other artifacts (inheritance, polymorphism, and encapsulation.) Then came along relational databases, and we were introduced in C# to a newfangled way of working with structures, the DataTable, DataView and DataSet, but those caused impedence mismatches so a new artifact was born, the ORM. Then the jar-heads decided to inflict themselves on the process because this was all too complicated and created JSON, a string "structure" that took us back to the BASIC 80's of untyped data and structure encoded in the string itself. Simultaneously, the "kids" (who were not even a glimmer in the eyes of their parents in the 80's) decided that relational databases were bad and gave us NoSQL, which, guess what, uses JSON, is document oriented and requires client-side callbacks to "join" data across documents. And this is called progress. Marc

      Imperative to Functional Programming Succinctly Higher Order Programming

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #47

      JSON is more lightweight as opposed to XML (no tags required - but does imply foreknowledge of the data formatting). As well - you don't have to worry about malformed tags et al. This is particularly important when trying to reduce traffic on the wire... XML is "pretty", but can be a pig on the wire.

      M 1 Reply Last reply
      0
      • L Lost User

        JSON is more lightweight as opposed to XML (no tags required - but does imply foreknowledge of the data formatting). As well - you don't have to worry about malformed tags et al. This is particularly important when trying to reduce traffic on the wire... XML is "pretty", but can be a pig on the wire.

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

        Rene Pilon wrote:

        XML is "pretty", but can be a pig on the wire.

        True, but the fact that we have to serialize data to in JSON / XML is absurd to begin with, and is a "workaround technology" to deal with doing something that HTTP was never originally intended to do. JSON is simply a bandaid on a corpse that refuses to die, and yet it has also become a way to animate other monsters. Marc

        Imperative to Functional Programming Succinctly Higher Order Programming

        1 Reply Last reply
        0
        • P PIEBALDconsult

          When I first learned BASIC in the '80s, the only structure available was the array, so we had to use that and build up more complex structures, but that's just not necessary with C#, OOP, and Collections. So I am saddened to these posts from the last few days: "Int32[] playerNumbers, String[] playerLastName, Int32[] playerPoints" -- Arrays how to delete multiple entries[^] "Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints" -- Cannot convert type int[] to int[^] "Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints" -- delete method not deleting[^] "Array carPark[10][2];" -- What Is Wrong With The Code And Why Doesnt It Run When I Try To Run It In C#[^] Those first two are the same member, the third probably is as well. The fourth is at least using a two-dimensional array, but he obviously copied it from somewhere and has no idea what it is. Oh, sweet Bob, they keep coming... "public string[][] Select(string query)" -- How to return array or list 2 dimensional from SQL Query[^] WTF!? "ProcessDelete(Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints )"

          P Offline
          P Offline
          patbob
          wrote on last edited by
          #49

          The multiple arrays design isn't really needed much anymore, but similar issues do occasionally crop up from time to time in the real world. I'd rather see students learn how to handle those issues on assigned toy problems than in real world code. I'd like to believe they just haven't been educated in OOP very well yet, which given that it is early in the school year, may well be possible. Even the does-not-compile code is a typical student blunder, I used to see several similar problems every semester when I use to work at the school computing center. Kudos to this student since they're well on their way to having a clue -- they're getting to it early, instead of waiting till the end of the class, which is usually when we'd get students that lost.

          We can program with only 1's, but if all you've got are zeros, you've got nothing.

          1 Reply Last reply
          0
          • Sander RosselS Sander Rossel

            So is the trend that teachers can't teach or that students can't learn? :rolleyes:

            It's an OO world.

            public class SanderRossel : Lazy<Person>
            {
            public void DoWork()
            {
            throw new NotSupportedException();
            }
            }

            My blog[^]

            U Offline
            U Offline
            User 10083203
            wrote on last edited by
            #50

            It is a bit of both. There are teachers who can't teach, because they are so busy trying to keep up their "no child left behind" status or simply are collecting a paycheck. There are students who are more concerned with facebook, twitter, or whatever than with the educational system. Then there are school which lack funding to update to the best teaching methods.

            1 Reply Last reply
            0
            • M Marc Clifton

              PIEBALDconsult wrote:

              When I first learned BASIC in the '80s, the only structure available was the array,

              Then C introduced the struct. Then C++ decided struct should have methods, and called it a class and added all sorts of other artifacts (inheritance, polymorphism, and encapsulation.) Then came along relational databases, and we were introduced in C# to a newfangled way of working with structures, the DataTable, DataView and DataSet, but those caused impedence mismatches so a new artifact was born, the ORM. Then the jar-heads decided to inflict themselves on the process because this was all too complicated and created JSON, a string "structure" that took us back to the BASIC 80's of untyped data and structure encoded in the string itself. Simultaneously, the "kids" (who were not even a glimmer in the eyes of their parents in the 80's) decided that relational databases were bad and gave us NoSQL, which, guess what, uses JSON, is document oriented and requires client-side callbacks to "join" data across documents. And this is called progress. Marc

              Imperative to Functional Programming Succinctly Higher Order Programming

              C Offline
              C Offline
              ClockMeister
              wrote on last edited by
              #51

              Zackly! Long live SQL Server! :)

              1 Reply Last reply
              0
              • R rnbergren

                Hey now, RPG was the bomb compared to Assembler. I loved the AS/400

                To err is human to really mess up you need a computer

                G Offline
                G Offline
                Garth J Lancaster
                wrote on last edited by
                #52

                oh Im not dissing it - if its all you have, then you just use it (and ILD-RPG 400 was a different animal) - I used to have RPG modules calling all sorts of system routines - loved it

                1 Reply Last reply
                0
                • P PhilLenoir

                  I've never "played" with RPG (unless we're talking Doom!), but I've had my time with AS400 "screen scrapes".

                  Life is like a s**t sandwich; the more bread you have, the less s**t you eat.

                  G Offline
                  G Offline
                  Garth J Lancaster
                  wrote on last edited by
                  #53

                  heh - I love the way people say 'this is right, wrong, do it this way' but at the end of the day, if that's the only way you can make it happen, well ... so good on you for 'screen scrapes' 'Mr Pragmatic'

                  1 Reply Last reply
                  0
                  • P PIEBALDconsult

                    The U.S. Marines are part of the U.S. Navy. The U.S. Navy gave us Admiral Grace Hopper. Admiral Grace Hopper gave us COBOL. :-\

                    D Offline
                    D Offline
                    dbraseth
                    wrote on last edited by
                    #54

                    As well as ForTran? I didn't know that! :)

                    1 Reply Last reply
                    0
                    • G Garth J Lancaster

                      COBOL's a pleasure compared to RPG !!! (IBM AS/400 for example)

                      B Offline
                      B Offline
                      BrainiacV
                      wrote on last edited by
                      #55

                      Garth J Lancaster wrote:

                      RPG

                      (Making sign of the cross)Hisssss!!! A hardware plugboard as program, gack!

                      Psychosis at 10 Film at 11 Those who do not remember the past, are doomed to repeat it. Those who do not remember the past, cannot build upon it.

                      1 Reply Last reply
                      0
                      • P PIEBALDconsult

                        When I first learned BASIC in the '80s, the only structure available was the array, so we had to use that and build up more complex structures, but that's just not necessary with C#, OOP, and Collections. So I am saddened to these posts from the last few days: "Int32[] playerNumbers, String[] playerLastName, Int32[] playerPoints" -- Arrays how to delete multiple entries[^] "Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints" -- Cannot convert type int[] to int[^] "Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints" -- delete method not deleting[^] "Array carPark[10][2];" -- What Is Wrong With The Code And Why Doesnt It Run When I Try To Run It In C#[^] Those first two are the same member, the third probably is as well. The fourth is at least using a two-dimensional array, but he obviously copied it from somewhere and has no idea what it is. Oh, sweet Bob, they keep coming... "public string[][] Select(string query)" -- How to return array or list 2 dimensional from SQL Query[^] WTF!? "ProcessDelete(Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints )"

                        G Offline
                        G Offline
                        Gary R Wheeler
                        wrote on last edited by
                        #56

                        <GeezerWarStoryAlert> My data structures class in college was taught in FORTRAN, where we used arrays to implement everything: linked lists, binary trees, heaps, etc. An array of integers effectively simulated word-wide memory, with array indices corresponding to addresses. In retrospect, this approach somewhat obscures the 'data structure' in lieu of the implementation. However, it gives you a profound appreciation of how memory works and mysterious beasties like pointers. </GeezerWarStoryAlert>

                        Software Zen: delete this;

                        1 Reply Last reply
                        0
                        • P PIEBALDconsult

                          When I first learned BASIC in the '80s, the only structure available was the array, so we had to use that and build up more complex structures, but that's just not necessary with C#, OOP, and Collections. So I am saddened to these posts from the last few days: "Int32[] playerNumbers, String[] playerLastName, Int32[] playerPoints" -- Arrays how to delete multiple entries[^] "Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints" -- Cannot convert type int[] to int[^] "Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints" -- delete method not deleting[^] "Array carPark[10][2];" -- What Is Wrong With The Code And Why Doesnt It Run When I Try To Run It In C#[^] Those first two are the same member, the third probably is as well. The fourth is at least using a two-dimensional array, but he obviously copied it from somewhere and has no idea what it is. Oh, sweet Bob, they keep coming... "public string[][] Select(string query)" -- How to return array or list 2 dimensional from SQL Query[^] WTF!? "ProcessDelete(Int32[] playerNumbers, ref Int32 playerCount, String[] playerLastName, Int32[] playerPoints )"

                          P Offline
                          P Offline
                          Peter Shaw
                          wrote on last edited by
                          #57

                          It's not a new trend, it's an ongoing current trend :-) Seriously though, it's actually to do with the current state of I.T education (Well at least here in the UK anyway) Put simply, there are way too many "General Purpose Teachers" and not enough "Specialist Teachers" , as a result many teachers that are teaching the next generation (and to be clear here, we are on about 6th form and colleges too), are teaching them from text books. A friend of mine, recently decided that programming was for him after getting inspired watching a community presentation I delivered. So he trotted off to his local community college and signed up for "Computer Programming Essentials" His guide book for the college, stated: "You will learn the fundamentals of software engineering, application design and general software problem solving, enabling you to build high quality software applications for now and the future and providing you with a firm foothold through the gateway of professional software development" All sounds, rather splendid if I do say so my self. We are now, 5 months in on his course, and so far he's learned nothing more than putting together simple desktop applications using Visual Basic .NET He's let me see every assignment he's been set, every bit of homework he's been asked to do and all he's done is learn how to wire VB components together. He's done nothing even remotely near understanding application architecture, good development practices or anything like that. He's not been told what the difference between integers, doubles & reals are, he understands nothing about how computers do maths. All he's been doing is learning how to pull data out of various "Things" , reshape it, then display it in ever changing fancy ways. ---------- Not too long ago, my Niece announced she was doing computing at comprehensive school, she came home with an A+ in computing and I.T, needless to say I was a proud uncle, until I dug into her curriculum and looked at the subjects she'd been getting taught. See attained the A+ because she'd figured out how to do animated sound & graphics on her own using PowerPoint, her teacher then sat her on a virtual pedestal and encouraged the rest of the class to strive to attain these high standards, if they wished to go into the software development & programming industry. ------------- Lastly, a very good friend in India recently explained to me how I.T and software education works out there. There are basically a bunch of private companies, th

                          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