random numbers..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #16
    Originally posted by ravenspoint
    By free, I did not mean that you did not have to write a check.

    I meant that you do not have to select an generator, install it, link it to your program, distribute it to your clients, and document why you chose it. This is all a huge amount of work for anyone who is not paid by the hour.

    The standard generator is just there, free.
    I'd say the right tool for the right job. the standard generator is for testing small programs and writting school assignments. If you use it for a lotto system however, you better be loaded with cash.

    Comment

    • ravenspoint
      New Member
      • Jul 2007
      • 111

      #17
      Originally posted by r035198x
      I'd say the right tool for the right job. the standard generator is for testing small programs and writting school assignments. If you use it for a lotto system however, you better be loaded with cash.
      Granted.

      However, most coding jobs fall between these extremes. Quick and dirty solutions to small problems some-one is prepared to pay a hundred bucks to fix.

      Coding for a lottery system would be a grand job.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #18
        Originally posted by ravenspoint
        Granted.

        However, most coding jobs fall between these extremes. Quick and dirty solutions to small problems some-one is prepared to pay a hundred bucks to fix.

        Coding for a lottery system would be a grand job.
        Some of these "small" things also differentiate between a good programmer and one who only cares about this month's salary.

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #19
          Originally posted by ravenspoint
          Coding for a lottery system would be a grand job.
          No it wouldn't; it would just take a fairly good pseudo random number generator,
          capable of generating a reasonable length series of uniform distributed pseudo
          random numbers. The 'standard' rand() isn't one of them but that's all.

          Jos

          Comment

          • MMcCarthy
            Recognized Expert MVP
            • Aug 2006
            • 14387

            #20
            The last three posts in this thread have been deleted as they had turned into a personal conflict and hijacked the thread. This does not in any way help the original poster and is not allowed in the development forums.

            Please remember the OP when discussing solutions in a thread.

            ADMIN

            Comment

            • emaghero
              New Member
              • Oct 2006
              • 85

              #21
              Originally posted by ravenspoint
              That is so harsh!

              In fact the standard generator is free, widely available and well understood. These are important benefits not shared by a home brewed generator. They are so important benefits, that I would suggest using the standard generator, unless someone can show a very good reason why it would be the wrong choice.

              If you routinely reseed the generator from the least significant digits of the system clock, then the standard generator serves perfectly for a huge number of the common purposes.
              If you have any kind of serious numerical application, such as Monte-Carlo Integration or Stochastic Differential Equations to name two, then the standard generator is hopelessly inadequate. This is because these processes usually require a specific type of random number. Physical processes modelled by SDEs have solutions based on gaussian random variables. To determine the price of a stock option at any given time one must use log-normal random variables. While these are specialised applications they are areas where random numbers are used heavily in practice and that standard generator is not used because of the necessity to continuously re-seed.

              Originally posted by ravenspoint
              The classic example is selecting a wait time before again requesting a shared resource that is currently busy. It is does not matter what wait time is selected, just that it be 'random'. Obscure flaws in the statistical behaviour of the standard generator over long runs are irrelevant - if you have to back-off more than 2 - 3 times your system has problems that will not be solved with a 'better' generator.
              The queuing times for many systems can be modelled very accurately with Poisson statistics. I am not saying that you should use "obscure" random variables for the sake of it. I am saying that certain applications require certain types of random variables and in those cases an application specific random number generator is required.

              Comment

              Working...