views:

324

answers:

9

I read a lot of blogs and forum posts about mathematics in programming and made a conclusion for myself that basic mathematics is needed in programming. I'm not a good mathematician. But is it somehow possible to improve my logical and algorithmical thinking without going deep into math science? Are there any excercises or some books that could help me to improve these skills so that I could become an good architect? Thank you in advance.

+6  A: 

http://en.wikipedia.org/wiki/Concrete_Mathematics <-- Written specially for you by Donald Knuth!

Radomir Dopieralski
+3  A: 

You might be interested in Project Euler for exercises.

Here's an interesting article, if you haven't seen it already, that discusses learning math via Wikipedia:

http://steve-yegge.blogspot.com/2006/03/math-for-programmers.html

Ian Henry
+6  A: 

Work through Project Euler.

The beginning of CLRS Algorithms has a bit on number theory, discrete math, combinatorics, probability, graph theory, and other really useful stuff. It's teaching exactly what is applicable to algorithms, and skipping everything else.

Dean J
A: 

theres a lot of types of programming. If you're designing wireless compression algorithms you'll probably want a masters degree in engineering. If you're making an online color-picker, you'll be fine with high school trig.

Dustin Getz
+3  A: 

Great suggestions above - to put some of this in context, there's a great project to reform math education in high school. It might help you understand some of the frustrations of learning math and how to overcome those difficulties.

Remember - much of math education is to exercise your ability to think abstractly and to solve problems. Both of these skills take practice and sometimes, even though you may not see the direct connection between the problems and so-called "real life", there's always something to learn and practice by working out the problems.

Grembo
+1  A: 

The emphasis on what constitutes "Discrete Mathematics" in Computer Science undergraduate curriculums has shifted in the past forty years. It used to be that such courses would cover material such as abstract algebra and go into concepts such as 'sorts' and 'kinds', which is useful for algebraic specification of programs. If that is the sort of math you think you will enjoy, then buy an old book on Discrete Maths, like this one: Discrete Mathematics in Computer Science (1977) $5 shipped!

I don't believe the ridiculously expensive Susanna Epps book contains similar material, and should know, since that hideously overpriced book is what I had to use in my freshman Discrete Maths class (2003) -- I can't believe the price has almost doubled since its outrageous price even then!

+2  A: 

But is it somehow possible to improve my logical and algorithmical thinking without going deep into math science?

But logic and problem solving is the basis of mathematics.

I suspect the real problem is with how mathematics is taught, and what you (and your previous teachers) think mathematics is. I'd recommend A Mathematician's Lament, for a better explanation of what mathematics is, versus what we are normally taught is mathematics.

Are there any excercises or some books that could help me to improve these skills so that I could become an good architect?

Yes, others have given you a better list of suggestions than I could, but the basic idea is yes you can learn to be better at mathematics, in particular the mathematics that most commonly pertains to Computer Science and programming.

I'm assuming you mean a software architect, because traditional architecture, like engineering, has a firm foundation in applied mathematics. Anyhow, good software architect need to be comfortable enough to do informal problem and algorithmic analysis, which does require a mathematical basis.

I would normally say if you could learn equivalent to the typical first year university mathematics requirements for a computer science degree (i.e. first year of calculus, discrete math(s) or linear algebra), it would go a long way to make you a better Computer Scientist, and better programmer or architect. It is not impossible without, but it can make you be better at your job (quicker to evaluate or solve problems correctly, efficiently and effectively).

Good luck.

mctylr
Yes, exactly. I meant software architect.
Azat
A: 

You don't need to know calculus to be able to program. Computer programming is composed of very simple math operations, just addition, subtraction, multiplication, decimal rounding, and even long division (4th grade math comes in handy).

Counters are extremely useful; you need to know how to start at zero and count up. Simple. Most languages are zero based meaning that start with zero instead of starting with one. Many learners forget that. Increment and preincrement (for example, i++ and ++i) increase the variable i by one after or before using the variable in the statement.

Logical operators are huge in programming. Less than and greater than are used frequently to test for a certain value and stay within proper limits. You need to realize that i < 5 is the same as 5 > i but they calculate to either true or false. When used like so: if (i < 5) ... when i = 4, then it is equivalent to if (true) ...

Likewise the AND, OR, and NOT operators are important for boolean testing. You may want to know if (i < 5 && i >= 0) ... which means if i is less than five AND i is greater than or equal to 0. NOT (!) and OR (||) act in a similar way.

Some languages require you to differentiate between integers and decimals (or floating point numbers). Integer mathematics makes use of rounding in ways that is different for each language. Decimal numbers have different issues with accuracy as operations become more complex.

Some advanced techniques involve the modulus operation (%). All that does is take the remainder of dividing two numbers. It is useful for distinguishing between even and odd numbers (e.g. rows in a table).

More general information on basics of computer programming including control structures and operators: http://computerprogramming.suite101.com/

js1568
+2  A: 

I'd say that the math you need depends on the problems you're asked to solve.

The problems you're asked to solve depend on the math skills you have.

Anyone who says you only need 4th grade math is also telling you that you cannot reasonably expect to have a chance to solve more challenging problems.

I would point out that computers have changed mathematics and applications. My engineering education consisted of a lot of calculus and closed-form solutions using pencil and paper.

My first career meant applying discrete, numerical analogs to those techniques on computers.

If you want to do that kind of work, it's best to learn a lot about numerical methods and linear algebra.

Google's Page Rank was a $25B eigenvalue problem when this paper was published. Google's market cap is $144B today.

Computer graphics are very mathematically intensive. If you like graphics, better learn matricies well.

Statistics are terribly important, especially when you have oceans of data available to you on the web. Learn R and basic statistics cold.

Read something like "Programming Collective Intelligence" to see what kinds of novel problems will require some sophisticated math.

If you want to solve those kinds of problems, best to get busy.

duffymo