09-10-2018 07:16 PM
hi everyone, i have a little question about the CLD exam, I going to take it next month and I read that almost all of the exams can be answered with a state machine, I personally feel very comfortable with this architecture, but I'm not very fast with others architectures like producer-consumer, so my question is: do you think that I have to study the others architectures? or can I just practice how be faster with the state machine? I want to use my study and practice time as efficient as possible
Solved! Go to Solution.
09-10-2018 07:27 PM
There is a certification forum which will have a lot of information for you. You should also download the preparation kit which has a couple (maybe 4?) different prompts for you to practice. When you attempt these, try to attack them however you are most comfortable, but don't be afraid to adapt your architecture to the problem.
09-11-2018 05:03 AM
The biggest problem most of people face on this exam, is the clean code and ****DOCUMENTATION****. Even if you cannot finish all the project, as long as what you program is working and that you do not have a broken arrow, you should pass. So focus in clean code, documentation and every part that you do make sure it runs without issue.
Benoit
09-11-2018 05:24 AM
A State Machine won't solve the parallel execution problem, and AFAIK most CLD exams require parallel execution.
IMHO, State Machines don't play nice with Event Structures. And when you do make something to support Even Structures, you'd probably don't need a State Machine anymore, just a parallel loop executing commands in parallel. That's what a Producer Consumer pattern is.
A Producer Consumer is more generally applicable. So is Actor Framework.
I usually avoid paradigms like this. If I need something to run in parallel, I make my class start something in parallel. But that might just be me...
@AleVS wrote:
do you think that I have to study the others architectures? or can I just practice how be faster with the state machine? I want to use my study and practice time as efficient as possible
I'd say studying other architectures will make you better. Understanding benefits of other architectures will make you appreciated them and the benefits of a state machine.
I'm sure you can study to pass the CLD, but I prefer to look at the CLD as a means, not a goal. What is the benefit of passing CLD as soon as possible? It won't make you a better programmer. Again, that might just be me...
09-11-2018 06:44 AM
wiebe@CARYA wrote:
IMHO, State Machines don't play nice with Event Structures. And when you do make something to support Even Structures, you'd probably don't need a State Machine anymore, just a parallel loop executing commands in parallel. That's what a Producer Consumer pattern is.
Sorry, but I need to hammer wiebe on semantics for a second. What you just described is more of a Queued Message Handler (QMH). A QMH is based on Message communications (intermittent, different data types in different messages, may or may not be lossless, possibly 1 to N). A Producer-Consumer is based on Streaming communications ("high speed", single data type, typically 1 to 1).
09-11-2018 07:04 AM
@crossrulz wrote:
wiebe@CARYA wrote:
IMHO, State Machines don't play nice with Event Structures. And when you do make something to support Even Structures, you'd probably don't need a State Machine anymore, just a parallel loop executing commands in parallel. That's what a Producer Consumer pattern is.
Sorry, but I need to hammer wiebe on semantics for a second. What you just described is more of a Queued Message Handler (QMH). A QMH is based on Message communications (intermittent, different data types in different messages, may or may not be lossless, possibly 1 to N). A Producer-Consumer is based on Streaming communications ("high speed", single data type, typically 1 to 1).
SpoilerI know a large majority of us, myself included, are not CS people. But we need to be more consistent on our terminology in order to avoid a lot of confusion in these discussions.
So the QMH is a (message streaming) PC .
QMH is usually 1 to 1 (queue), single data type (enum or message class) and high speed.
Seriously, I add what I need, until it does what it should do. You might be right. I don't pay much attention to that kind of "architecture" anymore.
09-11-2018 08:19 AM
wiebe@CARYA wrote:So the QMH is a (message streaming) PC
.
QMH is usually 1 to 1 (queue), single data type (enum or message class) and high speed.
My QMH is actually usually N to 1 using a queue.
You don't have data associated with your message? Oh, message class, which means each message type will have its own set of data. High speed is really just an added benefit of the queue, not really what you are trying to accomplish.
A Producer-Consumer is more like a stream of floats constantly being sent to another loop for analysis and/or logging.
09-11-2018 08:36 AM - edited 09-11-2018 08:37 AM
And I'll hammer weibe on the point that crossruzs missed.
Yes, every CLD exam can be successfully implemented as a simple state machine.
You won't pass the recertification without understanding the other design patterns discussed in LabVIEW Core II training.
09-11-2018 09:20 AM - edited 09-11-2018 09:29 AM
@JÞB wrote:
Yes, every CLD exam can be successfully implemented as a simple state machine.
No state machine is ever simple (except trivial ones, but then you can avoid them completelly). Or at least they are a big pain to me. If everything is right the first time, it's ok, but usually, and especially during CLDs, it's not. Haven't use one in years. If I have to, I'll use a state pattern. And yes, I passed my CLD using one.
IIRC, there's usually something that needs to run in parallel? Of course you can make a SM, with a demon\actor-ish conrtuct, but then it wouldn't be simple anymore.
09-11-2018 09:20 AM
thanks for the answer and yes, I already did the exam examples, actually, that's why I did this question because all of the solutions in the examples are state machines