How important is Maths for Programming

You're bowing out without providing any kind of counter evidence?

You seem to think I'm arguing with you. I'm not. My only position has been that it isn't true that speed/efficiency hasn't mattered for ten years. I am interested in stats that show the breakdown of programming manhours to target platforms (not languages). Your stats don't do that.
 
You asked for stats, I gave some that show more is happening in the non-performant world, and then you provided an anecdotal quip that, be honest, is nothing more than a straw man argument, in response and it deteriorated from there. :p

You brought up the ten year thing but I have no idea why.

My original reply about "resource creativity" was actually at Judgeneo, who was the one implying it is the norm to be concerned with such optimisations, anyway. So this discussion between us has been a waste of time all along. :o
 
You asked for stats, I gave some that show more is happening in the non-performant world, and then you provided an anecdotal quip that, be honest, is nothing more than a straw man argument, in response and it deteriorated from there. :p

It isn't a strawman argument because I wasn't arguing against your point at all, let alone by reframing your position. I agree that fewer programmers *have* to care about code efficiency but those stackoverflow stats do not, imo, conclusively prove it.

You brought up the ten year thing but I have no idea why.

The ten years thing was something that Tephnos said (post #98).

So this discussion between us has been a waste of time all along. :o

Isn't that what GD is for ? :D
 
They also don't concisely prove that my aunt is not called Susan. (She's not, fyi). The only thing that ever could concisely prove it is if we were to objectively count the occurrences of such incidents that has ever happened anywhere. Ever. I.e. impossible to do so.

What we can take from it is that due to their being more discussion in areas that do not concern performance that it is fair to assume that performance (to the nth degree along the lines of those in this thread) is not as wide spread a concern as some are making out.

The ten year thing, at face value, is just akin to "ages" to me. (I didn't spot that post before as I was looking out for 'ten' and not 'decade' :p) Which I agree with.

Since the publication of linked lists and the like (and the more powerful compilers, VMs/CLRs etc. that coincidentally came around the same time as them) the concern for performance has dropped massively. Never gone - I don't claim nobody cares, obviously some do (source: this thread :p) but the days of designing your own sorting or searching algorithm and the like (as claimed by D.P.) are pretty gone for an overwhelming majority of developers. More and more so as tech has advanced, resulting in the differences in results made to smaller and smaller gains, on top of all that. Much like nearly all Java and C# developers don't ever use malloc().

But this is all aside from the point. The OP asks about Maths. I'd argue a lot of the examples are also fixed by common bloody sense. If someone needs to sort a list of millions upon millions of things, I first want to know why they have all that info in memory and not in a managed environment like a DBMS, where the algorithm used is abstracted away from the developer of the application, anyway. Next if I see them sorting that same list in the same way every time they need something from it, they need a slap to wake up. etc.
 
Last edited:
I suspect the Java virtual machine relies very heavily on malloc, but would agree that the application code is at a rather higher abstraction. If you're going to continue posting sensible things it'll be difficult to keep an argument going!

If someone needs to sort a list of millions upon millions of things, I first want to know why they have all that info in memory and not in a managed environment like a DBMS, where the algorithm used is abstracted away from the developer of the application, anyway. Next if I see them sorting that same list in the same way every time they need something from it, they need a slap to wake up. etc.

I think I have an example from the happy world of maths. One of the approaches for solving systems of differential equations is discretisation across a cloud of points. One of the more expensive steps in solving the resulting set of equations is working out which points are sufficiently nearby to affect one another.

Maintaining a sorted list of the points would help efficiently determine which points are near one another - but the list would need to be resorted whenever the points have moved. That could be a terabyte or so of data distributed across a cluster, where access latency is important and the data is transient. Not a good place for a database, no obvious way to avoid resorting, and considerable complexity in determining how to sort the data.

I hope there are better approaches to the above than sorting, but it would be sorting lots of data in a way where neither databases nor the STL are of any use :)

edit: the weird example is roughly what I'm trying to find an alternative to (I don't want to sort the data) and not especially likely to be useful to the OP
 
Last edited:
edit: the weird example is roughly what I'm trying to find an alternative to (I don't want to sort the data) and not especially likely to be useful to the OP

You need to use the recursive implementation of subtractive clustering (Angelov, Filev et al). It works efficiently in one to many dimensions and can be used with different distance measures. It is patented, though.
 
Exactly. The real world works on time and budgets. You simply do NOT have the time to make sure your code runs as fast as it can be. A competent programmer can write code that is reasonably fast, and that's all that matters.

Are you the type of person who would write Roller Coaster Tycoon 3 in Assembly, just so it'll run extremely fast, D.P? Because you're increasingly giving off the perception in this thread that you're a bit of a smarty-pants type, thinking the most complicated solution is always the better one (which it is not.) In a normal job you can't AFFORD to spend time writing your own solution if one already exists.

By the way, you don't need to know math to use hashmaps. If you honestly have to provide your own hashtag function to use them then your library sucks. Also, you shouldn't be using any of that for an address book. You should be using an SQL databse - which does the math for you.



Who said anything about making code run as fast as it can. You only ever have to make code run as fast as it needs to run for the application and intended platform. if you re running on an embedded platform with highly constrained resources then it is likely you will spend more time in generating faster code, if you are creating code for real time graphics/games , high frequency trading, safety systems, control system etc then you have to operate at real time speeds. Conversely if the CPU costs are very high such as a climate simulation that might run on thousands of cores for months at a time making the code run faster can save huge amount of time and money.


But all of that is besides the point. No want wants a sluggish application that is complete CPU or memory hog when some very simple steps during developing can ensure effective and more maintainable code, such as choosing the correct type of container.

You seem to think I am talking about micro optimizations or creating your own data structures for some reason? I'm just talking about bread and butter programing in whatever language you want, this could be python for all I care, it is all the same, you always have a choice of representations and algorithms.

i go back to my example, someone wants to make an address book, a simple app that will map peoples names to their house address. The programmer has a choice of data structure to employ with different trade offs, even if they never have to program the underlying container in their life. If they were programming inn Java they can pick a list, or a vector, or a set or a map, or a hasptable etc, etc. They all behave differently and have different pros and cons, the best data structure needs to be selected ona case by case basis.

Why the heck would you want to use a whole frigging SQl database for something as simple as a little address book app? Do you honestly think that something like Apple Contacts on an iphone requires an entire SQL database? You clearly don't live in the real world if you think that is how all applications are developed. :rolleyes:
 
All this guff about speed is only true if you are programming for a PC or phone platform. Small hardware platforms with limited cycles, memory, and possibly power require you to be very creative with the available resources. In these cases you may not have libraries available, either.

Even for the PC it is true. If you want your PC to be doing something as highly exotic as playing a computer game then speed is critically important. Going by some of the people here they would be happy playing a game with one frame every 10 seconds, instead of 60FPS.
 
Quick example: stackoverflow.com tags. The most popular is Java, followed by C#, then Javascript, then PHP. Android makes an appearance in 5th. That's the first tag that resembles the "problems" described, but I'll be damned if anywhere near a majority of developers care about optimisation as much as is being made out here. Infact just looking at my battery usage from various apps I can tell already they don't. Plus it's Java.

The top four tags are all for less than optimal performing languages. C++ is the first that shows up (in 9th) that you can categorically argue is a language that demands developers code for performance. You'd think if it were nearer the norm it wouldn't have only 1/16th of the topic share of the top 10.

StackOverlfow tags are utterly meaningless.

Who is to say that people programming java are too stupid to think about what data structure or algorithm they might need and instead pluck something out of their arse?

Your assertion is blatantly wrong:
http://stackoverflow.com/search?q=Java+Optimization
 
This just in: different sub-fields of software development may require more or less maths!

And as has been pointed out on numerous occasions, even fields where maths is seemingly less important it tends to turn up all the time, even when you least suspect it.

I'll point out my example yet again - I just wanted a very basic website that used Google maps API and displayed some arrows at various landmarks. To draw those arrows required rotations, linear algebra, line intersection tests nd a Haversine distance function.

And I just wanted a few arrows displayed, nothing fancy, something I would hope any webmonkey could whip together.
 
StackOverlfow tags are utterly meaningless.

Who is to say that people programming java are too stupid to think about what data structure or algorithm they might need and instead pluck something out of their arse?

Your assertion is blatantly wrong:
http://stackoverflow.com/search?q=Java+Optimization

Sigh.. and I'm the one with weak mathematics here.

Your search: 20,973 results.

"Java" search: 688,255 results.

(20,973 / 688,255) * 100 = 0.03047271723416466280666322801868 (yes, that's three percent) of all Java threads on Stackoverflow contain the word "Optimization".

That's not a lot now really, is it?
 
Last edited:
Interesting all the arguments and counter-arguments on here. However, for the OP the posts you really need to look at are the ones that start 'I employ ...'. That is what it comes down to at the end of the day rightly or wrongly. I am presuming you want a job at the end of it all!
 
I've already linked a few developers to this thread (including someone at Nvidia, so no need to whip out that they're crappy or something) and they've been laughing at some of the stuff said here, and commented on how over the top D.P is (I'm not the one who said he was a smarty-pants overly complicated programmer, they did). They also play down how much maths is needed, contrary to D.Ps assertion. Something like "Unless you're making something specifically heavily maths dependent, like a game engine, the amount of maths you're going to need to know or come across is very little. Sure, to understand the precise logic behind everything you're doing helps, but in by no means is it any kind of requirement to being a good programmer." Basically D.P, you're not wrong, you're just being over the top in how important it is to the average programmer.

The point is, stop scaring people looking to get into programming. For most, non specific cases the amount you need to know is very little and that is fact. Abstraction only helps with that.

But hey, what do I know? :p
 
Last edited:
Why the heck would you want to use a whole frigging SQl database for something as simple as a little address book app? Do you honestly think that something like Apple Contacts on an iphone requires an entire SQL database? You clearly don't live in the real world if you think that is how all applications are developed. :rolleyes:

Chances are it'll use sqlite, and a quick Google seems to back this up. So yes, it's not a "full blown" SQL server but instead a lightweight datastore that happens to use SQL as a query interface. If I were writing an address book program on a PC I'd probably use something similar to sqlite too.

Though you'll be pleased to know that for my current project at work (an Android app) I decided not to store data in sqlite but instead serialise the files as JSON files to the data folder.
 
I've already linked a few developers to this thread (including someone at Nvidia, so no need to whip out that they're crappy or something) and they've been laughing at some of the stuff said here,

Plenty of developers already here laughing at some of the posts! Thanks for the appeal to authority though.

Accusing D.P. of caring more about software efficiency than the average developer isn't especially offensive. Who wants to be average :)
 
Back
Top Bottom