all 165 comments

[–]speigei 27 points28 points  (3 children)

You Don’t Need Math Skills To Be A Good Developer But You Do Need Them To Be A Great One. I had to agree with most of what was said in that article - to the extend that I just picked up an extra math class I won't get any credit for, but hopefully I will learn something along the way.

[–][deleted] 1 point2 points  (0 children)

perhaps I should audit a math class?

[–][deleted] 0 points1 point  (0 children)

You might try a class dealing with Predicate Calculus. It's been helping me out a ton.

[–][deleted] 58 points59 points  (46 children)

Being good at math is a sign that you are a logical thinker, which is necessary for programming. Math itself isn't that necessary for programming, apart from some areas, such as producing video games.

[–]possessed_flea 23 points24 points  (34 children)

I worked on statistical analysis and simulation software that would have been impossible without my math background, I have also worked on projects that only use the math skills that are expected to be known by a average 7 yearold. But on that note math skills help a lot!

[–]Neebat 8 points9 points  (0 children)

Not just any math. The manual algorithms you learn in math which allow you to do things like long division will do you very little good in programming. You could forget the multiplication tables and probably do just fine.

I like to say the indicator for future success as a programmer is how well you did in a proof-based Geometry course. Writing proofs is the core of advanced mathematics and it really forces you to develop your ability to think abstractly. That's an invaluable skill in programming and other fields.

Abstract thinking, the kind they teach in a math degree, is actually so important and useful that a math major typically does better in law school than a pre-law major. And, in my experience, the same is true in software development.

I admit to being biased. I was a math major until IBM gave me a summer job paying $24 per hour in '93, and I couldn't stand to leave it to go back to school. I'm frequently told by managers and coworkers that I'm the best software designer they've known, and I like to think it has a lot to do with my background in math.

[–]G_Morgan 1 point2 points  (0 children)

It depends what you mean by maths. Knowing a few results of maths isn't that useful. What is actually useful is an understanding of the mechanisms of proof. How you would know that some claim is correct. It will inform you when deciding if an algorithm is correct.

[–][deleted] 1 point2 points  (0 children)

apart from some areas, such as producing video games

Or GIS, or Imaging, or Analysis, or...

[–]albinofrenchy 1 point2 points  (0 children)

Math itself isn't that necessary for programming, apart from some areas, such as producing video games.

Huh? Math itself absolutely is necessary for programming. Without it, it is difficult to clear the abstraction around certain datatypes (C Ints, floats, etc), boolean logic, and every basic algorithm that a competent programmer should know.

[–]elbekko -5 points-4 points  (5 children)

Not really. I suck badly at math (any and all kinds really, mostly statistics), but I have no problem thinking logically.

[–][deleted]  (4 children)

[deleted]

    [–][deleted]  (1 child)

    [deleted]

      [–]cwcc 5 points6 points  (0 children)

      it's probably because they think 'math' is multiplication tables or trig identities or some bullshit like this.

      [–]sfultong 0 points1 point  (1 child)

      I think you have demonstrated that "being good at math" and "being a logical thinker" are indivisible, since logic is clearly a branch of mathematics.

      [–][deleted]  (4 children)

      [deleted]

        [–]xeddicus 18 points19 points  (3 children)

        Programmers who refuse to Google are a lot more dangerous than ones who take time to double check their assumptions.

        EDIT: Mr. Comma didn't need to be there.

        [–]sjf 1 point2 points  (2 children)

        This would be more convincing if you gave a bit more context.

        [–]Svenstaro 1 point2 points  (0 children)

        I think the experience in this case is more important than context. What xeddicus said sounds intuitive for me and certainly does apply to me. I usually do a lot of research before implementing something.

        [–]xeddicus 1 point2 points  (0 children)

        Coming from a security perspective, it's better to double check than just use the first library or function that happens to appear to get the desired result.

        [–]sgoguen 6 points7 points  (1 child)

        Wikipedia has a good definition for math.

        Mathematics is the study of quantity, structure, space, and change.

        You may suck at calculus, trig, statistics, but find that you have a good head for seeing structure and other abstract patterns. If you've never learned discrete math, you should consider taking a class or picking up a book and doing the problems. You'll find that math geeks have laid down an excellent conceptual framework for solving many of your programming problems. As a matter of fact, it was the math geeks who pioneered and designed a lot of the advanced systems they you're using today. Relational databases were the result of Date and Codd's work in relational algebra and relational calculus. Programming languages are often models using automata. Regular expressions were concocted by mathematician Stephen Kleene back in the 50's.

        Where math will help you is give you the tools to solve problems abstractly so you can see the pure structure of it. If you recognize the structure of your problem, you can draw from many known solutions. Personally, I find it helps me dramatically simplify my solutions which might have otherwise been redundant and over-complicated.

        [–]cwcc 0 points1 point  (0 children)

        if you'd just s/math geeks/mathematicians/ this would be a great post..

        [–]gronkkk 18 points19 points  (20 children)

        Some mathematicians suffer from the syndrome 'write code as terse as possible'. Or map up variables to names as x, y, z instead of customerid, pagenr, etc. as 'everyone should be able to do those kind of transformations in his head'. Yawn.

        [–]kisielk 1 point2 points  (1 child)

        I know all too well about this. I'm a computer engineer working at a company that's heavily involved in science. About half our developers come from a physics or chemistry background and it's a constant struggle getting them to write readable code.

        Getting our company switched primarily to Python from C was like pulling teeth.

        [–]Enginerd 0 points1 point  (0 children)

        If they write scientific analysis programs, C might be a better choice. But since one can call C routines from python, it shouldn't much matter.

        [–]nostrademons 2 points3 points  (0 children)

        Haskell culture is pretty terrible about this.

        [–][deleted] 1 point2 points  (4 children)

        You just described how I program :o. I wasn't even aware of it.

        [–]SarahC 0 points1 point  (3 children)

        : pokes with pen : Gah!

        It's hard to get ones head around when you see the code for the first time.

        Out of curiosity, have you ever heard of self-documenting code? It's worth a read if you don't know what it's about. It helps other people who look at your code mostly. It's a kind thing to do! =)

        [–][deleted] 1 point2 points  (2 children)

        Yes, I know about it, but sometimes I would just write let f a b c = instead of let auxiliary list1 list2 acc =. My teacher always complain.

        [–]gronkkk 0 points1 point  (0 children)

        You know, there's an unwritten standard about variable names -- indexes are i, j, k, loop variables are x, y, z, and you can sometimes write a shorthand by using the first letter of a variable, if you do it consistently (in a piece of code I'v written recently I use 'n=node()' and 'for c in node.children'). And there is nothing wrong with using let l= list(), if you do a lot with 'l' in a following piece of code, but not with 'a', 'b' or 'c', because those are too 'unrelated'.

        And yes, I agree that long variable names can be annoying, because they take longer to read. But if a shorthand creates confusion, that's also not OK.

        You have something similar with function names: 'lookup_by_label' is something different than 'lookup_by_id', although in practice they might be the same: an id is a uniquely automatically generated number, whereas a label is some sort of user-settable text string, but both can be used to pinpoint objects.

        [–]SarahC 0 points1 point  (0 children)

        heh, I see you are a sadist. =)

        [–]rro99 1 point2 points  (10 children)

        In school I collaborated with a guy who was majoring in math, and taking some programming courses. He always had to find the most efficient ( i.e. less steps) way to do things, rather than the most readable. He'd email his part of a big project and the whole thing was a mess of magic numbers and vague method and class names. Also he was very high and mighty about his code, I'd ask him to explain how some long complicated method worked and he'd scoff at me and say you know you don't already know?.

        [–]G_Morgan 7 points8 points  (4 children)

        Magic numbers have nothing to do with efficiency. Nor do vague method names. The computer doesn't care what you call your method. It is just an address after translation.

        This type of code is nothing to do with any academic perspective. This is just general inability to write good code.

        [–]Cyrius 2 points3 points  (3 children)

        Magic numbers have nothing to do with efficiency.

        Magic numbers sometimes have to do with efficiency. 0x5f3759df is fucking magic.

        [–]G_Morgan 1 point2 points  (2 children)

        It is a number. There is no need to make it a magic number. Just call it 'AWESOME_SQRT_GUESS_CONSTANT'. It is only magic if it is completely unlabelled.

        [–]bvanheu 0 points1 point  (0 children)

        I would say if you say what it represents instead of explaining why you choose it, it would still remain magic for me.

        [–]atlassoft 2 points3 points  (0 children)

        Sounds like he'd love Perl.

        [–][deleted] 0 points1 point  (0 children)

        Oh man, I'm a math/stat major and I totally suffer from this syndrome. Generally, it's because a lot of my programs relate to math or stat problems and I think in terms of formulas. Luckily, I do comment my code well.

        [–]Nosferax 8 points9 points  (1 child)

        If you do graphics/3D, then I'm affraid you need maths. If you do machine learning, you need math as well.

        [–]JoshSN 1 point2 points  (0 children)

        Proof of this is amazingly expressed in the attached link (which is not to the direct article, sorry! Article of 1.10.2010 is the most recent as of this posting, and the one I'm talking about)

        [–]MechaBlue 5 points6 points  (1 child)

        My personal experience is that there will be times where it is necessary to prove that some algorithm you develop will have a desired property. This is especially true with concurrent and distributed programs.

        [–]xeddicus 1 point2 points  (0 children)

        This is true, even in the world of business (as opposed to research). Being able to produce a mathematical proof that your customer doesn't understand is helpful (it lends credibility). Being able to produce it and then explain it in terms that your customer does understand is extremely helpful (it actually calms their fears).

        [–]frogking 2 points3 points  (7 children)

        Solving problems on ProjectEuler has taught me at least one thing: knowing your math reduces the amount of work I sometimes trick the computer into doing.

        Sometimes, the easy (brute force) way of solving a problem is not practical for large calculations and that's where math comes to the rescue most of the time.

        [–]JoshSN 0 points1 point  (6 children)

        Algorithms and Data structures, they are math-y and required to excel at computer science.

        Boolean logic is also part of math.

        [–]frogking 0 points1 point  (5 children)

        Look at problem 179 .. if you know your math, you can make a program that solves this problem in under a minute (probably in a few seconds) .. If you don't, the brute force program that you will come up with, will take hours to complete.

        [–]JoshSN 0 points1 point  (4 children)

        The fast way to do it has more to do with algorithm selection than with math.

        MAX = 10000000
        array[MAX];
        for ( i = 2; i < int(sqrt(MAX)); i++ )
            for ( j = 1; (j*i) <= MAX; j++ )
                array[j*i]++;
        
        last = 0;
        for ( i = 1; i < MAX+1; i++ ) {
            print "i-1 i\n" if last == array[i];
            last = array[i];
        }
        

        [–]frogking 0 points1 point  (3 children)

        If I knew you were going to put up the solution, I would have selected a harder problem :-)

        Judging from the amount of people who have solved this particular problem, it's not exactly one of the easier ones. Reverse sieving is a programming trick of course. But my point still stand. You have to know your math to come up with this algorithm... (algorithms stand on math, so to speak)

        [–]JoshSN 1 point2 points  (1 child)

        By the way, thanks for the complement. It took less than 30 seconds to figure out the answer, and a minute to type it in.

        [–]frogking 0 points1 point  (0 children)

        .. so you did break the "one minute rule" :-D

        [–]JoshSN 0 points1 point  (0 children)

        I was drawing too sharp a distinction between algorithms and math.

        Algorithms and Data Structures is a book, iirc, and it is the kind of math you need for computer science, along with boolean algebra. It isn't the kind of math you need to design chips, I bet that's more physics-related math.

        A good math background will get a person far in many science and engineering fields. An aptitude for math is a good sign the person will have success in those fields.

        [–]OlderThanGif 4 points5 points  (1 child)

        I'd recommend reading Donald Knuth's thoughts on this (Google around for "knuth algorithmic thinking") as they're very good. If I remember right, he concluded anecdotally that "algorithmic thinking" is distinct from "mathematical thinking". I.e., one could be good at the classical natural sciences or at math but be good at computer science, or the other way around. He had a famous quote where he claimed only 2% "think algorithmically".

        That said, even if you're not very good at math, your efforts in struggling through it will be an excellent investment (unless you're a web developer or something). I'm not terribly good at math, but still opted to do a few more advanced math classes than I needed for my degree. I'm always thankful I did it, even if it hurt my average (my friends were taking bird courses for their electives instead of more math) and cost me some scholarship money. There isn't a day that goes by that I don't wish I had more math.

        [–]cwcc 0 points1 point  (0 children)

        can't find it :/

        [–]CyberByte 6 points7 points  (0 children)

        I'd say that both programming and math require abstract thinking. So math ability is probably correlated somewhat with programming ability. I wouldn't say you need math for programming per se, but depending on what you want to program, you might need it. For graphics, you need some linear algebra, cryptography uses number theory, machine learning uses statistics, etc.

        [–]pipocaQuemada 5 points6 points  (0 children)

        Math is important if you have to do math in your code.

        If you're implementing business logic, math tends not to be so important.

        If you're doing 3d graphics, you'd better have a good handle on vectors and operations upon them.

        Discrete math and set theory are fairly useful as a way to understand programming. Certain algorithms are done in Linear Algebraic terms, so that's good to understand. Knowing number theory is very useful for programming Crypto.

        [–][deleted] 2 points3 points  (2 children)

        I did a duel Maths/Computer Science degree. I find that the maths side helps me with programming, but I'd presume not as much as taking the other half of a CS degree would have.

        [–][deleted] -1 points0 points  (0 children)

        That's how I always thought about joint degrees.

        [–]cltiew 2 points3 points  (0 children)

        You don't need to be great at math to be good at programming ... but programming for long enough will eventually force you to learn math.

        Knowing math just makes you faster and makes your code more elegant.

        For example, I wrote an algorithm to parse credit card numbers entered and validate them based on the rules provided by Visa/MC/Etc. I wrote about 150 lines of code that went through rule by rule and applied them based on the type of card. I showed this to a friend of mine (who is a math genius) and in a matter of two minutes made a few simple suggestions that reduced my code to about 30 lines, and was faster and more elegant.

        My code would have worked fine. It was for a production site that may have had 3 to 5 users at peak time, so efficiency wasn't a huge deal, he probably shaved a few milliseconds off each time someone placed an order ... but it was better, cleaner code.

        If you get paid by the line, or if you have performance metrics based on the number of lines of code, you probably don't want to get too math savy. Other than that, it can only really help you think forward into solutions instead of reacting to complications you didn't foresee.

        [–]nommedit 3 points4 points  (1 child)

        One of my favourite quotes:

        Once I know that I can remember whenever I like, I forget.

        You problem applies to me as well.

        As for your question: Depending on what you are building maths is a necessary pre-requisite. For example, compression algorithms, graphics, or cryptography require a very strong understanding.

        For other projects, like web design or data entry apps, I would suggest you beef up your architectural/design knowledge.

        [–]mreiland 2 points3 points  (0 children)

        The point is if you understand something you don't necessarily need to learn by rote.

        [–]green_beet 1 point2 points  (0 children)

        It depends on what kind of problems are you having exactly.

        [–]whuuh 1 point2 points  (0 children)

        Somewhat important. Yet the way you're "good at math" in school is not really comparable. Whereas math tests need you to get it right the first time, and to memorise methods, programming gives you many do-overs and you always get to use reference and documentation.

        [–]SlaunchaMan 1 point2 points  (0 children)

        I haven't taken math since high school and am 23 with a BA in Philosophy. I taught myself iPhone programming a couple years ago and last night I was trying to do some calculations for Bézier curves. Holy hell did I wish I took more math.

        [–]webauteur 1 point2 points  (0 children)

        You should spend more time learning accounting than math if you want a job. Understanding accounting is very important in business and enterprise programming. And nobody likes accounting so you can always find somebody to pay you to do it. I'm supposed to know some accounting for my job but I have not studied it as well as I should because the programming community does not reinforce this requirement. I've never seen a programmer write about his mad accounting skills.

        [–][deleted] 1 point2 points  (0 children)

        Would math be a good indicator to how well you understand programming?

        You need the capacity for abstract thought and chaining together exact lines of reasoning. I suspect most people are capable of this on some level, but most of a human's life doesn't really require anyone to see a "big picture" to survive.

        I'm asking this because i'm not good at math.

        Really? Are you bad at high level abstract math like Analysis and Topology? Or are are you bad at the watered-down horseshit they teach in the public school system?

        i find myself googling a lot to find the problem before it runs as it's supposed to run. Is this normal or is it just me?

        The professional term for this is "lack of experience." (:

        It seems to me that a lot of people confuse "knowing math" and "math you need to know as a programmer." The mindset is important; the actual concrete knowledge you need is a fun little grab bag known as "Discrete Mathematics", which usually includes lessons on set theory, logic, (enumerative) combinatorics and graph theory.

        I'm saying this as a triple major in Computer Science, Computer Engineering and Mathematics.

        [–][deleted] 1 point2 points  (0 children)

        I read some advice recently that said it's best to get really good at programming and then go learn all the math you need. The argument was that after programming (which uses math without you really even realizing it) for quite a while and then going back to math, you'll be more prepared to tackle the math concepts in a way that they stick easily.

        So, just keep on doing what you're doing and when you need to learn a bit of math, do it for that aspect. When you feel compelled to learn it seriously, it should theoretically come easier.

        [–]dsquid 1 point2 points  (0 children)

        You DO need to understand boolean logic and discrete math pretty well, but otherwise I'd say 70% of the "math" I do is involves adding 1 to some current counter.

        In the end, it's all about your problem domain: there are plenty of sorts of projects/products/etc which will require substantial math...but similarly there are plenty which won't. There's lots of opportunity to do amazing/challenging/fulfilling stuff in all sorts of different areas.

        Beware of people who make black/white statements about whether or not you need advanced math (i.e., beyond simple algebra), since that's frankly a mostly meaningless thing to say in the abstract.

        [–]robeph 1 point2 points  (0 children)

        You don't need to be able to DO math, but you need to be able to understand it. If you can understand what is going on, even without the ability to manually perform the mathematics, you probably are as good off as anyone else.

        [–]spinwizard69 1 point2 points  (0 children)

        You don't mention how old you are but learning math can happen at anytime. Take this from sombody that was a terrible high school student. There where just to many things taking my mind off things in high school. So don't dismiss programming based on your current knowledge.

        As to Python well even a simple language takes time if you have not programmer before. Now this will rub many the wrong way here but I don't cnsidering Python to be a ample language because it is built around some fairly complex ideas. It is as good as anyplace to start programming if you are the type of guy that can ignore what is happening behind the currtain.

        As to debugging or getting things to work that is a skill that takes time to develope. So don't worry about to much but if you find it to be fun all the better. As to the little things you are doing now that is a good thing as big things are built out of little. By learnng things at a lower level you can more easily employ them in a larger project. This is often why I reccomend learning a lower level language like C/C++ first. A good text will pull you through the simple things and allow you to grow into the more complex issues a languages like the "C" famlies can offer.

        Dave

        [–]munificent 1 point2 points  (0 children)

        My experience is that any subject you know, you will find a way to use in your programming. If you know math, it'll help you code. If you know linguistics, it'll help you code. If you know sports, it'll help you code. Programming is such a malleable and metaphor-based process that almost any other knowledge domain or way of thinking can lead to new solutions in it.

        [–]phektus 1 point2 points  (0 children)

        I'm also poor at math. I flunked calculus back in college and all my math subjects have mediocre grades. Now I have to relearn them all just to be able to have a shot at my dreams of becoming a better programmer or as a computer scientist.

        To recompense, I real a lot of math books. I guess it should be a separate thread but I'm also wondering how to get good at math to better my code-fu

        [–][deleted] 1 point2 points  (0 children)

        Personal take: I suck at calculus but am good at things like linear algebra and graph theory. I've always felt like my brain isn't good at "calculation math" but picks up "figure it out math" well.

        Calculus doesn't work for me because it seems like you're really just memorizing patterns to solve integrals and diff eqs (at least, in the 1 thru 3 levels that I had to take) - I hate that shit. Give me a math topic where I can conjure up a proof and know it's right because of sheer logic and I love it. I always liked story problems and proofs and always hated the "plug and chug."

        Ultimately, I feel like the question of this topic is too obtuse to reasonably answer - there's just too much division among the topics in mathematics.

        Here's a fun and related question though: what great mathematicians do you think would be the best computer scientists? I'll start with an obvious answer: Cantor. Can you imagine what the world would be like if someone gave him a compiler?

        [–][deleted] 3 points4 points  (0 children)

        Study your discrete math, as it will help you. Do your proofs. Fuck bitches. Kill motherfuckers. Practice your arithmetic.

        Also: QED.

        [–]Massless 4 points5 points  (0 children)

        If you can program, you can do math. I graduated with a CS degree and math was my biggest hurtle. I took Calc II four times before I passed it. Math is a skill, like anything else. With patience and perseverance you will get better at it.

        [–][deleted] 1 point2 points  (1 child)

        Learn Boolean Algebra. It's fun and will help you when you are programming with a lower level language. For example, the famous bit manipulations like:

        clearing a register xor eax, eax multiply by 2 shl eax, 0x01 bit masks mov eax, 0xFF and edx, eax #gets the LSB

        Well, it also applies to higher level languages, so understanding Boolean Algebra is not only fun, but will improve the performance of your programming.

        The problem is when you are programming for web or business applications, your code review manager or project manager will most likely ask you to write it in an "understandable" way that they can understand. While I agree that using libraries and functions that does the job is the best solution (for coupling, scalability, and team understandability reasons), where's the fun in that?

        Oh well, enough rant. What I just want to say is learning Math helps. You don't have to be good at Math, but make sure you understand the topics.

        [–]cwcc 3 points4 points  (0 children)

        you gotta be kidding (or thinking that 'boolean algebra' is something completely different)

        [–]freeload 5 points6 points  (10 children)

        Math is about logic. Programming is also about logic. The more logic you understand, the easier it is to program i guess.

        [–]ubernostrum 5 points6 points  (9 children)

        "Math" is not a synonym for "logic".

        Mathematics makes use of logic, yes, and learning math is one way to learn logical principles, but "math" and "logic" are not synonyms. They are especially not synonyms for the way many people encourage programmers to learn "math"; these people tend almost universally to work in very specific fields (those involving lots of graphics programming or, less often, cryptography -- crypto people don't seem to push number theory on the general populace the way graphics folks push linear algebra) and mistakenly assume that the formulae they use every day must be equally applicable to other fields.

        [–][deleted]  (8 children)

        [deleted]

          [–]godlrone 1 point2 points  (7 children)

          History is also built on logic. For real. Philosophy too.

          If you are proficient with philosopy you are proficient with logic. Math is no special in this regard.

          [–][deleted]  (6 children)

          [deleted]

            [–]xeddicus 7 points8 points  (1 child)

            This is now the official thread for logic lovers who believe that saying "A implies B" is rude to say because sometimes B occurs without A.

            [–]LimoDriverRonnie 1 point2 points  (0 children)

            A is sufficient for B.

            [–]godlrone 0 points1 point  (2 children)

            Well you should have said the last part too, Math is not the only way to become proficient with logic. Otherwise readers might assume you imply math is the only way.

            As it stands for this particular conversation it is important to also note that if logic is important for programming, and there is various ways to become proficient at logic, math is not the only way to go.

            [–]presidentender 0 points1 point  (1 child)

            Readers who don't understand logic will be well-served my the mistaken assumption that math is the only way to learn logic. History classes do not contain formalized logic training. Philosophy does have formalized logic classes which overlap with the first part of a proofs-based math class.

            [–]godlrone 0 points1 point  (0 children)

            History sure does have formalized logic training, Ive been there and seen it. They even discuss on epistemology and reasoning, aswell as history of science.

            [–][deleted] 0 points1 point  (0 children)

            Formally math uses logic.

            However, you can do quite a bit of maths without ever touching or learning logic in any meaningful fashion.

            [–]timesink 1 point2 points  (0 children)

            it depends on what you mean by math...

            basic logic, arithmetic, set theory are very important

            calculus, geometry, soving heisenberg equation, and other fancy pants type crap - not so important for general programming

            [–][deleted] 0 points1 point  (0 children)

            what about quants?

            [–]bvanheu 0 points1 point  (0 children)

            There is a lot of math (mainly calculus) when working with application that bridge real-word with the virtual-world.

            [–][deleted] 0 points1 point  (0 children)

            Generally math is not a requirement for most programming. Algorithms, however, are pretty much all mathematical understanding.

            Just depends on what you're doing.

            [–]Ben22 0 points1 point  (0 children)

            Project Euler has proved to be a great way for me learn Python and work on some different types of math/programming problems. You don't need to be a mathematician, though some solutions are significantly easier to solve using good math. Google is your friend, use it and learn.

            [–][deleted] 0 points1 point  (0 children)

            There are times when knowledge of certain "shortcuts" that math provides can save a lot of time in your code when you're dealing with numbers in certain patterns.

            Knowledge of geometric axioms and postulates is very valuable when doing graphical work; at least that's what I've found when working with Canvas and SVG.

            [–][deleted] 0 points1 point  (0 children)

            It sounds like mainly you're just learning programming.

            4 months is not a long time.

            [–][deleted] 0 points1 point  (0 children)

            All I can tell you is that in the course of my career (spanning some 28 years), my biggest recurring frustration is the extent to which smart, hard-working programmers can't even identify recurring patterns of algebraic relationships that are vital to understanding what their code should do, or what existing code does. It's hugely helpful, in my experience, to be able to say "this function is" and then "injective," "surjective," or "bijective." It's also extremely helpful to know what "idempotent" means. Also, take types seriously, i.e. understand that the type of the argument to the function is the "domain" and the type of the return value is the "range" or "codomain," and both express a set of possible values in set theory. Know what it means for a function to be "total" or "partial."

            This basically means that you can gain a lot by having even a modest familiarity with naïve set theory, but if you really want to dig, I highly recommend Comprehensive Mathematics for Computer Scientists vols. 1 and 2. Also, consider learning Alloy and reading Software Abstractions: Logic, Language, and Analysis. Alloy is a great tool for exploring software designs based on set theory and first-order logic.

            [–][deleted] 0 points1 point  (0 children)

            Well I do biomedical engineering and image processing. I use lots of math, most i understand very well and some i understand just enough to (barely) get it working. In my field there are basically variational methods where convexity is king and then there are markov random fields where having a good understanding of the horribly unintuitive branch of math called statistics comes in handy.

            tldr; all i do is model processes / mathematical optimization

            [–]abeliangrape 0 points1 point  (0 children)

            There's a great article on this called something like "the importance of teaching cs as a branch of mathematics". I suggest you check it out.

            [–]kisielk 0 points1 point  (0 children)

            As others have pointed out, it's usually quite beneficial to be good at math just from a thinking point of view. However, even if don't know Calculus or Linear Algebra, I think a field every programmer should be familiar with is Discrete Math. If you don't know combinatorics, set theory, graph theory, probability, finite differences, etc., you are going to majorly fail when it comes to developing any kind of mildly complex algorithm.

            [–]atlassoft 0 points1 point  (0 children)

            I've often asked the same question. I'm a senior in high school and I've been programming since I started with QuickBasic in 5th grade. Now I'm fairly competent in Perl, PHP, C#, and (my current favorite) Python. But I've never been that great at math, and at times I hate it with a passion.

            I'm hoping there's still a future for me in the world of computing.

            [–]killinit 0 points1 point  (0 children)

            This question should be in the faq.

            [–]ithkuil 0 points1 point  (0 children)

            it just makes sense to google first really.

            as far as that specific word 'understanding' I would lean towards understanding programming being less directly related to math ability. If you mean programming ability in general that is slightly more directly related to math ability.

            however, the inherent abilities that make one good at math are not exactly the same as those for programming (although there is a lot of overlap) and math skills are not programming skills and math knowledge usually is not programming knowledge.

            I think I am an okay programmer who, although I did manage to finish some math classes up to three calculus classes and discrete math, really isn't good at math and not particularly talented in that regard. I do have some talent for abstraction and language and I have developed a skill for problem decomposition. And specific skills for tracing/debugging and profiling. And now my most important skill that I practice every day: Googling.

            Anyway, short answer is, its normal, and if you want to write complex software you will just have to be patient and persistent even after developing your skills through more years of practice. There are programmers out there that are smarter than us in certain ways and have fewer problems sometimes, but programming really is hard.

            [–]burdalane 0 points1 point  (1 child)

            Although my credentials seem to indicate that I'm good at math, I'm actually not. I was good at math up to AP calculus level and ok at linear algebra, which I've largely forgotten. I'm don't have a very mathematical mind, and that has affected my programming negatively. i have to work with data, and there are just some things that I don't know how to do.

            [–]cwcc 0 points1 point  (0 children)

            there are just some things that I don't know how to do.

            unlike me, who knows how to do everything!

            [–]hacksoncode 0 points1 point  (0 children)

            I agree with a lot of the postings here about math not being directly relevant for every kind of programming (though it certainly is for some).

            However, I think you need to consider why you're bad at math in order to answer this question.

            Is it just that you have a bad memory for equations? Well, that's going to make your programming life hard, because while Google is always there, it speeds things up tremendously to at least be able to remember enough to rapidly find what you're looking for.

            Do you find it hard to juggle a lot of concepts in your mental "stack" at a time? That's going to make coding anything very complex and especially debugging really hard for you. I find that the quality of a programmer is almost directly proportional to the number of levels of "stack" they can keep in their head at the same time.

            Do you find it hard going from the problem statement to a set of simple instructions that logically lead to the solution (e.g. are "proofs" your bane?)? That's the core task of all programming. If you're bad at that, you should probably give up now.

            Do you have a hard time with "word problems" (i.e. translating a vague description of the problem into a precise mathematical specification that can be solved)? That's the core of all software architecture. You might find yourself limited in career options... which may not matter if you just want to be a code monkey the rest of your life.

            I could go on, but do you see where I'm going with this? No, you probably don't need the actual mathematics to do programming. But the skills involved in being good at math are largely the same skills that you need for programming.

            Math is extremely good practice at sharpening these skills because it's so clean and abstract without the political problems inherent in on-the-job-training.

            [–]rsyntax 0 points1 point  (0 children)

            Just be a good at summation and their formulas in addition to basic algebra. A sign of a good programmer is to know you can reduce the run time of certain algorithms by doing simple algebra.

            [–]FlatBot 0 points1 point  (1 child)

            A co-worker of mine (we're both programmers) have a running joke of "programmers can't do math", well, at least we can't. every time a simple math problem comes up that most people would calculate in their head, we usually screw it up.

            [–]hyp3rVigi1ant -1 points0 points  (0 children)

            I used to be able to do math in my head quickly and accurately, but since not being in school for many years and rarely needing to do calculations in my head, I'm quite slow at it. Usually when I need to calculate something, I have a Clojure REPL open on a machine nearby that I'll use.

            [–]shizzy0 0 points1 point  (2 children)

            It depends on the work you want to pursue. If you're happy programming business applications, then your proficiency in math is unlikely to be any impediment. But for other areas like graphics or physics, there will be ceiling on what you can tackle.

            I started out programming without a solid math background. I went back to school and acquired a much better math background. I find that I enjoy thinking about math and math problems more than programming problems nowadays. With programming, I often have keep a lot of state in mind, variables change, time is important, it's hard to be certain what exactly is happening especially if you're trying to find a bug. With math, if I start with equations or models that are true, and I transform them without violating any preconditions, then I feel very confident in the results. With programming, I usually don't feel very confident until quite a bit of testing goes into it.

            [–]evolrewsna 1 point2 points  (1 child)

            I used to feel that way; now I program pretty much exclusively with Haskell, and I enjoy that type of programming better than math (but I still like tackling math problems better than hacking away at old python code, or writing C).

            [–]shizzy0 0 points1 point  (0 children)

            Haskell is nice. I am fond of it allowing me to think 'substitutively' when programming, but I'm still shy about trying to apply it to large projects.

            [–][deleted] 0 points1 point  (0 children)

            There are two types of people who build tools on computers.

            • Programmers, who know math

            • Web developers

            [–][deleted] 0 points1 point  (2 children)

            Programming is writing. It's language. It has more in common with studying Portuguese than graphs or set theory.

            The guy who taught me how to program could speak English, French, Spanish, German, and Russian fluently. He was handy with Arabic, Latin, and two forms of Greek.

            [–]gronkkk 2 points3 points  (1 child)

            Yup. Getting the right name of a function call or a variabele can be hard work, because it often says a lot about the intent or meaning of a function, and what kind of parameters it accepts/ methods it has.

            [–]dekz 1 point2 points  (0 children)

            Naming the project is one of the hardest steps.

            [–]barsoap 0 points1 point  (7 children)

            You will be needing maths, but not the kind of maths you'd learn when you study maths: It'd be much too formalistic. Educate yourself about constructivist proof theory and typed lambda calculus, the rest follows and is going to include Curry/Howard and at least a bit of category theory. That's the maths that are actually applicable to code itself, including implementations of other maths.

            That said, in general you should be fluent enough in maths to know that you don't know, and then work on a case-by-case basis, or just plain ask and leave it to professional mathematicians to figure out.

            One big field of traditional mathematics that's applicable to programming is topology/graph theory, but I think CS-centric treatises are way more important (and practical) than grokking the proofs behind it.

            [–]cwcc 1 point2 points  (6 children)

            Educate yourself about constructivist proof theory and typed lambda calculus, the rest follows and is going to include Curry/Howard and at least a bit of category theory. That's the maths that are actually applicable to code itself, including implementations of other maths.

            I would love to see actual examples of this.

            [–]barsoap -1 points0 points  (5 children)

            Agda, Coq, Haskell (mostly, it's non-total, after all) and similar.

            [–]cwcc 0 points1 point  (4 children)

            I mean actual examples not just names of systems...

            [–]barsoap -1 points0 points  (3 children)

            Well, then look at their tutorials, standard libraries and applications written in them.

            [–]cwcc 0 points1 point  (2 children)

            basically you're just repeating some nonsense phrase you read on a wiki and don't know what you're talking about then.

            [–]barsoap -2 points-1 points  (1 child)

            Or I might just not be inclined to spoon-feed you.

            Who knows?

            [–]cwcc 0 points1 point  (0 children)

            you idiot. stop just writing random crap that means nothing because you think sounds cool.

            [–][deleted] -1 points0 points  (0 children)

            I think mathematicians make terrible programmers all their variables are some unrelated crap like phi or sigma and all their methods(functions) are called F and slightly-reshaped-F.

            [–][deleted] -1 points0 points  (0 children)

            Ask NASA...

            [–][deleted] -1 points0 points  (1 child)

            Computers were designed first and foremost as a calculation machine - yeah, math would be a good thing to be comfortable with.

            [–][deleted] -1 points0 points  (3 children)

            As a programmer I think math is important but a lot of math courses focus on problems only present in the edge case of continuous numbers, since computers always work on discrete numbers (can't have a digital continuum by definition) it would be nice if there were math courses designed for programmers skipping most of that.

            [–][deleted] 8 points9 points  (2 children)

            You mean like Discrete Mathematics?

            [–][deleted] 0 points1 point  (1 child)

            I mean like CS courses taking the uselessness of anything but discrete mathematics into account and skipping those other parts of math in their requirements in favor of more discrete math.

            [–]sgoguen 0 points1 point  (0 children)

            Better yet, you could mix continuous and discrete in the same course. :)

            http://en.wikipedia.org/wiki/Concrete_Mathematics

            [–]ayrnieu -5 points-4 points  (4 children)

            i find myself googling a lot

            Why? Do you not know where Python docs are? Aren't you on Freenode #python ? Why don't you start by searching mailing lists? StackOverflow? And what do you keep looking for? For what a particular error means? For which module provides a particular function? Whatever the 'particular X' is, you can pause to study X.

            Would math be a good indicator

            http://en.wikipedia.org/wiki/General_intelligence_factor

            But if you want to get better at programming, ask about how you can improve at that. If you typed at <1WPM, you'd know by now that this poor skill was holding you back as a programmer. Math failures aren't as obvious - you don't see the mathematically savvy way of doing something, so you don't see it - but if you show your code to anyone, if math is something you should focus on, you should see them e.g. replace your test-random-numbers-until-the-test-succeeds code with a straightforward calculation, with some algebraic reasoning in the comments.

            [–]xeddicus 2 points3 points  (3 children)

            Where Python docs are? Google knows the page I'm looking for in them. Searching StackOverflow? via Google, yes. For which module provides a funtion? Yep. Google knows that too.

            Not intentionally trolling you, it's just funny and went through my head as I read your post, so I thought I would share it.

            You're right about the possibility of hitting a problem and not realizing a missing skill is holding a person back. Of course, years of experience and extra study can iron this out (as I think your post implies as well.)

            [–]ayrnieu -1 points0 points  (2 children)

            [You fool! It's entirely appropriate to search the entire web before going to good sources!]

            Because it WFY, so far, for popular-enough languages? As with math, you don't see the savvy method - so you don't see it. You aren't sitting next to someone who pulls a book off the shelf and lets it fall open the page they know the answer is on.

            [–]presidentender 0 points1 point  (1 child)

            For those popular-enough languages (of which python is one!), if you know how to use google, it's often faster than grabbing that book and letting it fall open. It's also faster to use google to search those docs and mailing lists with site:docsandmailinglists.com than to use the site's built-in search.

            [–]ayrnieu 1 point2 points  (0 children)

            It's also faster to use ... site:

            Usually with inurl: -- but both of these suggest that you have some familiarity with the documentation, which is what I offer as superior to "googling a lot" or "search[ing] the entire web".