Is there a good book for a complete coding novice?

A place to discuss the science of computers and programs, from algorithms to computability.

Formal proofs preferred.

Moderators: phlip, Moderators General, Prelates

UchihaJax
Posts: 12
Joined: Thu Sep 06, 2007 7:37 pm UTC

Is there a good book for a complete coding novice?

Postby UchihaJax » Thu Sep 06, 2007 7:47 pm UTC

Been approached by someone who wants to learn how to code from scratch.
Usually the best idea is 1on1 teaching, however i'm not sure if I can spend the time at the moment.

Is there a decent "Oh me yarm you are brand new to coding, let me explain some things to you while avoiding making it too dry" kinda book out there?

Or is 1on1 training the only real solution?

User avatar
xyzzy
Meta-Titled
Posts: 263
Joined: Sun Mar 18, 2007 10:02 pm UTC
Location: Colossal Cave
Contact:

Postby xyzzy » Thu Sep 06, 2007 7:50 pm UTC

Well, one of the traditional introduction Comp Sci texts would be Structure and Interpretation of Computer Programs by Abelson, Sussman, and Sussman. However, this uses an unusual (but very beautiful) language, and may be hard going.

Otherwise, I'm not sure. I attacked things from the Functional/Lisp side of programming, so SICP is the Bible in those parts.

Edit: You might want to post in the Intro thread. Look in the general forum.
"Wile E. Coyote was a theoretical mathematician." - Leliel
"Modern life can be so boring without elements of the bizarre or the fantastical. Hence, we have steampunk." - Me

UchihaJax
Posts: 12
Joined: Thu Sep 06, 2007 7:37 pm UTC

Postby UchihaJax » Thu Sep 06, 2007 8:17 pm UTC

Thanks for the reply :D

I'd prefer to avoid any less useful language, but I should probably check it out, does it cover OOP? :D
I would prefer a C based language, preferably C# (oh noes, this is getting too specific) as it's the easiest way to get people keen on coding as you can acheive more, quicker (subject to 10 page flaming thread).

User avatar
xyzzy
Meta-Titled
Posts: 263
Joined: Sun Mar 18, 2007 10:02 pm UTC
Location: Colossal Cave
Contact:

Postby xyzzy » Thu Sep 06, 2007 9:13 pm UTC

Well, you're starting to drift into Coding forum territory.

Lisp isn't useless as such. It's less in demand, certainly, but it's a truly beautiful programming paradigm. It's a functional language - you define functions, which take arguments which may or may not be other functions. It also lends itself to recursion.

As a historical note, it evolved out of the λ (lambda) calculus, a theoretical model of computation developed by Alonzo Church.

As for "acheive[sic] more, quicker", I'll say that Lisp is faster for that as well. Sure, "Hello World" is probably quicker to write in C, and I wouldn't recommend trying to do graphics in Lisp. Finally, as you seem to be looking for a good book on C, I'll point you at the coding forum, which is likely to be more what you need.
"Wile E. Coyote was a theoretical mathematician." - Leliel
"Modern life can be so boring without elements of the bizarre or the fantastical. Hence, we have steampunk." - Me

User avatar
Yakk
Poster with most posts but no title.
Posts: 11129
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Postby Yakk » Thu Sep 06, 2007 9:50 pm UTC

I learned how to program on my own.

What stage are you at?

"Hello World" -- a program that ouputs the string "Hello World".
or
"Choose your own adventure" -- a simple input/output game with very little state.
or
"A program that lets the user design a Battlemech" -- a more complex program that has state and makes decisions based on user input.
?

I would advise you against aiming for a "useful" language first: you want to learn at least two quite different languages. You will want to learn at least one "high level" language (where it does garbage collection and the like for you), one "low level" language (where you have to manage your own memory allocation), and one non-procedural language (because exposure to non-procedural languages keeps your brain from rotting in a rut).

User avatar
jack
Posts: 49
Joined: Tue Aug 28, 2007 6:52 pm UTC

Postby jack » Thu Sep 06, 2007 9:52 pm UTC

Another vote for SICP, but only if they are somewhat adept in math already, or the exercises will be very difficult.

Otherwise playing around with Python and PyGame would be fun, or a bit of Javascript (writing a greasemonkey script would be a fun project to get them started).

User avatar
mellow_geek
Posts: 173
Joined: Thu Sep 13, 2007 1:06 am UTC
Location: Atlanta, Georgia
Contact:

Postby mellow_geek » Fri Sep 14, 2007 3:33 pm UTC

The good thing about SICP is that they also have the video of the lectures available online. They were recorded back in the 80s, but from what I understand, the course hasn't changed all that much.

*hunts for link*

http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/

Dark Shikari
Posts: 113
Joined: Mon Jul 16, 2007 7:03 am UTC

Postby Dark Shikari » Fri Sep 14, 2007 5:23 pm UTC

I'd recommend Python first, just because its so easy and you can learn the basics in a few days. Once you have that down, you'll realize how fun and easy programming can be.

And then you get to move to something more difficult, like C :lol:

User avatar
Aperfectring
Posts: 252
Joined: Fri Sep 07, 2007 3:47 am UTC
Location: Oregon (happily)

Postby Aperfectring » Sat Sep 15, 2007 1:33 am UTC

My first programming language was Basic. I highly recommend against using basic first. After my introduction to Basic, I learned a few other languages in the "Basic" line (QBasic, Visual Basic, TI calculator Basic). Then the first real programming I did was in C. Learning C can be painful as a first language, and I don't think that is the right way to go either.

Personally, I feel that learning to code, and learning how larger programs are structured should be completely separate. Because of this I would suggest staying away from Java, which forces OOP concepts, even if you don't want anything to do with them.

The easiest way to get someone interested in programming is to use Python (or possibly Perl). The syntax of those two is generally fairly easy to pick up, and they will be able to make "useful" things quickly. After learning how to do basic things in Python, I would suggest exposing them to C++, and the beginnings of OOP concepts.
Odds are I did well on my probability exam.

User avatar
Pesto
Posts: 737
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: Berkeley, CA

Postby Pesto » Mon Sep 17, 2007 8:12 pm UTC

I first learned with basic, too. It was the only language I knew until I learned C/C++ in college, and I don't seem to have suffered any ill effects because of it.

Lots of people have been suggesting Python. I haven't ever used Python, but after looking through some tutorials, it seems to have a feel very similar to basic. Sounds like a decent language to start with.

User avatar
Taejo
Posts: 60
Joined: Wed Oct 11, 2006 8:00 am UTC

Postby Taejo » Wed Sep 19, 2007 5:10 pm UTC

UchihaJax wrote:I'd prefer to avoid any less useful language, but I should probably check it out, does it cover OOP? :D


You've already been trapped! You don't know how to code, but you already think OOP is the bee's knees. It ain't. I like OOP. But unlike the hype will have you believe, OOP doesn't make programming easy. Programming is hard, and no amount of acronyms will change that.

There are programs that fit well into the OOP paradigm; and a lot of programs can be fitted into the paradigm. The latter category is much bigger. Now that I've progressed to more interesting things than OOP (like Haskell), I'm finding that some things that I thought fitted naturally into the object paradigm are simpler and neater with algebraic types and pure functions.

It's better to start with an open mind.
Indiscreet Mathematics, a comic about maths

powersofone(poo)
Posts: 1
Joined: Fri Sep 21, 2007 8:17 am UTC
Location: Berkeley, CA

Postby powersofone(poo) » Fri Sep 21, 2007 8:29 am UTC

You may want to check out the webcasts to the CS61A series at UC Berkeley. Here is the link:

http://webcast.berkeley.edu/course_deta ... 1906978454

That is the one being taught this semester, and it's the entry point for most CS and EECS majors here. It goes well with SICP (it is the course's textbook). I think it's a wonderful introduction to the computer science world.

Plus, if you have any questions, you could definitely e-mail Brian Harvey and ask him directly. He loves the idea of students tuning in from outside Berkeley.

User avatar
Enssel
Posts: 64
Joined: Mon Sep 24, 2007 10:15 pm UTC

Postby Enssel » Mon Sep 24, 2007 10:20 pm UTC

I recommend Lua. It's barebones and simple yet powerful; out the door it's not OO, but you can create classes and objects yourself with the basic tools provided. In doing this, you really gain insight as to what classes really are, as you have to construct them yourself.

On top of that, Programming in Lua is a joy to read, particularly compared to some harder texts. The code makes sense to read. On the negative side, it has no type checking at all, and is not widespread, but its popularity is growing (Painkiller, World of Warcraft, etc). Being a scripting language built much after the popular ones, it benefits from all that has been learned and added since then; I think of it as a halfway point between C and Perl.

User avatar
Cabhan
Posts: 67
Joined: Wed Aug 29, 2007 4:34 am UTC
Location: Boston, MA, USA
Contact:

Postby Cabhan » Mon Sep 24, 2007 10:32 pm UTC

I see this question get asked a lot on various forums, and it seems that Python is pretty popular these days as a first language. I personally learned Java first, but this was because it was the language used in the first class I took.

Which brings me to point 1: is there a class you could take? Classes are, in my experience, a great way to get started in programming.

Having said that, if you're looking for the more Computer Science / abstract notions of development, you'll find a great deal of Lisp and Scheme and such in that realm. These are rather popular in universities, because they are pretty simple, and operate differently from most languages out there. While you won't be able to do much development with them, I imagine they are a good way to pick up the basics of development and program design. Having said that, I prefer other languages, since I know the concepts already :).

Anyway, if you're interested, my university uses How to Design Programs by Felleisen, Finder, Flatt, and Krishnamurthi. The entire text is available online at:
http://www.htdp.org/2003-09-26/Book/

This is done with Scheme, and it uses the development environment called DrScheme:
http://www.drscheme.org/

I'm not gonna say that this is the best approach: it's certainly not how I learned program design. But I know it's worked for some of my friends, so give it a go.

The hardest part of programming is learning the concepts the first time along. Once you can implement the concepts in one language, you can do it in any language.

User avatar
Enssel
Posts: 64
Joined: Mon Sep 24, 2007 10:15 pm UTC

Postby Enssel » Mon Sep 24, 2007 10:41 pm UTC

I like the analogy to verbal languages - some of them have radically different structural features (functional vs. imperative, for example) or rigid syntax, but as you learn more and more of them you notice patterns that make it easier and easier to pick up the next one.

[e] Python's not a bad choice either, but knowing both, I use Lua to introduce friends to the concepts behind programming.


Return to “Computer Science”

Who is online

Users browsing this forum: No registered users and 8 guests