Live data from Hacker News

Teach Yourself Computer Science

teachyourselfcs.com

71–80 of 85 posts

Re: Teach Yourself Computer Science

#71

Earlier quoted context omitted.

Algorithms ( sorting, for instance) don't require knowledge of advanced math. Analysing the computational cost requires some math or math like thinking. Advanced math is linked with computing mostly because the roots of computing lie in mathematical logic. So you can become a master programmer without advanced math knowledge. In short, most algorithms 101 books should be accessible to someone who considers themselves…

Yeah, but a substantial amount of problems that are dealt with through computers _do_ require mathematical tools beyond that. Statistics, for example, appears in any non-trivial computer science problem, like network congestion, analyzing proper parameters for algorithms, probabilities of getting lock contention, distribution of dispatched instructions, audio psychoacoustics, etc. Computer vision and graphics program…

I was answering specifically about algorithms.

A lot of real world problems can be solved without a programmer requiring advanced math knowledge.

Re: Teach Yourself Computer Science

#72

Earlier quoted context omitted.

I overcame my math illiteracy by reading How To Prove It. The book is so simple and narrow in scope and yet it gave me a feeling that ultimately no math is beyond my grasp, even the papers on arxiv. Now I would say my math skills are still rather low because I know how much is out there, but at least I am competent. At this point I wouldn't want to read books that avoid math for mathematical topics. Algorithms are ma…

I wonder if there is just a big split between what folks are looking for in mathematics. I cannot understand how "How to Prove It" is so frequently praised. I tried reading after finishing my CS degree, while I was searching for books that would do math 'right,' being especially inspired by Paul Lockhart (and others), and it was one of the first books I picked up. I found it to be so much more of the same, focused on…

Truth be told, at the time I was also reading around 20 other books, it's just that I completed 90% of How To Prove It and around 10-15% of the other books. I was so captivated by math after discovering blogs of rather opinionated math professors and students that I downloaded literally over a hundred books (for free) and started designing the perfect curriculum. I would start over many times, over and over, study most of the free time I had between college and programming, watch dozens of lectures, seek lecture notes and additional exercise sheets, and try to solve everything. This particular period lasted about 8 months, after which I stopped studying math and took a long break to resolve some life issues and prepare myself for my first job as a software engineer.

I remember reading a few sections from What is Mathematics too. Some chapters on topology and the preface.

So, yeah, I also succeeded because I drowned myself in everything possible until I got used to it. It's just that I never felt any frustrations with Velleman's book, so I knew that every time I open it I will learn something new, won't get confused, and the level of difficulty will be just right. That's why I kept coming back to this book and completed most of it, while didn't make much progress in others.

Re: Teach Yourself Computer Science

#73
post #54

Earlier quoted context omitted.

There is a certain danger in trying to learn maths with this mindset though. A lot of topics seem intuitively easy, but the proofs only come somewhere near the end of a degree level course. It's a very healthy mindset to have, but it's a blessing and a curse. Some people are just very good at just abstracting away the details and getting on with things; what seems like "clicking" is not always the same as intuition.…

I’ve definitely learned that now after 10 years of development experience. But as a curious kid who didn’t just want to memorize and regurgitate it was quite a challenge. I’ve debated restarting mathematics all the way from basic algebra and geometry to see if I’d do any better these days.

I noticed my high school math(s) teachers were very bad at explaining why and what we were doing.

Arbitrary example:

One teacher kept saying "f(x)" but couldn't explain what a function is. He just said "it's anything", then "don't worry about it". If he had even said "a function is like a machine that takes number(s) as input, changes them with a formula and outputs the new number(s)", I think it would have helped us grok.

I think he understood math(s) so well that he couldn't relate to someone who didn't know what a function was.

Re: Teach Yourself Computer Science

#74

I don’t really like the recommendation for SICP. The book expects a certain level of mathematical maturity from the reader and I think this level is significantly greater than the level that might be expected from the targets of this website. Mathematical maturity in this case can be broken into two parts: 1. Understanding what a proof is, what is required to prove some proposition, how to figure out and write a proo…

That kind of annoyed me when I delved into a it a while ago, too. I have decent mathematical sophistication (I do a lot of linear algebra and computational geometry for work, read graphics papers and math history), though I'm largely self-taught, and had bad gaps in very basic things at the time I was attempting to read SICP. So when I came across all the math-related stuff in it, I'd have to stop reading and go lear…

I basically agree. SICP makes a lot more sense when considered in the context of a course at MIT, taken after a first course in calculus. The exercises are easy to motivate if one can motivate the study of calculus (e.g. calculus is useful because X, therefore doing calculus by computer is useful because X but faster). The examples therefore feel relevant to what one knows and what one knows is useful (or at least considered useful by lecturers).

I think it is hard to find good exercises for this sort of early computer science outside of mathematics sadly. It seems to me that there is less variety in the computational constructs one might use in solving problems about producing or processing text (which are concisely written and have a small solution), but I think the book does emphasise mathematical examples more than needed. For example there are other first examples of higher order functions than Newton Raphson, and proving things on the way to a logarithmic Fibonacci algorithm is largely irrelevant to the kind of computer science that people looking at Teach yourself Computer Science are interested in.

Re: Teach Yourself Computer Science

#75

I don’t really like the recommendation for SICP. The book expects a certain level of mathematical maturity from the reader and I think this level is significantly greater than the level that might be expected from the targets of this website. Mathematical maturity in this case can be broken into two parts: 1. Understanding what a proof is, what is required to prove some proposition, how to figure out and write a proo…

Do you think How to Design Programs (TtDP) is a good alternative to SICP? It seems gentler, but if one were to go the HtDP route, what would come after? SICP or something else? http://www.htdp.org/

Well I don’t really know anything about it but it seems ok. The programming environment is easier to set up than in SICP which removes a barrier to entry.

I’m not really convinced that scheme is the be all and end all of teaching languages. It has some nice qualities and some that can make programming more difficult. For example I think the kind of interaction is good but often in that interaction one is essentially repeatedly refactoring a small part of the program and TNT’s language does not offer much to ensure that these refactoring are correct for any definition of correct. I think a ML style language could be good for teaching too although often the errors that are produced can be quite unhelpful.

The book seems like it covers some nice introductory things (like splitting up programs into small functions) and some harder things to get to grips with like quoting. But I haven’t had a very thorough look.

The thing I really like about SICP is the idea of building up a model of how programs are interpreted and evaluated. The book produces plausible models for evaluation and demonstrates how one can test between the two and where they are wrong. I like this for two reasons:

1. It really feels like science, coming up with ideas, testing them, seeing when you are wrong. This feels especially useful when one considers mordern systems built out of so many individually large things that it is hard to keep track of things perfectly. It is useful in real life to build up models for what’s going on and think about how you might test them and where you might be wrong. I like that the book reminds you that computer systems may be tested in the same scientific way that the real world might.

2. (Because these evaluation models are implemented in code) it makes the process of compilation and evaluation seem much more understandable and less like magic. One can have an ok understanding of machine code and how a machine roughly works without ever having to write any.

On the other hand maybe these reasons are wushu-washy and no one really needs such concepts for computer science.

Re: Teach Yourself Computer Science

#77

Earlier quoted context omitted.

I wonder if there is just a big split between what folks are looking for in mathematics. I cannot understand how "How to Prove It" is so frequently praised. I tried reading after finishing my CS degree, while I was searching for books that would do math 'right,' being especially inspired by Paul Lockhart (and others), and it was one of the first books I picked up. I found it to be so much more of the same, focused on…

Truth be told, at the time I was also reading around 20 other books, it's just that I completed 90% of How To Prove It and around 10-15% of the other books. I was so captivated by math after discovering blogs of rather opinionated math professors and students that I downloaded literally over a hundred books (for free) and started designing the perfect curriculum. I would start over many times, over and over, study mo…

Oops! My bad! I just realized that you're talking about a different book. I thought you were referring to the book's namesake, Polya's "How to Solve it." I have not had any contact with how "How to Prove it"!

Also, interesting how much of a similar way we seem to have gone about learning math. I kept it as my main focus for a similar amount of time, then for as a secondary focus while working on a big software side project for another 7 months or so (I was working at a grocery store for money the whole time), then got my first software engineering job and largely dropped any focused study in mathematics. But now I'm in a position where I'll learn bits of math as I need them for projects or whatever, so it definitely wasn't a waste (and like you mentioned in being able to read stuff off of arxiv, it expanded the range of ideas I can understand).

I've actually started getting interested in continuing study again, getting more into applied math this time since I really focused on pure last time. First goal is to get a clear understanding of Maxwell's Equations :)

Re: Teach Yourself Computer Science

#78
I think the problem with Computer Science is that the focus has been on the C and C++ programming languages.

It goes back to the 1970s. C was created to have all these cute little tricks that you could do to manipulate your data in memory. This led to pointers and all the fancy pointer arithmetics, that allowed your program to run a few clock cycles more efficiently. But, the cost is that you shoot yourself in the foot, once in a while.

Fast forward to now, and squeezing a few extra clock cycles here and there, and memory usage conservancy is largely irrelevant, except for a few edge cases.

C is just a bad programming language. And C++ just inherited all its defects, just to bring in Objects. But the objects were a poorly designed idea, and was terribly executed.

In C and C++, instead of just focusing on your problem, you have to manage the language, and its built in defects.

Then came Java. And it was the opposite reaction to C++. No more pointer arithmetics, everything is now a reference. Ok, good. But, it created another problem. The framework monstrosity. Learning the language itself is simple enough. But having to work with someone else's poorly designed framework, that makes no logical sense, is just unbearable. In Java, you now have to manage the framework.

I like Python for its brevity and conciseness. And especially for its flexibility with functions. It allows you to program in a pure functional style. It's a breath of fresh air. I can build out my code like lego blocks, stress test each function, and then connect it all together. And the results work flawlessly. Except for one catch, it runs a little slower.

I'm hoping this move into Functional Programming will be the next true wave to come into the computer industry.

Re: Teach Yourself Computer Science

#79

My theoretical knowledge of computer science can be approximated to zero, as is my knowledge of math, but for some time I worked as a programmer with good results; in my best days I could write about two hundred lines of C or Pascal in a few hours, then go home without testing them because the machine wasn't available and be complimented the following day because they compiled and worked without any errors. I still f…

> Figuring them is easy from experience but the math behind that is way harder; anything beyond simple equations is like alien language to me ... It took me a long (and often frustrating) time to figure out that the perception of difficulty is largely because of how implicit most everything is in mathematics. It's not like programming where eventually there is a compiler with a definite structure that's going to make…

> because of how implicit most everything is in mathematics.

Which is a completely wrong impression due to how it is taught in school and to undergrads in the US.

Speaking as a mathematician, since one is reasoning about abstract objects everything necessarily is pedantically explicit (otherwise proofs could not possibly work). Hence, in US graduate courses or EU undergrad courses you start from scratch and rigorously define every symbol you ever write and justify every step you take (e.g. given a field, why is "1" distinct from "0"? What is a derivative? Prove that it is actually well-defined, exists for such functions etc.).

What many people confuse for being implicit is the heavy polymorphism and terseness in mathematical notation. For instance, one often identifies a function, its graph or its image depending on type makes sense in context. Here, rigorous courses spent much time to prove that any possible ambiguity in notation is actually no ambiguity at all; one is allowed to use short-hand notation because all interpretations are equivalent.

Re: Teach Yourself Computer Science

#80

Earlier quoted context omitted.

> Figuring them is easy from experience but the math behind that is way harder; anything beyond simple equations is like alien language to me ... It took me a long (and often frustrating) time to figure out that the perception of difficulty is largely because of how implicit most everything is in mathematics. It's not like programming where eventually there is a compiler with a definite structure that's going to make…

> We aren't taught about what it is our (sic) how it works My biggest frustration learning math when I was younger was not knowing -why- I was doing something a certain way or how it worked. It was incredibly discouraging because it didn’t just “click” like it seemed to with my peers.

https://en.wikipedia.org/wiki/A_Mathematician%27s_Lament

Schools tend to not teach mathematics but memorization, unmotivated formulas and computation. Mathematics as its own discipline is basically only "why and how", i.e. proofs.

Post reply on HN