Programming got me confused in class!

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
WolfNinja2
Party member
Posts: 150
Joined: Wed Oct 24, 2012 10:10 pm

Programming got me confused in class!

Post by WolfNinja2 »

So here is my tale . :D

I am a freshman in high school now, and I just started the trimester, one of my classes is Physics I. I was really excited to learn about physics because I use it a lot when I program games. Today, we took our third or fourth set of notes, my teacher gave us the definition of displacement I asked how we could use this. She replied with the equation for velocity, then she gave us a displacement problem. At the end the displacement was zero. This meant that after all that MOVEMENT had happened, the end displacement was zero (because the object came back to it's starting point), and in programming games there is ALWAYS velocity during movement. THIS CONFUSED THE LIVING HECK OUT OF ME ( XD ) I spent the rest of the hour doing nothing trying to figure it out and bickering with the teacher until I finally understood. I feel kinda' stupid now :)

So that is how programming confused me.

Anyone else ever get confused during real life because of programming logic? O,o

Thanks for reading xD

-Wolf
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Programming got me confused in class!

Post by kikito »

There is this old joke:
A programmer goes on holidays with his wife. When they are leaving the hotel, she asks him:
– Do we have all our 4 suitcases?
– Dear, I think we only have 3 of them.
– Are you sure? I thought I counted 4.
- Ok, let me count them then: 0, 1, 2, and 3. See?
Of course Lua programmers don't have this problem :megagrin:.
When I write def I mean function.
User avatar
WolfNinja2
Party member
Posts: 150
Joined: Wed Oct 24, 2012 10:10 pm

Re: Programming got me confused in class!

Post by WolfNinja2 »

Haha another one of those little quirks :)
User avatar
Qcode
Party member
Posts: 170
Joined: Tue Jan 10, 2012 1:35 am

Re: Programming got me confused in class!

Post by Qcode »

My math teacher like pulling jokes on people, and he knows that I always take things the complicated way. So he asked me to write a possible way to make a sine wave onto the board, while keeping it as simple as I could. He would then type it into the computer and it would show up on the smartboard. Anyway, I had this piece of code written to create a sine wave for a powerup I made.

Code: Select all

self.y = self.originaly + (2.08*scale*32) * math.sin((self.x-self.scroll)/(2.08*scale*32))
So I wrote something like that on the board. He ran it, and it worked. Then he said, "You went a bit too far there"
Then he pressed the sine button.
And I felt stupid.
User avatar
IMP1
Prole
Posts: 43
Joined: Mon Oct 03, 2011 8:46 pm

Re: Programming got me confused in class!

Post by IMP1 »

I feel like I'm being stupid right now, but I don't get it.
Velocity is the speed with direction
Displacement is distance with direction.

I don't get this bit: "in programming games there is ALWAYS velocity during movement". After all the movement, there is no movement. So there is no velocity.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Programming got me confused in class!

Post by bartbes »

I like how you used the sine function to approximate a sine wave :3.
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Programming got me confused in class!

Post by Roland_Yonaba »

Well, this topic reminds me of an old joke I found really funny.
So there you go:

After having problems with his computer, a user calls the technical support team seeking for help.
- Tech Support: Support team here! How can we help you?
- User: There's smoke coming out of my computer. The power supply unit, more precisely.
- Tech Support: Well, the power supply might have burnt. You shall buy a new one.
- User: No, certainly not! I guess I just need to edit some configuration file...
- Tech Support: Sir, if there is smoke coming out of the power supply unit, it just means this device burnt. You really have to replace it!
- User: No way! Someone told me I just have to change the system configuration at startup to solve this problem. You just have to tell me what's the correct command to run ...

After ten minutes, despite all the efforts of the tech team to explain the problem and its solution, the user kept asking for the "magic" command to run that will fix the problem. So, to get rid of him, the tech guy finally replied:
- Tech Support: Dear sir, I'm sorry, you're right. We do not usually disclose this information to our users, but there is actually a DOS command that will fix your problem.
- User: Ha! I knew it!
- Tech Support: Just add the line "DEVICE = \ DOS \ NOSMOKE.SYS" at the end of your CONFIG.SYS file, restart the computer and everything should return back to normal. Call me back if you have any problem.

Ten minutes later, the user recalls the technician.

- User: It did not work. There's still smoke coming out of the power supply unit...
- Tech Support: Ah. Tell me, what version of DOS are you running, actually ?
- User : MS-DOS 6.22
- Tech Support: That's the problem! This version of DOS does not include NOSMOKE. Well, just call Microsoft and ask them to send you an update. And let me know what happens next, right ?
- User: Okay, i'll do that!

About an hour later, the same client recalls.

- User: I need a new power supply unit ...
- Tech Support: No problem, I'll send it to you today, but tell me, how did you came up with this conclusion?
- User: Well, I called Microsoft and I repeated the tech guy there what you just told me. After a long discussion, he asked me the brand and the model number of my actual power supply unit ...
- Tech Support: And what did he tell you?
- User: He said my power supply unit was not compatible with NOSMOKE ...
User avatar
WolfNinja2
Party member
Posts: 150
Joined: Wed Oct 24, 2012 10:10 pm

Re: Programming got me confused in class!

Post by WolfNinja2 »

Roland_Yonaba wrote: - User: He said my power supply unit was not compatible with NOSMOKE ...
Bahahahahahahahahaha THIS made me laugh so hard xD
User avatar
WolfNinja2
Party member
Posts: 150
Joined: Wed Oct 24, 2012 10:10 pm

Re: Programming got me confused in class!

Post by WolfNinja2 »

IMP1 wrote:I feel like I'm being stupid right now, but I don't get it.
Velocity is the speed with direction
Displacement is distance with direction.

I don't get this bit: "in programming games there is ALWAYS velocity during movement". After all the movement, there is no movement. So there is no velocity.
Honestly I was being stupid, the reason is that I knew there had to be SOME kind of velocity along the way and this just mucked me up when it came out as zero in the end XD

Sorry if that dosen't make sense haha
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests