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. Statics

Statics

Scheduled Pinned Locked Moved The Weird and The Wonderful
11 Posts 10 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.
  • W Offline
    W Offline
    wizardzz
    wrote on last edited by
    #1

    Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

    P A E B B 9 Replies Last reply
    0
    • W wizardzz

      Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

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

      Sounds ideal to me; why use OOP when you don't need it?

      1 Reply Last reply
      0
      • W wizardzz

        Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

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

        System.Xml.Linq

        Thou mewling ill-breeding pignut!

        K 1 Reply Last reply
        0
        • W wizardzz

          Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

          E Offline
          E Offline
          ekolis
          wrote on last edited by
          #4

          Written by a former VB6 programmer? :)

          1 Reply Last reply
          0
          • W wizardzz

            Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

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

            Why, yes, I have seen a project with everything that could be made static was made static, but they did have a reason. When I asked why all those methods were static, I was told "so that they can be called by an outside program". I didn't say they had a good reason. :sigh:

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

            1 Reply Last reply
            0
            • W wizardzz

              Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

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

              Not everything, but really a lot: WPF.

              1 Reply Last reply
              0
              • A AspDotNetDev

                System.Xml.Linq

                Thou mewling ill-breeding pignut!

                K Offline
                K Offline
                krumia
                wrote on last edited by
                #7

                I just went to http://msdn.microsoft.com/en-us/library/system.xml.linq.extensions.aspx[^]. Other few classes are OK though.

                Peace, ye fat guts!

                1 Reply Last reply
                0
                • W wizardzz

                  Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

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

                  One place I interviewed at a few years ago showed me their code -- every class was a Singleton! :omg: -- I didn't ask for the job.

                  1 Reply Last reply
                  0
                  • W wizardzz

                    Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

                    R Offline
                    R Offline
                    Rahul Rajat Singh
                    wrote on last edited by
                    #9

                    Once upon a time Manager: Show me your design diagrams. Developer: Here they are but I am still working on it. Manager: Where is the class for our front page. Developer: (confused) That would be a static page so we dont need the classes. Manager: OK now you work on task 2. i will get this one done by developer 2. Later that day Developer2: Is it complete Manager: yes. Developer2: where are the relationships between classes? Manager: hmm, well all these classes and functions are static so we don't need them. **Developer2:**WHAT? Manager: yes now go and do it before I sack you.

                    1 Reply Last reply
                    0
                    • W wizardzz

                      Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

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

                      My boss recently got the habit of making a 'helper class' for just about anything. Each helper class has one shared (static) function that is usually called in just one place in the code. Even the helper classes have helper classes and each class is a seperate file sometimes even in seperate folders... :sigh: I am guessing he does this because classes now have a 'single responsibility'. Mixing up 'single method' and 'single responibility' is a common mistake I think. It especially doesn't hold true if all methods are shared (static). I'm also not about to argue about it with him. If he comes up with this kind of stuff you can imagine what kind of programmer he is: one that simply doesn't understand.

                      It's an OO world.

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

                      1 Reply Last reply
                      0
                      • W wizardzz

                        Has anyone ever come across and entire project where every class, every function is a static, for no good reason at all. Just a ton of statics and delegates and that is it. It is a pretty large project.

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

                        Shocking!

                        public class SysAdmin : Employee
                        {

                         public override void DoWork(IWorkItem workItem)
                         {
                              if (workItem.User.Type == UserType.NoLearn){
                                 throw new NoIWillNotFixYourComputerException(new Luser(workItem.User));
                              }else{
                                   base.DoWork(workItem);
                              }
                         }
                        

                        }

                        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