04-15-2014 10:16 AM
@CsabaF wrote:
Hello there,
I spent some time on the boiler and car wash examples. The boiler was a total failure, it was messy, I ran out of time, I kept on making mistake after mistake... So, I will do it again today after work. Lesson learnt - don´t try a CLD sample exam when you are not relaxed and ready for the challenge. 🙂
The car wash is finished and waiting for you valuable comments. This time I decided to use a simple state machine and tried to follow your advices from my previous ATM and sprinkler solutions, such as creating error state, adding more comments and using (hopefully) better style.
I am not fully satisified with it, I think the statemachine´s logic is not the best and most effective. I have some other ideas and I will try to do it again later this week (probably with some kind of producer-consumer solution).
So, please use some of your valuable time and take a look on it. Thank you!
I'm still amazed that you can complete this thing. It's much cleaner, but I still think that if you have five minutes you can get a couple of more style points to assure yourself of victory. The big thing remains error handling, although with the state machine that you used, all you have to do is OR the error out with your exit loop boolean. Tada! Simple error handling is provided. 🙂
04-15-2014 01:23 PM
Well you have a pausable timer- too bad you didn't use some logic to drive the enum input to it in the Run Step case it would only need a FBN to hold last "InPossition? state and the current in position state to select Get Time, Pause, or Resume. That would have simplified your code by several states
And whats with the extra buffer alocation here?:
Wire elapsed time right to the SR!- I know, someone way way back wrote their LV2 Global that way and the practice has a life of its own. Not a killer on a scalar DBL but try that with a large data set and you'll have the devil's own time finding where you made that mistake.
Some food for thought: How Could you let the user know that an error shutdown is occuring? Users get upset with crashing software but really upset when it poofs out of existance without so much as a dialog to say it died.
Overall nice code. Simple and effective. About the only style hit I would mention is thase too small enum arrays. the code is a lot mor readable with the enum text visable.
04-15-2014 01:56 PM
@JÞB wrote:
Well you have a pausable timer- too bad you didn't use some logic to drive the enum input to it in the Run Step case it would only need a FBN to hold last "InPossition? state and the current in position state to select Get Time, Pause, or Resume. That would have simplified your code by several states
Yep, I had the feeling that I overlooked something and made the whole thing too complicated. 🙂 Thanks for the comments, I will open my solution tomorrow again - it´s getting late here.
04-15-2014 01:59 PM
@billko wrote:
I'm still amazed that you can complete this thing. It's much cleaner, but I still think that if you have five minutes you can get a couple of more style points to assure yourself of victory. The big thing remains error handling, although with the state machine that you used, all you have to do is OR the error out with your exit loop boolean. Tada! Simple error handling is provided. 🙂
I was just on time, my kitchen timer started beeping a few minutes after I saved the whole thing. 🙂
My biggest challenge is to create the find the best structure in the first 30 mins. I often make small mistakes there, and the results is a too complex structure, which is almost impossible to finish on time.
Thanks for the feedback!
04-15-2014 02:07 PM - edited 04-15-2014 02:09 PM
I hae just finished the boiler example. My previous attempt was a total chaos, I ended up with a producer-consumer monster, which locked up the UI! 🙂 The funny thing is that after reading the specifications I said to myself "oh, easy, a simple state machine"... Don´t ask why I decided to use another structure. Most probably I was too tired for a 4 hour CLD session.
Anyway, today I tried it again, relaxed, calm and the result is much-much better.
I used a simple state machine and the whole thing was ready in 2 hours 45 minutes. Probably this was the easiest among the 4 sample tests. I am still a bit worried of my speed, as far as I know the real CLD thing is way more complex than this.
Please take a look on this and tell me if you see any improvements compared to my previous attempts.
Thanks!
04-15-2014 02:22 PM
@CsabaF wrote:
I hae just finished the boiler example. My previous attempt was a total chaos, I ended up with a producer-consumer monster, which locked up the UI! 🙂 The funny thing is that after reading the specifications I said to myself "oh, easy, a simple state machine"... Don´t ask why I decided to use another structure. Most probably I was too tired for a 4 hour CLD session.
Anyway, today I tried it again, relaxed, calm and the result is much-much better.
I used a simple state machine and the whole thing was ready in 2 hours 45 minutes. Probably this was the easiest among the 4 sample tests. I am still a bit worried of my speed, as far as I know the real CLD thing is way more complex than this.
Please take a look on this and tell me if you see any improvements compared to my previous attempts.
Thanks!
Actually I found the real test to be a lot easier. (I failed the test because of a brain cramp. Still waiting on the results of the 2nd, which I'm pretty sure I passed - no brain cramp.)
04-15-2014 02:24 PM
@CsabaF wrote:
@billko wrote:
I'm still amazed that you can complete this thing. It's much cleaner, but I still think that if you have five minutes you can get a couple of more style points to assure yourself of victory. The big thing remains error handling, although with the state machine that you used, all you have to do is OR the error out with your exit loop boolean. Tada! Simple error handling is provided. 🙂
I was just on time, my kitchen timer started beeping a few minutes after I saved the whole thing. 🙂
My biggest challenge is to create the find the best structure in the first 30 mins. I often make small mistakes there, and the results is a too complex structure, which is almost impossible to finish on time.
Thanks for the feedback!
Practicepracticepracticepracticepractice... 🙂
04-28-2014 01:29 AM - edited 04-28-2014 01:32 AM
@billko wrote:
Practicepracticepracticepracticepractice... 🙂
So... I went to the local NI office and did the test on last week. The task was not complicated, but the time limit was though, just as on the sample tests. I missed a lot from the functionality list and I think my solution was too complex. I tried to document everything to gain a few extra points, but in the last 30 mins I made a flustered attempt to get more items from functionality specs and I ruined my style - and probably my points...
Lesson learned, practice, practice, practice and keep calm.. 🙂 I might have a small chance to pass on the test, but most probably I will have to visit them again.
04-28-2014 09:57 AM
@CsabaF wrote:
@billko wrote:
Practicepracticepracticepracticepractice... 🙂
So... I went to the local NI office and did the test on last week. The task was not complicated, but the time limit was though, just as on the sample tests. I missed a lot from the functionality list and I think my solution was too complex. I tried to document everything to gain a few extra points, but in the last 30 mins I made a flustered attempt to get more items from functionality specs and I ruined my style - and probably my points...
Lesson learned, practice, practice, practice and keep calm.. 🙂 I might have a small chance to pass on the test, but most probably I will have to visit them again.
So you're following in the footstep of so many before you. I had a brain cramp that made me fail the first time around. But the second time around, I squeaked by. I figured my strong point was style - exactly the opposite of your strength - so I concentrated on getting all the style points I could get. I figured to shoot for a functionality of 5 because I expected not to get every single point in style and/or documentation. I got 5 functionality points - and passed by one point.
Good Luck!!! 🙂
05-30-2014 12:58 AM
@billko wrote:
So you're following in the footstep of so many before you. I had a brain cramp that made me fail the first time around. But the second time around, I squeaked by. I figured my strong point was style - exactly the opposite of your strength - so I concentrated on getting all the style points I could get. I figured to shoot for a functionality of 5 because I expected not to get every single point in style and/or documentation. I got 5 functionality points - and passed by one point.
Good Luck!!! 🙂
It took a while, but I got the results today - fail. I got max points for documentation, 13 of 15 for style but I really messed up the functionality (as I mentioned earlier). 2 points more and I pass, ehh, next time. 🙂 Thanks for the help, all of you, I will start preparing myself for the next test today. 🙂