Mike Le Posted June 27, 2013 Report Share Posted June 27, 2013 (edited) Hi all, This is my SECOND attempt at the CLA practice exam. Because it was my second attempt, I reduced my time to 3:10 instead of the full 4:00. I figure I'll lose ~45 minutes on the real exam getting acclimated to the problem. I'm pretty comfortable using Actor Framework for my professional work, so I tried to apply it here. Unfortunately, I think I'm going to need to switch gears... the result feels nowhere near complete. The time crunch is much worse compared to when I did the CLD. Overall, looking for thoughts on my organizational structure, general recommendations on what I might get dinged for on what IS done, and of course opinions on how far from a "pass" this solution is. I definitely don't consider this a passing solution, but some thoughts on what I should work on would be helpful. It's in LabVIEW 2012, where Actor Framework is native. If you would like to look at it in a different version of LabVIEW, let me know and I'll try to back-convert. Thanks. Mike ATM Practice MQL2 (LabVIEW 2012).zip Edited June 27, 2013 by Mike Le Quote Link to comment
todd Posted June 28, 2013 Report Share Posted June 28, 2013 (edited) I don't have CLA exam knowledge, so I'm following this post. A question: Why call Handle Error directly in the ES? That doesn't allow the actor to be stopped, right? I usually try to put code that has meaningful errors inside the actor methods, and if there's an error in the ES, I consider that a hard stop - so after the ES's while loop, I call stop core (and ignore errors if Handle Error already caused a stop). Then send the error to the caller so it can decide to restart. Edit, after looking at it better: Oh, you're using the stop actor output to stop the ES. But this only stops the ES, not the actor. If a method throws an error, and Handle Error stops the actor, how do you stop the actor core ES/while? Typically, I create a user event (type error cluster) that stops the ES. when the "call parent" actor core stops, it's error output triggers this "done" event. I dwelling on error handling, and not offering helpful input. In handle error, I rarely call parent, because I want the option to not stop the actor. Edited June 28, 2013 by todd Quote Link to comment
Mike Le Posted June 28, 2013 Author Report Share Posted June 28, 2013 Todd, Thanks for looking at the code. I hadn't implemented a good way to stop the ES. In practical terms, it would shut down in 10 seconds with no user input. But that's a bad way to do it. I would normally have used a custom event, as you suggest, and registered it. I was amazingly time-crunched, though, and more focused on trying to cover as many requirements as possible. If I were to fix that by documenting it in the code, I would either: (1) describe the custom event stop method or (2) had a subVI that decides whether an input error was "severe," in which case it would stop the loop and pass a message to the actor core. Error handling is an important part of the exam, so I'll try to allot more time to that next time I take the practice. As it is, I'm still getting overwhelmed by all the other myriad requirements. Quote Link to comment
GregFreeman Posted June 30, 2013 Report Share Posted June 30, 2013 Here are my steps for success. One of them is "don't try to be a hero." I think this point will help save you some time. Quote Link to comment
Mike Le Posted June 30, 2013 Author Report Share Posted June 30, 2013 Thanks for the link, I've scoured the forums and have read it before. Very helpful! I took my first tries with Actor Framework because it's what I reach for in terms of asynchronous processes talking to each other. I'm worried I might be even slower if I try to wrap my head around a task-oriented solution, like the NI sample. I guess I should at least try running through the practice sample once with something like the functional global layer they used, though I really hated that design... Quote Link to comment
GregFreeman Posted July 1, 2013 Report Share Posted July 1, 2013 Thanks for the link, I've scoured the forums and have read it before. Very helpful! I took my first tries with Actor Framework because it's what I reach for in terms of asynchronous processes talking to each other. I'm worried I might be even slower if I try to wrap my head around a task-oriented solution, like the NI sample. I guess I should at least try running through the practice sample once with something like the functional global layer they used, though I really hated that design... I agree -- the design is not something I would ever use in the real world. I forget which CLA example I looked at (is there only one?) but I do remember it is very consistent/misleading as far as what is important. They implemented an entire error handler if I remember correctly! I would suggest not doing this on the test. IMO an error handler "shell" with comments will suffice. You may find actor oriented solutions to be the best solution for the problem, but is it the best solution for passing the test? These two things are inherently different (especially when there is a time limit) and as engineers we always want the best solution to the problem. But, now we find ourselves thrown in a situation (just make it "good enough") that completely contradicts what we have been molded to do! It's a difficult balance, but I trust you'll find it. 1 Quote Link to comment
Mike Le Posted July 1, 2013 Author Report Share Posted July 1, 2013 Yeah, you're right. I really need to be studying "to the test." I'll take another go at it with a non-OOP solution this week. There's only one practice CLA exam from NI, the ATM. They included one solution, which used a functional global "intermediary" layer. I was also really surprised at the level of implementation detail with the error logger! It got me very worried in terms of what kind of functional code I actually need to implement. I've been looking around for other practice solutions to the ATM, but so far only found one other, by FraggerFox at the NI Forums. Did you happen to save your practice ATM solution? If so, would you be willing to share it? It'd be really helpful for me to see a solution by someone who actually achieved the Architect level. Quote Link to comment
GregFreeman Posted July 1, 2013 Report Share Posted July 1, 2013 The first attempt I made was not good and is more of an example of what not to do than what to do. And honestly, I'm not sure if I have it anymore but I'll check later if I can dig it up. I will say, before the test I never felt completely comfortable. I was always in a serious time crunch, and I don't know if I ever finished the practice exam in the 4 hours allotted. I was crammed for time at the end of the actual exam also. So, if you're waiting for that "ok, I'm ready" feeling, you probably aren't going to ever get it! What I found helped the most was practice as best you can and realize that in your day-to-day job you have most likely done things far more complex and those things will prepare you better than any amount of practice can. If, through your code, you can get across to the graders the point that you know how to architect, I am sure you'll be good to go. Again, I'll see if I can dig up some of the practice stuff I did, but later attempts were purely regurgitation of the solution, so they probably won't help you too much, if I even still have them. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.