Hey everyone,

I'm just wondering what level and type of maths are needed in solving programming problems. I was looking at maths courses the other day but I was unsure which one would suit my need as I'm an IT guy.

Can anyone suggest something? I want to be able to program in Java and solve problems quickly. So I want something to help me with my programming logic.


Recommended Answers

All 23 Replies

hmmm ...
well, my knowledge of Math s*cks (to say the least).
Off course, having a background in Math will make it a lot easier to quickly learn some things, understand certain patterns and behaviour, ... but not being an A-grade math student doesn't mean you can't learn Java programming or have a carreer in software development (living proof right here).

Naturally, it depends on the kind of software you are writing, so you should also take a look at your situation: if you are going to write code for a company that wants every possible calculation done on their numbers with the least possible overhead, well, a rock-solid knowledge of Math might be recommended there.

Unless the applications are math-based you need very little math to work in Java. Basically just arithmetic and logic. Very little algebra, no geometry, no calculus.

Thanks folks for passing by and commenting on this thread.

@James.. I know this question might sound a little strange, but I'd like to know. How can programming logic be improved? Reading books? Keep practising?

there are ton's of ways logic can be improved
keep separate jobs in (re-)usable methods, don't write ten lines of code if you can write it in one line (and I 'm not talking about chaining of statements :) )

and, of course, just like a carpenter: choose the right tools for the job.
if you need to work with numerical values, take a look at what kind of value they should be able to process, do you have to be able to work with decimal numbers, ...

for instance, there are big differences in using an int (primitive type integer) or an Integer ( object Integer) or a BigDecimal.

the more you practice makes perfect, they say, so programming won't hurt getting better, also reading books can help you improve your knowledge, and it will help even more if you actually try the techniques you learn therein, not just with the example code you find in the book, but in smaller applications you come up with yourself and create from scratch.


I think the best way to improve logic is doing it a lot. Keep making problems and solving problems, and you will find that the things you had problems with before, will be very easy.
In my opinion books won't help, unless you don't understand a basic concept of programming logic.

I agree with hiddepolen.

Member Avatar

You can learn a lot from reading other people's code examples.
You can learn a better way to do something,
or you can learn how NOT to do something.
Practice with projects of your own.
Be fussy with how you want things to look and run.
At the same time; keep it simple, organized, and easy to maintain,

What branch of maths would be more useful for an IT guy who is majoring in database system? I ain't good at maths but I'd like to improve my mathematical knowledge.

It matters what kind of databases, and what math is connected to it. Mostly logic I'd say, just like any programming you will ever do.

I think Predicate Logic would be useful especially when dealing with databases and technologies that let you query inside code.

Yes, Databases do make sense to me and I love working with them. But, I want to learn a little bit of maths that will help me with programming(especially Java)..

what kind of applications will you develop?
for a lot op applications having a better insight in maths will not necessarily make you a better programmer.

I want to develop desktop applications in java.

well, let me chip in my two cents.

The math I think you need for the kind of skills I think you want is called Discreet Math. You learn there predicate calculus as thines mentioned. In addition you will learn some graph theory and combinatorics there. This, I believe, would help you in organizing your classes and building your UMLs. This would also give you insight in how to normalize your databases better. Of course, you'd always have to create problems and then solve them if you're to learn.

Not an expert here, just an answer I came up with for my questions.

normalizing your tables can be done following Codd's steps.
will your application actually be doing mathematical stuff? will you implement any heavy math-based logic?

@ bibiki... I did a course on discrete maths and thought,while doing it, the mathematical inductions introduced in the course were kindda useless. But then I realised that proving things is also done in many fields like IT, Business and engineering to name a few.

How are predicate statements used in programming languages? I don't think I'll struggle too much in discrete maths if I go back to it and revise a bit what I studied.

well see, predicate calculus and set operations are the same thing basically. now, when you need to to perform complex if tests that involve more than evaluation of a single boolean variable, knowledge of predicate calculus/set operations will come in handy allowing you to come up with ways to reduce the amount of code you have to write.

In discreet math they teach you how to simplify a complex predicate expression.

As an example, think of this: you have a form that you use to take input. You want to validate input based on: is it mandatory, or is not? is it numeric only, is it not? is it string, is it not? is it a mix of numbers and alphabetic characters, is it not? you'd have to evaluate a String input against 4 conditions, and you'd want to do this with as little code as possible. first time around, you may do it with lots of code, then when you rewrite your code, you can apply your knowledge of predicate calculus to come up with a shorter way to do it.

BUT, I don't think you really need to complicate things. You can build many applications without knowing much math, as stultuske said. plus, you can hone your skills for organizing code and normalizing databases without knowing any discreet math. but since you asked what math would help you in programming, then Discreet Math and Abstract Algebra, which is pain.. for most people, are two math courses that may facilitate construction of complex software, if you want to build complex software.

Relational Algebra sounds like fun! it's also used in relational DBs.

Thanks guys for your comments/advice. All appreciated.

How are predicate statements used in programming languages?

To us, they look like "where" clauses.

Wow. I never realised that.

Member Avatar

I'm a Professional Database Developer (Oracle).
Math is NOT a requirement for database development.
In fact, desktop applications are what I do the LEAST.
You spend more time on coding programs in the database.

But still. The only math that you REALLY require is basic math.
If there are more complex equations that you may have to code,
whoever is assigning the task (your Team Lead) will have already have the equations for you.

Oh... It might be good to understand how to add and subtract TIME.

@hfx642, I guarantee you've been applying upper-level mathematical concepts and you might not even know it (like predicate logic).

[slightly different note]
A lot of students have problems with "functions" in math, but find they have no problem with "functions" in programming.
I can say programming helped me with MATH more than math helped me with programming.

I would like to add two things:
one, Edgar Codd was a mathematician. He invented what we call relational databases today. He could not convince even IBM for the benefit of his ideas because even IBM could not see the math in it, I guess.

then, I know many people that hate anything that involves as much math as addition and subtraction if you call it math, but they are way to good in adding and subtracting in practical life.

kind regards.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.