51

I'm a self-taught programmer. I am honestly not good in math. What advice you can give to improve my Mathematical skills so that I will not be so insecure around my fellow programmers? What are the steps or guidelines that you can recommend to improve my mathematical skills?

Is there a book out there that's the de-facto standard for describing best practices, design methodologies, and other helpful information on mathematics for programmers? What about that book makes it special?

Thomas Owens
  • 79,623
  • 18
  • 192
  • 283
adietan63
  • 735
  • 1
  • 7
  • 9
  • 8
    Do you know geometry? algebra? trigonometry? lineal algebra? calculus? How far in are you? – Marcelo Jun 20 '11 at 14:25
  • @marcelo hernandez | some basics but not that to expert. – adietan63 Jun 20 '11 at 14:39
  • 3
    @adietan63: Suggestions will be speculation only unless you are more specific about your current mathematical knowledge. – David Thornley Jun 20 '11 at 14:44
  • @adietan63 Math can only be improved with practice or applying it, maybe you can embark in a programming project that will put your Math skills to work. – Marcelo Jun 20 '11 at 14:46
  • honestly my math skills is not that sharp(rusty). Can you give me advice what is the first thing to do to improve my math skills? – adietan63 Jun 20 '11 at 14:47
  • @adietan63: Graphics programming will get you into shape quickly. Of course, you will want to start with simple 2D stuff to avoid getting overwhelmed. Simple 2D games will help refresh simple algebra. More interesting functionality such as collision detection, gravity-affected motion, projectiles, can also help get back into it. – FrustratedWithFormsDesigner Jun 20 '11 at 15:09
  • @FrustratedWithFormsDesigner | What programming language is suitable for this kind of application? Is it difficult to learn? – adietan63 Jun 20 '11 at 15:16
  • @adietan63: When I did a lot of that kind of programming, it was in C++ and some C. I've done a little using .NET. Most mainstream languages have graphics libraries and APIs, so pick your favourite language and then see what's available for it! – FrustratedWithFormsDesigner Jun 20 '11 at 15:21
  • @FrustratedWithFormsDesigner Is PHP suitable for hardcore programming? – adietan63 Jun 20 '11 at 15:30
  • @adietan63: I don't know of any PHP graphics libraries, but that doesn't mean they exist. – FrustratedWithFormsDesigner Jun 20 '11 at 15:31
  • 1
    I would use Python with PyGame. If you want to get into 3D without too much trouble, then [Panda3D](http://www.panda3d.org/) by Carnegie Mellon with Disney Studios is very easy to learn. – thorsten müller Jun 20 '11 at 15:34
  • 1
    @FrustratedWithFormsDesigner | Is java is suitable for graphics processing and gamming or its c++? – adietan63 Jun 20 '11 at 15:35
  • @adietan63: Java can be used for this sort of thing. You will probably hear that C++ will perform better and faster, but that is somewhat debatable and if you're learning new techniques, it might be better to at least work with a familiar language. – FrustratedWithFormsDesigner Jun 20 '11 at 15:43
  • @FrustratedWithFormsDesigner | Thank you for your ideas. thank you! :) – adietan63 Jun 20 '11 at 15:47
  • 5
    Would you please tell us some more about how your fellow programmers use math? I'd dispense quite different advice if you're working for a financial firm vs. a programming shop. (If it makes you feel more secure to toss words like "Hilbert space" and "heteroskedasticity" around the office, by all means learn some linear algebra and advanced statistics. Just don't expect to impress the hoi polloi developers.) – rajah9 Jun 20 '11 at 19:43
  • ["The art of computer programming" Donald Knuth](http://www.amazon.com/Computer-Programming-Volumes-1-4A-Boxed/dp/0321751043/ref=dp_ob_title_bk) – Sergey Jun 20 '11 at 15:24

11 Answers11

24

Hmm, from what you say it seems you want to start very basic. Nothing bad about that, I did the same. My math was mostly high school level and a lot of it forgotten.

Start with Khan Academy, go to the practice section and see how far you can get. This will give you a good idea what you can do and where to start learning.

Don't bother watching the videos. At least for me videos are just a slow way to learn and Khan's are extra boring. There are lots of other resources to learn basic maths. Like some of the WikiBooks or ck-12

The question is discussed on Math.StackExchange often enough and searching for 'free resources' or 'free books' will bring you a lot of information and material. Same goes for search terms like 'start' or 'beginner'. Or ask your own question there. That works as well in the /r/math subsection on reddit. There you will find more subreddits, eg for learning maths.

Practice a lot. It's not enough to just understand a concept and then go on to the next. You must feel comfortable to apply it. You won't understand percentages if you are not comfortable with division and multiplication (as an example). That is true for higher concepts too. That's why to me the practice section at Khan is far more valuable than the videos.

As with programming, staying in contact with the community will keep you motivated. Just logging in some forum once in a while and read what people are talking about.

thorsten müller
  • 12,058
  • 4
  • 49
  • 54
  • Thanks man! Your right. I think i need to start from the very basic to understand the wide area of mathematics. – adietan63 Jun 20 '11 at 15:22
  • +100 KhanAcademy is great for strengthening math foundations. There's nothing wrong with starting from the basics. The self-paced learning removes the 'humiliation factor' of not knowing some of the simple math fundamentals. The assessment system does a good job identifying weaknesses and quickly moving beyond weaknesses. – Evan Plaice Jan 28 '14 at 21:12
16

Concrete Mathematics: A Foundation for Computer Science (2nd Edition) would be my choice for a good Math book covering various areas of Mathematics along with having some humor to the book that may be useful.

JB King
  • 16,795
  • 1
  • 40
  • 76
  • Me too read it. A good book. – Ando Jun 20 '11 at 19:11
  • 2
    +1 because it's very good book. Not sure though if it's something for someone who defines himself as "not good in math". – vartec Jun 21 '11 at 09:54
  • It would be great, if rather than merely use word 'obvious' Knuth made some parts more obvious. But with hard work all stuff can be understood, if one has solid math background from school. – gruszczy Jun 21 '11 at 10:28
  • 8
    Be warned, this book is definitely not for beginners. – MAK Jun 21 '11 at 18:09
  • 2
    The trick is to actually read it. I kept finding myself wanting to skim it like a manual or a website. That doesn't work. Word or concept unexplained? You'll find it if you go far enough back. Slow going for me (never finished calculus - but more for being a slacker than bad at math), but a good recommendation IMO. They explain things well. Just be patient and take your time. – Erik Reppen Oct 31 '13 at 00:08
10

Paul's Online Notes from Lamar University comes in PDF Format. It's very good for quick referencing and there are examples on every page. If I ever wanted to refresh myself on a topic or grasp something, I tend to come back to this site.

Here is the set:

Algebra (Math 1314): Full Notes
Listing of contents

  • Preliminaries - Exponent Properties, Rational Exponents, Negative Exponents, Radicals, Polynomials, Factoring, Rational Expressions, Complex Numbers
  • Solving Equations and Inequalities - Linear Equations, Quadratic Equations, Completing the Square, Quadratic Formula, Applications of Linear and Quadratic Equations, Reducible to Quadratic Form, Equations with Radicals, Linear Inequalities, Polynomial & Rational Inequalities, Absolute Value Equations & Inequalities.
  • Graphing and Functions - Graphing Lines, Circles, and Piecewise Functions, Function Definition, Function Notation, Function Composition, Inverse Functions.
  • Common Graphs - Parabolas, Ellipses, Hyperbolas, Absolute Value, Square Root, Constant Function, Rational Functions, Shifts, Reflections, Symmetry.
  • Polynomial Functions - Dividing Polynomials, Zeroes/Roots of Polynomials, Finding Zeroes of Polynomials, Graphing Polynomials, Partial Fractions.
  • Exponential and Logarithm Functions - Exponential Functions, Logarithm Functions, Solving Exponential Functions, Solving Logarithm Functions, Applications.
  • Systems of Equations - Substitution Method, Elimination Method, Augmented Matrix, Nonlinear Systems.

Calculus I (Math 2413): separated into

  1. Listing of contents
  2. Notes
  3. Practice Problems
  4. Solutions to Practice Problems
  5. Assignment Problems

    • Algebra/Trig Review - Trig Functions and Equations, Exponential Functions and Equations, Logarithm Functions and Equations.
    • Limits - Concepts, Definition, Computing, One-Sided Limits, Continuity, Limits Involving Infinity, L'Hospitals Rule
    • Derivatives - Definition, Interpretations, Derivative Formulas, Power Rule, Product Rule, Quotient Rule, Chain Rule, Higher Order Derivatives, Implicit Differentiation, Logarithmic Differentiation, Derivatives of Trig Functions, Exponential Functions, Logarithm Functions, Inverse Trig Functions, and Hyperbolic Trig Functions.
    • Applications of Derivatives - Related Rates, Critical Points, Minimum and Maximum Values, Increasing/Decreasing Functions, Inflection Points, Concavity, Optimization
    • Integration - Definition, Indefinite Integrals, Definite Integrals, Substitution Rule, Evaluating Definite Integrals, Fundamental Theorem of Calculus
    • Applications of Integrals - Average Function Value, Area Between Curves, Solids of Revolution, Work.

Calculus II (Math 2414) Full Notes

Calculus III (Math 2415) Full Notes

Linear Algebra (Math 2318) Full Notes

Differential Equations (Math 3301) Full Notes

You can check the site for the rest of the topic listings.

phwd
  • 458
  • 3
  • 17
8

I realize this isn't a book, but I think it might be a good way to broaden your thinking about mathematics. Try working through the Project Euler problems.

For example, the first one is:

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

Peter K.
  • 3,828
  • 1
  • 23
  • 34
  • Project Euler questions are for sure math based but the problem I had with them was they got so advanced so quickly that the only way I was able to solve them was with brute force algorithms (unless I cheated). They say that you should be able to find an elegant solution that runs in under 60 seconds for all the questions. – Mike Jun 20 '11 at 14:43
  • @Mike: I agree they get hard. That's part of my point: even the brute-force approaches took my thinking outside the normal run of programming. – Peter K. Jun 20 '11 at 14:59
  • 4
    @Mike, I don't think researching similar problems and trying to understand the underlying concepts well enough to attack the problem is cheating. You're learning more by "cheating" this way then not doing all that research. – Doug T. Jun 20 '11 at 15:37
  • 1
    I did many of them and it enhanced my programming skills. Though regarding to math itself you mostly learn a lot of neat tricks but don't add much to fundamental knowledge like Calculus or Algebra. But it adds to you motivation doing math. – thorsten müller Jun 20 '11 at 15:40
  • 1
    @thorsten: my wife (the mathematician in the family) thinks that mathematics is ONLY a bunch of neat tricks. :-) – Peter K. Jun 20 '11 at 21:42
  • 1
    The way I usually go through Euler problems is that first I usually try a brute force, and optimize it. That alone has taught a lot of mathematical facts I never knew. Reading the solution forums afterwards usually nets even more mathematical insights. – System Down Jun 20 '11 at 22:29
  • The only problem with trying to 'learn' math using project Euler is, a lot of optimal answers are based on well known algorithms learned in higher-level math courses. For instance, anything that involves calculating primes can be optimized using an Eratosthenes Sieve. It's great for discovering new algorithms and thinking about managing complexity but not very useful for foundational math. – Evan Plaice Jan 28 '14 at 20:15
8

I always recommend Kenneth Rosen's Discrete Mathematics and Its Applications. It covers a lot of different topics (as any good Discrete Math book will) with a good balance of theory and application. It also has many interesting sidebars on the mathematicians and computer scientists who originated the concepts covered.

Bill the Lizard
  • 8,408
  • 9
  • 41
  • 92
  • Thanks! but what are the Prerequisites before studying discrete Mathematics etc. – adietan63 Jun 20 '11 at 14:49
  • 1
    @adietan63: Algebra is all that I'd say is *required*. My university let us take Discrete Math before either Calculus or Stats, but it certainly wouldn't hurt to take those first. – Bill the Lizard Jun 20 '11 at 14:52
  • @adietan63: You might also want to check out some of the [Head First](http://www.amazon.com/Head-First-Algebra-Learners-Guide/dp/0596514867) math books if you need a refresher, or watch some free online video lectures. – Bill the Lizard Jun 20 '11 at 14:58
  • @Bill Thank you! Maybe I feel pressured in learning this stuff because I want to learn many things in programming in a short period of time. Maybe I will take it one at a time. I think that this is part of learning process. thanks again! – adietan63 Jun 20 '11 at 15:02
  • 7
    You're welcome. Also, that feeling of "I want to learn many things in programming in a short period of time" never really goes away. :) – Bill the Lizard Jun 20 '11 at 15:05
  • See also http://stackoverflow.com/questions/2154055 – BlueRaja - Danny Pflughoeft Jun 20 '11 at 16:19
  • Just a warning - it's a critically important area of mathematics to learn and I've used this book myself, it's also a tough area to wrap your head around sometimes. At least it was for me. – kinakuta Jun 20 '11 at 16:37
  • This was my university's textbook for two quarters of Discrete Mathematics. The only pre-req for those courses was two quarters of calculus (but, IMO, it really wasn't needed for most of the topics). – Thomas Owens Dec 13 '11 at 20:29
  • @ThomasOwens I didn't think calculus would have helped much either. Probability/Stats probably would have been a good pre-req though. – Bill the Lizard Dec 15 '11 at 17:09
4

While reading a 1000 discrete math book is a good solution, it might not be the optimal path if time is a constraint. If you want to have a flavor of how much math should you have with out going to deep, take a look in to the appendix A of the introduction of (cormen) Algorithm book: http://www.acmsolver.org/books/Introduction%20to%20Algorithms,%202nd%20Ed%20-%20Thomas%20H.%20Cormen.pdf

I read the appendix and it gave me a better grasp on what math topics should I review more. Once you know what to expect, take a look on:

http://www.amazon.com/Journey-into-Mathematics-Introduction-Proofs/dp/0486453065/ref=sr_1_15?ie=UTF8&qid=1308591694&sr=8-15 enter image description here

In my opinion, learning how to proof (especially by induction) is a cornerstone on understanding the analysis algorithms. Unfortunately, most algorithms and even CS math courses don't focus too much on proof. they already assume that your are a competent on it, so they don't go beyond a few pages. The Journey into math book is very small and easy to read. It uses CS problems and their mathematical aspect as well. Other good topics to learn is matrix arithmetic, probability, counting, and graph theory as well.

The other two popular big textbooks: Discrete Math and its application from EPP (my favorite) and the other one from Rosen.

http://www.amazon.com/Discrete-Mathematics-Applications-Susanna-Epp/dp/0534359450/ref=sr_1_4?ie=UTF8&qid=1308591784&sr=8-4

http://www.amazon.com/Discrete-Mathematics-Applications-Kenneth-Rosen/dp/0073229725/ref=sr_1_1?ie=UTF8&qid=1308591784&sr=8-1

I haven't got the pleasure of reading the textbook titled "Concrete Mathematics" but I always heard good things about it.

Armando
  • 1,746
  • 1
  • 10
  • 19
1

Frankly, you can be a perfectly adequate programmer in a lot of fields without a fundamentally very strong knowledge of mathematics. You may not be very capable when it comes to game engines or network routing optimization, but truth be told, lots of business applications are fairly simple. However, I would encourage you to keep hope alive and not yet give up on the math.

There's a world of difference between the math you take at a lower level and the math you take at a higher level. It's a very different thing to say that you're bad at Calculus (I was - I failed Calc I the first time I took it) than it is to say that you're bad at Graph Theory. As you advance through mathematics, the focus is not on simple problem solving that is frankly fairly boring and repetitive and might as well be done by your graphing calculator. Instead, the focus is on logical thinking skills: constructing proofs is frankly a lot like writing software.

The best math class I ever had was what I considered to be my first "real" math class: basically an introduction to proofs class that covered a range of areas from Graph Theory to Number Theory. The text we used was great (Mathematical Thinking: Problem Solving and Proofs by D'Angelo and West.) You may find it useful just to work through that book to get some ideas of attacking proofs.

Overall, did I really need any of the math I took in college? No, probably not. But having some formal background gave me better critical thinking skills, a better imagination (there are typically many ways to solve a problem, sometimes good, sometimes bad, but a unique idea can be helpful) and confidence in problem solving.

Edward Thomson
  • 250
  • 1
  • 7
  • | Thanks man! I think even if Math cant help you all the time. Maybe its presence will help you in critical thinking and improve your analytical skills? – adietan63 Jun 21 '11 at 03:00
  • Frankly, I think you like the word "frankly." – bukzor Dec 16 '13 at 00:06
1

Look, I'm good at maths, but I really do not use it at all for programming, and I do program quite a lot. My advise would simply to get used to not know enough and have someone do the math for you.

There are so many things to know, you can't expect to be good at all of them, but maths in particular, it's not very useful.

Of course, you may need it because your programs are scientific something, otherwise use that time to learn something more useful.

Ando
  • 1,071
  • 6
  • 15
  • 2
    Disagree, good programming skills are related to good math skills. – Marcelo Jun 20 '11 at 19:25
  • 1
    Well, I reckon that you can disagree. I think that disagreement is a right, but if that makes you feel authorized to downvote my contribution, that is really risky. – Ando Jun 20 '11 at 19:34
  • Privileges - vote down - requires 125 reputation; you have already earned this privilege. – Marcelo Jun 20 '11 at 19:44
  • 1
    Upvoted because I agree, that you don't **need** maths to become a good programmer in many areas. Though I heavily disagree that maths is not very useful. Even if you don't need maths in your daily work, you gain a lot from learning certain aspects of math and if it's only as much to understand big-O notation. – thorsten müller Jun 20 '11 at 23:31
1

Looking at the course notes of some of the (beginner) courses from the "Logic & Computation" section of ESSLLI (as an example, the upcoming 2011 program or the 2010 program, search for more) can be interesting. It will give you an impression about the current theoretical developments in the field related to programming. Then you can decide to study deeper the foundations in a certain subfield touched in those courses.

(Otherwise, it's difficult to answer your question, there is so much different "mathematics", which you might not really need or be interested in. One reason why the ESSLLI courses can turn out to be interesting for us is because they reflect some current research, so they are about solving certain puzzles; and trying to solve a certain puzzle is an important component in the process of a real understanding of a theory, of understanding what is the interesting thing behind it.)

1

If you are studying CS maths properly then you are looking at things like mathematical logic and set theory. These are have some fairly involved maths supporting them. Therefore if your basic level of mathematics is a bit ropey then you are best of starting with the fundamentals, before moving onto the more CS related areas.

Therefore I would suggest that you start with K.A. Stroud's Engineering Mathematics. Well written, easy to follow and covers the basics as well as more advanced stuff.

Matthieu
  • 4,559
  • 2
  • 35
  • 37
CdMnky
  • 91
  • 3
1

Start with the fundamentals and then move on to the specialized: Mathematician's Delight and How to solve it are two great books to start. Mathematician's Delight approaches fundamental math topics (eg. Geometry, algebra, calculus, etc.) in a human-friendly and amusing manner. I haven't read How to solve it yet but it focuses on how to attack math problems by reasoning.

sakisk
  • 3,377
  • 2
  • 24
  • 24