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
    Marc Clifton
    wrote on last edited by
    #4

    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

    P B U F T 11 Replies 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

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #5

      Marc Clifton wrote:

      Then C introduced the struct.

      Exactly, even Pascal has records (?), variant records as well. Of course in Perl you'd have to use a hash ( X| ), but at least it's something.

      P 1 Reply Last reply
      0
      • P PIEBALDconsult

        Marc Clifton wrote:

        Then C introduced the struct.

        Exactly, even Pascal has records (?), variant records as well. Of course in Perl you'd have to use a hash ( X| ), but at least it's something.

        P Offline
        P Offline
        PhilLenoir
        wrote on last edited by
        #6

        To say nothing of COBOL. No please, say nothing of COBOL!

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

        P G 2 Replies Last reply
        0
        • P PhilLenoir

          To say nothing of COBOL. No please, say nothing of COBOL!

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

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #7

          I didn't. I didn't even think it. Until now, thank you very little.

          P 2 Replies Last reply
          0
          • P PIEBALDconsult

            I didn't. I didn't even think it. Until now, thank you very little.

            P Offline
            P Offline
            PhilLenoir
            wrote on last edited by
            #8

            :doh:

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

            1 Reply Last reply
            0
            • P PIEBALDconsult

              I didn't. I didn't even think it. Until now, thank you very little.

              P Offline
              P Offline
              PhilLenoir
              wrote on last edited by
              #9

              I'd heard of COBOL.NET, but since I last touched COBOL almost 30 years ago I though I'd do a quick search. I found this:

              program-id. Program1 as "ConsoleHelloWorld.Program1".
              data division.
              working-storage section.
              procedure division.
              display "Hello World"
              goback.
              end program Program1.

              X|

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

              D 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 )"

                B Offline
                B Offline
                BillWoodruff
                wrote on last edited by
                #10

                The fourth example uses a jagged array, an array of arrays, not quite the same thing as a 2-d array, and under-the-hood in .NET: "If you write some simple code using jagged and multidimensional arrays and then inspect the compiled assembly with an IL disassembler you will see that the storage and retrieval from jagged (or single dimensional) arrays are simple IL instructions while the same operations for multidimensional arrays are method invocations which are always slower" [^].

                « I am putting myself to the fullest possible use which is all, I think, that any conscious entity can ever hope to do » HAL (Heuristically programmed ALgorithmic computer) in "2001, A Space Odyssey"

                P 1 Reply Last reply
                0
                • B BillWoodruff

                  The fourth example uses a jagged array, an array of arrays, not quite the same thing as a 2-d array, and under-the-hood in .NET: "If you write some simple code using jagged and multidimensional arrays and then inspect the compiled assembly with an IL disassembler you will see that the storage and retrieval from jagged (or single dimensional) arrays are simple IL instructions while the same operations for multidimensional arrays are method invocations which are always slower" [^].

                  « I am putting myself to the fullest possible use which is all, I think, that any conscious entity can ever hope to do » HAL (Heuristically programmed ALgorithmic computer) in "2001, A Space Odyssey"

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #11

                  BillWoodruff wrote:

                  not quite the same thing

                  Pfft, details. :rolleyes:

                  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 )"

                    A Offline
                    A Offline
                    Andy Brummer
                    wrote on last edited by
                    #12

                    I once worked with a developer that couldn't figure out why this:

                    for i=0 to a.length
                    response.write(a[0])
                    end

                    output the same value over and over again. He had only worked with ADODB recordsets.

                    Curvature of the Mind now with 3D

                    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 )"

                      R Offline
                      R Offline
                      Roger Wright
                      wrote on last edited by
                      #13

                      PIEBALDconsult wrote:

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

                      When I first learned BASIC in the '70s, the only arrays we had were 1 dimensional, 20 DATA 12, 22, 15, 'X' . . . 120 READ A, B, C, $D 130 GOTO 9999 . . . 9999 LPRINT A, B, C, $D 10000 END

                      Will Rogers never met me.

                      P P 2 Replies Last reply
                      0
                      • R Roger Wright

                        PIEBALDconsult wrote:

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

                        When I first learned BASIC in the '70s, the only arrays we had were 1 dimensional, 20 DATA 12, 22, 15, 'X' . . . 120 READ A, B, C, $D 130 GOTO 9999 . . . 9999 LPRINT A, B, C, $D 10000 END

                        Will Rogers never met me.

                        P Offline
                        P Offline
                        PIEBALDconsult
                        wrote on last edited by
                        #14

                        Oh, then having two was like twice as many. The BASIC I learned even had matrix operations built in!

                        R 1 Reply Last reply
                        0
                        • P PIEBALDconsult

                          Oh, then having two was like twice as many. The BASIC I learned even had matrix operations built in!

                          R Offline
                          R Offline
                          Roger Wright
                          wrote on last edited by
                          #15

                          :-D :-D :-D My HP-67 calculator was, at the time, far more advanced than the version of BASIC available then.

                          Will Rogers never met me.

                          P M 2 Replies Last reply
                          0
                          • R Roger Wright

                            :-D :-D :-D My HP-67 calculator was, at the time, far more advanced than the version of BASIC available then.

                            Will Rogers never met me.

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

                            Roger Wright wrote:

                            HP-67

                            1867? :-D

                            1 Reply Last reply
                            0
                            • P PhilLenoir

                              To say nothing of COBOL. No please, say nothing of COBOL!

                              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
                              #17

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

                              P R B 3 Replies 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 )"

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

                                This entire thread brought a tear to my eye! Here I was thinking I'm the only grizzled fossil among a million "please, sirs, to send me the codes" or "can you do my programming homework for me?" and find that I am not alone! There are others whose first programming ventures were indeed programmable *calculators*? (TI-57 in my case) Mayhaps who thought that BASIC was a dumbing down and that Real Programmers used Assembler - when they were lazy and didn't just want to hack in 6502 machine code? *sniff* Vale atque ave, amici, vale atque ave!

                                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 )"

                                  Sander RosselS Offline
                                  Sander RosselS Offline
                                  Sander Rossel
                                  wrote on last edited by
                                  #19

                                  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 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 )"

                                    M Offline
                                    M Offline
                                    Mark_Wallace
                                    wrote on last edited by
                                    #20

                                    Ah, the good old days... I was early enough not to taught that the string is a data type, but that it's an array (which it still is, but no-one bothers to try to get that into their heads any more), and I've twice seen people reinventing the string by creating an array of characters that can be truncated, searched through, etc. And if I had a penny for every vacant stare I've seen when linked lists were mentioned... * * I could probably buy a Mars bar, but I'd rather let everyone's imagination exaggerate it for me

                                    I wanna be a eunuchs developer! Pass me a bread knife!

                                    S P 2 Replies Last reply
                                    0
                                    • R Roger Wright

                                      :-D :-D :-D My HP-67 calculator was, at the time, far more advanced than the version of BASIC available then.

                                      Will Rogers never met me.

                                      M Offline
                                      M Offline
                                      Member 10707677
                                      wrote on last edited by
                                      #21

                                      I'll match your HP-67 and raise you an HP-35. (Bargain price $397 [3 weeks before HP-21 came out at $180 RRP])

                                      R 1 Reply Last reply
                                      0
                                      • M Mark_Wallace

                                        Ah, the good old days... I was early enough not to taught that the string is a data type, but that it's an array (which it still is, but no-one bothers to try to get that into their heads any more), and I've twice seen people reinventing the string by creating an array of characters that can be truncated, searched through, etc. And if I had a penny for every vacant stare I've seen when linked lists were mentioned... * * I could probably buy a Mars bar, but I'd rather let everyone's imagination exaggerate it for me

                                        I wanna be a eunuchs developer! Pass me a bread knife!

                                        S Offline
                                        S Offline
                                        Simon ORiordan from UK
                                        wrote on last edited by
                                        #22

                                        Well of course, we 'ad it 'ard. I used to get up at one in the morning, before I went to bed, and hand-punch cards with lines of Fortran IV. Then I'd assemble them into a batch, and place them in the card reader with a weight on top. You tell young kids today what a 'batch file' is, and they don't believe you! :-\

                                        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

                                          B Offline
                                          B Offline
                                          Bernhard Hiller
                                          wrote on last edited by
                                          #23

                                          Exactly. When reading Piebald's post, also I thought of some "serialized as text" compatibility mode. That's progress in these times...

                                          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