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. The Lounge
  3. Welcome to my (new) life...

Welcome to my (new) life...

Scheduled Pinned Locked Moved The Lounge
helpdevops
9 Posts 7 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.
  • M Offline
    M Offline
    Maximilien
    wrote on last edited by
    #1

    bug people : hey, there's an issue with a report we generate... me: naively opens up one of 3 report related files. hmmm, resharper doesn't start. looks at the report related files, first one has 37,000 lines and the other 2 files 17,000 and 15,000 lines. There's another file in our solution with 46,000 lines !!! (all formatted by rogue gremlins) :sigh:

    CI/CD = Continuous Impediment/Continuous Despair

    Mircea NeacsuM R J 3 Replies Last reply
    0
    • M Maximilien

      bug people : hey, there's an issue with a report we generate... me: naively opens up one of 3 report related files. hmmm, resharper doesn't start. looks at the report related files, first one has 37,000 lines and the other 2 files 17,000 and 15,000 lines. There's another file in our solution with 46,000 lines !!! (all formatted by rogue gremlins) :sigh:

      CI/CD = Continuous Impediment/Continuous Despair

      Mircea NeacsuM Offline
      Mircea NeacsuM Offline
      Mircea Neacsu
      wrote on last edited by
      #2

      I see your huge files, and raise you 12300 lines of C code for PNG libary validation[^]. This is just the program that runs the tests. It is full of "interesting" things like parameters named "this" and "that":

      static void
      image_transform_png_set_palette_to_rgb_set(const image_transform *this,
      transform_display *that, png_structp pp, png_infop pi)
      {
      png_set_palette_to_rgb(pp);
      this->next->set(this->next, that, pp, pi);
      }

      Also structure members called "new":

      char wname[FILE_NAME_SIZE];
      png_store_buffer new; /* The end of the new PNG file being written. */
      store_pool write_memory_pool;

      For good measure, you should know that:

      #define FILE_NAME_SIZE 64

      :omg: If you are wondering how this can work, check this out:

      #ifdef __cplusplus

      define this not_the_cpp_this

      define new not_the_cpp_new

      Next time you hear the BS about "given enough eyeballs...", show them this crap open-source code.

      Mircea

      R D 2 Replies Last reply
      0
      • Mircea NeacsuM Mircea Neacsu

        I see your huge files, and raise you 12300 lines of C code for PNG libary validation[^]. This is just the program that runs the tests. It is full of "interesting" things like parameters named "this" and "that":

        static void
        image_transform_png_set_palette_to_rgb_set(const image_transform *this,
        transform_display *that, png_structp pp, png_infop pi)
        {
        png_set_palette_to_rgb(pp);
        this->next->set(this->next, that, pp, pi);
        }

        Also structure members called "new":

        char wname[FILE_NAME_SIZE];
        png_store_buffer new; /* The end of the new PNG file being written. */
        store_pool write_memory_pool;

        For good measure, you should know that:

        #define FILE_NAME_SIZE 64

        :omg: If you are wondering how this can work, check this out:

        #ifdef __cplusplus

        define this not_the_cpp_this

        define new not_the_cpp_new

        Next time you hear the BS about "given enough eyeballs...", show them this crap open-source code.

        Mircea

        R Offline
        R Offline
        raddevus
        wrote on last edited by
        #3

        So in that first method, there is:

        const image_transform *this

        :sigh: That's a const image_transform pointer named this!?! Oy!

        Mircea NeacsuM 1 Reply Last reply
        0
        • M Maximilien

          bug people : hey, there's an issue with a report we generate... me: naively opens up one of 3 report related files. hmmm, resharper doesn't start. looks at the report related files, first one has 37,000 lines and the other 2 files 17,000 and 15,000 lines. There's another file in our solution with 46,000 lines !!! (all formatted by rogue gremlins) :sigh:

          CI/CD = Continuous Impediment/Continuous Despair

          R Offline
          R Offline
          raddevus
          wrote on last edited by
          #4

          Maximilien wrote:

          There's another file in our solution with 46,000 lines !!!

          But think how convenient this is since you don't have to go searching in numerous files. :rolleyes: Whoever did that is definitely the square root of genius.

          L 1 Reply Last reply
          0
          • R raddevus

            So in that first method, there is:

            const image_transform *this

            :sigh: That's a const image_transform pointer named this!?! Oy!

            Mircea NeacsuM Offline
            Mircea NeacsuM Offline
            Mircea Neacsu
            wrote on last edited by
            #5

            raddevus wrote:

            That's a const image_transform pointer named this!?!

            Indeed! But if you look at the #define I mentioned, it turns into:

            const image_transform *not_the_cpp_this

            :laugh: And there are many, many functions that all use the this and that parameters. I swear, the guy who wrote this code (John Cunningham Bowler according to copyright notice), had the worst naming system I've ever seen. Also, if you think this is code from the '80-es or'90-es, you are wrong again, at least according to copyright notice:

            * Copyright (c) 2021 Cosmin Truta
            * Copyright (c) 2014-2017 John Cunningham Bowler

            And this is the code used to validate libpng, one of the most popular pieces of open-source software. :wtf:

            Mircea

            E 1 Reply Last reply
            0
            • R raddevus

              Maximilien wrote:

              There's another file in our solution with 46,000 lines !!!

              But think how convenient this is since you don't have to go searching in numerous files. :rolleyes: Whoever did that is definitely the square root of genius.

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

              I have programs, that will concatenate text files; just so I can browse "the whole thing". I may "globally" change the whole thing; then split it back into its components; particularly when I'm doing a conversion of sorts. I'm inserting meta data as I'm doing this; so that everything that follows becomes trivial.

              "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

              1 Reply Last reply
              0
              • Mircea NeacsuM Mircea Neacsu

                raddevus wrote:

                That's a const image_transform pointer named this!?!

                Indeed! But if you look at the #define I mentioned, it turns into:

                const image_transform *not_the_cpp_this

                :laugh: And there are many, many functions that all use the this and that parameters. I swear, the guy who wrote this code (John Cunningham Bowler according to copyright notice), had the worst naming system I've ever seen. Also, if you think this is code from the '80-es or'90-es, you are wrong again, at least according to copyright notice:

                * Copyright (c) 2021 Cosmin Truta
                * Copyright (c) 2014-2017 John Cunningham Bowler

                And this is the code used to validate libpng, one of the most popular pieces of open-source software. :wtf:

                Mircea

                E Offline
                E Offline
                englebart
                wrote on last edited by
                #7

                change “this” to “thiz”? I use “this” and “that” a lot for things like assignment operators, but with the implicit “this”.

                1 Reply Last reply
                0
                • Mircea NeacsuM Mircea Neacsu

                  I see your huge files, and raise you 12300 lines of C code for PNG libary validation[^]. This is just the program that runs the tests. It is full of "interesting" things like parameters named "this" and "that":

                  static void
                  image_transform_png_set_palette_to_rgb_set(const image_transform *this,
                  transform_display *that, png_structp pp, png_infop pi)
                  {
                  png_set_palette_to_rgb(pp);
                  this->next->set(this->next, that, pp, pi);
                  }

                  Also structure members called "new":

                  char wname[FILE_NAME_SIZE];
                  png_store_buffer new; /* The end of the new PNG file being written. */
                  store_pool write_memory_pool;

                  For good measure, you should know that:

                  #define FILE_NAME_SIZE 64

                  :omg: If you are wondering how this can work, check this out:

                  #ifdef __cplusplus

                  define this not_the_cpp_this

                  define new not_the_cpp_new

                  Next time you hear the BS about "given enough eyeballs...", show them this crap open-source code.

                  Mircea

                  D Offline
                  D Offline
                  David ONeil
                  wrote on last edited by
                  #8

                  "Take *this job and shove it...

                  Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

                  1 Reply Last reply
                  0
                  • M Maximilien

                    bug people : hey, there's an issue with a report we generate... me: naively opens up one of 3 report related files. hmmm, resharper doesn't start. looks at the report related files, first one has 37,000 lines and the other 2 files 17,000 and 15,000 lines. There's another file in our solution with 46,000 lines !!! (all formatted by rogue gremlins) :sigh:

                    CI/CD = Continuous Impediment/Continuous Despair

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #9

                    20 years ago... The C++ class had at least 100,000 lines of code. I say at least because besides the include file there were three different code files (which is possible in C++). It is possible there were others. There were at least 200 class attributes and at least 200 methods. Obviously the methods were not small. Design patterns because a thing after that and soon after that one saw "AntiPatterns" (the book by that name.) And so I learned what a God Object is.

                    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