Discrete Math and Programming

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4

53 Replies - 2696 Views - Last Post: 10 July 2013 - 02:24 PM

#31 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10693
  • View blog
  • Posts: 39,770
  • Joined: 27-December 08

Re: Discrete Math and Programming

Posted 08 July 2013 - 01:00 PM

I can't imagine anything more exciting than an adventure filled trip through Numberland!

Posted Image
Was This Post Helpful? 1
  • +
  • -

#32 NeoTifa  Icon User is online

  • Whorediot
  • member icon





Reputation: 2742
  • View blog
  • Posts: 15,834
  • Joined: 24-September 08

Re: Discrete Math and Programming

Posted 08 July 2013 - 01:00 PM

Not enough drama and angst.

And you guys scared me with the Newtonian vs Liebnitzian for a second. I thought I had forgotten everything about math. :( I had a sad for 5 seconds.
Was This Post Helpful? 2
  • +
  • -

#33 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10693
  • View blog
  • Posts: 39,770
  • Joined: 27-December 08

Re: Discrete Math and Programming

Posted 08 July 2013 - 01:04 PM

Quote

I thought I had forgotten everything about math. :( I had a sad for 5 seconds.

The fact that forgetting math makes you sad tells me that you are a quality person overall.
Was This Post Helpful? 4
  • +
  • -

#34 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7892
  • View blog
  • Posts: 13,420
  • Joined: 19-March 11

Re: Discrete Math and Programming

Posted 08 July 2013 - 01:10 PM

I don't dislike Steve Jobs - it's just that he doesn't have anything to do with programming. Seriously. He never wrote code, he didn't understand code, he didn't think about code. He has as much to do with programming as Coco Chanel (who I also don't see as relevant to discrete math or computer science). I'm glad he had a good life, but I don't see why he has to be elevated as a sort of paragon of virtues for appropriating other peoples' ideas and finding ways to sell them, which is more or less all he did for most of his career.

Quote

It has plenty to do with programming! It's the difference between being a programmer and being a developer!


Come on, let's try to stay focused. Steve Jobs was a fashion industry professional. That's all he ever did, and that's fine, but it's nothing to do with programming or computer science. He hired programmers, which is a little different from being a programmer.
And if you want to do what he did, that's fine too. The first thing you have to do is stop writing programs and start hiring them. In other words, if you want to be like Steve Jobs, you first have to stop being a programmer.


What I really don't understand is how a good socialist like yourself could possibly consider him a role model, when he made his life exploiting the work of others and "harming the US by shipping jobs out of the country", taking immense tax breaks for doing so all the while. (I mean Apple's Irish subsidiary has exactly one purpose, and it's to avoid Apple paying taxes) How is it that you don't find him despicable? Or is it time to revise your sig?

View PostBenignDesign, on 08 July 2013 - 02:54 PM, said:

I didnt think it was possible, but y'all have managed to start a lounge thread less exciting than "what music do you listen to". Bravo.

Boring. ass. shit. kids.


Say, B9, do you think it's possible that a girl could ever program computers? Or is that just too ridiculous to contemplate?

This post has been edited by jon.kiparsky: 08 July 2013 - 01:07 PM

Was This Post Helpful? 3
  • +
  • -

#35 NeoTifa  Icon User is online

  • Whorediot
  • member icon





Reputation: 2742
  • View blog
  • Posts: 15,834
  • Joined: 24-September 08

Re: Discrete Math and Programming

Posted 08 July 2013 - 01:21 PM

View Postjon.kiparsky, on 08 July 2013 - 04:10 PM, said:

View PostBenignDesign, on 08 July 2013 - 02:54 PM, said:

I didnt think it was possible, but y'all have managed to start a lounge thread less exciting than "what music do you listen to". Bravo.

Boring. ass. shit. kids.


Say, B9, do you think it's possible that a girl could ever program computers? Or is that just too ridiculous to contemplate?


Posted Image
Was This Post Helpful? 1
  • +
  • -

#36 USC2587  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 29
  • Joined: 04-June 12

Re: Discrete Math and Programming

Posted 08 July 2013 - 05:31 PM

It seems like the amount of theory you need is relative to how complicated the project is. For example, you can make some pretty cool rockets with little to no theory. But, if you're trying to send a man into space, obviously you're going to run into problems without any theory.

To me it's best to work on both theory and practice. Discrete Math and Computer Science theory would be good to study for someone who already has a good amount of experience in programming.
Was This Post Helpful? 1
  • +
  • -

#37 AVReidy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 65
  • View blog
  • Posts: 431
  • Joined: 17-February 11

Re: Discrete Math and Programming

Posted 08 July 2013 - 09:28 PM

Personally, I think deliberately studying math to become a better programmer is a little counterproductive (assuming you have a solid understanding of algebra and some trig). You're far better off actually coding for practice. You will run into real-life math, and that's what programmers routinely deal with. My formal math education ended with trigonometry and AP statistics, and while I use both (primarily trig) for game programming, the vast majority of math-related problems in software end at basic algebra. That said, problems involving basic algebra, multiplication, and logic can be quite challenging. Really, the hard math in normal programming involves little more than arithmetic; it's only challenging because you have to use mathematical reasoning to solve problems. Programming is more about the ability to understand a problem thoroughly enough to devise a solution with logic, and ultimately computer code. Math just helps you get there.

I can't speak much for advanced 3D OpenGL and such (which I think amounts to the manipulation of matrices, an Algebra II topic, and maybe some trig), but in my experience programming 2D games, the most challenging math-related problem I encountered involved having to adjust for an inverted, unconventional coordinate plane so I could use trig intuitively. I spent at least 30 minutes thinking of the best way to correct things, and my solution was to add 360 to the negative angles. Admittedly, without having taken trig, it would have taken me a lot longer to figure this out.

Also, consider delta timing. Multiplying by a single value is all it takes to keep a game's animation speed decoupled from hardware speed, but you have to understand the relationship between a number of components to understand why this works.

Unless you're doing really hardcore graphics/physics/statistics programming, don't bother. You will get a taste of discrete mathematical topics while programming anyway, and you will get a deeper, more practical understanding this way.
Was This Post Helpful? 0
  • +
  • -

#38 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2045
  • View blog
  • Posts: 4,235
  • Joined: 11-December 07

Re: Discrete Math and Programming

Posted 09 July 2013 - 03:42 PM

AVReidy, for implementing business logic, you are absolutely right. There is minimal maths. However, for a lot of the fun stuff maths is really great.

It's surprising what comes in useful. For example, I remember reading about 2D and 3D rotation and translation matrices as applied to graphics. It's just the same principles as the symmetry matrices we were taught about when studying molecular and crystalline symmetry.

You just have to take one look at 's tutorials to see the value he has got out of maths. I struggle to follow them sometimes but it's clear that he gets a lot of value from maths and is able to do a lot of things with it that I'm not able to.

Will maths alone make you a better programmer? No.
Will programming alone make you the best programmer you can be? No.

You want to continuously improve both at the same time, along with graphic design, HCI, any domain you might be working in and anything else that works for you. Too narrow a focus will only serve to limit you.
Was This Post Helpful? 0
  • +
  • -

#39 Vendicarsi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-June 13

Re: Discrete Math and Programming

Posted 10 July 2013 - 08:36 AM

The most useful part from my class in discrete math was learning truth tables. The logic learned applies all the way down to logic gates(such as a NAND, AND, etc) in computer architecture and, on a higher level, applies to every logic statement you code(regardless of the language, logic is universal).

But like someone earlier in posts said, depending on what you do will determine what knowledge in math is useful and nothing beats actually getting hands on with it. Pathing(nodes, edges, etc) in discrete is useful for AI, while linear algebra is useful for 3D regarding matrices. If you want to work on games, physics and trig are a must for either 2D or 3D. But for example, if you work for a bank then you would probably need to learn some tax/interest rate formulas and physics really wouldn't apply.
Was This Post Helpful? 0
  • +
  • -

#40 NeoTifa  Icon User is online

  • Whorediot
  • member icon





Reputation: 2742
  • View blog
  • Posts: 15,834
  • Joined: 24-September 08

Re: Discrete Math and Programming

Posted 10 July 2013 - 09:17 AM

I don't remember anything from discrete math because the dude next to me was jacking off under his book bag and was moaning the whole time. Super disgusting and distracting.
Was This Post Helpful? 0
  • +
  • -

#41 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7892
  • View blog
  • Posts: 13,420
  • Joined: 19-March 11

Re: Discrete Math and Programming

Posted 10 July 2013 - 09:21 AM

*
POPULAR

Indiscreet math, then?
Was This Post Helpful? 7
  • +
  • -

#42 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2538
  • View blog
  • Posts: 4,639
  • Joined: 24-September 10

Re: Discrete Math and Programming

Posted 10 July 2013 - 09:30 AM

o.O

Where the fuck did you go to school?

And why didn't you call the son of a bitch out on it?
Was This Post Helpful? 2
  • +
  • -

#43 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 582
  • View blog
  • Posts: 1,292
  • Joined: 24-April 12

Re: Discrete Math and Programming

Posted 10 July 2013 - 09:50 AM

I might as well wade into this discussion since everyone else has. I agree with most of what's been said, especially those who said just get in there and do it.

I'm mathematically "challenged" compared to a lot of guys on here, including several who have posted in this thread. I'm not sure I even know what "discreet mathematics" actually is, as I mostly know what it is from flipping through a book once. So, my definition of discreet mathematics is: "integers". It's dealing with numbers that aren't real numbers. So everything is discreet because you don't have the continuum of real numbers to deal with. For example, you can't really have 2.3 children. And while I find the idea a little intriguing, I'm not sure I see what value there is in studying it outside of academic. (It's always good that someone is studying it.)

I suppose computers are discreet because they work on binary bits (base 2) numbers which are by their very nature discreet. There really is no such thing as a real number in a computer. Even the real numbers are floating point type numbers that are not precise but have degrees of precision, and are prone to losing information because they are not actually real numbers but representations made out of discreet bits (binary values).

So, is there some value in studying discreet math for computer science? I don't know. I would say learn computer science and then ask yourself if there is value in more study of discreet math. I like what was said about Newton. Necessity is the mother of invention. If you have a problem where the mathematical tool is needed, you'll be much more likely to understand and appreciate the tool once you've understood the problem.

As for me, I've been working with computers longer than I can remember and I'm seriously math deficient for most of what I do. I know trig pretty much inside and out. And I think I know what most people would call linear algebra because I'm pretty solid with 2D and 3D vectors as well as how to apply matrices. I've forgotten the matrix algebra that I used to know just because I have never, not once, used it for a computer program. All actual matrix math is in libraries or code you can copy off the internet. As long as you know what it means to multiply two matrices together and such and when you need to do it, you're pretty much golden.

I have never yet (knock on wood) had my math deficiency bite me in the posterior end... except... with physics. I manage to limp along in physics without calculus but I constantly find myself wishing I knew calculus to understand what other people write if nothing else. I'm not sure if calculus is absolutely necessary for game physics, but it quite obviously would be awefully handy to know. And you might have to "invent" calculus, like Newton, in order to solve some problems.

I mean, I understand that calculus is basically the math of measuring constantly changing systems and that that's done by breaking the problem up into discreet units. (Back to discreet math.) Seems like I could do that without calculus itself but I might be reinventing the wheel if I did.

Anyway, I think the link between math and computers is greatly exagerated unless you're using the computer to solve such math problems, or you're doing game programming. And with game programming, I think you're primarily talking about 3D game programming. Even then, the math for 3D is mostly in physics and shaders. It's mostly vectors, matrices, quaternions, a fair amount of trig, and maybe calculus (primarily for physics).

Is it worthwhile to read Euclid's Elements? Maybe. It couldn't hurt. But odds are that you could better spend the time reading some programming books and writing some code until you're solid in that. Then you might see a need for Euclid's Elements once you were pretty solid as a programmer. That's my dos centavos anyway.

This post has been edited by BBeck: 10 July 2013 - 09:55 AM

Was This Post Helpful? 0
  • +
  • -

#44 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10693
  • View blog
  • Posts: 39,770
  • Joined: 27-December 08

Re: Discrete Math and Programming

Posted 10 July 2013 - 10:27 AM

Quote

So, my definition of discreet mathematics is: "integers". It's dealing with numbers that aren't real numbers. So everything is discreet because you don't have the continuum of real numbers to deal with.

Just to be pedantic, the integers are continuous, if you are only looking at the integers. The definition of continuity is: Given a subset of R (call it A); For all epsilon in R+, there exists a delta in R+ such that: for all x, y in A, d(x, y) < delta -> d(f(x), f(y)) < epsilon. The integers satisfy this definition. :)
Was This Post Helpful? 0
  • +
  • -

#45 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 582
  • View blog
  • Posts: 1,292
  • Joined: 24-April 12

Re: Discrete Math and Programming

Posted 10 July 2013 - 11:40 AM

View Postmacosxnerd101, on 10 July 2013 - 12:27 PM, said:

Quote

So, my definition of discreet mathematics is: "integers". It's dealing with numbers that aren't real numbers. So everything is discreet because you don't have the continuum of real numbers to deal with.

Just to be pedantic, the integers are continuous, if you are only looking at the integers. The definition of continuity is: Given a subset of R (call it A); For all epsilon in R+, there exists a delta in R+ such that: for all x, y in A, d(x, y) < delta -> d(f(x), f(y)) < epsilon. The integers satisfy this definition. :)/>/>



I have no idea what you just said, but I'll defend your right to say it. :-) (I even had to look up the word pedantic.) All I know is you can't have 2.3 kids. :-) (I did mention that I'm mathematically "challenged".)

Incidentaly, what form of math is that where you learn to speak like that? I see bits and pieces of stuff like that in books, but never knew what class actually teaches that.

This post has been edited by BBeck: 10 July 2013 - 11:41 AM

Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4