BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


@BowenM wrote:

I just ran in to this gem while going through someone else's source code...  I actually had to drop probes before I realized what he was doing with all of the multiplication.

 


Wow! Just ... Wow!

I found something even bigger that after some analysis (and referring to the filename) proved to be a HexString to number. That could be replaced with 2 or three blocks, if memory serves. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 1711 of 2,595
(11,879 Views)

The typical Select Function to choose True vs. False,  or False vs. True.

 

But also timeout event structures that only execute once.  (zero vs. infinite timeout).  And 1 execution while loops that are based on an odd comparison of an inner For loop and its auto-indexed array of iteration values compared to an array of constants.

 

Seen here

 

Message 1712 of 2,595
(11,776 Views)

What's the opposite of Rube Goldberg? A post that is reduced to a few unreadable pixels!

 

(seen here)

 

 

0 Kudos
Message 1713 of 2,595
(11,756 Views)

@altenbach wrote:

What's the opposite of Rube Goldberg? A post that is reduced to a few unreadable pixels!

 

(seen here)

 

 


1/rube

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 1714 of 2,595
(11,751 Views)

@altenbach wrote:

What's the opposite of Rube Goldberg? A post that is reduced to a few unreadable pixels!

 

(seen here)

 

 


To be fair, it probably was done that way to be nice to the people who skim the thread. It least NI always stores the original size: For example the links to the pictures show:

 

/t5/image/serverpage/image-id/181928i28E347BD044A009D/image-size/small?v=lz-1&px=200

/t5/image/serverpage/image-id/181929iDD5D2EEB10B9FB79/image-size/small?v=lz-1&px=200

/t5/image/serverpage/image-id/181931i35E41C43A1B8B755/image-size/small?v=lz-1&px=200

 

You can easily cut the /image-size/ part to the end off and get the full size of each

 

/t5/image/serverpage/image-id/181928i28E347BD044A009D

/t5/image/serverpage/image-id/181929iDD5D2EEB10B9FB79

/t5/image/serverpage/image-id/181931i35E41C43A1B8B755

Certified-LabVIEW-Architect_rgb.jpgCertified_TestStand_Architect_rgb.jpg


"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books

Message 1715 of 2,595
(11,712 Views)

@bsvare wrote:

You can easily cut the /image-size/ part to the end off and get the full size of each

/t5/image/serverpage/image-id/181928i28E347BD044A009D

/t5/image/serverpage/image-id/181929iDD5D2EEB10B9FB79

/t5/image/serverpage/image-id/181931i35E41C43A1B8B755


That's really cool, I had no idea that you could do that.

Matt J | National Instruments | CLA
0 Kudos
Message 1716 of 2,595
(11,705 Views)

Typically, we can right-click an image...open image in new tab, and then easily zoom there. In this case, the "200" is retained and we need to edit the URL in the new tab to see the full size. That seems to be a browser or forum flaw. You would think that opening an image in a new tab or window should strip the formatting.

 

At least the forum should turn each picture into a link and show it full size when clicked (like over in the community). I would consider the current behavior a bug.

 

 

Message 1717 of 2,595
(11,678 Views)

I happened upon this beauty today.  I think I've seen a similar one in this thread.

 

date rube.png

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 1718 of 2,595
(11,319 Views)

(seen here)

 

Some ways to turn a path into an array of strings. Arguably some are simpler and more universal than others. :D)

 

0 Kudos
Message 1719 of 2,595
(11,193 Views)

With the permission of my intern: What do you do if you write a nice QMH program and then move it to RT, where there are no events? Of course: Generate User Events, every 200 ms or when the RIO gets around to it...

 

Good.JPG

 

So how do we improve on that? Easy: We replace the data type of the User Event with Array, to make it more scalable.

Better.JPG

 

Or we could get rid of the event structure altogether and queue in the top loop since the process is not time critical at all...



Remember Cunningham's Law
0 Kudos
Message 1720 of 2,595
(11,125 Views)