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. Did I miss a memo?

Did I miss a memo?

Scheduled Pinned Locked Moved The Weird and The Wonderful
question
20 Posts 13 Posters 1 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.
  • D Duncan Edwards Jones

    It seems all the code I've been given to look at recently has not a care at all about scoping - every field, property, function and constructor is public and it is up to the user of that code to decide if they can, in fact, use it or not....

    B Offline
    B Offline
    BillW33
    wrote on last edited by
    #4

    I used to work for someone who liked all the variables to be public so that he would have easy access to anything he wanted. There is a reason I don't work there anymore. :sigh:

    Just because the code works, it doesn't mean that it is good code.

    1 Reply Last reply
    0
    • D Duncan Edwards Jones

      It seems all the code I've been given to look at recently has not a care at all about scoping - every field, property, function and constructor is public and it is up to the user of that code to decide if they can, in fact, use it or not....

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

      Yes, that's a great programming paradigm. Whenever you might need access to some property or function, you can do it. Well, better yet when everything is static or only one big class. YAGNI, SRP and Co. are for script kiddies only! :-D

      1 Reply Last reply
      0
      • D Duncan Edwards Jones

        It seems all the code I've been given to look at recently has not a care at all about scoping - every field, property, function and constructor is public and it is up to the user of that code to decide if they can, in fact, use it or not....

        B Offline
        B Offline
        Brisingr Aerowing
        wrote on last edited by
        #6

        I can top that. One of my classmates from Purdue wrote an application where EVERYTHING was private and had to be used through reflection. Everything. Constructors, properties, methods, events, etc. All this in Java. The assignment was to write a simple timer with a Gui (extra credit project). It was graded on functionality, code quality (with some pretty strict rules), and accuracy. His didn't even work. It would go 1... 2... 9... 23... 99... etc. He failed for obvious reasons.

        What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

        L 1 Reply Last reply
        0
        • D Duncan Edwards Jones

          It seems all the code I've been given to look at recently has not a care at all about scoping - every field, property, function and constructor is public and it is up to the user of that code to decide if they can, in fact, use it or not....

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

          Duncan Edwards Jones wrote:

          every field, property, function and constructor is public

          Well, is it? Is everything you are working on, available outside the "black box"? If not, then are you allowed to change it?

          D 1 Reply Last reply
          0
          • S Slacker007

            Duncan Edwards Jones wrote:

            every field, property, function and constructor is public

            Well, is it? Is everything you are working on, available outside the "black box"? If not, then are you allowed to change it?

            D Offline
            D Offline
            Duncan Edwards Jones
            wrote on last edited by
            #8

            No - from a business point of view some of these properties cannot be changed after the class was created (for one example there are running balance properties that get updated when a trade record is added - if these are also public and can be monkeyed around with outside the class it causes all sorts of problems when the trade history doesn't match the running balance)

            1 Reply Last reply
            0
            • D Duncan Edwards Jones

              It seems all the code I've been given to look at recently has not a care at all about scoping - every field, property, function and constructor is public and it is up to the user of that code to decide if they can, in fact, use it or not....

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #9

              So much for data encapsulation?

              "I've seen more information on a frickin' sticky note!" - Dave Kreskowiak

              1 Reply Last reply
              0
              • B Brisingr Aerowing

                I can top that. One of my classmates from Purdue wrote an application where EVERYTHING was private and had to be used through reflection. Everything. Constructors, properties, methods, events, etc. All this in Java. The assignment was to write a simple timer with a Gui (extra credit project). It was graded on functionality, code quality (with some pretty strict rules), and accuracy. His didn't even work. It would go 1... 2... 9... 23... 99... etc. He failed for obvious reasons.

                What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

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

                Why did he fail? His idea is as revolutionary as long ago the WOM (write only memory).

                The language is JavaScript. that of Mordor, which I will not utter here
                This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

                B 1 Reply Last reply
                0
                • L Lost User

                  Why did he fail? His idea is as revolutionary as long ago the WOM (write only memory).

                  The language is JavaScript. that of Mordor, which I will not utter here
                  This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                  "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

                  B Offline
                  B Offline
                  Brisingr Aerowing
                  wrote on last edited by
                  #11

                  He failed every assignment, as that was how he did EVERYTHING. He actually caused the grading server to crash and corrupt the system drive with a bug in the JVM in a class he wasn't supposed to use for that assignment. He didn't seem to get why it was a bad idea, either. He ended up dropping out of the CIS program and going for a anthropology major instead. :doh:

                  What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

                  Sander RosselS 1 Reply Last reply
                  0
                  • D Duncan Edwards Jones

                    It seems all the code I've been given to look at recently has not a care at all about scoping - every field, property, function and constructor is public and it is up to the user of that code to decide if they can, in fact, use it or not....

                    S Offline
                    S Offline
                    Stephen Gonzalez
                    wrote on last edited by
                    #12

                    I suspect the code is in VB (VB.NET). What did you expect from these Devs.

                    C 1 Reply Last reply
                    0
                    • B Brisingr Aerowing

                      He failed every assignment, as that was how he did EVERYTHING. He actually caused the grading server to crash and corrupt the system drive with a bug in the JVM in a class he wasn't supposed to use for that assignment. He didn't seem to get why it was a bad idea, either. He ended up dropping out of the CIS program and going for a anthropology major instead. :doh:

                      What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

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

                      Brisingr Aerowing wrote:

                      He actually caused the grading server to crash and corrupt the system drive with a bug in the JVM in a class he wasn't supposed to use for that assignment.

                      So he knew exactly what he was doing? :D

                      Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.

                      Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

                      Regards, Sander

                      B 1 Reply Last reply
                      0
                      • Sander RosselS Sander Rossel

                        Brisingr Aerowing wrote:

                        He actually caused the grading server to crash and corrupt the system drive with a bug in the JVM in a class he wasn't supposed to use for that assignment.

                        So he knew exactly what he was doing? :D

                        Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.

                        Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

                        Regards, Sander

                        B Offline
                        B Offline
                        Brisingr Aerowing
                        wrote on last edited by
                        #14

                        Well, it took a week for the grading server to be brought back online (someone had turned backups off), so we didn't know how we did on two assignments for that week. That was majorly stressful. The student was given an warning that if that happened again, he would be indefinitely suspended for violation of a rule about damaging university property. After he failed the class, he was forced to drop out of the program and go into a probationary period in another department. I don't know what happened to him after that.

                        What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

                        Sander RosselS 1 Reply Last reply
                        0
                        • B Brisingr Aerowing

                          Well, it took a week for the grading server to be brought back online (someone had turned backups off), so we didn't know how we did on two assignments for that week. That was majorly stressful. The student was given an warning that if that happened again, he would be indefinitely suspended for violation of a rule about damaging university property. After he failed the class, he was forced to drop out of the program and go into a probationary period in another department. I don't know what happened to him after that.

                          What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

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

                          So a bug in the JVM caused the server to crash? :wtf: So Sun/Oracle messes up (for making such a severe bug!), your school messes up (for not having backups!), and the "dumb" student gets a warning? :wtf: Unless this student did indeed know exactly what he was doing he sounds like the only one who didn't do anything wrong, except mess up an assignment. Which would be even more worrying as a dumb student can apparently crash complete servers :~ I'm not sure what to think of this, except that I'm glad I'm not in school and I'm not working with Java or the JVM :)

                          Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.

                          Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

                          Regards, Sander

                          P B 2 Replies Last reply
                          0
                          • Sander RosselS Sander Rossel

                            So a bug in the JVM caused the server to crash? :wtf: So Sun/Oracle messes up (for making such a severe bug!), your school messes up (for not having backups!), and the "dumb" student gets a warning? :wtf: Unless this student did indeed know exactly what he was doing he sounds like the only one who didn't do anything wrong, except mess up an assignment. Which would be even more worrying as a dumb student can apparently crash complete servers :~ I'm not sure what to think of this, except that I'm glad I'm not in school and I'm not working with Java or the JVM :)

                            Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.

                            Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

                            Regards, Sander

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

                            Sander Rossel wrote:

                            and the "dumb" student gets a warning?

                            That's been the first answer there for a long time.. like back when the Morris worm came through and a friend of mine almost got expelled because someone else guessed the engineering computing network's root password.. dietcoke.. how lame of a root password can you get :)

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

                            1 Reply Last reply
                            0
                            • S Stephen Gonzalez

                              I suspect the code is in VB (VB.NET). What did you expect from these Devs.

                              C Offline
                              C Offline
                              Charles Programmer
                              wrote on last edited by
                              #17

                              You know, considering VB was around much longer than C#, and save for something like 4 functions in VB that have no corresponding C# equivalent (or at least that used to be the case,) there is pretty much a one to one mapping between the two languages, I am going to go out on a limb and call that an ignorant statement. Have you ever done VB? Do you know the language? Again, I'll venture out, and conclude the answer is "no."

                              J S 2 Replies Last reply
                              0
                              • Sander RosselS Sander Rossel

                                So a bug in the JVM caused the server to crash? :wtf: So Sun/Oracle messes up (for making such a severe bug!), your school messes up (for not having backups!), and the "dumb" student gets a warning? :wtf: Unless this student did indeed know exactly what he was doing he sounds like the only one who didn't do anything wrong, except mess up an assignment. Which would be even more worrying as a dumb student can apparently crash complete servers :~ I'm not sure what to think of this, except that I'm glad I'm not in school and I'm not working with Java or the JVM :)

                                Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.

                                Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

                                Regards, Sander

                                B Offline
                                B Offline
                                Brisingr Aerowing
                                wrote on last edited by
                                #18

                                It was an older Linux system that wasn't all that stable (where the true bug was, a faulty system call that the JVM used), and JDK 1.3 (yes, 1.3). I think it was an intern working the server that turned off backups (just didn't know what he was doing). As for the warning, Purdue has a rule about those kind of things that goes in the progression of Warning, Failed Class, Expulsion (apparently a legal requirement of some sort). The fact that the system was so old and the other failures by the CS department were also taken into account, and lead to reprecussions for some professors for putting such a security hole in the university network. (The system was from 2004, and this incident was in 2011) This was the students' first offense, so it was only a warning. Most people got bad grades as the professor was using JDK 1.6 at the time. There was a major regrading and reevaluation of people who failed the class due to this, and some people were fired in the process (the professor who had set up the server that way, some IT personnel for not vetting the server as they should have, and some other people for various things). It was kind of crazy.

                                What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

                                1 Reply Last reply
                                0
                                • C Charles Programmer

                                  You know, considering VB was around much longer than C#, and save for something like 4 functions in VB that have no corresponding C# equivalent (or at least that used to be the case,) there is pretty much a one to one mapping between the two languages, I am going to go out on a limb and call that an ignorant statement. Have you ever done VB? Do you know the language? Again, I'll venture out, and conclude the answer is "no."

                                  J Offline
                                  J Offline
                                  Jeremy Falcon
                                  wrote on last edited by
                                  #19

                                  So you're the one person that uses VB.NET. Hi!

                                  Jeremy Falcon

                                  1 Reply Last reply
                                  0
                                  • C Charles Programmer

                                    You know, considering VB was around much longer than C#, and save for something like 4 functions in VB that have no corresponding C# equivalent (or at least that used to be the case,) there is pretty much a one to one mapping between the two languages, I am going to go out on a limb and call that an ignorant statement. Have you ever done VB? Do you know the language? Again, I'll venture out, and conclude the answer is "no."

                                    S Offline
                                    S Offline
                                    Stephen Gonzalez
                                    wrote on last edited by
                                    #20

                                    VB sucks. This is the underlying truth. I've been dealt with it. Now cleared that garbage with .NET bleach called GC. :)

                                    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