Jump to content

Second CLD Practice - Object Oriented


Recommended Posts

Hi Steve

Firstly, this is just my opinion. Secondly, if it works - it works (so good job thumbup1.gif) - but I always like to ask myself can it be done better?

So on that note, comparing your two posts, it feels that you have just used LVOOP for the sake of it.

As a result you have coupled your UI to the logic of your code.

post-10325-0-07993300-1300070110_thumb.p

I discussed this on the darkside here with respect to the CLD so I won't regurgitate it again, only to say that you mention that...

There are no subvis which are not part of a class.

...yet you have used logic (nodes) on the top level BD which are not encapsulated.

post-10325-0-36802700-1300070442_thumb.p

Additionally, you have used typedefs that are not part of a Class, but which form an interface to your Class (i.e. public clusters) (private clusters is another topic for discussion when persisting data to disk not relevant to this one).

post-10325-0-85136100-1300069982_thumb.p

post-10325-0-84412700-1300069926_thumb.p

This is not always a bad thing, I do this for:

  • UI Classes where the role of the Class is to essentially take data and format it for display (but note there is always that distinction) - I do this as opposed to breaking out an X-Control when I don't need to.
  • Very Top Level Class which is just wrapping up all the Classes e.g. so method calls do not sit on the BD of a process\loop etc... - this is what I think you have done however, underneath it is still coupled.

Therefore, I think there is the opportunity to encapsulate more. However, given the size of the application it may be overkill, but would definitely be a good exercise. :)

Maybe this second version of the CLD practice exam (sprinkler controller) will be more exciting for people to review.

I don't think LVOOP makes it more exciting, perhaps using LabVIEW 8.6 instead of 2010 was a better idea this time to cover more reviewers? Although I prefer LVOOP when programming day-to-day, I ended up using a more traditional approach for the CLD given the nature of the question\solution, time available etc...

Cheers

-JG

  • Like 2
Link to comment

Thanks for the detailed review! I have read many of your posts and you have earned much respect.

It could have definitely been better but with the four hour time crunch and all. It's just not enough time. It took four and a half hours to do and I should have saved a copy away at the four hour mark and posted that. But it would have gotten about one point for functionality.

I used LVOOP for a couple of reasons. One was just for the sake of it because I want to get as much practice. Another is that it seems easier for me. You do end up with a lot more vis to document and make icons for. But documenting them is easier since they don't do much. I don't know if I will write code in a similar way for the CLD. It depends on what they throw at me.

Link to comment

Thanks for the detailed review! I have read many of your posts and you have earned much respect.

It could have definitely been better but with the four hour time crunch and all. It's just not enough time. It took four and a half hours to do and I should have saved a copy away at the four hour mark and posted that. But it would have gotten about one point for functionality.

I used LVOOP for a couple of reasons. One was just for the sake of it because I want to get as much practice. Another is that it seems easier for me. You do end up with a lot more vis to document and make icons for. But documenting them is easier since they don't do much. I don't know if I will write code in a similar way for the CLD. It depends on what they throw at me.

I built an LVOOP solution for my CLA exam - all I can say is that it does add a large overhead in terms of time and documentation. For the CLA, where you don't have to produce functional code, it worked out for me - but just barely! I got high marks for style/documentation and a good score for architecture development (I presume that's because I had a pretty good OO system architecture) but a low mark for requirements coverage (I just ran out of time to get to anywhere near all of them). If this had been my CLD I'm not sure I would have had enough functionality to pass. But then again, I'm so used to doing things in LVOOP now I might struggle to create any project that's not LVOOP.

Mark

Link to comment

It could have definitely been better but with the four hour time crunch and all. It's just not enough time. It took four and a half hours to do...

Point of warning--I took the CLD about a year ago and the problems on the sample exams (at that time--I haven't looked to see if they have rewritten them) did't have as many requirements as the problem I was given for the exam. I was able to complete the sample exams in 2-3 hours each, but I didn't finish all the requirements on the real exam.

There are lots of advantages to using OOP in real-world apps. Unfortunately, none of those advantages are relevant for the CLD and the disadvantages (namely the time it takes to recreate the frameworks from scratch) are very difficult to overcome. For the exam, I suggest sticking with the standard QSM implementation pattern. (Ignore the alarm bells going off in your head while you're writing your code.)

Link to comment

Thanks for the detailed review! I have read many of your posts and you have earned much respect.

No probs

It could have definitely been better but with the four hour time crunch and all. It's just not enough time. It took four and a half hours to do and I should have saved a copy away at the four hour mark and posted that. But it would have gotten about one point for functionality.

Preaching to the choir here - as Dave pointed out, the exams are larger so timing is more crucial. I made a conscious decision before going in not to use LVOOP (I was pretty sure given the examples I wouldn't have to, and I am no AQ :) ) - I am just too slow with it.

In practicing for the CLA I redid my CLD exam in LVOOP. I just made the 4-hr mark and it was done, but I still would have liked another 1/2hr to polish it up\off.

I used LVOOP for a couple of reasons. One was just for the sake of it because I want to get as much practice. Another is that it seems easier for me. You do end up with a lot more vis to document and make icons for. But documenting them is easier since they don't do much. I don't know if I will write code in a similar way for the CLD. It depends on what they throw at me.

I like LVOOP but wrt the exam I ended up with way too much stuff to document, and you will inevitably have to mash things around because of the time you spend on upfront design (none? shifty.gif). I find it easier to change a module than a whole heap of VIs etc...

But alas, I do the opposite and use LVOOP in the real-world. rolleyes.gif

Cheers

-JG

I suggest sticking with the standard QSM implementation pattern.

QFT star.gif

...lol... sorry couldn't resist laugh.gif

Link to comment

I built an LVOOP solution for my CLA exam - all I can say is that it does add a large overhead in terms of time and documentation.

Mark

When did you take the exam? Was it after they changed the format? I heard that it used to be some essay questions and a couple hours coding but now it is all coding. From your comments about requirements tracking it sounds like you took the newer one. If so I would be very interested in your opinion of how closely the single CLA sample exam compared with the real exam. Does it more closely resemble the actual exam than the CLD practice exams vs the real ones?

Link to comment

When did you take the exam? Was it after they changed the format? I heard that it used to be some essay questions and a couple hours coding but now it is all coding. From your comments about requirements tracking it sounds like you took the newer one. If so I would be very interested in your opinion of how closely the single CLA sample exam compared with the real exam. Does it more closely resemble the actual exam than the CLD practice exams vs the real ones?

I took the exam early this year - I found that the actual exam was much like the sample exam. It took me about eight hours to really complete the practice exam correctly and I could have used eight hours to do the real exam if I had that option. As it was, I got just enough done to pass.

Mark

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.