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. Even the best of us...

Even the best of us...

Scheduled Pinned Locked Moved The Weird and The Wonderful
pythoncomfunctionallearning
7 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
    Marc Clifton
    wrote on last edited by
    #1

    if (startupFailure)
    {
    startupFailure = true;
    }

    I must have been doing something else at some point, and this is all that is left now. :sigh: :doh: Marc

    Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! 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

    D Z T M G 6 Replies Last reply
    0
    • M Marc Clifton

      if (startupFailure)
      {
      startupFailure = true;
      }

      I must have been doing something else at some point, and this is all that is left now. :sigh: :doh: Marc

      Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! 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

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

      Debugging purposes? Sometimes these instructions remain...

      DURA LEX, SED LEX 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 If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

      1 Reply Last reply
      0
      • M Marc Clifton

        if (startupFailure)
        {
        startupFailure = true;
        }

        I must have been doing something else at some point, and this is all that is left now. :sigh: :doh: Marc

        Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! 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

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

        Marc Clifton wrote:

        startupFailure = true;

        Just to be sure. :-\

        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 Marc Clifton

          if (startupFailure)
          {
          startupFailure = true;
          }

          I must have been doing something else at some point, and this is all that is left now. :sigh: :doh: Marc

          Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! 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

          T Offline
          T Offline
          Tim Carmichael
          wrote on last edited by
          #4

          Schrodinger's cat override? Just to be sure...

          1 Reply Last reply
          0
          • M Marc Clifton

            if (startupFailure)
            {
            startupFailure = true;
            }

            I must have been doing something else at some point, and this is all that is left now. :sigh: :doh: Marc

            Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! 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

            M Offline
            M Offline
            Manfred Rudolf Bihy
            wrote on last edited by
            #5

            Since the language is not known I can only assume an untyped or weakly typed language and startupFailure might be true for an unbelievable amount of values. You're just putting that right with your assignment (again assuming true is a boolean literal). Nothing weird to see here, run along! :-D

            "I had the right to remain silent, but I didn't have the ability!"

            Ron White, Comedian

            1 Reply Last reply
            0
            • M Marc Clifton

              if (startupFailure)
              {
              startupFailure = true;
              }

              I must have been doing something else at some point, and this is all that is left now. :sigh: :doh: Marc

              Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! 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

              G Offline
              G Offline
              Gary Wheeler
              wrote on last edited by
              #6

              Ah. Here's my version:

              if (startupFailure)
              {
              DoSomething();
              }
              {
              DoSomethingElse();
              }

              Software Zen: delete this;

              1 Reply Last reply
              0
              • M Marc Clifton

                if (startupFailure)
                {
                startupFailure = true;
                }

                I must have been doing something else at some point, and this is all that is left now. :sigh: :doh: Marc

                Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! 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

                P Offline
                P Offline
                phil o
                wrote on last edited by
                #7

                It just made me think of a new pattern: the Failure Swallowing pattern (a behavioural one).

                bool failure;
                try {
                // Some lengthy and fault-prone code
                // ...
                }
                catch {
                failure = false;
                }
                finally {
                failure = false;
                }
                if (failure) {
                failure = false;
                }

                And here is it; you will never see any error anymore. ;P

                Loneliness and cheeseburgers are a dangerous mix.

                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