Skip to main content
GameDev.net gamedev.net
🔒 Locked

Programming and...math.

Started by Fl4sh Jun 18, 2010 at 10:54 PM 22 replies 5.6k views
Original Post
Fl4sh
Fl4sh
Are most of you guys good at word problems and extracting info from those word problems to write equations and etc...?
They hated on Jeezus, so you think I give a f***?!
CodeCriminal
CodeCriminal
Ha, not particularly, for me atleast. I wouldnt say im bad at it, but the lengthy ones will stump me for a while.
alvaro
alvaro
Quote:
Original post by Fl4sh
Are most of you guys good at word problems and extracting info from those word problems to write equations and etc...?


Yes. And I have a hard time imagining a good programmer that wouldn't be good at it. But perhaps they exist.
Fl4sh
Fl4sh
Quote:
Original post by alvaro
Quote:
Original post by Fl4sh
Are most of you guys good at word problems and extracting info from those word problems to write equations and etc...?


Yes. And I have a hard time imagining a good programmer that wouldn't be good at it. But perhaps they exist.



Danny had $22.00 in loonies and toonies.
a) Write a linear relation for the total amount of money in terms of the number of loonies and toonies.
b) Write an equation to express the number of toonies in terms of the number of loonies.
c) Use the equation to determine 4 diffrent possible combintations of coins Danny could have.


A software development company is getting ready to release a new product. The QA Director is notified the following: A Junior Verification Engineer takes 1 hour longer to fix a bug than it takes a Senior Engineer. If they can fix the bug in 5 hours working together, how long would it take each Engineer to finish the task by themselves?


A pilot flies 630 miles with a tail wind of 35 miles per hour. Against the wind, he flies only 455 miles in the same amount of time. Find the rate of the plane in still air.


...for fun
They hated on Jeezus, so you think I give a f***?!
CodeCriminal
CodeCriminal
Would the plane one, happen to be I guess a "rate" of 27.27 mph? I dont know what tail wind is and have never been presented with a question like this so its shot in the dark lol

d / t = s
630 / 18 = 35
455 / 18 = 27.27...


Thats mighty "big-headed" of you to say alvaro, maybe try be a little more modest next time?

[Edited by - CodeCriminal on June 19, 2010 3:27:04 AM]
szecs
szecs
Quote:
Original post by CodeCriminal
Would the plane one happen to be 542.5 miles with a, I guess rate "rate" of 87.5 mph? I dont know what tail wind is and have never been presented with a question like this so its shot in the dark lol

Thats mighty "big-headed" of you to say alvaro, maybe try be a little more modest next time?


To be honest, word problems are beginner high-school stuff (at least in my country). That doesn't mean it's easy, so you have to practice a lot. Get a book with word problems, and solve them all. (I'm having a hard time with them too, but I get them done. Maybe it takes two hours, but I get it done.)

I agree with Alvaro, if you can't solve word problems, that means you won't be able turn word problems to code either, thus you cannot program (or rather: you are just a code monkey) (problem solving in programming = algorithms + equations, programming without problem solving = monkey coding). Speed doesn't matter, all that matters, is that you get it done at the end.

So OP: don't get upset, if you are not good at it, get them done, and you will improve with practice.

I hope you will get me right.
KulSeran
KulSeran
Quote:

Thats mighty "big-headed" of you to say alvaro, maybe try be a little more modest next time?

I'd kinda have to agree. So many things out there in programming are published as just documents with no source code. You HAVE to learn to do word problems if you ever expect to translate some new grad student's paper into a working shader for your game.



Quote:

A pilot flies 630 miles with a tail wind of 35 miles per hour. Against the wind, he flies only 455 miles in the same amount of time. Find the rate of the plane in still air.

v = 217mph


-edit: remember to check your work people!
Quote:

A software development company is getting ready to release a new product. The QA Director is notified the following: A Junior Verification Engineer takes 1 hour longer to fix a bug than it takes a Senior Engineer. If they can fix the bug in 5 hours working together, how long would it take each Engineer to finish the task by themselves?

This one I feel like I screwed up.
J = 10.525Hrs
S = 9.525Hrs

[Edited by - KulSeran on June 19, 2010 2:35:23 AM]
CodeCriminal
CodeCriminal
Quote:
Original post by szecs
Quote:
Original post by CodeCriminal
Would the plane one happen to be 542.5 miles with a, I guess rate "rate" of 87.5 mph? I dont know what tail wind is and have never been presented with a question like this so its shot in the dark lol

Thats mighty "big-headed" of you to say alvaro, maybe try be a little more modest next time?


To be honest, word problems are beginner high-school stuff (at least in my country). That doesn't mean it's easy, so you have to practice a lot. Get a book with word problems, and solve them all. (I'm having a hard time with them too, but I get them done. Maybe it takes two hours, but I get it done.)

I agree with Alvaro, if you can't solve word problems, that means you won't be able turn word problems to code either, thus you cannot program (or rather: you are just a code monkey) (problem solving in programming = algorithms + equations, programming without problem solving = monkey coding). Speed doesn't matter, all that matters, is that you get it done at the end.

So OP: don't get upset, if you are not good at it, get them done, and you will improve with practice.

I hope you will get me right.


Im not sure whether that post was directed at me or the OP. In any case, I whole-heartidly agree, problem solving is an integral part of programming and like you, I do figure them out sooner or later, if I didnt, there would be no incentive for me to continue programming, so I must be doing something given the fact ive stuck by it for a few years now. I guess I was a little hasty to say no in my first post, and in my attempt at solving the above plane problem.

As for my comment directed at alvaro, it still strikes me as a bitter and condesending statement, regardless of its truths. haha

Is nobody else going to try any of the above problems?
szecs
szecs
Quote:
Original post by CodeCriminal
Is nobody else going to try any of the above problems?

I'm afraid it would take me 2 hours.

Anyways, a very effective way to problem solving is the utilization of paper and pen.
I guarantee, that most of the problems you will face ("you", as general subject) cannot be solved with just thinking "into the air" (I cannot express this even in my native language), or staring at the IDE. You have to use tools, paper and pen are the simplest and most effective tools. Sketch the problem down.

Okay, I guess you get it.

The thing I wanted to say in my previous post:
Solving word problems are not just good for being able to turn text into equations and shader code, but good for problem solving in programming in general.
Maybe this would be a good advice for those who are not good at problem solving: get a math book with word problems, and solve them. Practice a lot with word problems.
Antheus
Antheus
Quote:
Danny had $22.00 in loonies and toonies.
a) Write a linear relation for the total amount of money in terms of the number of loonies and toonies.
b) Write an equation to express the number of toonies in terms of the number of loonies.
c) Use the equation to determine 4 diffrent possible combintations of coins Danny could have.

Under global economy, Danny has 36 loonies, and the other guy is indebted by 18, with government covering the missing 4.

Quote:
If they can fix the bug in 5 hours working together, how long would it take each Engineer to finish the task by themselves?

In practice, 5 engineers working together take 4-6 weeks. Single developer, preferably a freelancer is the one who will do it in 5 hours.

Quote:
A pilot flies 630 miles with a tail wind of 35 miles per hour. Against the wind, he flies only 455 miles in the same amount of time. Find the rate of the plane in still air.

That depends... Is it African or European airplane?
Decrius
Decrius
Quote:
Original post by CodeCriminal
Is nobody else going to try any of the above problems?


Quote:
Original post by KulSeran
Quote:

A pilot flies 630 miles with a tail wind of 35 miles per hour. Against the wind, he flies only 455 miles in the same amount of time. Find the rate of the plane in still air.

v = 217mph


Jup, correct. Though in the HTML comment you could be doing this a little easier, and your equations are not equations (to what does it equate?);

(630 / t) = (455 / t) + (2 * 35);
t = (630 - 455) / 70 = 175 / 70;
v = (455 / t) + 35 = (70 * 455 / 175) + 35 = 217;

Quote:

If they can fix the bug in 5 hours working together, how long would it take each Engineer to finish the task by themselves?


How are we supposed to know how well they work together? That might be 2x faster then the senior, or like 1.5x slower. What do I misunderstand?

Quote:
Danny had $22.00 in loonies and toonies.


If I'd get that on an exam...I have no idea what loonies or toonies are.
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Armendegga
Armendegga
Quote:
Original post by Fl4sh

Danny had $22.00 in loonies and toonies.
a) Write a linear relation for the total amount of money in terms of the number of loonies and toonies.
b) Write an equation to express the number of toonies in terms of the number of loonies.
c) Use the equation to determine 4 diffrent possible combintations of coins Danny could have.

...for fun


I didn't see a solution for this one, and it looks easy enough,
A) 22 = 2*toonies + loonies
B)toonies(loonies) = (22 - loonies) / 2
C)loonies(toonies) = 22 - 2*Toonies
loonies(0) = 22
loonies(1) = 20
loonies(2) = 18
loonies(3) = 16

D(optional)) insert criticism for posting homework questions... sheesh, lazy but very clever...
crd
crd
Quote:
Original post by Fl4sh
Danny had $22.00 in loonies and toonies.
a) Write a linear relation for the total amount of money in terms of the number of loonies and toonies.
b) Write an equation to express the number of toonies in terms of the number of loonies.
c) Use the equation to determine 4 diffrent possible combintations of coins Danny could have.


I hope this is not your homework..
Quote:
x.loonies + y.toonies = $ 22.00x.loonies + y.toonies - $ 22.00 = 0.001 loonies = ($ 22.00 - y.toonies) / x          = (($ 22.00 / x) - (y / x)).toonies1 toonies = ($ 22.00 - x.loonies) / y          = (($ 22.00 / y) - (x / y)).loonies{loonies = $ 1.0 toonies = $ 0.5}x = 11y = 22{loonies = $ 5.5 toonies = $ 2.75}x = 2y = 4{loonies = $ 0.11 toonies = $ 0.55}x = 10y = 20{loonies = $ 3.667 toonies = $ 0.379}x = 3y = 29

Armendegga
Armendegga
Quote:
Original post by Fl4sh

A software development company is getting ready to release a new product. The QA Director is notified the following: A Junior Verification Engineer takes 1 hour longer to fix a bug than it takes a Senior Engineer. If they can fix the bug in 5 hours working together, how long would it take each Engineer to finish the task by themselves?

...for fun


9.5247166396799695209067530240975
10.524716639679969520906753024098

s:= senior programmers' Task/hour
j:= senior programmers' Task/hour

Relationships:
1 = 1/j - 1/s
5 = 1 /(j + s)
alvaro
alvaro
Quote:
Original post by CodeCriminal
As for my comment directed at alvaro, it still strikes me as a bitter and condesending statement, regardless of its truths. haha


I didn't mean to be bitter or condescending, so my apologies if it came out that way. Most of us are good at solving word problems, but some of us aren't tactful at all. I guess that summarizes it well. :)

mrchrismnh
mrchrismnh
A software development company is getting ready to release a new product. The QA Director is notified the following: A Junior Verification Engineer takes 1 hour longer to fix a bug than it takes a Senior Engineer. If they can fix the bug in 5 hours working together, how long would it take each Engineer to finish the task by themselves?


A half hour because adding manpower to a late project makes it later.
"It's like naming him Asskicker Monstertrucktits O'Ninja" -Khaiy

Fl4sh
Fl4sh
Quote:
Original post by Antheus
Quote:
Danny had $22.00 in loonies and toonies.
a) Write a linear relation for the total amount of money in terms of the number of loonies and toonies.
b) Write an equation to express the number of toonies in terms of the number of loonies.
c) Use the equation to determine 4 diffrent possible combintations of coins Danny could have.

Under global economy, Danny has 36 loonies, and the other guy is indebted by 18, with government covering the missing 4.

Quote:
If they can fix the bug in 5 hours working together, how long would it take each Engineer to finish the task by themselves?

In practice, 5 engineers working together take 4-6 weeks. Single developer, preferably a freelancer is the one who will do it in 5 hours.

Quote:
A pilot flies 630 miles with a tail wind of 35 miles per hour. Against the wind, he flies only 455 miles in the same amount of time. Find the rate of the plane in still air.

That depends... Is it African or European airplane?


best answers. ;o

They hated on Jeezus, so you think I give a f***?!
Bregma
Bregma
Quote:
Original post by Antheus
Quote:
Danny had $22.00 in loonies and toonies.
a) Write a linear relation for the total amount of money in terms of the number of loonies and toonies.
b) Write an equation to express the number of toonies in terms of the number of loonies.
c) Use the equation to determine 4 diffrent possible combintations of coins Danny could have.

Under global economy, Danny has 36 loonies, and the other guy is indebted by 18, with government covering the missing 4.

You did not factor in the conversion rate. Currently 1 loonie = US$0.94.
Quote:
Quote:
If they can fix the bug in 5 hours working together, how long would it take each Engineer to finish the task by themselves?

In practice, 5 engineers working together take 4-6 weeks. Single developer, preferably a freelancer is the one who will do it in 5 hours.

There's an open source project for that but it will never get finished.
Quote:
Quote:
A pilot flies 630 miles with a tail wind of 35 miles per hour. Against the wind, he flies only 455 miles in the same amount of time. Find the rate of the plane in still air.

That depends... Is it African or European airplane?

Laden or unladen?

Stephen M. Webb
Professional Free Software Developer
stimarco
stimarco
Quote:
Original post by Fl4sh
Are most of you guys good at word problems and extracting info from those word problems to write equations and etc...?


Nope. And those aren't "word" problems. They're "limited-data math" problems. The words are merely the user interface in which they're presented.

Thanks to a cycling accident many, many years ago, I have a truly useless short-term memory, but I have published games to my name.

Programming as a translation job. A common feature of most programs is some form of process defined in mathematical terms, so the programming will therefore involve translation of that maths. Computers actually suck at maths out of the box. They have to be taught how to do the vast majority of it by being fed programs with the necessary information. Thankfully, hordes of programmers have already done most of that work, so there's no need for me to do it all over again. (I did reinvent A* once—back in the days before the mighty internet—but I prefer not to do that sort of thing if at all possible.)

In other words: I prefer to make my computers do my maths for me, because I pretty much suck at it myself. (That accident I mentioned earlier gave me dyscalculia. I've had my current mobile phone for three months and I still can't remember my own phone number.) Even basic algebra is difficult for me to do.

But... I know where to look it up! I also have an engineering mind-set and can understand the "why" and the "what's it for?" of things like vectors and matrices. I've even written the user guide for a 3D graphics engine which was once very popular in the commercial games industry. (GTA3 used it, for example.)

While I won't claim maths is useless to a programmer, I don't believe being good at maths is all that necessary any more. The days when you had to hand-code multiplication and division functions in assembly language for the Zilog Z80A processor are, thankfully, long gone.
Sean Timarco Baggaley (Est. 1971.)Warning: May contain bollocks.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.