Welcome to The Sixth Nation of Gamers. If you are not a registered member, please sign up today. It only takes a couple seconds and allows you access to a few other site features not offered while browsing as a guest.
Enjoy your stay.
We are now sixthnation.net. Bookmark away!
Welcome to The Sixth Nation. Please see the Things to Know Section for important info!!
The Nation welcomes its newest community member: dakisking
Subject: College assignment Mon May 30, 2011 3:09 pm
This short film I have made for a college assignment where we had to use another medium to explain a simple coding term.
The short film is a metaphor for a while loop. A while loop is a basic computer programming coding term. The metaphor which helps to explain what a while loop is: You have lost your keys, you keep on looking around for them until you find your keys. You wouldn't look for your keys if you already have them and you will stop looking for them once you find them.
The main features of a while loop is that a Boolean (true or false statement) condition is evaluated first. In this case it is the question of “do you have your keys, true or false?” If you have your keys, true, then you don't search for them (complete the actions/code within the while loop). But if you don't have your keys, false, then you search for them until you have found them (you keep on evaluating and working your way through your action/code until the initial Boolean condition changes) and through completing this process you change the original Boolean condition of “do you have your keys” to true. Once you have your keys then you stop searching for them and this is the finish of the while loop.
Here's the video in it's current state, I am still editing some minor parts of it currently but the core of it hasn't changed. Same goes for the accompanying explanation.
Here's another version this time with more colour, which do you like better?
If I could get some feedback it would be greatly appreciated, do you think that the short film conveys the idea of a while loop very well? Do you like the video? Does it make sense? Feel free to say anything you like about it, any criticism is helpful.
Also if you do watch the video you will see me driving the car as a reward as I don't think I have posted anything before of what I look like.
Last edited by FlightOfGrey on Sat Jun 04, 2011 5:09 am; edited 1 time in total (Reason for editing : Altered the title name.)
Subject: Re: College assignment Mon May 30, 2011 4:37 pm
Hey Flight! Okay, first of all, well done. The filming is of high quality and is well edited. I know exactly where you're coming from -- I have spent a lot of time looking at suitable auditory metaphors for programming constructs and wrote a system that converts an executing program to music made of up these metaphors. You can read all about it at www.auralisation.org and there are audio examples in the Tutorial section. This is a really creative task. I'd love to meet the person who set it as an assignment because it has really made you think!!
Now, a couple of points about WHILE loops. First, because the condition is evaluated at the start of the loop, it must evaluate to Boolean True for the body of the loop to be executed, and it terminates when the condition becomes false. Your soundtrack is all set in a minor key and, whilst I suspect this is to represent the uncompleted task, one could ask whether this fits in well with the way the WHILE loop is made. Would a Boolean True not map more naturally to a major chord? Just a question, and something for you to think about. You could deal with the unresolved task by, say, repeating the first seven notes of a major scale which would give a very unresolved feeling to the audio. Even if you decide to go minor for the loop body, can you add in a change at the end to show the condition has been met? Some sort of cadence?
Second, although WHILE in English expresses a continuous state, in programming it represents a repeated set of actions. That is, one asks the question: is it true that I don't have my keys? If it is true, we carry out the key search routine. Then we ask the question again. So, I wonder if there is some way of conveying the repeated nature of the task, a series of short repeated searches rather than making it look like one long search activity?
Finally, I was a bit puzzled as he seemed to already know where the keys were at the start -- weren't they hanging up?
Anyway, great job. Feel free to do what you like with my thoughts. Accept or reject as you see fit.
Also, I like the B&W better than the colour. Or maybe you could change to colour when the loop finishes? (Or should that be the other way round???)
Subject: Re: College assignment Mon May 30, 2011 4:53 pm
Wow that's a great response I never expected anything that detailed thanks.
eatthemonkey wrote:
Your soundtrack is all set in a minor key and, whilst I suspect this is to represent the uncompleted task, one could ask whether this fits in well with the way the WHILE loop is made. Would a Boolean True not map more naturally to a major chord? Just a question, and something for you to think about. You could deal with the unresolved task by, say, repeating the first seven notes of a major scale which would give a very unresolved feeling to the audio. Even if you decide to go minor for the loop body, can you add in a change at the end to show the condition has been met? Some sort of cadence?
I had actually made the track to try and give a feeling of urgency and worry that the main character was feeling as you lose your keys hence the minor key. I tried getting a heartbeat repeating sound so you empathise with the character as his heartbeats gets louder and louder and I also made it repeat itself as that is the nature of a while loop. I have to admit I didn't think that much into depth of how the music might relate to the while loop itself, it is a great idea though, although I don't know if I will be able to implement something in time. Although the loop itself is resolved at the end, the actual dilemma of losing his keys hasn't been and I don't think that having some sort of cadence or a happier tone would suit the film.
eatthemonkey wrote:
So, I wonder if there is some way of conveying the repeated nature of the task, a series of short repeated searches rather than making it look like one long search activity?
This would give a better sense of the loop, but might possibly make the film a bit boring. I think that I will try it out though.
eatthemonkey wrote:
Finally, I was a bit puzzled as he seemed to already know where the keys were at the start -- weren't they hanging up?
The ones hanging up were the house keys, he was looking for his car keys. I tried to make the sign with the little logos obvious, but clearly not well enough (although why he's leaving without his house keys is a bit of an error on my part...). I will try to make this more obvious.
eatthemonkey wrote:
Also, I like the B&W better than the colour. Or maybe you could change to colour when the loop finishes? (Or should that be the other way round???)
I love this idea, like you say it gives a sense of completion when the loop is finished.
Really appreciate your feedback, I will give that website a read when I get a chance, it sounds interesting and I can give you the email of our lecturer and the assignment brief if you like.
Last edited by FlightOfGrey on Mon May 30, 2011 5:10 pm; edited 1 time in total (Reason for editing : Added a bit extra to the end.)
Subject: Re: College assignment Mon May 30, 2011 5:20 pm
I also like the b&w better.
One question: why do you say the loop finishes? In my point of view (a non-programmer one, I admit), he has not got his keys and therefore he should keep looking for them. I mean, what is the "while loop" here? while he does not have the keys, he looks for them? He has not got the keys at the end, so he should continue to look for them, chasing the guy in the car. If the loop is while not knowing where the keys are, then it would be different, but I think the loop is about not having them, since he was going to go out and he needed them. It would be different if he were going to bed and then noticed the keys weren't there. Does it make any sense what I am talking about? Or maybe go into an error mode where he continues to look for the keys in the house and repeating previous actions like lacing up the shoes, or freezing up! Lol
As I understood it, the process would be like this:
Getting ready IF clothes not on THEN put on IF shoes not laced THEN lace up IF (etc)
Getting the keys IF keys not in place THEN look for them WHILE keys not found = [what? Look everywhere? Look in house? Check not left somewhere else?...]
Going out
=============== As I understand it, he is stuck in the procress before 'Going out;. Do you understand that "knowing where they are" equals finding them? As I see it, it doesn't but again, I do not know a lot about "while loops" lol. For me, he either should continue to look for them (this time where he knows there might be, that is: in the car) and chase the car, then recover the keys and go back home to put them in the place and go back out after collecting them again; or going into error mode.
I couldn't hear the sound this time, I will try tomorrow.
Subject: Re: College assignment Mon May 30, 2011 5:35 pm
Another great response.
ElvenNinja wrote:
I also like the b&w better.
One question: why do you say the loop finishes? In my point of view (a non-programmer one, I admit), he has not got his keys and therefore he should keep looking for them. I mean, what is the "while loop" here? while he does not have the keys, he looks for them? He has not got the keys at the end, so he should continue to look for them, chasing the guy in the car. If the loop is while not knowing where the keys are, then it would be different, but I think the loop is about not having them, since he was going to go out and he needed them. It would be different if he were going to bed and then noticed the keys weren't there. Does it make any sense what I am talking about? Or maybe go into an error mode where he continues to look for the keys in the house and repeating previous actions like lacing up the shoes, or freezing up! Lol
You are the perfect target audience for this. It's supposed to be for people who don't understand coding at all.
Here is the while loop in pseudo code: while (You don't have your keys){ search room; }
I made the end to hopefully give it a bit of humour and a more interesting one than him just finding the keys. So I see what your saying in the fact that he doesn't actually have the keys himself but he knows where they are, so you aren't going to keep on looking for them as you know you aren't going to find them.
ElvenNinja wrote:
As I understood it, the process would be like this:
Getting ready IF clothes not on THEN put on IF shoes not laced THEN lace up IF (etc)
Getting the keys IF keys not in place THEN look for them WHILE keys not found = [what? Look everywhere? Look in house? Check not left somewhere else?...]
Going out
The getting ready isn't really part of the loop, it's there to show the viewer that he's getting ready to go out and to set the scene but I see what you are getting at, but it does seem like you are kind of understanding what a while loop is.
Subject: Re: College assignment Mon May 30, 2011 5:41 pm
The best man to talk to about making people understand coding is Eat. Dude wrote a book on it. I know. I have an autographed copy.
I think I get what you are trying to say about it. Your asking if he has the keys not where they are, the question is whether the keys are on him. If they are not on the person then he goes to search the area till the keys are found even if he knows where the keys are.
__________________________
Quote:
"I agree with all Liam has said so far" - Seyel
Quote:
"Sorry Cel I agree with everything Liam has said so far." - Rrwatch
Subject: Re: College assignment Mon May 30, 2011 6:08 pm
Not Cobalt Monkey wrote:
I like eattys idea. Start b and w, with a color flip once the keys are found. The rest is a billion miles over my head.
Yeah I agree, I am currently rendering out an edited version with this idea and a few other tweaks as I type.
Lod wrote:
The best man to talk to about making people understand coding is Eat. Dude wrote a book on it. I know. I have an autographed copy.
I think I get what you are trying to say about it. Your asking if he has the keys not where they are, the question is whether the keys are on him. If they are not on the person then he goes to search the area till the keys are found even if he knows where the keys are.
Wow, I think I had read that he was a computer scientist but I didn't realise it was anything to that level and that he has PhD! I don't think I could have found some better to ask for feedback on.
You're kind of on track, it is asking if he has the keys. But the thing is that he doesn't know where the keys are until he realises that they have been stolen when looking out the window. When he knows where the keys are he obviously isn't going to keep searching for them because what's the point if he knows where they are? - this is the end of the loop of searching for them.
Subject: Re: College assignment Wed Jun 01, 2011 4:47 am
Nice vid. Couple of final comments:
1. The first walking-down-the-corridor shot is in colour, yet the rest of the film is in B&W. (until the end) 2. Normally, one would write a WHILE loop whose terminating condition is satisfied at some point, otherwise you end up with a program that never terminates and eventually crashes the machine. It's a subtle point, but in this film your dude never finds the keys himself, so arguably the loop never terminates. 3. The thing that i'm still not getting is the idea of repeated action. Your represented algorithm looks a bit like this:
Code:
1. Tie shoes ; 2. Pick up wallet and jacket ; 3. Set possible key location = hook ; 4. WHILE (keys not found) 4.1 Look for keys at current search location 4.2 Set next search location ENDWHILE 5. Leave house
I still wonder whether there is some visual device you could use to show the search task repeatedly starting again? It still comes across as a continuous rather than a repeated action, IMO.
Then again, I am incredibly pedantic. And yes, I'd be really interested to see your assignment brief. BTW, that web site I pointed you to was my PhD research.
Subject: Re: College assignment Wed Jun 01, 2011 4:58 am
You could put post-its in the pieces of furniture you have searched, as a "log" of the locations where you have been and thus where you do not need to look again. Once all the flat has been searched, then you look at another location (looking outside the window).
I agree with eatty, he has explained what I tried to say in a way that can be actually understood! For me, he hasn't got the keys, so either he crashes because it is an impossible task (there are no keys in the apartment) and keep repeating the same action over and over and over (maybe put again post its on top of each others in second and third searches); either he moves location (street) and look for the keys, since he knows they are there but he still needs to make true the "having the keys" bit.
I also agree that the repetition needs to be shown to understand the full "while loop".
Video looks really good, what have you used to record it and edit it?