homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

How important are maths?

 4:50 pm on Apr 1, 2008 (gmt 0)

How complicated does the maths one needs in order to code dynamic websites get? I just read something about a very successful programmer in game development who said he was rather bad at maths in school. Apparently logical thinking and problem solving seem to be big in coding, but how important are pure maths in web development (or coding in general for that matter)?

Do you ever need advanced statistical stuff (regression, clustering, decision trees,...) for algorithms you code?


(P.S.: I'm not scared of maths :-), it's more a curiosity thing)



 5:14 pm on Apr 1, 2008 (gmt 0)

It really depends on the type of coding you're doing.

I don't use anything complicated on the front end, but use some slightly more complex math on the backend for stats and looking for trends to focus on.

If you're doing a lot of DB work, set theory would probably be helpful, but I'm not sure how advanced you'd need to go.

Logical thinking and problem solving are definitely critical.


 5:16 pm on Apr 1, 2008 (gmt 0)

I think a good understanding of math makes for good code.

Yes you can code without knowledge of math but doing advanced algorithms usually involves some advanced math stuff but you don't have to know it, just be apt at understanding when you need it.

A simple example....

When I was in school we had to do a calculator project, we had to custom code a calculator in a java applet to run on the web.

One guy in my class kept swearing and getting pissed off. We asked him what his issue was and he was having an issue creating a positive/negative button that would toggle the value to positive or negative.

He was doing some wacky int to string conversion to check for a '-' then would try to parse it out or add one then convert back to an integer. It was ugly.

I asked him what would you do in math to make a number negative or positive without changing the number value and he looked at me like I was asking advanced math...

All he needed to do was multiply the value by -1 and that would toggle the positive/negative value without caring what the current value is positive or negative, because if you know math you know that multiplying by 1 won't change the number value but multiplying by -1 will make it negative if it is positive and vice versa.

I can think of lots of other examples where code is better because of a good understanding of math. His method would have worked but as far as good code goes not so much.

Just look at "bubble sort" vs "selection sort" algos.. math makes a difference.


 5:19 pm on Apr 1, 2008 (gmt 0)

Game programmers will likely run into it more often than standard application development but yes, sooner or later you are probably going to be doing some math. The best part is, you can get your math from a mathematician if necessary. For example, when I first set out to code a "dealer locater" based on United States zip code (latitude and longitude), I found a theory and formula from a man that worked for NASA. I asked him if it was OK for me to use his formula in my code and upon granting me the go-ahead I merely translated his formula into code.

Don't let the math be too intimidating to you. I would say logic is going to play a much larger part in your coding than math. Now, if you are lacking in the logic department, that's a whole new ballgame ;)


 5:27 pm on Apr 1, 2008 (gmt 0)

All he needed to do was multiply the value by -1 ...

Hoo-boy, if this is considered "complicated math"... :)

[edited by: LifeinAsia at 5:28 pm (utc) on April 1, 2008]


 5:42 pm on Apr 1, 2008 (gmt 0)

First of all thanks for the replies!

Hehe the * (-1) really was complicated math :-) but I think I get your point.

@coopster: Actually I don't find maths intimidating. Actually I kind of like it - as long as it doesn't get overly theoretical (that's the kind of stuff I don't like!)..so I was mostly wondering whether one would almost have to have a PhD in maths to be a great developer or whether being plain "good" at maths was enough to become a good developer.

How about statistical stuff such as regression, clustering, etc. though? I'm majoring in business (want to go into e-commerce) and my two statistics classes were my favorite classes (lol). Is that ever needed for algorithms or not really? (just curious!)

thanks again!


 11:09 pm on Apr 1, 2008 (gmt 0)

Do you ever need advanced statistical stuff (regression, clustering, decision trees,...) for algorithms you code?

Understanding the advanced statistical stuff might be a big help when you are designing a database driven site where the amount of data can grow huge. Understanding how the data can be sorted and organized, which queries will be used in most cases and which paths through the data give the fastest results may make the difference between a turtle site or a cheetah.


 2:51 pm on Apr 2, 2008 (gmt 0)

I, too, was paying more attention to the locks of golden hair in from of me than the math lessons. :-) I really regret it now. It does become important, but as said, you can figure out what you've forgotten in math, it's just regretful you should have to. Should have been paying better attention, it turns out there really **was** a use for math in the real world.

Shipping calculations that consider volume and final dimensions of a package for multiple items, that one kept me kicking myself in the pants for a month or so. :-(


 4:29 pm on Apr 2, 2008 (gmt 0)

Hi lammert & rocknbil,

@lammert: I think this is one of the things where I have to think to myself "it (statistical techniques) might be of some help at some point, but my time is probably better spent on learning the things I need to know - and if I learn other algorithms that are frequently used for programming, etc. that should keep my mind fresh when it comes to these things, so I won't have a big problem if I ever have to (or feel) like learning stats".

However, are decision tree algorithms such as CHAID (frequently used in database marketing, I think) not used in programming? Aren't decision tree algorithms used in coding a lot (or is it just that CHAID is never used :-))?

@rocknbil: Actually, I feel about it exactly the same way..I was never interested much in maths, but if I'd go to school once again, it would be one of the select few subjects I'd try to be good at and learn something I can actually use later hehe


 9:51 am on Apr 3, 2008 (gmt 0)

In over 25 years in IT I have never needed anything more complicated than basic algebra but that has been essential.

In my previous job I set a simple apptitude test:

Write 1 + 2 * 3 in two ways to get the answers 7 and 9

Anybody who could manage that was capable of learning SQL. I had never thought it necesary until I was given a trainee who really couldn't understand why 1+(2*3) and (1+2)*3 were different. He quit fairly rapidly.


 10:01 am on Apr 3, 2008 (gmt 0)

Hehe, I was looking at it and thinking I need to find 2 ways for each solution and was already wondering whether this was one of those outside-the-box thinking tests lol:


1 + (2*3)
(2*3) + 1


(1+2) * 3
3 * (1+2)


 11:50 am on Apr 3, 2008 (gmt 0)

No, two formulae in total not two for each solution.


 6:52 pm on Apr 3, 2008 (gmt 0)

hehe, yes I understood it after I looked at the solution and read the question again.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved