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

Irony

Scheduled Pinned Locked Moved The Lounge
pythoncomfunctionallearning
21 Posts 13 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.
  • D Dave Kreskowiak

    I ran into that myself about a year and a half ago. You find out the hard way that your email notification code better be rock-f***in'-solid before you launch the site. :-D

    A guide to posting questions on CodeProject

    Click this: Asking questions is a skill. Seriously, do it.
    Dave Kreskowiak

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

    Dave Kreskowiak wrote:

    You find out the hard way that your email notification code better be rock-f***in'-solid before you launch the site.

    Yeah, and with the vagaries of the email server, the only way to really do that is wrap the whole thing in a try-catch that handles its own errors -- I have a UDP message to PaperTrailApp for those super critical help help help! problems. :) 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 1 Reply Last reply
    0
    • OriginalGriffO OriginalGriff

      I thought it was just me! :laugh: I ended up putting the error log to a DB, with a delayed bulk email at intervals to prevent locking it all up with error reports... :-O

      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #5

      We ended up doing the same thing. We don't get email notifications for every brain fart the site runs into, just the most severe. I really have to overhaul the email system anyway. There's a ton of notification subscriptions the system supports as well as site errors. In the overhaul I'm going to split out the site errors from everything else and handle it with a different, very simple, subsystem. The remaining subscription emails will be handled by message queuing and an email system running as its own process. I wish I had the time to do it that way before launch but we had to launch the site 6 months earlier than planned.

      A guide to posting questions on CodeProject

      Click this: Asking questions is a skill. Seriously, do it.
      Dave Kreskowiak

      1 Reply Last reply
      0
      • M Marc Clifton

        Dave Kreskowiak wrote:

        You find out the hard way that your email notification code better be rock-f***in'-solid before you launch the site.

        Yeah, and with the vagaries of the email server, the only way to really do that is wrap the whole thing in a try-catch that handles its own errors -- I have a UDP message to PaperTrailApp for those super critical help help help! problems. :) 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
        Dave Kreskowiak
        wrote on last edited by
        #6

        Marc Clifton wrote:

        PaperTrailApp

        Huh? Wha'dat?

        A guide to posting questions on CodeProject

        Click this: Asking questions is a skill. Seriously, do it.
        Dave Kreskowiak

        M 1 Reply Last reply
        0
        • M Marc Clifton

          When your email service, that handles emailing you exceptions, itself throws an exception... Which is then caught by the message processor, that then tries to email you a notification that your application threw an exception... By queuing an exception message... Which gets dequeued on a separate thread... And the whole process repeats itself. :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

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

          Exceptionception!

          What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

          1 Reply Last reply
          0
          • M Marc Clifton

            When your email service, that handles emailing you exceptions, itself throws an exception... Which is then caught by the message processor, that then tries to email you a notification that your application threw an exception... By queuing an exception message... Which gets dequeued on a separate thread... And the whole process repeats itself. :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
            Garth J Lancaster
            wrote on last edited by
            #8

            I was hoping (and still am) that this was going to be a 'well, ironically, having made an attempt at writing a HAL in Python, the kiddies have discovered that they can't do it, and have come to me cap in hand to help them' I LIVE for that post, Marc

            M 2 Replies Last reply
            0
            • D Dave Kreskowiak

              Marc Clifton wrote:

              PaperTrailApp

              Huh? Wha'dat?

              A guide to posting questions on CodeProject

              Click this: Asking questions is a skill. Seriously, do it.
              Dave Kreskowiak

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

              Dave Kreskowiak wrote:

              Huh? Wha'dat?

              Very cool way to log stuff.[^] Though I only log non-secure info. 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 1 Reply Last reply
              0
              • G Garth J Lancaster

                I was hoping (and still am) that this was going to be a 'well, ironically, having made an attempt at writing a HAL in Python, the kiddies have discovered that they can't do it, and have come to me cap in hand to help them' I LIVE for that post, Marc

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

                Garth J Lancaster wrote:

                having made an attempt at writing a HAL in Python, the kiddies have discovered that they can't do it, and have come to me cap in hand to help them'

                First part happened, second part has not. Now they're writing it in F#, because one of the kiddies as a Haskell background. :laugh: The irony here is: 1) very few people actually know F#, so the code will undoubtedly be thrown away by the next iteration of kiddies, if not sooner. 2) it's like reading imperative code with match statements instead of switch and type instead of enum, and everything is mutable. 3) FP is just the wrong approach for this kind of work because you're dealing with a lot of struct stuff for the hardware, a lot of mutable data from the I/O, and possibly the need to maintain some sort of state information, like is the hardware up or down since the last time we checked. 4) from what I've seen so far, no logging, no exception handling, no modularity, and a lot of hard coded constants and strings, but hey, "we're ahead of schedule!" is pronounced loudly and proudly at every stand up. I write better prototype code. :laugh: 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

                1 Reply Last reply
                0
                • G Garth J Lancaster

                  I was hoping (and still am) that this was going to be a 'well, ironically, having made an attempt at writing a HAL in Python, the kiddies have discovered that they can't do it, and have come to me cap in hand to help them' I LIVE for that post, Marc

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

                  Garth J Lancaster wrote:

                  I LIVE for that post, Marc

                  Actually, what's worse is that one of them said the UI (Javascript/HTML hosted in a CefSharp browser client) was ready for QA, so I volunteered to pre-QA the UI before we sent it over the fence to the "real" *cough* *cough* QA people. An hour later, I had 8 pages of bugs. 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 1 Reply Last reply
                  0
                  • M Marc Clifton

                    Dave Kreskowiak wrote:

                    Huh? Wha'dat?

                    Very cool way to log stuff.[^] Though I only log non-secure info. 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
                    Dave Kreskowiak
                    wrote on last edited by
                    #12

                    It looks cool, though it appears to be cloud-based logging and aggregation? Damn it! :mad: I can't use it. :mad: Security would throw an epic temper tantrum. It took SIX MONTHS of thrashing those guys to get authorization to have a 3rd-party stand up TWO SERVERS in Azure to be managed by that company and we would install a client app on a dozen machines that connects to them and feeds them data all day for analysis. And that wasn't even HIPPA regulated nor business critical stuff either! They're heads would explode if I showed them this thing.

                    A guide to posting questions on CodeProject

                    Click this: Asking questions is a skill. Seriously, do it.
                    Dave Kreskowiak

                    1 Reply Last reply
                    0
                    • M Marc Clifton

                      Garth J Lancaster wrote:

                      I LIVE for that post, Marc

                      Actually, what's worse is that one of them said the UI (Javascript/HTML hosted in a CefSharp browser client) was ready for QA, so I volunteered to pre-QA the UI before we sent it over the fence to the "real" *cough* *cough* QA people. An hour later, I had 8 pages of bugs. 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
                      Mycroft Holmes
                      wrote on last edited by
                      #13

                      Oh nice, give the old bastard who has spent years being nitpicked by QA a shot at your first UI :laugh: Don't get me wrong I think QA people are essential but what a bunch of pedantic, anally retentive, irritating, annoying and bloody persistent sods they are.

                      Never underestimate the power of human stupidity RAH

                      M 1 Reply Last reply
                      0
                      • M Marc Clifton

                        When your email service, that handles emailing you exceptions, itself throws an exception... Which is then caught by the message processor, that then tries to email you a notification that your application threw an exception... By queuing an exception message... Which gets dequeued on a separate thread... And the whole process repeats itself. :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

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

                        The only good case I found for empty try-catch blocks, when your error handling (logging, emailing, whatever it is you do) goes awry :sigh:

                        Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.

                        Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

                        Regards, Sander

                        1 Reply Last reply
                        0
                        • M Mycroft Holmes

                          Oh nice, give the old bastard who has spent years being nitpicked by QA a shot at your first UI :laugh: Don't get me wrong I think QA people are essential but what a bunch of pedantic, anally retentive, irritating, annoying and bloody persistent sods they are.

                          Never underestimate the power of human stupidity RAH

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

                          Mycroft Holmes wrote:

                          Oh nice, give the old bastard who has spent years being nitpicked by QA a shot at your first UI

                          I must admit, I took great sadistic pleasure in the process.

                          Mycroft Holmes wrote:

                          but what a bunch of pedantic, anally retentive, irritating, annoying and bloody persistent sods they are.

                          Yeah, aren't they wonderful? :) Honestly, once I started to learn how to work with QA (part of which was, don't rely on them accurately telling you what they did to break your software), I started enjoying the process, because it did improve the quality of the product, as well as my code and I learned better architecture (ok, fancy word for automatic logging) as well as a result of my QA experiences. The best thing though was when we got to a point of working together, and I could ask them "I found this weird bug in my code and I can't figure out how to reproduce it, could you try?" That was great. 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

                          1 Reply Last reply
                          0
                          • M Marc Clifton

                            When your email service, that handles emailing you exceptions, itself throws an exception... Which is then caught by the message processor, that then tries to email you a notification that your application threw an exception... By queuing an exception message... Which gets dequeued on a separate thread... And the whole process repeats itself. :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

                            K Offline
                            K Offline
                            Kiriander
                            wrote on last edited by
                            #16

                            Old story, even the Unix haters' handbook has it.

                            1 Reply Last reply
                            0
                            • M Marc Clifton

                              When your email service, that handles emailing you exceptions, itself throws an exception... Which is then caught by the message processor, that then tries to email you a notification that your application threw an exception... By queuing an exception message... Which gets dequeued on a separate thread... And the whole process repeats itself. :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
                              #17

                              One petard wedgie, coming up. Welcome to humanity, Marc :-D.

                              Software Zen: delete this;

                              1 Reply Last reply
                              0
                              • M Marc Clifton

                                When your email service, that handles emailing you exceptions, itself throws an exception... Which is then caught by the message processor, that then tries to email you a notification that your application threw an exception... By queuing an exception message... Which gets dequeued on a separate thread... And the whole process repeats itself. :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

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

                                Install a mail agent on each server, send all emails to the local agent, and let the local agent send it upstream to the actual relays. Your emails will arrive eventually, even if the whole network is down! You can tune the retry parameters on the local agents to be pretty aggressive on retries.

                                1 Reply Last reply
                                0
                                • M Marc Clifton

                                  When your email service, that handles emailing you exceptions, itself throws an exception... Which is then caught by the message processor, that then tries to email you a notification that your application threw an exception... By queuing an exception message... Which gets dequeued on a separate thread... And the whole process repeats itself. :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

                                  A Offline
                                  A Offline
                                  agolddog
                                  wrote on last edited by
                                  #19

                                  Marc, In our little system we have email sending configured as a Boolean. Down when we're instantiating the class that sends the email, we look at that. If false, we instantiate an implementation of the class which writes to a local file instead of sending the email. So, we can check content etc in development without the risk of "oops that was a real email address." I wonder if something similar could be wired up for your error condition. Once you're in the catch block, fire off the email send, but pass the magic param which says "write to log/file/send up a flare/whatever."

                                  1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    When your email service, that handles emailing you exceptions, itself throws an exception... Which is then caught by the message processor, that then tries to email you a notification that your application threw an exception... By queuing an exception message... Which gets dequeued on a separate thread... And the whole process repeats itself. :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
                                    Dale Barnard
                                    wrote on last edited by
                                    #20

                                    At least someone is *trying* to handle/report errors. Better than ignoring them.

                                    1 Reply Last reply
                                    0
                                    • M Marc Clifton

                                      When your email service, that handles emailing you exceptions, itself throws an exception... Which is then caught by the message processor, that then tries to email you a notification that your application threw an exception... By queuing an exception message... Which gets dequeued on a separate thread... And the whole process repeats itself. :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
                                      milo xml
                                      wrote on last edited by
                                      #21

                                      I did something similar. My program connects to a SQL database and when that database connection is broken an exception is thrown and logged to a message processor which also tries to log it to the, wait for it, SQL database. Which then throws the exception again.....

                                      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