12-14-2013 05:10 AM
Hi Bill,
just a quick comment - don't get too weighed down with the "The LabVIEW Style Book" recommendations - whilst it is an excellent book remember that the CLD exam is only 4 hrs and impossible to put all the suggested methods for good code practice into play. My suggestion would be to focus on getting the basics of functionality working first and as long as you document and keep your wires straight etc you should have no problem. Having read through Jeff's comments he says "Any recognizable design pattern is by definition "Maintainable, scaleable and readable." " - that is enough for me to stop fretting about architecture.
Your code clearly shows that you worked thorugh the style book - my concern would be that the time taken to make all those subVIs eats into the time needed for functionality. (I say this from experience as I sat and failed the exam last year and having also worked through the style book put too much empathise on laying out the software architecture, i.e. having template folders for subvis at the expense of getting the functionality working).
I would prefer to see the error handing subVI code on the block diagram and not in a subvi as this code is only used once, but just my opinion!
Showing that you can put code into subvis is good and makes the block diagram smaller but bad if you have so many of them that it takes too long to do so as you have to document each one..
When do you take your exam? I wish you all the very best.
Helen
12-14-2013 12:27 PM
@HelenC wrote:
Hi Bill,
just a quick comment - don't get too weighed down with the "The LabVIEW Style Book" recommendations - whilst it is an excellent book remember that the CLD exam is only 4 hrs and impossible to put all the suggested methods for good code practice into play. My suggestion would be to focus on getting the basics of functionality working first and as long as you document and keep your wires straight etc you should have no problem. Having read through Jeff's comments he says "Any recognizable design pattern is by definition "Maintainable, scaleable and readable." " - that is enough for me to stop fretting about architecture.
Your code clearly shows that you worked thorugh the style book - my concern would be that the time taken to make all those subVIs eats into the time needed for functionality. (I say this from experience as I sat and failed the exam last year and having also worked through the style book put too much empathise on laying out the software architecture, i.e. having template folders for subvis at the expense of getting the functionality working).
I would prefer to see the error handing subVI code on the block diagram and not in a subvi as this code is only used once, but just my opinion!
Showing that you can put code into subvis is good and makes the block diagram smaller but bad if you have so many of them that it takes too long to do so as you have to document each one..
When do you take your exam? I wish you all the very best.
Helen
Helen, I think you are dead-on. I haven't set a date yet because I wanted to see if it was even worth trying. With these tips though, I think if I work a little harder and keep in mind the actual scope of the test, I should be okay. Trying to change my thinking patterns is going to be a bit of a challenge, because, as Fezzik from Princess Bride once said, "Well, you see, you use different moves when you're fighting half a dozen people than when you only have to be worried about ... one." 😉
12-16-2013 06:10 AM
@billko wrote:
Helen, I think you are dead-on. I haven't set a date yet because I wanted to see if it was even worth trying. With these tips though, I think if I work a little harder and keep in mind the actual scope of the test, I should be okay. Trying to change my thinking patterns is going to be a bit of a challenge, because, as Fezzik from Princess Bride once said, "Well, you see, you use different moves when you're fighting half a dozen people than when you only have to be worried about ... one." 😉
I do not envy you the headache you will have when you take the test. But for now, rest well and dream of large problem statements.
12-17-2013 10:45 AM
I would avoid not using subVIs simply to save time. Using subVIs does illustrate that you are thinking about reuse and code organization. While you probably could write the entire test in a single VI this would not be a very good method on the CLD exam. You don't want to go overboard but you definitely need to consider and show the thought process of writing modular code.
12-17-2013 10:54 AM
Re. SubVIs - I was suggesting not going over board with subVIs rather than avoiding them totally, in relation to looking at Bill's submitted code.
A good CLD solution should have at least 2 (mentioned in a CLD prep class that I attend at NI week, London) in it to show the examiners that you know how to write and document them etc, but more that say 10 then time could be eaten up documenting, designing icons etc.
Just a case of balance.
Helen
12-18-2013 10:12 AM
@HelenC wrote:
Re. SubVIs - I was suggesting not going over board with subVIs rather than avoiding them totally, in relation to looking at Bill's submitted code.
A good CLD solution should have at least 2 (mentioned in a CLD prep class that I attend at NI week, London) in it to show the examiners that you know how to write and document them etc, but more that say 10 then time could be eaten up documenting, designing icons etc.
Just a case of balance.
Helen
These are my reasons for using more SubVIs than less. Some of them are mostly reated to the way I think, others may be of practical use to others:
It helps me organize my thoughts.
Using a template contributes to a consistent "feel" to the program. (I seldom use "Create subVI.")
Modularity.
It satisfies my OCD tendencies. ('nuff said. I didn't say all my reasons were GOOD ones.)
12-18-2013 01:08 PM
Using a template contributes to a consistent "feel" to the program. (I seldom use "Create subVI.")
From selection? Edit>> Create Subvi, or File>>New VI?
And, why wasn't that file saved with a *.vit extension at C:\Program Files (x86)\National Instruments\LabVIEW 2013\templates?
Big hint: My ini contains
CustomShortcuts=";APP_NEW,Ctrl+~;APP_CREATE_ENHANCED_VI_IMAGE,Ctrl+/;APP_THIS_VIS_HIERARCHY,Ctrl+Shift+V;APP_REENTRANT_ORIGINAL,Ctrl+Shift+M;APP_SHOW_PROFILE_WINDOW,Ctrl+<;APP_SHOW_BUFFER_ALLOCATIONS,Ctrl+>;APP_FULL_SIZE,;APP_EXPLAIN_ERROR,Ctrl+!"
12-18-2013 05:02 PM
@JÞB wrote:
Using a template contributes to a consistent "feel" to the program. (I seldom use "Create subVI.")
- Nevermind about helping the next developer understand the project. It helps me because every time I open a new VI based on the template, I am instantly familiar with the workspace, and with a properly developed template, all the stuff I need from the main VI is at my fingertips.
- A well-devloped template also assures that my subVI will just drop right in when it is finished.
From selection? Edit>> Create Subvi, or File>>New VI?
And, why wasn't that file saved with a *.vit extension at C:\Program Files (x86)\National Instruments\LabVIEW 2013\templates?
Big hint: My ini contains
CustomShortcuts=";APP_NEW,Ctrl+~;APP_CREATE_ENHANCED_VI_IMAGE,Ctrl+/;APP_THIS_VIS_HIERARCHY,Ctrl+Shift+V;APP_REENTRANT_ORIGINAL,Ctrl+Shift+M;APP_SHOW_PROFILE_WINDOW,Ctrl+<;APP_SHOW_BUFFER_ALLOCATIONS,Ctrl+>;APP_FULL_SIZE,;APP_EXPLAIN_ERROR,Ctrl+!"
Sorry, I meant Edit >> Create SubVI.
It wasn't saved in the "real" templates folder because really the template was only for that one project. (But I did save the icon template in the appropriate place. I sense some inconsistency here.) The .vit extension was a real mistake on my part. I rememberd that extension from long ago but for some reason I forgot all about it.
Anyway, all I wanted to really do was explain why I used subVIs more than most people. Some (maybe even most?) people don't have such a hard time focusing on the task at hand, but my mind wants to do everything at once. That's probably the hardest thing for me.
Since the last time I posted, I've been working on trying to strike a balance between haphazard programming and excessive sub-VI creation. I haven't quite found my comfort level yet. Too many sub-VIs and I become too slow, but not enough and the code itself becomes distracting to me. Hopefully I have something new to show soon...
12-18-2013 05:27 PM
The answer to that happy balance seems related to how the project is paid.
Time and materials (you are way ahead)
X fixed hours (you need those templates and that ini token) Memorize the path. "Most" CLD proctors will give you a few minutes to set-up your options. bring an ini with you. you won't be able to bring your vit's (A real shame since project templates seem legal to use) IMHO knowing when to use a template just makes you look god-like arround other developers. As in- "Holy $h!t - he's FAST!" and I don't QD much. (There may even be video proving it from NI week)
Guess what the exam will test you on
Now on that Re-cert exam.... they'll get you the other way!
01-04-2014 02:17 PM
Hi all,
I would be very grateful for someone to review my Sprinkler attempt.
I am aware of wire bends but ran out of time to use VI analyzer to put right the wrongs.
On the whole I ran over time by 1/2 hour but wanted to at least get the timing sequence going.
Would also have liked to use more subVIs but my coding is not fast enough for me to feel confident in spending the time to do this.
My CLD exam is on Jan 10th and if I fail then I'll spend more time practing speed before trying again.
Cheers,
Helen