Avoid Yoda Conditions in Perl You Should

I remember a brief time in the mid-2000s insisting on so-called “Yoda conditions” in my Perl. I would place constants to the left of equality comparisons. In case I accidentally typed a single = instead of ==, the compiler would catch it instead of blithely assigning a variable. For example:

Perl
 
if ( $foo == 42 ) { ... } # don’t do this
if ( 42 == $foo ) { ... } # do this
if ( $foo = 42  ) { ... } # to prevent this

And, because a foolish consistency is the hobgoblin of little minds, I would even extend this to string and relational comparisons.

The Essential Elements of an Internet of Things Dashboard

In “What is an Internet of Things Dashboard?," we looked at an IoT Dashboard compared to a car dashboard. We summarized that an IoT dashboard provides performance information about IoT equipment in a graphical user interface accessible through an Internet browser or mobile app.

  • Real-time performance data
  • Alerts/warnings if there is a problem
  • Insights on performance over a time period
  • Analytics for problem-solving
  • Control for modifying performance

Today, companies are realizing that the ability to remotely monitor equipment with IoT dashboards will make them more efficient with their resources and provide more value to their customers. Now, the question is: how does an enterprise acquire this capability?