Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Best intro to programming (heavy on algorithm design/mathy stuff)?
7 points by beatpanda on Jan 23, 2011 | hide | past | favorite | 8 comments
My girlfriend wants to get into programming. She's a math whiz, and wants to find an intro to programming from a perspective that assumes you know nothing and would then allow her to look at stuff like algorithm design and statistical analysis.

I suggested the Try Ruby tutorial but it was being really buggy, and I don't know anything else good.

Any suggestions?



I recommend clojure. I'm teaching a friend of mine to program with clojure for the following reasons:

1) clojure is functional - Someone with math background will have no difficulty to think of computation as combinations of functions. And with map/filter/reduce there is a lot of fun stuff you can do. Also, there is no need to burden a learning programmer with pointers, and clojure doesn't bother you with that, it's all "by-value".

2) clojure has great data types - After all, it's all about data. Clojure shines with elegant notation and powerful processing of data structures, which IMHO is very easy and straightforward to grasp.

3) clojure has a REPL - Learning by doing helps a great deal to get a feeling for programming, because of the direct feedback.

4) http://try-clojure.org/ - No need to install anything - get started instantly, do the further steps later. And there's a tutorial as well (never tried it).


I think either Python or Java are good first languages. I'd probably stay away from VB (too GUI based) and C++ (too confusing for a beginner). I was an Applied Math and Physics major my first year of college. I ended up switching to CS my second year after I had a really good professor for the Java intro class. Actually, for the mathematically inclined, Lisp can be a really fun language to learn because it's so simple yet powerful.

You also might want to try this:

1. Teach basics of programming in general (for example: http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for...)

2. If she wants to learn the theoretical stuff, go over Big-O notation, sorting algorithms, data structures, etc.

3. Then maybe teach her the basics of Lisp and go over recursion.

4. Next, try a fun small project. Maybe try to make Tic Tac Toe or a Word Search solver.

5. At this point she would be familiar enough with CS and can tell you what she wants to work on next (i.e. learn C or Assembly to do low-level stuff, learn theoretical CS, or try making more complex programs).

Finally, check out these Stack Overflow answers to see what others have suggested: http://stackoverflow.com/questions/3088/best-ways-to-teach-a..., http://stackoverflow.com/questions/1858064/so-my-girlfriend-...


It's also worth checking out the other posts under the "Related" sidebar on the bottom-right of both Stack Overflow pages.


For a math whiz, SICP should be an option.


I'd actually suggest, any good tutorial on the net ; pretty everything that you need is there, just need to google it there.

You'd be surprised at how much resources there is online.

Honestly, buying books as introductions seems useless to me besides the fact of that buying the book might actually push you more into the actual programming act.

But for her to start, the best would really be to pick tutorials that not only relates to her future use of the program but also to what interrest her. Because, after all, she probably won't be programming websites or wordpress themes.

Quick googling for "math related python tutorial" got me this :) http://showmedo.com/videotutorials/series?id=101

seems pretty cool intro.


Lot of students who love maths love Richard Birds books : http://www.amazon.com/Richard-Bird/e/B001HCWQ9I/ref=sr_ntt_s...


Book called learn Python the hard way, loved it back in the day, you need to know nothing to follow it!


I actually think this is far more repetitive than a math whizz could handle, and might bore them if programming is presented this way to them. I think the suggestion earlier for Structure and Interpretation of Computer Programs was a good one.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: