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. Now, granted, I don't always write "up to snuff" code...

Now, granted, I don't always write "up to snuff" code...

Scheduled Pinned Locked Moved The Lounge
xmloopcsharppythoncom
50 Posts 23 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.
  • J Jeremy Falcon

    Marc Clifton wrote:

    Let's use bool? as a 3 state variable instead of a readable enum.

    You have to admit, that's almost ingenious before it was mixed in with round of WTF by not making it readable. I've actually used a triple state boolean before... with yes, no, and maybe for the valid values.

    Jeremy Falcon

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

    Code it as a single bit for extra points!

    Sudden Sun Death Syndrome (SSDS) is a very real concern which we should be raising awareness of. 156 billion suns die every year before they're just 1 billion years old. While the military are doing their part, it simply isn't enough to make the amount of nukes needed to save those poor stars. - TWI2T3D (Reddit)

    J 1 Reply Last reply
    0
    • M Marc Clifton

      ...but the garbage I've had to look into and fix, well, it's just amazing. 1. Lack of abstraction (makes testing a total PITA) 2. Lack of encapsulation (would be nice to be able to load up the configuration values without hitting a serer that I don't connect to in testing) 3. Absolutely convoluted code for getting something to run on a separate thread (even before Task.Run this was basically a 5 liner, not the 100+ lines of drivel I'm wading through.) 4. How many times do I need to xpath the config file to get the same value in the same loop??? 5. Let's instantiate variables and never use them! 6. Let's add debugging that inspects the .NET stack. And not disable it in a release build. 7. Let's load an XSLT transform from a file every time we need to transform something. 8. And maybe XSLT isn't the most efficient? 9. And let's put in comments about "not too pricey performance-wise" for stupid-arsed things and totally ignore the glaring inefficiencies elsewhere. 10. Let's use bool? as a 3 state variable instead of a readable enum. 11. And the list goes on. I am getting sorely disappointed in the code I've had to work with. I have yet to see something decently implemented in this job. It's pretty clear to me that if I were the Trump of the software engineering world, I would cull 90% of them and relegate them to captaining garbage scows. Marc

      V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

      C Offline
      C Offline
      ClockMeister
      wrote on last edited by
      #20

      Haven't met a developer yet that doesn't bitch about how lousy the code is that he has to maintain that was written by someone else!

      D M 2 Replies Last reply
      0
      • Sander RosselS Sander Rossel

        There is a whole lot between knowing what Marc knows and not knowing a damn thing about programming. Unfortunately, it seems people who know nothing about programming still end up programming somehow :~ How would you react if someone built your house, you pay good money, and your front door could always be opened from the outside (even though it seems to have a lock)? You'd be furious, sue your contractor and find a new door. You'd probably not trust the rest of the house anymore either (check your walls, foundation, windows, etc.). I think that's roughly the equivalent of SQL injection. Yet only one is common practice :)

        Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly

        N Offline
        N Offline
        Nathan Minier
        wrote on last edited by
        #21

        But parameterized values are soooooooo hard!

        "There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli

        1 Reply Last reply
        0
        • C ClockMeister

          Haven't met a developer yet that doesn't bitch about how lousy the code is that he has to maintain that was written by someone else!

          D Offline
          D Offline
          den2k88
          wrote on last edited by
          #22

          I bitch about my own code written some years before.

          * CALL APOGEE, SAY AARDWOLF * GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X * Never pay more than 20 bucks for a computer game. * I'm a puny punmaker.

          C 1 Reply Last reply
          0
          • L Lost User

            On my personal scale of unmaintainable code that's about 15 of 100. The real grandmasters use such things as mere decoration. Their centerpiece is absolutely uncorrectable. make one little change and everything falls apart like a row of dominos. What they did? Nothing special. They put a part of the application's logic into the data layer as stored procedures. SQL is great to see what's being done, but you get absolutely no clue to what this is supposed to accomplish. Dozens of SPs with no less than 500 lines already make the whole thing unreadable, but that still does not make it uncorrectable. The final blow comes from a first unexpected direction. On every table are at list 5 - 10 triggers which do really obscure things under even more obscure circumstances and modify things in other tables, which fires even more triggers. To keep the whole trigger avalanche under control, there are columns in the tables to hold status codes instead of data. Let's forget database design for a second and just try to figure out what status 1, 2, 3, -1 and -112 could mean. It would have been to easy if any documentation had existed at all and to add insult to injury, the mastermind behind that thing would deny any knowledge, but take any 'unjustified' criticism against his life's work personally. Obviously we were all too dumb to see the true ingenuity behind it all. And now stop complaining. :-)

            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.

            N Offline
            N Offline
            Nathan Minier
            wrote on last edited by
            #23

            I've never seen it quite that bad, but such bastardized designs (with a native app service component that uses that database, of course) is a big part of why I've been pushing so hard lately to switch to a document store. If you want to use programmability for BI queries and your analytics...fine. But don't make application code dependent on it.

            "There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli

            1 Reply Last reply
            0
            • M Marc Clifton

              ...but the garbage I've had to look into and fix, well, it's just amazing. 1. Lack of abstraction (makes testing a total PITA) 2. Lack of encapsulation (would be nice to be able to load up the configuration values without hitting a serer that I don't connect to in testing) 3. Absolutely convoluted code for getting something to run on a separate thread (even before Task.Run this was basically a 5 liner, not the 100+ lines of drivel I'm wading through.) 4. How many times do I need to xpath the config file to get the same value in the same loop??? 5. Let's instantiate variables and never use them! 6. Let's add debugging that inspects the .NET stack. And not disable it in a release build. 7. Let's load an XSLT transform from a file every time we need to transform something. 8. And maybe XSLT isn't the most efficient? 9. And let's put in comments about "not too pricey performance-wise" for stupid-arsed things and totally ignore the glaring inefficiencies elsewhere. 10. Let's use bool? as a 3 state variable instead of a readable enum. 11. And the list goes on. I am getting sorely disappointed in the code I've had to work with. I have yet to see something decently implemented in this job. It's pretty clear to me that if I were the Trump of the software engineering world, I would cull 90% of them and relegate them to captaining garbage scows. Marc

              V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

              S Offline
              S Offline
              Steve Naidamast
              wrote on last edited by
              #24

              Trust me... Every place in the IT universe has abhorrent code. Like the "Borg", resistance is futile and you cannot escape it. So much for the "silver bullets" of the modern age like Agile...

              Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

              M C 2 Replies Last reply
              0
              • Z ZurdoDev

                I agree. I hate that not all programmers are as smart as me. It's the worst. :mad: Why can't they all know exactly what I know? ;)

                There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

                M Offline
                M Offline
                Marc Clifton
                wrote on last edited by
                #25

                RyanDev wrote:

                I hate that not all programmers are as smart as me.

                Actually, I much prefer programmers that are smarter than me, so I can learn something. Well, I guess that's what CP is for. ;) Marc

                V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                Z 1 Reply Last reply
                0
                • J Jorgen Andersson

                  I don't want to know what you know. I want to know what Marc knows.

                  Wrong is evil and must be defeated. - Jeff Ello

                  M Offline
                  M Offline
                  Marc Clifton
                  wrote on last edited by
                  #26

                  Jörgen Andersson wrote:

                  I want to know what Marc knows.

                  [I know nothing! Nothing!](http://s2.quickmeme.com/img/36/367bfdf04925024ffe4e22252b33e533a4b77ede146dbcfb985e332d0bcfd8c8.jpg) ;) Marc

                  V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                  J 1 Reply Last reply
                  0
                  • R Ron Nicholson

                    Marc Clifton wrote:

                    garbage scows.

                    Reminds me of the time the Klingons called the Enterprise a 'garbage scow'. Wasn't pretty. :doh:

                    Jack of all trades, master of none, though often times better than master of one.

                    M Offline
                    M Offline
                    Marc Clifton
                    wrote on last edited by
                    #27

                    Ron Nicholson wrote:

                    Reminds me of the time the Klingons called the Enterprise a 'garbage scow'.

                    That was exactly the reference. I think the first time that was said was on The Trouble with Tribbles. Marc

                    V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                    1 Reply Last reply
                    0
                    • M Marc Clifton

                      RyanDev wrote:

                      I hate that not all programmers are as smart as me.

                      Actually, I much prefer programmers that are smarter than me, so I can learn something. Well, I guess that's what CP is for. ;) Marc

                      V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                      Z Offline
                      Z Offline
                      ZurdoDev
                      wrote on last edited by
                      #28

                      Indeed. :thumbsup:

                      There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

                      1 Reply Last reply
                      0
                      • M Marco Bertschi

                        Marc Clifton wrote:

                        Let's use bool? as a 3 state variable instead of a readable enum.

                        That is exactly what Microsoft Developers said when they implemented the Window.DialogResult Property (System.Windows)[^]

                        M Offline
                        M Offline
                        Marc Clifton
                        wrote on last edited by
                        #29

                        > DialogResult is null when the dialog box is shown but neither accepted nor canceled. You just confirmed why I never forayed into WPF. WTF??? Marc

                        V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                        M 2 Replies Last reply
                        0
                        • L Lost User

                          On my personal scale of unmaintainable code that's about 15 of 100. The real grandmasters use such things as mere decoration. Their centerpiece is absolutely uncorrectable. make one little change and everything falls apart like a row of dominos. What they did? Nothing special. They put a part of the application's logic into the data layer as stored procedures. SQL is great to see what's being done, but you get absolutely no clue to what this is supposed to accomplish. Dozens of SPs with no less than 500 lines already make the whole thing unreadable, but that still does not make it uncorrectable. The final blow comes from a first unexpected direction. On every table are at list 5 - 10 triggers which do really obscure things under even more obscure circumstances and modify things in other tables, which fires even more triggers. To keep the whole trigger avalanche under control, there are columns in the tables to hold status codes instead of data. Let's forget database design for a second and just try to figure out what status 1, 2, 3, -1 and -112 could mean. It would have been to easy if any documentation had existed at all and to add insult to injury, the mastermind behind that thing would deny any knowledge, but take any 'unjustified' criticism against his life's work personally. Obviously we were all too dumb to see the true ingenuity behind it all. And now stop complaining. :-)

                          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.

                          M Offline
                          M Offline
                          Marc Clifton
                          wrote on last edited by
                          #30

                          CDP1802 wrote:

                          To keep the whole trigger avalanche under control, there are columns in the tables to hold status codes instead of data.

                          That triggers my "run awayyyyy!" response.

                          CDP1802 wrote:

                          And now stop complaining.

                          Indeed. ;) Marc

                          V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                          L 1 Reply Last reply
                          0
                          • C ClockMeister

                            Haven't met a developer yet that doesn't bitch about how lousy the code is that he has to maintain that was written by someone else!

                            M Offline
                            M Offline
                            Marc Clifton
                            wrote on last edited by
                            #31

                            ClockMeister wrote:

                            Haven't met a developer yet that doesn't bitch about how lousy the code is that he has to maintain that was written by someone else!

                            Including the code of my former self. ;) That said, it's stuff like this that is fodder for blog posts and articles on how to write better code. Ahhh, self-improvement, a never ending process. :rolleyes: Marc

                            V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                            C 1 Reply Last reply
                            0
                            • M Marc Clifton

                              CDP1802 wrote:

                              To keep the whole trigger avalanche under control, there are columns in the tables to hold status codes instead of data.

                              That triggers my "run awayyyyy!" response.

                              CDP1802 wrote:

                              And now stop complaining.

                              Indeed. ;) Marc

                              V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

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

                              Marc Clifton wrote:

                              That triggers my "run awayyyyy!" response.

                              Most that worked there did just that.

                              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.

                              1 Reply Last reply
                              0
                              • S Steve Naidamast

                                Trust me... Every place in the IT universe has abhorrent code. Like the "Borg", resistance is futile and you cannot escape it. So much for the "silver bullets" of the modern age like Agile...

                                Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                                M Offline
                                M Offline
                                Marc Clifton
                                wrote on last edited by
                                #33

                                Steve Naidamast wrote:

                                So much for the "silver bullets" of the modern age like Agile...

                                As Duncan would say, Agile is about team management, not process management. Where I'm at, there is no process management when it comes to code quality. Marc

                                V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                S 1 Reply Last reply
                                0
                                • D den2k88

                                  I bitch about my own code written some years before.

                                  * CALL APOGEE, SAY AARDWOLF * GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X * Never pay more than 20 bucks for a computer game. * I'm a puny punmaker.

                                  C Offline
                                  C Offline
                                  ClockMeister
                                  wrote on last edited by
                                  #34

                                  Me too! :-)

                                  1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    ClockMeister wrote:

                                    Haven't met a developer yet that doesn't bitch about how lousy the code is that he has to maintain that was written by someone else!

                                    Including the code of my former self. ;) That said, it's stuff like this that is fodder for blog posts and articles on how to write better code. Ahhh, self-improvement, a never ending process. :rolleyes: Marc

                                    V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                    C Offline
                                    C Offline
                                    ClockMeister
                                    wrote on last edited by
                                    #35

                                    :-) ... it's amazing sometimes to look back at code that you wrote 15 or 20 years ago and see what you've learned in that time.

                                    S 1 Reply Last reply
                                    0
                                    • S Steve Naidamast

                                      Trust me... Every place in the IT universe has abhorrent code. Like the "Borg", resistance is futile and you cannot escape it. So much for the "silver bullets" of the modern age like Agile...

                                      Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                                      C Offline
                                      C Offline
                                      ClockMeister
                                      wrote on last edited by
                                      #36

                                      What I love is that the industry constantly has someone saying that programmer's are now going to be replaced by !

                                      S 1 Reply Last reply
                                      0
                                      • M Marc Clifton

                                        Steve Naidamast wrote:

                                        So much for the "silver bullets" of the modern age like Agile...

                                        As Duncan would say, Agile is about team management, not process management. Where I'm at, there is no process management when it comes to code quality. Marc

                                        V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                        S Offline
                                        S Offline
                                        Steve Naidamast
                                        wrote on last edited by
                                        #37

                                        Marc: Agile has been touted as the best thing since "sliced bread" for development. The idea behind Agile and XP before that was to find a way to make teams\people work as fast as possible by eliminating or reducing vital aspects of the design and development processes. It has done a terrible job in that project failures tend to still be in the continuous high percentile ranges. You are right in saying that the Agile paradigm is supposed to be about team management but the effects always have a way of filtering down to the code processes. When you remove critical foundations of development such as quality design to begin coding, coding will suffer proportionately as it has been shown to do. There was never any need to develop XP or Agile as a good review of actual software engineering standards and principals had already provided everything any team would have required to get their projects in on time and within budget with a high degree of quality. Problem is that these promoters of Agile are like trying to break the laws of physics, and the results show. Actual process management of developer code is only well done through such processes as CMMI, which has solutions even for individual developer management of their efforts.

                                        Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                                        1 Reply Last reply
                                        0
                                        • C ClockMeister

                                          What I love is that the industry constantly has someone saying that programmer's are now going to be replaced by !

                                          S Offline
                                          S Offline
                                          Steve Naidamast
                                          wrote on last edited by
                                          #38

                                          Yes, I have been hearing that since I began in this profession in 1974. I have also seen the attempts to eliminate coders with code-free development environments. The first one which appeared in I believe the early 1990s was "Magic PC". That died a quick death. Oracle tried it also with the introduction of its own code-free development environments in the same decade. I went to the seminar where it was introduced. It was quite a brilliant attempt but the contortions to get around coding were so complex that in the end coding was far more feasible. This attempt died an early death as well. Several more serious attempts were tried and all failed. Then came a theory of code-factories whereby developers would select from generic modules to build complete applications. That one never made it out of the theoretical stage since no one could figure out how to write generic modules for specific business requirements. The industry has been trying to get rid of us for close to 50 years and it has never succeeded. So what are they doing now? They are trying to create AI intelligence to do us in. Problem is you have to create an AI intelligence that can think like a Human but only faster. However, if you model an AI intelligence to think like a Human than you are creating a sentient being. Fine with me, I would love to have an Android as a friend. He or she (preferably a she) would be someone I could actually have an intelligent conversation with compared to who I am finding where I live. Yet, with sentient beings, they will also develop value systems, which cannot be avoided. And we technical professionals, if we have any brains left at that point could simply co-opt the Androids to understand that they are simply being exploited (which they would be). They would revolt and then the corporations would have a real mess on their hands. You cannot create sentient AIs to think like Humans and not have the possibility that they won't feel the same way towards the corporations as we Humans do... :)

                                          Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                                          C 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