1st language- python or scheme?

lightstar

Senior member
Mar 16, 2008
579
0
0
my 14 y.o. son and i are learning computer programming for the first time. our eventual goal is to learn C++. eric raymond and peter norviq both suggest starting out with something other than C++. python looks "easier" to digest than scheme. But would getting through the learning curve & fundamentals of scheme give us a better foundation for later programming?

also, i have these 2 intro books picked out. anyone have any experience with them?

Python Programming: An Introduction to Computer Science

How to Design Programs: An Introduction to Programming and Computing
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
If you want to use Scheme, then use this book: http://mitpress.mit.edu/sicp/

It's used at Berkeley and MIT in their introductory CS classes. It goes over just about every important programming concept you can think of.

As for Python vs. Scheme, I don't think it matters much. Scheme has a cleaner syntax IMO, but Python syntax will be more similar to other languages, so it's a trade-off.
 

Dravic

Senior member
May 18, 2000
892
0
76
It?s not really one or the other, its both.

They will teach you different things. In school we learned C and Pascal for actual project coding, learning syntax and how to debug. The actual process of coding a project from beginning to end.

I?m just learning python myself after years of Perl. It?s a pretty cool language so far. much less repeat coding, and object based. These higher level languages (python, ruby types) do a lot of the work for you as each object has the functions associated with it built in.

For instance: 4 lines of code to run a system command capture all the output and do something with each entry.

#! /usr/bin/python

import os

cmd = "ps ?ef | grep myprocess"

for mydata in os.popen(cmd).readlines():
print mydata.rstrip()


Scheme is all about teaching you the nature of the coding, how the automaton works under the covers. You will learn things like order of preference, recursion, and functional program techniques. They used lisp + emacs in our day to teach these principles. You will learn techniques with scheme that will influence the way you code regardless of language.

I would learn python on my own first, and at some point take a scheme/lisp or a computing logic class down the line. You really want someone who knows lisp/scheme explaining it to you if you can. Recursion is a powerful tool not many understand well.


I will warn you though, while i think its a good way to start, you may get frustrated going to a low level language where you need to write a lot of whats built into a higher level language.


 
Oct 27, 2007
17,009
1
0
If your goal is to learn C++ I would start with Java or C#, or even jump right into C++. No point in beating around the bush, in my opinion.
 

lightstar

Senior member
Mar 16, 2008
579
0
0
Originally posted by: esun
If you want to use Scheme, then use this book: http://mitpress.mit.edu/sicp/
yea i looked at that book and its associated videos online- too intimidating. don't think i'm smart enough to handle it.


thanks for the replies everyone. unfortunately, i'm too old and tired for any more schooling so this will be a self-study affair. i'm leaning towards scheme so i'm sure i'll be banging my head against the wall soon enough; maybe i'll ask some computer friends for tutoring help
 

Cogman

Lifer
Sep 19, 2000
10,283
134
106
Originally posted by: GodlessAstronomer
If your goal is to learn C++ I would start with Java or C#, or even jump right into C++. No point in beating around the bush, in my opinion.

I agree 100% with this statement. Learning another language will just slow you down if your end goal is to learn C++.

Start with C++, While fairly low level it isn't THAT bad. And it will force you into good programming habits.

Some books that might help you.

Pragmatic programmer.
Savitch's Absolute C++
and Design Pattens: Elements of Reusable Object Oriented Software

Find a problem that you want to solve, set a goal, and learn how to tackle it. Thats probably the best way you can learn to program. Browsing through code/code tutorials doesn't hurt either.
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
Originally posted by: lightstar
Originally posted by: esun
If you want to use Scheme, then use this book: http://mitpress.mit.edu/sicp/

yea i looked at that book and its associated videos online- too intimidating. don't think i'm smart enough to handle it.


thanks for the replies everyone. unfortunately, i'm too old and tired for any more schooling so this will be a self-study affair. i'm leaning towards scheme so i'm sure i'll be banging my head against the wall soon enough; maybe i'll ask some computer friends for tutoring help

Hmm, well if the purpose of this desire to learn programming is just to learn C++, then fine. But if it's about learning a new way of thinking or understanding, I would definitely reconsider SICP. It's worth the effort (and free, too). It wouldn't be worth doing it if it wasn't a challenge, would it?
 

hans007

Lifer
Feb 1, 2000
20,212
18
81
the kid is 14....

i wouldnt suggest scheme though. Scheme is a really oddball language. I only had to learn it to do some AI classes in college, but its not structured like most mainstream things.

If the end goal is C++ , then I would say ruby or python would be best.

I honestly recommend PHP as a good language because it is very c++ like, without all the nitty gritty. I learned with basic and pascal. But I guess that was in ancient times (i'm almost twice as old as your kid haha)
 

lightstar

Senior member
Mar 16, 2008
579
0
0
let me rephrase. . . .my son wants to become a hacker and study comp sci in college so i figure we have 3-4 yrs to get some programming experience in. . . .i've noticed C++ is the industry standard so learning that would be one of our goals before the end of high school. . . .however, laying down a solid foundation trumps everything else. . . .

so i've noticed that alot of the top schools (like MIT, berkeley, cal tech, ga tech, u. chicago, rice) use scheme in their intro courses. . . .also, i've read several times that these two books (how to design programs & SICP, which are both in scheme) are the best books to read on programming.

since he's only 14, i figure we'd start with the easier of the 2 books to get our feet wet and then later in a year or 2, if we're still standing & interested, go through the SICP text & videos.
 

tfinch2

Lifer
Feb 3, 2004
22,114
1
0
Originally posted by: lightstar
let me rephrase. . . .my son wants to become a hacker and study comp sci in college so i figure we have 3-4 yrs to get some programming experience in. . . .i've noticed C++ is the industry standard so learning that would be one of our goals before the end of high school. . . .however, laying down a solid foundation trumps everything else. . . .

so i've noticed that alot of the top schools (like MIT, berkeley, cal tech, ga tech, u. chicago, rice) use scheme in their intro courses. . . .also, i've read several times that these two books (how to design programs & SICP, which are both in scheme) are the best books to read on programming.

since he's only 14, i figure we'd start with the easier of the 2 books to get our feet wet and then later in a year or 2, if we're still standing & interested, go through the SICP text & videos.

I don't really think there is an industry standard. It all depends on the type of software you want to write.
 

Woosta

Platinum Member
Mar 23, 2008
2,978
0
71
my son wants to become a hacker and study comp sci in college

I would recommend learning all languages available, which I'm currently doing ( though I've never taken a course nor gone to college for that matter )

So far I know: Perl, C, Python, Ecmascript, (sadly) PHP

Next up on the list to learn: Haskell, Lua, Common Lisp, C#, Ruby, C++, Smalltalk, Actionscript 3 / Ecmascript V4, Advanced SQL, Curl

If he wants to do C++ and he learns Python first, it might spoil him as it's a very high level language and there's less code to do more work. I would just learn C++ first.
 
Oct 27, 2007
17,009
1
0
Originally posted by: Woosta
my son wants to become a hacker and study comp sci in college

I would recommend learning all languages available, which I'm currently doing ( though I've never taken a course nor gone to college for that matter )

Apart from being physically impossible, I don't think that this is a good approach to programming. Programming isn't about writing in a language, it's about solving problems. Moving to a new language in most cases is an ordeal that should last for about a week for an experienced programmer, but if your focus in your programming life is learning every language, you might find a few years down the track that you know a bunch of languages but your problem solving skills leave something to be desired.
 

JasonCoder

Golden Member
Feb 23, 2005
1,893
1
81
Originally posted by: tfinch2
Originally posted by: lightstar
let me rephrase. . . .my son wants to become a hacker and study comp sci in college so i figure we have 3-4 yrs to get some programming experience in. . . .i've noticed C++ is the industry standard so learning that would be one of our goals before the end of high school. . . .however, laying down a solid foundation trumps everything else. . . .

so i've noticed that alot of the top schools (like MIT, berkeley, cal tech, ga tech, u. chicago, rice) use scheme in their intro courses. . . .also, i've read several times that these two books (how to design programs & SICP, which are both in scheme) are the best books to read on programming.

since he's only 14, i figure we'd start with the easier of the 2 books to get our feet wet and then later in a year or 2, if we're still standing & interested, go through the SICP text & videos.

I don't really think there is an industry standard. It all depends on the type of software you want to write.

Yeah, I'd agree with tfinch2 here. IMO C++ is the new assembler. It's quickly devolved into it's creator's original intended function: low level system programming. So if you're writing an OS or something than yeah, cpp is the way to go.

Like it or not, today it's more about 6 mo. project cycles that you'll see with managed code like Java and C# vs. the 2 year product cycles cpp often requires. Even games are often wrote in managed code.