06-10-2020 01:06 PM
@BowenM wrote:
I think I've posted this story before, but it is one of my favorites. This reminded me of it
(Of course the hardware team will substitute a 10x faster processor in the next iteration .. BOOM!. 🐵
06-11-2020 02:54 AM
@BowenM wrote:
@altenbach wrote:
Not really Rube Goldberg code, more a Rube Goldberg concept (seen here).
"If you quickly run out of memory, add a time delay so you run out of memory more slowly. :D"
(That particular code would take 5 days with the suggested delay so we can start the program on Monday and leave for the weekend without ever running out of memory. Problem solved!!!)
I think I've posted this story before, but it is one of my favorites. This reminded me of it
A troubled program being blown up in action will hunt me in my sleep.
Only fixing the source will send it into the light 👼.
06-17-2020 11:58 AM
Haven't seen these in a while, but they are just the tip of the iceberg.
Maybe somebody want to help fix all that code. It has doozies like the following.
06-17-2020 08:15 PM
That's almost as embarrassing as some of my Rube-ish attempts at coding early in my career.
06-19-2020 11:34 AM
@billko wrote:
That's almost as embarrassing as some of my Rube-ish attempts at coding early in my career.
There's a saying I read somewhere, though I can't seem to find it now. Something along the lines of: "Good code is what you just wrote. Bad code is what your coworker just wrote. Terrible code is what you wrote 6 months ago"
I can't tell you the number of times I've been looking through old code and thought "oh wow. What was I thinking?!"
06-27-2020 05:55 PM
So we have a 1D array that should have a linear scaling applied.
Some programmers thing that we:
My gut feeling is that this could be simplified! I wonder how much the LabVIEW compiler can strip out from the original. 😄
07-04-2020 09:35 AM - edited 07-04-2020 09:36 AM
The problem is simple: Take any 2D array and interleave empty rows and columns to double the size. (seen here)
There are many ways to do this, Here are two alternatives.
One of them might take less time to write, debug, and verify. 😄
Decisions, decision!
08-03-2020 03:19 PM - edited 08-03-2020 03:22 PM
08-04-2020 06:25 AM
@altenbach wrote:
We talked about Aztec code architecture before, but it seems that some will take it to the next level and implement Mayan Code Architecture:
Yes, I actually visited Tikal in 1980. Quite an adventure!
But it's OK because he left out more bad code. 🤣
08-06-2020 11:33 AM - edited 08-06-2020 11:34 AM
One would think that having a single 2D array shift register receiving a row would be slightly simpler than 28 (!!) 1D arrays, each receiving a scalar per iteration. ( very small code section seen below)
(seen here).
What hurts the eye (and brain!) even more is all these detours via shorts stretches of dynamic data. Yuk! I am not even trying to figure out what they should do.