3 ms·
As someone who got into programming late in life - and, with the exception of geometry, began sucking at math starting with algebra - I never graduated beyond A
by maroonblazer 13y ago
As someone who got into programming late in life - and, with the exception of geometry, began sucking at math starting with algebra - I never graduated beyond Algebra 2 and trig (and barely passed those classes).
The biggest stumbling block I run into with programming relates to the adage "There are only three numbers in computer science: 0, 1 and n". I can easily deal w/ the '0' and '1' cases, but struggle making my programs work with the 'n' case. I've attributed this to my poor math background, so have begun to pick up where I left off with an aim to learn Pre-calc and then Calculus.
However I'm wondering if this isn't a mistake and rather I should focus more on logic and, perhaps set theory (I'm not even sure I know what that is and whether it requires higher level math)...?
If the above is true - I'm curious to hear from those with more advanced math backgrounds - then it may lend at least some credence to the author's point.
- Jtsummers 13y agoI would look into discrete math topics. I'm not able to make recommendations on resources or textbooks, however. In the world of mathematics there are some parallel paths. They feed back into each other, but you can often study one field in depth and stay in the shallows with the rest. Some useful math topics: Set theory is related to relational algebra, which forms the foundation for relational databases. You don't need to know the math to use databases. There are methods, rules that you can apply when constructing databases that are, essentially, a distilled version of what others have discovered through the study of the math itself. But having a better understanding of the math side can help you to go beyond just a few memorized rules or querying stackoverflow. Language hierarchies. This is a mathematical CS theory topic. Think about matching strings, you use a regular expression. Some structures, however, are not matchable with a regex. They're too complicated, that leads to context free grammars. Knowing the different classes and when to use each can be very useful. [1] Big-O notation. This is an important concept in algorithm analysis. This gives a way to talk about the efficiency of a program and relate the efficiencies of different parts. It uses a moderate amount of calculus, but not much. Really, like with using a DB without knowing relational algebra, you can use the calc required for this sort of analysis without knowing calculus. [1] This comes with a story. At an old job they needed to write their software design document (SDD) as part of a certification package. Now, ideally this is down concurrent to development (or prior if you're a waterfall/bullshit method organization). They, however, hadn't started on it. In the SDD there were typically flowcharts, pseudocode or some other high level representation of the code. To accomplish this a dev wrote a C->Pseudocode converter that really just used regular expressions and a global search/replace. This lead to some amusing ommissions and extra changes, and a bullshit document. if -> IF, while -> WHILE, { and} were omitted with the intent of replacing the } with ENDIF or ENDWHILE. They ended up just replacing them with END because they didn't know if it matched to an if, a while, a function or what. While I still think the task was bullshit (done at the wrong time and zero-added value, possibly negative for future maintainers), if they wanted to do it right they should have used a proper parser. C parsers are available that would know the difference between a } matching an if, while, for or function block. That would know the difference between `if` in a variable name and `if` the keyword. They could have at least made a more presentable version of their hack.
- jackmaney 13y agoAlthough calculus isn't a bad thing to learn, you might want to consider picking up some discrete mathematics and combinatorics, instead.