Join 3,523 readers in helping fund MetaFilter (Hide)


CS Math books
April 10, 2011 5:40 PM   Subscribe

I am a GIS college student looking to develop my skills in programming, particularly in Python. For starters, I need to wake up my dormant math skills. What mathematics-for-programmers books, or general Computer Science books, should I be looking for?

Hey all, longtime mefi reader (lurker?) , first time poster.

Anyway, I am a college student in the midwest USA currently working in the GIS department for a decent sized city. My internship and my college curriculum have made me aware that I need to develop my skills on the scripting side of things.

That being said, I don't want to go with a narrow approach and read nothing but "Python for GIS" type articles. I have learned the hard way way that if you try to skip the foundational skills when trying to learn something technical, it just comes back to haunt you down the road. I am not trying to transition from GIS tech to full fledged Computer Scientist but I am an avid learner and want to strengthen my skills.

I have not had a huge problem so far finding books on learning Python. I have just started going through Python for beginners, and am liking it so far. I've also just ordered John Zelle's intro to CS using Python. I'm having a harder time finding general into to CS books and math books relating to programming, specifically on the subjects of discrete and algebra. My school library has a lot of resources, and I've found a few good books, but mostly I'm just overwhelmed by the sheer amount of material.

Many years ago when I first started college I did well in my algebra and pre-cal classes, but I'm feeling rusty. And regarding the CS stuff, some of the programming books I'm looking at are using phrases like "garbage collection" without any explanation. I understand the general idea of garbage collection but a paragraph or two would be nice. I don't need the concept of a CPU explained to me, but a book with a little elaboration on CS vocabulary would be helpful.

I should probably say that I'm not looking for something like Knuth's Concrete Mathematics . I browsed through it at my school's library- I was able to understand bits and pieces, but the rest might as well have been written in hieroglyphics. Many of the books in this thread seemed to be above what I'm looking for as well, but I found some of the recommendations useful.

I've found some good online resources like MIT's open courseware, but I'd like to have some good textbooks. Thanks in advance.
posted by ajax287 to Computers & Internet (9 answers total) 48 users marked this as a favorite
 
Also try Zed Shaw's book: Learn Python the Hard Way.
posted by gregglind at 5:54 PM on April 10, 2011 [1 favorite]


I am using the C# version of Head First and it is awesome. There is a 2D geometry, Rails, Algebra, Physics, Statistics, etc. There is also Khan Academy (all online, no textbook), which is quite good. And then there is Cosmo Learning. and ooohhh, blue...
posted by Monkey0nCrack at 6:26 PM on April 10, 2011


I am a programmer working for a Midwest USA university (this is less exciting than it sounds).

The one mathematics niche I would say most benefits programmers uniquely is called discrete math, more specifically graph theory. Graph theory concepts underpin a lot of the logic behind systems level programs. As a rough first example, tsort "was initially written for providing an ordering of object files that allowed the linker to process them sequentially (each one exactly once, and in order). " Programmers rarely have to solve this problem themselves nowadays, but dependencies crop up everywhere in systems to build software.

But a better example is your question about garbage collection. First off, if you just want a definition, nearly every term you can think of is documented on Wikipedia (garbage collection). To summarize, garbage collection determines which object instances (regions of memory -- completely different than objects above unfortunately) are still in use and which can be reclaimed. In order to do that, it needs to traverse the graph of object references, keep the ones your program can still find and discard the rest.

If you've not taken calculus, I imagine that Concrete Mathematics book will look awfully confusing. Unlike CS terms in general, you probably don't know how to search for mathematical symbols you can't type on your keyboard. I don't either. MIT OCM has a CS Math course, but not videos. Khan academy doesn't yet cover this niche in mathematics. For what it's worth, here's is the newest edition of the textbook I learned from.

If you're looking for a discrete math lite, I'd suggest a book on Data Structures. Trees, linked lists and such are all derived from graph theory, and yet the subject, in my experience, doesn't assume familiarity with discrete/graph theory. As a bonus, you might have the prereqs to enroll in the class. No idea on python specific data structure textbooks.
posted by pwnguin at 8:24 PM on April 10, 2011 [1 favorite]


Learn python the hard way looks to be a great resource, especially all the exercises in it, thanks gregglind.

Monkeyoncrack: I had been looking at the Head First series in bookstores, wondering if they were any good or not. And the Khan Academy looks interesting, I hadn't heard of it before.

And pwnguin, thanks for the discrete recommendations, I should say too that I definitely want books with exercises ( with solutions) in them. And wiki does have info on just about everything, its true.
posted by ajax287 at 9:06 PM on April 10, 2011


CS major here.

As far as books go, you'll want to look for introductory books on algorithms, data structures, and maybe discrete math. The goal is to have functional understanding of basic algorithms, algorithmic complexity, and things like trees and hash tables.

The standard textbook for algorithms is Introduction to Algorithms, but it's more of a reference than a textbook to learn from. You may have better luck with a different text.

For discrete mathematics, I learned from this one, but I haven't compared it with any others.

Really, most of my recommendations would be non-book. The standard texts are likely to be overly formal - my experience has been that the classroom is usually where the best explanations are.

The ArsDigita University videos are fantastic. Especially the ones with Shai Simonson, who covers much of what you're looking for.

The MIT Abelson/Sussman lectures are incredible too, but less immediately applicable - watch them when you're ready to rethink everything you think you know about programming. SICP, the book corresponding to the lectures is a classic.

Consider trying some of the problems at Project Euler. They'll stretch your programming and math abilities, and they gradually increase in difficulty. Make sure to look at other people's solutions after you've solved a problem. There's a great deal you can learn from the techniques they use.

For looking up terms, you could also try the Free Online Dictionary of Computing, aka FOLDOC.
posted by Wemmick at 9:56 PM on April 10, 2011 [1 favorite]


Stanford CS has some class recordings up on youtube. CS 106A/B and CS 107 are online (http://www.youtube.com/user/StanfordUniversity). 106A is probably a little bit too basic, but 106B and 107 would be useful. 106B is a good first look at data structures in a non-formal way, & 107 is a good look at different approaches to programming, which is super useful. CS 103 isn't online, unfortunately (it's the discrete math & intro to theory of computation class). For discrete math, I'd go with Epp's discrete math, and for theory of computation, Sipser's Introduction to Theory of Computation.

In terms of algorithms, the standard is Cormen et al's Introduction to Algorithms (usually referred to as CLRS).

If you get into a lot of high performance computing stuff, a book on computer architecture would be useful for understanding what's going on under the hood, but the level of detail there isn't really necessary for most application-level coding.

If you get into any number crunching, a book on scientific computing & numerical algorithms would be useful. This one (code-based) and this one (math-based) are two good choices.
posted by devilsbrigade at 9:56 PM on April 10, 2011 [1 favorite]


No book recommendations, just subjects that will be very helpful if you will be displaying anything on a screen:
Linear Algebra
Multivariable Calculus

These will help you determine where on a screen to draw something and how to draw it.

I'm guessing that with GIS you may be outputting maps, so that is why I am suggesting the above. :)
posted by jillithd at 6:55 AM on April 11, 2011 [1 favorite]


The introductory programming course from MIT, video lectures for which are available online, might be the ideal resource to learn the things I think you are talking about. It uses Python to teach fundamental Computer Science, including both the engineering skills (structuring your programs, debugging, testing) and the theoretical concepts (data structures, strategies for building effective algorithms). If you really master this material, you will surely be able to write substantial programs that are reasonably engineered.

Then you can broaden your knowledge with other resources. Most courses/books of interest will tend to fall into one of two categories: Software Engineering and Computer Science. Software Engineering deals more with the pragmatics of dealing with code; reading some classic books like: "Refactoring", "Design patterns", "Pragmatic programmer", "Test driven development by example" etc. would help you a lot with this. I would recommend at least to learn to write unit tests for programs, it will save you a lot of frustration. Most of those things is relatively easy to learn and its usefulness is directly proportional to the size of the program you're writing.

Computer Science, on the other hand, deals with computers, programs and problems as abstract entities, for example you will often see pseudo-code instead of Python code. It is less directly relevant to programming - it studies small, specific, isolated, hard problems that only from time to time are relevant in practice. So, if you're say building a social network kind of thing that's very popular right now, 90% of the time you will be doing user interface stuff, database queries etc. which doesn't require much theoretical background (also because the theory was already put into the DB servers). But as part of this social network thing, you might want to find the "friend path" between two persons. If you have a lot of users, you simply ain't going to do this if you aren't familiar with the theory studied in an algorithms course. A few easily understandable and practical recommendations here would be:

- Robert Sedgewick has a sequence of two books teaching basic Computer Science to non-CS majors, stressing applications in the sciences: Introduction to Programming in Java and Algorithms

- AdUni has a lot of good courses with video lectures that are targeted towards a beginner audience. I especially recommend the Discrete Mathematics and Algorithms courses.
posted by jarekr at 5:05 AM on April 12, 2011 [1 favorite]


So much good info here, thanks!

I have bought a few of the books mentioned here and in other threads, like intro to algorithms and elements of programming. I don't expect them to be immediately useful but they look like great books to have and think about long-term. the 96 edition of SICP was at my library, looks good so far.

On a side note - should I stick with IDLE as far as Python IDE's go? I like that I can customize the colors, staring into a white background has always felt for me like looking into a light bulb
posted by ajax287 at 10:44 AM on April 12, 2011


« Older Where can I find the raygun (o...   |  I am putting together a propos... Newer »
This thread is closed to new comments.