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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. The Lounge
  3. When you learned how to really write code?

When you learned how to really write code?

Scheduled Pinned Locked Moved The Lounge
databasetutorialquestionhelpworkspace
25 Posts 12 Posters 6 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.
  • H Henry Minute

    programmervb.netc++ wrote:

    Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code.

    I really, really would hate to be the person having to troubleshoot those in a few months/years time. :wtf:

    Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

    P Offline
    P Offline
    programmervb netc
    wrote on last edited by
    #5

    It happens but it is logical and very well documented. Humble Programmer

    1 Reply Last reply
    0
    • M Mustafa Ismail Mustafa

      In my opinion, academic courses should ground you properly in what you need from the science perspective. Relational Algebra[^] is one, Algorithms is another. I cannot see why a university would want to teach you world-class, tech-savvy, optimized code. That, a student has to do on his own, preferably with guidance from his instructors. Some will argue against that, but they might forget that a university is an academic institution whose primary focus [should be] is academia/science/theory/research. Yes, you do need the practical part to be able to apply all this research, and it really helps if you write proper code.

      programmervb.netc++ wrote:

      Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code.

      I can understand 20 lines, it happens, but a statement going on 200 lines? :omg: What on earth are you trying to do? I'm almost certain there is something wrong with the logic.

      If the post was helpful, please vote, eh! Current activities: Playing Star Craft II. Don't bother me, eh? Now and forever, defiant to the end. What is Multiple Sclerosis[^]?

      O Offline
      O Offline
      Oakman
      wrote on last edited by
      #6

      Mustafa Ismail Mustafa wrote:

      they might forget that a university is an academic institution whose primary focus [should be] is academia/science/theory/research.

      The folks who forget that most often are the ones who write the college catalogs and the HR people who think that a BS is a substitute for knowledge.

      Remember in November: But when a long Train of Abuses and Usurpations, pursuing invariably the same Object, evinces a Design to reduce them under absolute Despotism, it is their Right, it is their Duty, to throw off such Government, and to provide new Guards for their future Security.

      M 1 Reply Last reply
      0
      • P programmervb netc

        I don't thinks there is a problem we just have a properly normalized database and there are very few of these but the ones I am talking about are like facesheets which pull data from almost all tables. Humble Programmer

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

        I wouldn't say that the database normalization is the problem (it might be, I wouldn't be able to tell without more info, not that I'm asking for any), but 200 lines? Do you know what sort of hell you'll put the person debugging or altering this in? Use the unix philosophy in this case: "Write programs that do one thing and do it well". I would have broken that into several scriptlets. But hey, who am I to judge different programming styles?

        If the post was helpful, please vote, eh! Current activities: Playing Star Craft II. Don't bother me, eh? Now and forever, defiant to the end. What is Multiple Sclerosis[^]?

        P 1 Reply Last reply
        0
        • O Oakman

          Mustafa Ismail Mustafa wrote:

          they might forget that a university is an academic institution whose primary focus [should be] is academia/science/theory/research.

          The folks who forget that most often are the ones who write the college catalogs and the HR people who think that a BS is a substitute for knowledge.

          Remember in November: But when a long Train of Abuses and Usurpations, pursuing invariably the same Object, evinces a Design to reduce them under absolute Despotism, it is their Right, it is their Duty, to throw off such Government, and to provide new Guards for their future Security.

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

          Certainly. That happens with sufficient regularity to have devolved learning institutions into for profit organizations.

          If the post was helpful, please vote, eh! Current activities: Playing Star Craft II. Don't bother me, eh? Now and forever, defiant to the end. What is Multiple Sclerosis[^]?

          1 Reply Last reply
          0
          • P programmervb netc

            I thought that I learned alot in school but I think I learned more in the first month working than I learned all through school. I have gone back to school since I started working and noticed that I still don't get as much from it. I think that this is partly because unless I am using a language to accomplish a real task...like a project for work. I will learn the syntax but not feel like I have learned anything until I do a real project. So my question is when did you learn how to write code. Personally in school I learned logic,logic,logic..... and a little syntax but did not learn to do anything near production code until I was in a sink or swim situation. Also in my school we did not use many of the things that are very heavily utilized in a work environment. For example I had never used source control, I had classes in SQL and DB management but not nearly enough classes, had never heard of bug tracking and did not know what a database connector was used for. The most involved of a SQL statement written in school was like SELECT SomeField, NextField FROM tableName WHERE SomeField > 2 Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code. What should schools really be teaching...?? Humble Programmer

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #9

            programmervb.netc++ wrote:

            and have a few statements that are near 200 lines of code.

            If you have to have a function/stored procedure that long, you REALLY need to look into breaking it into smaller pieces. Your definitely overlooking some opportunities to divide the problem up there.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            P 1 Reply Last reply
            0
            • P programmervb netc

              I thought that I learned alot in school but I think I learned more in the first month working than I learned all through school. I have gone back to school since I started working and noticed that I still don't get as much from it. I think that this is partly because unless I am using a language to accomplish a real task...like a project for work. I will learn the syntax but not feel like I have learned anything until I do a real project. So my question is when did you learn how to write code. Personally in school I learned logic,logic,logic..... and a little syntax but did not learn to do anything near production code until I was in a sink or swim situation. Also in my school we did not use many of the things that are very heavily utilized in a work environment. For example I had never used source control, I had classes in SQL and DB management but not nearly enough classes, had never heard of bug tracking and did not know what a database connector was used for. The most involved of a SQL statement written in school was like SELECT SomeField, NextField FROM tableName WHERE SomeField > 2 Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code. What should schools really be teaching...?? Humble Programmer

              H Offline
              H Offline
              HimanshuJoshi
              wrote on last edited by
              #10

              programmervb.netc++ wrote:

              So my question is when did you learn how to write code.

              I was programmed with programming programmed in :rolleyes:

              Place for Indians to hang out

              S 1 Reply Last reply
              0
              • M Mustafa Ismail Mustafa

                In my opinion, academic courses should ground you properly in what you need from the science perspective. Relational Algebra[^] is one, Algorithms is another. I cannot see why a university would want to teach you world-class, tech-savvy, optimized code. That, a student has to do on his own, preferably with guidance from his instructors. Some will argue against that, but they might forget that a university is an academic institution whose primary focus [should be] is academia/science/theory/research. Yes, you do need the practical part to be able to apply all this research, and it really helps if you write proper code.

                programmervb.netc++ wrote:

                Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code.

                I can understand 20 lines, it happens, but a statement going on 200 lines? :omg: What on earth are you trying to do? I'm almost certain there is something wrong with the logic.

                If the post was helpful, please vote, eh! Current activities: Playing Star Craft II. Don't bother me, eh? Now and forever, defiant to the end. What is Multiple Sclerosis[^]?

                A Offline
                A Offline
                AspDotNetDev
                wrote on last edited by
                #11

                Mustafa Ismail Mustafa wrote:

                I can understand 20 lines, it happens, but a statement going on 200 lines?

                For most OO languages, I'd say 200 lines is very long for a method. However, SQL is a declarative language, and one that doesn't handle functions or objects very well. For example, functions cannot modify the database (they can only return data). And returning data from stored procedures is a real pain. Add to that the need to store data in an optimized fashion and get it in an optimized fashion, functions and stored procedures are sometimes just not an option. This can make for some very long queries, especially if you break each thing out on its own line (as I do).

                [Forum Guidelines]

                1 Reply Last reply
                0
                • P programmervb netc

                  I thought that I learned alot in school but I think I learned more in the first month working than I learned all through school. I have gone back to school since I started working and noticed that I still don't get as much from it. I think that this is partly because unless I am using a language to accomplish a real task...like a project for work. I will learn the syntax but not feel like I have learned anything until I do a real project. So my question is when did you learn how to write code. Personally in school I learned logic,logic,logic..... and a little syntax but did not learn to do anything near production code until I was in a sink or swim situation. Also in my school we did not use many of the things that are very heavily utilized in a work environment. For example I had never used source control, I had classes in SQL and DB management but not nearly enough classes, had never heard of bug tracking and did not know what a database connector was used for. The most involved of a SQL statement written in school was like SELECT SomeField, NextField FROM tableName WHERE SomeField > 2 Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code. What should schools really be teaching...?? Humble Programmer

                  A Offline
                  A Offline
                  AspDotNetDev
                  wrote on last edited by
                  #12

                  I learn by doing, coming across problems, finding solutions, then presenting that solution so that others may learn from me (e.g., JOIN Instead of Repeating a Subquery). Teaching others can be a very effective way of learning... all that pressure to explain something in a short amount of time and to be able to answer questions can really push you to hone your abilities.

                  [Forum Guidelines]

                  1 Reply Last reply
                  0
                  • P programmervb netc

                    I thought that I learned alot in school but I think I learned more in the first month working than I learned all through school. I have gone back to school since I started working and noticed that I still don't get as much from it. I think that this is partly because unless I am using a language to accomplish a real task...like a project for work. I will learn the syntax but not feel like I have learned anything until I do a real project. So my question is when did you learn how to write code. Personally in school I learned logic,logic,logic..... and a little syntax but did not learn to do anything near production code until I was in a sink or swim situation. Also in my school we did not use many of the things that are very heavily utilized in a work environment. For example I had never used source control, I had classes in SQL and DB management but not nearly enough classes, had never heard of bug tracking and did not know what a database connector was used for. The most involved of a SQL statement written in school was like SELECT SomeField, NextField FROM tableName WHERE SomeField > 2 Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code. What should schools really be teaching...?? Humble Programmer

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

                    I've been programming professionally for 33 years - and I still learn something almost every day. The day I think I know it all is the day I'll stop programming.

                    ___________________________________________ .\\axxx (That's an 'M')

                    S P 2 Replies Last reply
                    0
                    • P programmervb netc

                      I thought that I learned alot in school but I think I learned more in the first month working than I learned all through school. I have gone back to school since I started working and noticed that I still don't get as much from it. I think that this is partly because unless I am using a language to accomplish a real task...like a project for work. I will learn the syntax but not feel like I have learned anything until I do a real project. So my question is when did you learn how to write code. Personally in school I learned logic,logic,logic..... and a little syntax but did not learn to do anything near production code until I was in a sink or swim situation. Also in my school we did not use many of the things that are very heavily utilized in a work environment. For example I had never used source control, I had classes in SQL and DB management but not nearly enough classes, had never heard of bug tracking and did not know what a database connector was used for. The most involved of a SQL statement written in school was like SELECT SomeField, NextField FROM tableName WHERE SomeField > 2 Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code. What should schools really be teaching...?? Humble Programmer

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

                      The university tried to teach me FORTRAN, but I beat them to it, having found a book in the library on FORTRAN II before I started college. They taught me facts - math, physics, chemistry, electronics - but applying them in a logical, efficient manner I taught myself. When my employer asked me to program a new system, I asked, "what language and OS this time?" Then I taught myself both and got to work. Schools should teach a language or two, if only to get students used to debugging their own errors. But that should not be their primary focus; a language is just a tool, not a career choice. A focus on the basics - data structures, algorithms, problem definition and scoping, writing lucid requirements - should be fundamental. Languages change; the basics are eternal.

                      Will Rogers never met me.

                      P 1 Reply Last reply
                      0
                      • P programmervb netc

                        I thought that I learned alot in school but I think I learned more in the first month working than I learned all through school. I have gone back to school since I started working and noticed that I still don't get as much from it. I think that this is partly because unless I am using a language to accomplish a real task...like a project for work. I will learn the syntax but not feel like I have learned anything until I do a real project. So my question is when did you learn how to write code. Personally in school I learned logic,logic,logic..... and a little syntax but did not learn to do anything near production code until I was in a sink or swim situation. Also in my school we did not use many of the things that are very heavily utilized in a work environment. For example I had never used source control, I had classes in SQL and DB management but not nearly enough classes, had never heard of bug tracking and did not know what a database connector was used for. The most involved of a SQL statement written in school was like SELECT SomeField, NextField FROM tableName WHERE SomeField > 2 Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code. What should schools really be teaching...?? Humble Programmer

                        S Offline
                        S Offline
                        Sushant Joshi
                        wrote on last edited by
                        #15

                        I feel I learn something when I am stuck up at some point. That's the point where Old and best friend (Google) comes into picture and I tend to explore something new (new for me!) :) School did teach me few things which I could apply, however, sometimes, I really think that most of the things I learned during my graduation in University (or even earlier), we never apply or do not get scope to apply them :(

                        Sucess is going from failure to failure without loss of enthusiasm.

                        1 Reply Last reply
                        0
                        • L Lost User

                          I've been programming professionally for 33 years - and I still learn something almost every day. The day I think I know it all is the day I'll stop programming.

                          ___________________________________________ .\\axxx (That's an 'M')

                          S Offline
                          S Offline
                          Sushant Joshi
                          wrote on last edited by
                          #16

                          Good one .. :)

                          Sucess is going from failure to failure without loss of enthusiasm.

                          1 Reply Last reply
                          0
                          • H HimanshuJoshi

                            programmervb.netc++ wrote:

                            So my question is when did you learn how to write code.

                            I was programmed with programming programmed in :rolleyes:

                            Place for Indians to hang out

                            S Offline
                            S Offline
                            Sushant Joshi
                            wrote on last edited by
                            #17

                            too much of programming :laugh: ;)

                            Sucess is going from failure to failure without loss of enthusiasm.

                            1 Reply Last reply
                            0
                            • P programmervb netc

                              I thought that I learned alot in school but I think I learned more in the first month working than I learned all through school. I have gone back to school since I started working and noticed that I still don't get as much from it. I think that this is partly because unless I am using a language to accomplish a real task...like a project for work. I will learn the syntax but not feel like I have learned anything until I do a real project. So my question is when did you learn how to write code. Personally in school I learned logic,logic,logic..... and a little syntax but did not learn to do anything near production code until I was in a sink or swim situation. Also in my school we did not use many of the things that are very heavily utilized in a work environment. For example I had never used source control, I had classes in SQL and DB management but not nearly enough classes, had never heard of bug tracking and did not know what a database connector was used for. The most involved of a SQL statement written in school was like SELECT SomeField, NextField FROM tableName WHERE SomeField > 2 Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code. What should schools really be teaching...?? Humble Programmer

                              R Offline
                              R Offline
                              Rage
                              wrote on last edited by
                              #18

                              programmervb.netc++ wrote:

                              For example I had never used source control,

                              programmervb.netc++ wrote:

                              had never heard of bug tracking

                              That is presently why I am giving config management courses in engineering schools.

                              P 1 Reply Last reply
                              0
                              • P programmervb netc

                                I thought that I learned alot in school but I think I learned more in the first month working than I learned all through school. I have gone back to school since I started working and noticed that I still don't get as much from it. I think that this is partly because unless I am using a language to accomplish a real task...like a project for work. I will learn the syntax but not feel like I have learned anything until I do a real project. So my question is when did you learn how to write code. Personally in school I learned logic,logic,logic..... and a little syntax but did not learn to do anything near production code until I was in a sink or swim situation. Also in my school we did not use many of the things that are very heavily utilized in a work environment. For example I had never used source control, I had classes in SQL and DB management but not nearly enough classes, had never heard of bug tracking and did not know what a database connector was used for. The most involved of a SQL statement written in school was like SELECT SomeField, NextField FROM tableName WHERE SomeField > 2 Now it is not uncommon for me to write a SQL statement that is 20 lines of code and have a few statements that are near 200 lines of code. What should schools really be teaching...?? Humble Programmer

                                S Offline
                                S Offline
                                Slacker007
                                wrote on last edited by
                                #19

                                programmervb.netc++ wrote:

                                until I was in a sink or swim situation.

                                IMHO, this is the only time when you truly learn something; doesn't matter if it is programming or something else. When your ass is on the line (food, bills, kids, etc...) you will find that you will do amazing things...school can't prepare you for that...nothing can.

                                1 Reply Last reply
                                0
                                • M Mustafa Ismail Mustafa

                                  I wouldn't say that the database normalization is the problem (it might be, I wouldn't be able to tell without more info, not that I'm asking for any), but 200 lines? Do you know what sort of hell you'll put the person debugging or altering this in? Use the unix philosophy in this case: "Write programs that do one thing and do it well". I would have broken that into several scriptlets. But hey, who am I to judge different programming styles?

                                  If the post was helpful, please vote, eh! Current activities: Playing Star Craft II. Don't bother me, eh? Now and forever, defiant to the end. What is Multiple Sclerosis[^]?

                                  P Offline
                                  P Offline
                                  programmervb netc
                                  wrote on last edited by
                                  #20

                                  I know what you mean but to populate one document we just have to join alot of tables and that document has a ton of information on it and it can be many pages. Humble Programmer

                                  1 Reply Last reply
                                  0
                                  • L Lost User

                                    I've been programming professionally for 33 years - and I still learn something almost every day. The day I think I know it all is the day I'll stop programming.

                                    ___________________________________________ .\\axxx (That's an 'M')

                                    P Offline
                                    P Offline
                                    programmervb netc
                                    wrote on last edited by
                                    #21

                                    Agreed I learn all the time but my real question is did you have the feeling when you started that you really did not know what you were doing but then after doing work for a few years you feel fairly confident about your skills. Humble Programmer

                                    L 1 Reply Last reply
                                    0
                                    • R Roger Wright

                                      The university tried to teach me FORTRAN, but I beat them to it, having found a book in the library on FORTRAN II before I started college. They taught me facts - math, physics, chemistry, electronics - but applying them in a logical, efficient manner I taught myself. When my employer asked me to program a new system, I asked, "what language and OS this time?" Then I taught myself both and got to work. Schools should teach a language or two, if only to get students used to debugging their own errors. But that should not be their primary focus; a language is just a tool, not a career choice. A focus on the basics - data structures, algorithms, problem definition and scoping, writing lucid requirements - should be fundamental. Languages change; the basics are eternal.

                                      Will Rogers never met me.

                                      P Offline
                                      P Offline
                                      programmervb netc
                                      wrote on last edited by
                                      #22

                                      I agree language is not very important it is logic and fundamental things that you will always use. Humble Programmer

                                      1 Reply Last reply
                                      0
                                      • R Rage

                                        programmervb.netc++ wrote:

                                        For example I had never used source control,

                                        programmervb.netc++ wrote:

                                        had never heard of bug tracking

                                        That is presently why I am giving config management courses in engineering schools.

                                        P Offline
                                        P Offline
                                        programmervb netc
                                        wrote on last edited by
                                        #23

                                        That sounds promising and progressive considering what many schools teach. Humble Programmer

                                        1 Reply Last reply
                                        0
                                        • D Dave Kreskowiak

                                          programmervb.netc++ wrote:

                                          and have a few statements that are near 200 lines of code.

                                          If you have to have a function/stored procedure that long, you REALLY need to look into breaking it into smaller pieces. Your definitely overlooking some opportunities to divide the problem up there.

                                          A guide to posting questions on CodeProject[^]
                                          Dave Kreskowiak

                                          P Offline
                                          P Offline
                                          programmervb netc
                                          wrote on last edited by
                                          #24

                                          I know the post is huge but that is what we are talking about so.... I went ahead and posted it in the DB forum. http://www.codeproject.com/Messages/3609635/Query-Improvement-Related-to-Lounge-Post.aspx[^] Any suggestions are welcome. Humble Programmer

                                          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