Forum Moderators: mack
Do you ever need advanced statistical stuff (regression, clustering, decision trees,...) for algorithms you code?
thanks!
(P.S.: I'm not scared of maths :-), it's more a curiosity thing)
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.
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.
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 ;)
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!
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.
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. :-(
@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
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.