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. Submission for the Guiness book of world records

Submission for the Guiness book of world records

Scheduled Pinned Locked Moved The Weird and The Wonderful
questionlearning
7 Posts 4 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
    Michael Agroskin
    wrote on last edited by
    #1

    Instrument = instrument.Accessor;
    Accessor = GetAccessorForInstrument(instrument.Accessor);
    Accessor.Instrument = instrument.Accessor;

    :thumbsdown::thumbsdown::thumbsdown::thumbsdown::thumbsdown: Has anybody seen a more confusing piece of code???

    A 1 Reply Last reply
    0
    • M Michael Agroskin

      Instrument = instrument.Accessor;
      Accessor = GetAccessorForInstrument(instrument.Accessor);
      Accessor.Instrument = instrument.Accessor;

      :thumbsdown::thumbsdown::thumbsdown::thumbsdown::thumbsdown: Has anybody seen a more confusing piece of code???

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

      Is this in a case sensitive language?

      [WikiLeaks Cablegate Cables]

      M 1 Reply Last reply
      0
      • A AspDotNetDev

        Is this in a case sensitive language?

        [WikiLeaks Cablegate Cables]

        M Offline
        M Offline
        Michael Agroskin
        wrote on last edited by
        #3

        Yes, it is case-sensitive C#. I forgot to mention that all "instrument" variables are of various "xxxAccessor" types, and all "accessor" variables are of "xxxInstrument" types, so the code is way way worse than it seems. I swear, the variables are declared something like this:

        aaaAccessor Instrument;
        bbbInstrument Accessor;
        cccAccessor instrument;
        dddInstrument accessor;

        Instrument = instrument.Accessor;
        Accessor = GetAccessorForInstrument(instrument.Accessor);
        Accessor.Instrument = instrument.Accessor;

        I won't even mention there are also InstrumentFactory class, and AccessorFactory class, and InstrumentWrapper class, and AccessorWrapper class, and IInstrument interface, and IAccessor interface, and InstrumentHelper, and AccessorHelper, and ... Do you think that deserves the Guinness book? I mean, this is probably the only program where not the values but THE MEANINGS of variables are being swapped all the time. This is not programming, this is meta-programming.

        modified on Wednesday, December 29, 2010 4:31 PM

        T 1 Reply Last reply
        0
        • M Michael Agroskin

          Yes, it is case-sensitive C#. I forgot to mention that all "instrument" variables are of various "xxxAccessor" types, and all "accessor" variables are of "xxxInstrument" types, so the code is way way worse than it seems. I swear, the variables are declared something like this:

          aaaAccessor Instrument;
          bbbInstrument Accessor;
          cccAccessor instrument;
          dddInstrument accessor;

          Instrument = instrument.Accessor;
          Accessor = GetAccessorForInstrument(instrument.Accessor);
          Accessor.Instrument = instrument.Accessor;

          I won't even mention there are also InstrumentFactory class, and AccessorFactory class, and InstrumentWrapper class, and AccessorWrapper class, and IInstrument interface, and IAccessor interface, and InstrumentHelper, and AccessorHelper, and ... Do you think that deserves the Guinness book? I mean, this is probably the only program where not the values but THE MEANINGS of variables are being swapped all the time. This is not programming, this is meta-programming.

          modified on Wednesday, December 29, 2010 4:31 PM

          T Offline
          T Offline
          TorstenH
          wrote on last edited by
          #4

          it's kind of an obfuscation-tactic! After at least 10 lines you're totally confused and want to drain yourself in your coffee mug. regards Torsten

          I never finish anyth...

          M 1 Reply Last reply
          0
          • T TorstenH

            it's kind of an obfuscation-tactic! After at least 10 lines you're totally confused and want to drain yourself in your coffee mug. regards Torsten

            I never finish anyth...

            M Offline
            M Offline
            Michael Agroskin
            wrote on last edited by
            #5

            Yeah, it is probably about job security. Everybody who has to work with his code will quit, and he will be forever the sole maintainer of that garbage. What about XAML like this?

            <Textbox Text="{Binding xxxViewModel.xxxModel.xxxData.xxxModel.DataContext.xxxUnderlying.xxxModel.xxxViewModel.Model....}" />

            Yes, Binding paths with 8 dots and more !!!

            modified on Friday, January 7, 2011 1:16 PM

            R 1 Reply Last reply
            0
            • M Michael Agroskin

              Yeah, it is probably about job security. Everybody who has to work with his code will quit, and he will be forever the sole maintainer of that garbage. What about XAML like this?

              <Textbox Text="{Binding xxxViewModel.xxxModel.xxxData.xxxModel.DataContext.xxxUnderlying.xxxModel.xxxViewModel.Model....}" />

              Yes, Binding paths with 8 dots and more !!!

              modified on Friday, January 7, 2011 1:16 PM

              R Offline
              R Offline
              Rob Grainger
              wrote on last edited by
              #6

              I think something got lost in translation

              M 1 Reply Last reply
              0
              • R Rob Grainger

                I think something got lost in translation

                M Offline
                M Offline
                Michael Agroskin
                wrote on last edited by
                #7

                What translation? I have to maintain and fix bugs in his code. It is all like that. Variables have wrong names, and their meaning changes al the time. Variable named "exchange" may actually mean "exchange_code", "exchange_id", "IExchange", "ExchangeConfig". "string exchange" may be used to keep "exchange_id", "exchange_code", and later on "exchange_name"... "instrument" may be of type "IInstrumentWrapper", "Ric", "Occ", "IDataAccessor", or whatever, and "accessor" means exactly the same... What about his unique approach to multi-threading? GUI thread: Click start background thread do something synchronous post to GUI Dispatcher wait until GUI is done do something synchronous post to GUI Dispatcher wait until GUI is done do something synchronous post to GUI Dispatcher wait until GUI is done do something Thread synchronization? Done using bunch of boolean flags, so it is one big race condition waiting to happen. There is no way to stop any background thread of course, so usually you have to use TaskManager to kill the application after you click "Close". Forget about memory leaks and such.

                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