Member #394180

Member Since: December 31, 2012

Country: United States

  • Your misuse of units of measure is annoying. You give the dimension in metric units, but do the screw in UTS which is inch-based and then as a final insult give the screw length in mm. ARGGGH!

    I’m guessing that since it’s a UTS screw that the box is actually meant to be measured in inches, but that there’s some kind of conspiracy to deny inches in favor of metric in spite of the fact that 350 million of your closest potential customers use inches. Without debating the merits of the 2 systems, how about you pick one (either one) and stick with it for your ad copy? if you’re going to mix and match, how about giving the complete set of dimensions in both?

    PS - there are 2 types of countries on this planet, those that have landed a man on the moon and those that use metric

  • My dentist gave me an entire container of that stuff they use to take molds of your teeth for crowns. I 3D printed him a mandible as a thank-you gift.

  • This looks to have real possibilities for PC-based games. Very cool.

  • Looks like a fun game.

    For about the same price you could have used Raspberry Pis with built-in wifi. The built-in Linux network stack would have let you use UDP or TCP sockets for communications and you wouldn’t have had to spend the time designing, implementing and debugging node addressing, retries, checksums, multi-byte packets, etc. You may have been able to finish the visual front end. Simple is the enemy of easy.

    BTW, if you use a node-js server to implement a web GUI for your front end, then any device that has a browser - PC, Pi, phone, etc. - can be used as your front end hardware.

    But still a fun game. maybe I’ll put together the Pi version at home. Thanks for the idea.

  • A few things. You can code a nice clean forever loop as either

    for (;;)
    {
    }
    

    or

    while (true)
    {
    }
    

    You get out of the loops using the break, assuming you want to get out at all.

    Next, in the for-loop “afterthought” (cute name, BTW), using post increment/decrement is traditional, but when using C++ variables for loop control, variables that can be complex objects with complex increment operators, such as iterators, it’s actually more efficient to use pre increment/decrement. That is:

    for (map<string, int>::const_iterator i=foo.begin(); i!=foo.end(); ++i)
    {
    }
    

    Another way to exit loops is by throwing an exception.

    for (;;)
    {
        throw runtime_error("Oopsie"); 
    }
    

    The exception unwinds the stack, causes a clean scope exit and cleans up all automatic variables (including calling the destructors for any that may be objects).

    It’s sort of funny to consider that break and continue are structured programming mutants of the good old goto and that throw is the computed goto on steroids.

    One thing you should never do is a goto into a loop:

    int i;
    
    for (i=0; i<10; i++)
    {
    dont:
    }
    
    i = 5;
    goto dont;
    

    Believe it or not I actually saw this construct being used to re-execute the loop 5 more times after the first 10 times. The brainless bozo was using it to implement a retry strategy. Ugh! That’s the C/C++ equivalent of covfefe :-)

  • Gesture boards do oft improve profits

  • Obtuse is as obtuse does. Hopper took the same point of view with COBOL and we ended up with the abomination of ADD A TO B GIVING C instead of c = a + b. Trying to make a piece of code look like English to make the code more understandable is a futile exercise for at least 2 reasons - first, anyone listening to the President’s concatenations of English words should realize that just because the symbols are English the semantics are not automatically comprehensible; second, there are now a lot of non-English-speaking software writers out there. “&&” looks the same in all languages, whereas “and” does not. It’s the same reason we use emojis - universal communication through universal symbols. So just think of “&&” as the emoji for ‘and" and you’ll be happy :-)

  • Cases in point - the Apollo Guidance Computer (AGC) used only NAND gates, as did the CRAY 1 supercomputer. AGC did it because of the available IC technology, Cray because of the desire to have uniform propagation times through the array processor.

  • Everything weird that happens when no one’s around can be explained by the presence of one or more invisible (to us) cats. Put a dummy hamster or mouse (or a cat treat) into the ball to verify this.

  • The OpenMV can be programmed in high-level Python scripts (courtesy of the MicroPython Operating System) instead of C/C++. This makes it easier to deal with the complex outputs of machine vision algorithms and working with high-level data structures.

    But I prefer C/C++. I have tons of existing C/C++ infrastructure that I can reuse. C/C++ runs faster because there’s no interpreter overhead.In addition, a decent compiler can optimize my code to run as fast as possible. I get to control memory allocations and my code can be deterministic hard real time. I can put indentations where I want them and curly braces let me know that I’ve changed scope. Best of all, I can find 90%+ of my errors at compile time, not run time.

    Having Python-only control is a huge bug, not a feature, a terrible blemish on an otherwise interesting product. (Other than that, Mrs. Lincoln, how did you like the play?)

No public wish lists :(