Jump to content

Started college in a c++ class need help

johnadams123412

I've seen that book recommended a bunch of times but haven't gotten around to taking a look at it. I'll have to make some time to read it.

 

It really is a rewarding book. Especially following the video lectures too. Berkeley webcast has an amazing course based on it too, though you have to look 2011 and before for it since they have since replaced the course with a less slick Python based one. Not less slick because of any deficiency in Python, but less slick because the professors are nowhere near as good as the one who did the SICP based course (it's CS 61A). It's pretty cool, you start writing interpreters at the end and it has lots of interesting topics like generic programming, lazy evaluation, writing generic accumulators, lots of other cool stuff.

 

One of the things I really love about the book is the use of recursion. I mean most programmers couldn't write a working iterative binary search if you asked them right now (this was actually tested at IBM or some other big tech company by the author of Programming Pearls, another really amazing programming book) but writing it recursively is super easy. And even as a recursive function with any decent compiler or interpreter it generates an iterative process, not a recursive process, so writing it recursively doesn't give a performance hit of any kind. I thought it was so cool replacing loops with recursive functions that were much easier to understand and read. It's a really fun book if you like programming. But it's challenging too.

Link to comment
Share on other sites

Link to post
Share on other sites

- snip -

 

Thanks for the info. I know about Berkley's CS 61A , however I didn't know there is an alternative to the Python version. I'd like to check out the Scheme version.

 

I've also heard good things about The Little Schemer and The Seasoned Schemer, at least from people who enjoy the format the book was written in. I've been considering learning some Clojure but maybe I'll play around with Scheme for a while instead.

Link to comment
Share on other sites

Link to post
Share on other sites

I've seen that book recommended a bunch of times but haven't gotten around to taking a look at it. I'll have to make some time to read it.

 

I can also vouch for that book, it's awesome.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

The blurring of function and data in SICP is such a cool thing. You get so much experience using functions as data in SICP that it becomes second nature, by working through the book you effectively train your subconscious to know functions are data. It makes the C++ STL all of a sudden make perfect sense. You don't have for loops or while loops in Scheme, so you're having to use functions as inputs to other functions all the time. And recursion is so useful to know, it's really important for algorithms for going through a file system for example. Since there are no for loops or while loops in Scheme, you have to do it all with recursion. You have to learn between tail and tree recursion, and you get a good handle on when recursion won't hurt your performance vs when it makes a program ridiculously slow and/or memory hungry. Then seeing how much of an interpreter you can write in terms of an interpreter. SICP is filled with so many interesting surprises and every problem should be attempted, they're critical to the material. But because of that I can only recommend the book if you find computer programming fun.

Link to comment
Share on other sites

Link to post
Share on other sites

I don't think C++ is a good language to start with programming either.

Its incredibly 'bloated' which makes it hard to learn the syntax if you don't already know a similar language. Also, I divide people learning to code in 2 groups: people who just want to learn how to code and/or want to grasp the logic and workflow behind it and people who want to understand how software works.

C++ imo fits neither of those.

as long as you have the programming mentality, there's no saying what language you should start with

Link to comment
Share on other sites

Link to post
Share on other sites

Here is the full coursework for CS61A when it was taught using SICP:

 

http://inst.eecs.berkeley.edu/~cs61a/sp11/

 

Homework assignments and projects are in volume one of the course reader. Here's the playlist for the entire course's videos:

 

 

It also modernizes the course somewhat by adding discussion about topics like OOP and client-server programming. Brian Harvey is a great teacher and it's sad they don't teach his course anymore.

Link to comment
Share on other sites

Link to post
Share on other sites

as long as you have the programming mentality, there's no saying what language you should start with

Of course you can start with whatever language you want, you could start with writing binary for all i care, but its stupid.

C++ is bloated and abstract but still uses low level concepts. Its not a hard language, its a confusing language.

Want to start with low level? Learn C.

Want to start with something abstract? Learn python.

 

You won't be a bad programmer because you chose the wrong language to start with but it won't make the learning any easier.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×