Like Tree2Likes
  • 1 Post By brewbuck
  • 1 Post By Neo1

Correlation between being good at math and thus good at programming?

This is a discussion on Correlation between being good at math and thus good at programming? within the General Discussions forums, part of the Community Boards category; Is that a myth or does it hold some fact to it? I personally am not fond of numbers and ...

  1. #1
    Registered User camel-man's Avatar
    Join Date
    Jan 2011
    Location
    Under the moon
    Posts
    589

    Correlation between being good at math and thus good at programming?

    Is that a myth or does it hold some fact to it? I personally am not fond of numbers and hate math. How many of you enjoy math and find it beneficiary to your programming skills?

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,160
    If you can explain a task to somebody then you can write a program. The computer is a very dumb person who needs to be told everything very explicitly in a weird language, that's it.

    There are two reasons you need to know some math to write code: one, to understand the difference in resource usage between multiple approaches to problem solving (whether that's CPU, memory use, network, or whatever). Two, if the thing you want to do requires math, obviously you need to know math. That includes a lot of graphics, image and audio processing, signal processing, simulation, etc.

    But the act of commanding a computer to do something is not inherently mathematical.
    whiteflags likes this.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    2,076
    I've always loved math, though never pursued it to the levels I wanted to.

    For the most part, I don't think math has directly helped my programming skills. However, I do feel it indirectly benefits my programming. Higher level math requires implementation of algorithms to solve problems. When I was learning calculus, the solutions would span over several pages. I wrote out each step, changing only one thing at a time, so that if I made an error somewhere, it would be easy to go back and find where I went wrong. This is the same kind of methodical, step-by-step process that I employ when I program.

    There are a few instances when knowing "math tricks" have improved my programs - sometimes, deriving a clever equation can make code much more efficient than bluntly coding each and every step.

    And not directly math-related, as a child, I had a passion for logic puzzles. Those things really forced me to think, and think efficiently. I feel that this definitely forged a mind-frame that is conducive to programming.

  4. #4
    Registered User camel-man's Avatar
    Join Date
    Jan 2011
    Location
    Under the moon
    Posts
    589
    Interesting, I am hoping once I finish with my cal2 class I won't ever have to use that kind of math again. There is just no passion in me for it, and I don't find much interest in numbers unfortunately. I have never worked with graphics before brewbuck, what level of math is involved typically?

    Matticus, do you think that learning to program tricky problems comes straight from the mind(gifted with intense logical thought) or do you think that you learn after having some experience with the problem in the past, giving you a head up on how to approach the problem.
    Last edited by camel-man; 11-30-2012 at 12:29 PM.

  5. #5
    Epy
    Epy is offline
    Hen-teaser Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    880
    It's more of the problem solving ability acquired from being good at math that allows you to attack programming problems, not the math knowledge itself.

  6. #6
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    934
    Quote Originally Posted by camel-man View Post
    Interesting, I am hoping once I finish with my cal2 class I won't ever have to use that kind of math again. There is just no passion in me for it, and I don't find much interest in numbers unfortunately. I have never worked with graphics before brewbuck, what level of math is involved typically?

    Matticus, do you think that learning to program tricky problems comes straight from the mind(gifted with intense logical thought) or do you think that you learn after having some experience with the problem in the past, giving you a head up on how to approach the problem.
    Breaking a problem down into smaller more easily manageable parts is an acquired skill, most people are exposed to this kind of thinking when learning to spell. Didn't your elementary school teacher tell you to take one syllable at a time when dealing with long words like Antidisestablishmentarianism?

    Ofcourse, some people are inherently good at this kind of thing, but anyone can learn it over time.
    camel-man likes this.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  7. #7
    Registered User
    Join Date
    Jun 2005
    Posts
    5,883
    Personally, I make a distinction between software development and programming. Software development is an intellectual activity that requires capturing of requirements, understanding requirements, solving problems, translating the solution description into a language that unambiguously and repeatably makes sense to a machine, and then maintaining the result.

    Mathematics is intellectual activity that requires describing problems, understanding problems, solving problems, describing both problems and solutions in a specialised language so they are repeatable, and convincing other people that the solutions are valid. There are differences, but there is some similarity between that description of mathematics and of software development.

    One thing in common between software development and mathematics is that people often focus on one of the minor aspects of them, ignore the rest, and then wonder why they don't do the whole job well. Software development is often portrayed as "programming" (the routine transcription of a solution approach into a programming language, using specific techniques at best, or as "hacking"). Mathematics is often portrayed as a rote-learning activity (eg multiplication tables) and the jiggling of formulae using rules. In reality, both software development and mathematics are complex intellectual activities, with specialised, extendable, and highly flexible languages tailored to describing and solving problems.

    If you accept those broad characterisations, there is certainly a positive correlation between mathematical skills and software development skills. That is not saying that all good software engineers are good mathematicians. It is saying that a good software engineer will often become a better software engineer if s/he fosters skills in mathematics.

    As to whether good skills with mathematics correlates with programming skills, I don't care. There is much more to being a good software developer than programming, and programming is among the least difficult aspects of being a software developer.
    Right 98% of the time, and don't care about the other 3%.

  8. #8
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,831
    cal2 class is calculus? If so, I have personally not used calculus directly in the types of programming I do. But sometimes, depending on the problem, I have had to do some curve fitting and equation solving because an engineer asked me to write code to translate a thermistor's value to temperature... embedded into a microcontroller. So I was glad to be able to look at his data sheet and code a small program which included a noise filter and moving averages. In other jobs I had to rely on some geometry I could remember - rotations of coordinate systems when interfacing touch-screen and digitizer tablet input. Or finding whether a polygon encloses thousands of coordinates in a mapping program.

    I think your question is more about whether the level of math is ever needed to program well, with the exception of where the stated problem specifically demands such knowledge. As was said very well by Matticus, it's the discipline and meticulousness that's learned and carried forward into programming. Attention to detail. Being willing to stick with a laborious process that does not seem to give rewards until the very end.

    Having approached similar problems in the past is certainly the best way to program more effectively in the future. That's plain experience. I can't credit my math memories for that since I don't practice those things.

  9. #9
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,655
    Quote Originally Posted by camel-man View Post
    Is that a myth or does it hold some fact to it? I personally am not fond of numbers and hate math. How many of you enjoy math and find it beneficiary to your programming skills?
    Mathematics is a science that can benefit you a lot in your life.

    ( in early years of university you find out that computational geometry and graphics for example are really given a boost some guy good at maths. )

    My suggestion : Be good at both
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  10. #10
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    Quote Originally Posted by camel-man View Post
    Is that a myth or does it hold some fact to it? I personally am not fond of numbers and hate math.
    Just take the approach that if some math knowledge is necessary for you to solve a computational problem, just study what is required. It's no different than learning enough accounting to make an accounting program.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What Math would be good to learn to making games??
    By hockey97 in forum Game Programming
    Replies: 17
    Last Post: 09-26-2008, 12:30 PM
  2. Do you have to be good at math to be good at C/C++?
    By orion- in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-07-2007, 04:15 AM
  3. Trying to build a good math interface
    By Twice in forum C++ Programming
    Replies: 7
    Last Post: 08-04-2006, 04:56 PM
  4. do you have to be good at math to be good at C++?
    By orion- in forum C++ Programming
    Replies: 6
    Last Post: 09-04-2005, 10:29 AM
  5. Anyone here good with math?
    By volk in forum C Programming
    Replies: 2
    Last Post: 02-03-2003, 11:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21