Recent content by D H

  1. D H

    Insights Your Software is Never Perfect - Comments

    The Space Shuttle flight software was written at a rate of about two or three lines of production code per person per month. The people behind that code weren't twiddling their thumbs for 159 working hours and then writing two or three lines of code. They were instead attending meetings (NASA...
  2. D H

    Insights Your Software is Never Perfect - Comments

    By working very carefully, by using thorough testing, by using processes that reduce the number of bugs that arise, by having a top-to-bottom attitude toward quickly stomping those few bugs that do arise, and by having others check everything.
  3. D H

    Python How to Efficiently Remove Zeros from 2D Arrays in Python?

    That won't work, for a number of reasons. One is that the condition is wrong. Another is that you aren't changing array. You can fix this by using while not numpy.any(array[0]) : array = array[1:] This however is a bad idea. Suppose the first nonzero element is on row 1000. You will be...
  4. D H

    New Dodge Ram Pickup: Is it the Next Edsel?

    I have two cars (one of which is dead) and a truck. The two cars holds two people each, plus perhaps a few groceries. A big grocery trip? Need the truck. A trip to the hardware store or to the gardening store? Need the truck, no doubt. A trip to the dump to get rid of decades of accumulated...
  5. D H

    Insights What Can You Learn About the Moon?

    Whet they mean is that there are no intervening partial or penumbral lunar eclipses. Greg has this one right. I do have to quibble about question #3. When people say that the Moon does have an atmosphere, what they mean is that the Moon has an exceeding low density exoatmosphere, with a surface...
  6. D H

    Space Stuff and Launch Info

    That image shows the remnants of a type IA supernova, several thousand years after the supernova occurred. Another way to put it: The light from the supernova itself reached the Earth several thousand years ago.
  7. D H

    Largest permutation of elements in the range 1,....,N

    To make this clear, this is a hacker rank problem. Problem sites such as this focus solely on efficiency in the small, and in the process create rather artificial problems. This is an artificial problem. As an alternative to beating yourself over the head on those artificial hacker rank...
  8. D H

    Largest permutation of elements in the range 1,....,N

    Your algorithm is O(N2). You need to find an O(N) algorithm.
  9. D H

    I Intuition on divergence and curl

    You are correct: Your understanding is incorrect. I'll look at your three items point by point. Curl should always be zero in circles where the field lines are totally straight (right-most figure) The figures in the opening post use a fairly common technique where the density of lines...
  10. D H

    A Blue-Eye Paradox: Solution Not Unique

    With regard to what happens when six monks on the first day after the guru makes here statement? It breaks the chain. They might have broken the rule against looking at mirrors, they might have broken the about discussing eye color, or they might have committed suicide for some non-related...
  11. D H

    A Blue-Eye Paradox: Solution Not Unique

    That is a good assumption. There's no reason to make the problem more complex than it already is. That there have to exist non blue-eyed islanders (or whatever) does not necessarily follow. An islander merely has to consider it to be possible that their own eyes are not blue. Your assumption...
  12. D H

    A Blue-Eye Paradox: Solution Not Unique

    This is mutual knowledge, but it is not common knowledge. Yes, there is. This announcement is the common knowledge that starts the countdown. There is a big difference between mutual knowledge and common knowledge. I haven't seen the post that explains the version of this problem that is being...
  13. D H

    A Blue-Eye Paradox: Solution Not Unique

    To which version of the story are you referring? There are many, many versions, dating back to 1953 at a minimum. Some variations have previously been discussed right here on PhysicsForums. (Aside, NUTS! I'm still not quite used to this new setup, and as a result I just lost half an hour of...
  14. D H

    B Survival on Mars: Radiation & Temperature Challenges

    Much worse. Astronauts are not average, and they are not perfect. They own Corvettes (or even hotter cars) in much higher numbers than average, they race motorcycles in much higher numbers than average, they philander in much higher numbers than average, ... That's what astronauts do. They work...
  15. D H

    Problems with Runge-Kutta method

    That is not right. What double x[4] does do is to declare x as an array with four elements, accessed as x[0], x[1], x[2], and x[3]. The element x[4] does not exist. Your code is incorrect in a number of other ways. You are not implementing RK4 correctly.
Back
Top