I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart from knowing how to do "Hello World" in Java.

I keep hearing that mathematics is pertinent to coding, but how is it so? What general examples would show how mathematics and programming go together, or are reliant on one another?

I apologize of my question is vague, I'm barely starting to get a rough idea of the kind of world I'm stepping into as a code monkey student...


Question: Split dataset based on the first column
Answer: You seem to be on the right track but having some trouble with the anonomous function syntax. I highly recommend you read up on this as it's a very useful concept. Essentially #1+#2&amp; is shorthand that translates into Function[{arg1,arg2},arg1+arg2]. So a good place to start is the documentation for Function. 

Now to the problem at hand. I understand it you want to sort your list such that you get one list containing all entries starting with "KO", and one with all the entries starting with "MCD", and so forth. In that case you should not be using Split on it's own. Since it only sorts out runs of identical elements. eg Split[{a,a,b,a,a}]=&gt; {{a,a},{b},{a,a}} So what you need to do is to first sort your list, and then split it. Now it happens to be the case that there are convinient functions for sorting and splitting based on the output of a function, so you don't actually need the First[#1]==First[#2]&amp; syntaxt that you find confusing. Still I would again highly recommend you read up on it. Anyways, here's an example of code that solves your problem:

 sortedAA = SortBy[AA, First];
 splitAA  = SplitBy[sortedAA, First];


First we sort the list so that all entries with the same first element apear in order eg. SortBy[{a,a,b,a,a},First] =&gt; {a,a,a,a,b}, then we split this into sublists, eg. Split[{a,a,a,a,b}] =&gt; {{a,a,a,a},{b}}.