Wanna start learning to program (52)

1 Name: #!/usr/bin/anonymous : 2008-07-23 00:57 ID:gk6c3eDU

I'm new to the programming thing, but I've been interested in programming for a long time. I'm mostly interested in C++ and Javascript, since they are the most commonly used programming languages (At least the most common ones that I see/hear of).

Do you guys mind if I ask for a few pointers? I'm pretty much new, so it'd be nice if I could get some help.

Also, I've been on chan boards which just say gtfo, etc etc, so it'd be nice if you'd just save your breath if you wanna say that. :)

3 Name: #!/usr/bin/anonymous : 2008-07-23 05:25 ID:Yqp9NJuK

I really highly recommend this book for beginning programmers. Try and work the exercises as you read along.

4 Name: dmpk2k!hinhT6kz2E : 2008-07-23 05:57 ID:Heaven

<p>If you've never programmed anything before, I recommend playing with something that gives instant gratification and pretty pictures. It's how I started.</p>

<p>I've heard promising things about <a href="http://www.nodebox.net/">Nodebox</a>. If you don't have a Mac, there's also <a href="http://processing.org/">Processing</a>, although it means using Java.</p>

5 Name: dmpk2k!hinhT6kz2E : 2008-07-23 05:58 ID:Heaven

Uh, wrong button. D:

6 Name: #!/usr/bin/anonymous : 2008-07-23 13:14 ID:i34VCoLX

>>2

Almost ashamed to admit it, but I loled.

7 Name: #!/usr/bin/anonymous : 2008-07-23 16:33 ID:B71s4+q9

>>3
I second this. If you haven't already polluted your brain with some weird notions of what programming is about, this book is going to be a very straightforward way to teach yourself solid basics of programming, which will be transferable to any language.

When I read SICP, I had been programming for a decade, mostly in C and C++, and I thought I was pretty good at it, but reading it made me feel like that was the first time I actually understood anything about programming.

Some people claim SICP requires lots of math knowledge, which is quite simply complete bullshit. I struggle even with the most basic algebraic manipulation, but math never became an issue when reading SICP or solving the exercises.

8 Name: dmpk2k!hinhT6kz2E : 2008-07-23 16:56 ID:Heaven

I don't think a neophyte programmer will get much out of SICP. Without external motivation -- read: grades, and perhaps not even then -- they're likely to get bored and wander off.

I have a number of books on my desk I think are quite good, but would have put me to sleep a few years ago.

9 Name: #!/usr/bin/anonymous : 2008-07-23 22:22 ID:Heaven

>>8
Are we talking about the same SICP? It's an excellent introductory textbook and I doubt you've read it.

10 Name: #!/usr/bin/anonymous : 2008-07-23 22:29 ID:Bdn+rn72

I recommend you take a look at http://pine.fm/LearnToProgram/ (ruby) or http://www.greenteapress.com/thinkpython/ (python).

Starting with Javascript in the context of a browser (the only context where it's really used often) requires you to learn a lot of stuff that isn't directly relevant to learning to program (HTML, CSS, browser quirks)—stuff that is much easier to pick up once you've got a programming background.

C++ (or Java)? Don't start with that, you've got tons of unnecessary chores to attend to that won't teach you much.

Scheme is good if you can handle it, but it take a special person to read SICP outside of a course. You just need to be aware that lisp is almost completely irrelevant in the real world.

Whatever you choose, pick something you are really comfortable with and MASTER IT. Once you really understand one decent language, learning another is not a big undertaking.

Python and Ruby are both great languages for beginners, that tech you a lot, have a good user community, and are used in the real world. You can't go wrong if you start with either.

11 Name: #!/usr/bin/anonymous : 2008-07-23 23:42 ID:Heaven

>>9
It may be an excellent introductory textbook but that doesn't mean it's not boring. Unless >>1 is that rare breed of person who wants to learn to program for the mental challenge of finding the most efficient change-counting algorithm, and not so they can make vidya games, probably not a good recommendation.

12 Name: #!/usr/bin/anonymous : 2008-07-24 00:45 ID:5TGS4ued

>>9

It doesn't matter how simple and beautiful you think functional programming is, the vast majority of people do not find functional programming easier to learn than imperative programming. I've seen enough attempts at teaching introductory programming in functional language to know that.

Seriously, it's just not a good idea.

13 Name: dmpk2k!hinhT6kz2E : 2008-07-24 00:53 ID:Heaven

That's real classy, >>9. If I don't agree with you it's because I haven't read it...

There are plenty of positive comments about SICP by experienced programmers. I think it's largely deserved. Do note however that it's experienced programmers making these comments.

Most beginners don't care about the kind of material presented in SICP. Give it to a 12 year old and watch it collect dust.

14 Name: #!/usr/bin/anonymous : 2008-07-24 05:07 ID:B71s4+q9

>>10

> You just need to be aware that lisp is almost completely irrelevant in the real world.

Couldn't be further from the truth. For the last twenty years, most `new' languages have been basically reimplementing old Lisp (and sometimes Smalltalk) ideas. If you know Lisp, you can learn any of them quickly.

Anyway, your language oriented way of thinking is harmful. Beginners should learn abstract concepts of programming, not the idiosyncracies of some language. SICP uses Scheme for its simplicity; when you can learn the syntax in the first two chapters, you can focus on actual programming.

15 Name: #!/usr/bin/anonymous : 2008-07-24 06:57 ID:Heaven

>>13
My daughter is 13 and she has been intermittently reading SICP ever since she told me she wanted to learn programming. Whenever I ask her about it she responds with "it's ok" but she liked K&R more and frequently shows me little fragments of C she wrote (nothing big yet since she knows very little about data structures).

If you look at the Amazon reviews for SICP they're divided quite equally between 1/5 or 5/5, without much middle ground.

16 Name: #!/usr/bin/anonymous : 2008-07-24 08:41 ID:Heaven

>>14
There are no practical uses for any lisp dialect. I don't care if the world would be a better place if they were actually used, they aren't. Learning it is purely an academic pursuit.

According to you a beginner should spend years writing pseudocode and understand everything inside-out before they can even think of doing something.

That's complete bullshit. What matters for a self-taught beginner is that they can stick with learning.

That's why you want a language that brings instant gratification and lets you go from "I want to learn to code" to "look at my shitty tic-tac-toe game" in as few days as possible.

17 Name: #!/usr/bin/anonymous : 2008-07-24 09:09 ID:Heaven

>>16

> According to you a beginner should spend years writing pseudocode and understand everything inside-out before they can even think of doing something.

>>14 said nothing like that, and I'm quite surprised someone could interpret it that way.

18 Name: #!/usr/bin/anonymous : 2008-07-24 14:47 ID:Heaven

I replied more to the general sicp trolls than the actual post, my bad.

But it doesn't change the fact that scheme is not used at all outside of academia and has very few libraries outside of the scientific domain. You have no incentive to stick to it if you learn it on your own. It's best learned later.

19 Name: #!/usr/bin/anonymous : 2008-07-24 18:42 ID:B71s4+q9

>>18
Although I'm here only because /prog/ is down, I'm totally serious about recommending SICP to a beginner, and I don't really want to be called a `SICP troll' by someone who hasn't read SICP or understood what it is.

The fact that Scheme is not used outside of academia (and it isn't used inside academia all that much, either) holds no relevance. SICP is not a book about Scheme. It is a book about the basics of programming that happens to use Scheme as a teaching method.

20 Name: #!/usr/bin/anonymous : 2008-07-24 18:59 ID:0DJNvdLs

>>19

While I appreciate what I learned from SICP, I think it's a difficult beginner's book because it's so damned boring. Many people (myself included) got into programming to do something "cool" like make a shitty game. Having completed that task, then when went back and started to learn more and more about the process, and at that point the lessons in SICP were revelations.

21 Name: 18 : 2008-07-24 20:50 ID:Heaven

Looks like this is the second time in this thread you wrongly accuse someone of not having read this book.
Believe it or not, not everyone is religiously devoted to this book.

22 Name: #!/usr/bin/anonymous : 2008-07-24 21:20 ID:B71s4+q9

>>21
Looks like you accuse me of being someone who I am not. I've only posted non-saged posts with this single ID in this thread.

23 Name: #!/usr/bin/anonymous : 2008-07-25 13:11 ID:5TGS4ued

> Although I'm here only because /prog/ is down, I'm totally serious about recommending SICP to a beginner,

The fact that you are sincere does not mean you are not also seriously misguided. Once again, a beginner does not care about the pure ideals of programming, and trying to force them to care about it gets you nowhere.

The beginner wants to dive in and get their hands dirty. They don't want abstract theory. And because they don't want it, they won't learn it, no matter how much you want them to.

24 Name: HMA MEME FAN : 2008-07-25 13:58 ID:Heaven

> I'm here only because /prog/ is down

Oh man, me too. Feels ronery now that /jp/ is gone, and there's no equivalent anywhere, only shitty shounen /a/ boards.

25 Name: #!/usr/bin/anonymous : 2008-07-26 01:17 ID:Heaven

>>20

>While I appreciate what I learned from SICP, I think it's a difficult beginner's book because it's so damned boring

The purpose of SICP is not to entertain.

>The beginner wants to dive in and get their hands dirty. They don't want abstract theory. And because they don't want it, they won't learn it, no matter how much you want them to.

+

>That's why you want a language that brings instant gratification and lets you go from "I want to learn to code" to "look at my shitty tic-tac-toe game" in as few days as possible.

An example would be the various BASIC dialects, and I hope we all know what's wrong with the ``programmers'' they've produced.

What is all this hype about "instant gratification" anyway? Has exposure to mediums such as television desensitized the population to the point where sitting down and reading a book is considered ``boring''?

26 Name: dmpk2k!hinhT6kz2E : 2008-07-26 05:38 ID:Heaven

> An example would be the various BASIC dialects, and I hope we all know what's wrong with the ``programmers'' they've produced.

Okay, I'm becoming tired of this sheep-like shibboleth. Good for you, you're elite.

I started with QBasic. Loved it to death. Used it for years. Figured out every one of its limitations the hard way. Moved on. I think that people who started long ago with BASIC, assembly, or a similarly unstructured language have a much finer appreciation for the problems those things can cause; you don't know unless you've been there, even if you can talk the talk.

As for me, my coworkers seem to think I'm quite capable. I don't understand itself, since I consider myself lazy and something of a programming idiot, but most of these people are technical bigwigs/movers/rockstars/whatever-the-hell-you-call-them (I don't know how I fell in with them either). As I write this there's a minor war going on between my current job and another startup who wants me. I didn't ask for it, and I really don't understand it, but there you go.

Purely anecdotal, but in the absence of any more information I think you're full of it.

27 Name: #!/usr/bin/anonymous : 2008-07-26 06:55 ID:Heaven

also, you can get instant gratification in many popular languages (python, ruby, etc) nowadays, not just broken ones like BASIC. whereas scheme's only gratification comes when you're advanced enough that you can switch to a more practical language with ease.

why not recommend lisp if you're an FP whore? lisp actually has SDL bindings and some other useful libraries available for it.

28 Name: 18 : 2008-07-26 07:43 ID:Heaven

>>25
I have been given an (already old) computer and a BASIC crash course when I was 6, and it didn't make reading the wizard books (including your favorite) harder.
Not that it isn't a shitty languages even for beginners, and of course all my BASIC idioms were replaced over the years as I got to use nicer toys.
But saying that using shitty languages cripples the mind forever is stupid. I know for a fact that that if misguided adults didn't tell me this stuff as a kid, maybe I wouldn't have learned to code at all.

Not that what I said applies at all to Python or Ruby, since there's no honest way you can consider them shitty.

29 Name: #!/usr/bin/anonymous : 2008-07-26 13:41 ID:4r8/RqdI

> BASIC/COBOL programmers

Dijkstra has successfully trolled you. Have a nice day.

30 Name: #!/usr/bin/anonymous : 2008-07-26 14:18 ID:Heaven

I see your namedropping and raise you a Knuth. NOW WHAT CLEVER BOY?

31 Name: #!/usr/bin/anonymous : 2008-07-26 15:54 ID:B71s4+q9

>>28
I also started with BASIC and, while I switched to C quite quickly and dropped the most blatant basicisms with it, I don't think it hindered learning proper programming later on (although it would've been nicer if I didn't waste 10 years).

That said, I don't see >>25 saying that using shitty languages cripples the mind forever''. I may be wrong, but I think he meant something along the lines of most people learn a language and treat every language they encounter later as the same language with a different syntax''. That makes BASIC a horrible first language.

32 Name: #!/usr/bin/anonymous : 2008-07-26 15:55 ID:Heaven

>>31
Oh dear. 4-ch doesn't seem to like my proper quotes.

33 Name: dmpk2k!hinhT6kz2E : 2008-07-26 16:44 ID:Heaven

It's a bit hard to treat structured languages like BASIC.

I'm sure there's someone out there who decided to use a single massive function with a lot of gotos in it, but otherwise most other people followed the beaten path provided by tutorials.

My transition to C was pretty smooth. The thing I had trouble with wasn't something like abandoning goto, it was character arrays.

34 Name: #!/usr/bin/anonymous : 2008-07-26 20:49 ID:+etmC0pw

I'd like to transition smoothly into Leah Culver's acne scars, if you know what I mean.

35 Name: #!/usr/bin/anonymous : 2008-07-27 02:29 ID:Heaven

>>32 the backtick is not a "proper quote."

36 Name: #!/usr/bin/anonymous : 2008-07-27 04:31 ID:Heaven

>>35
Five decades of abysmal computer typesetting disagree with you.

37 Name: #!/usr/bin/anonymous : 2008-07-27 08:51 ID:QrObZ7oa

You guys are nerds.

38 Name: 20 : 2008-07-27 12:34 ID:0DJNvdLs

>>25

> What is all this hype about "instant gratification" anyway? Has exposure to mediums such as television desensitized the population to the point where sitting down and reading a book is considered ``boring''?

BASIC was my first language, which I started picking up when I was eight years old. SICP would have bored me to death, certainly gone over my head, and possibly turned me away from programming for lack of any gratification. I agree with you that SICP is not meant to entertain. I hope you will agree with me that depending on the person and their circumstances, SICP is a horrible start on the path of programming.

39 Name: #!/usr/bin/anonymous : 2008-07-27 14:18 ID:Heaven

>>5
But the time doesn't ‘add up’ except in terms of system load, which you're creating more of. The web server is already handling each request concurrently, and spawning an extra thread just to spit out a template isn't going to improve that.

40 Name: #!/usr/bin/anonymous : 2008-07-27 14:21 ID:Heaven

>>39
I know I put that in the right reply box. WTF.

41 Name: #!/usr/bin/anonymous : 2008-07-29 22:18 ID:Heaven

>>31
It's actually Dijkstra who said that, of cobol, in a rant that also talks about basic. http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD498.html
I don't think people were dumber in 1975, so this is just bullshit and hyperbole from a time when you could still be taken seriously if you wrote real programs in basic.

42 Name: #!/usr/bin/anonymous : 2008-08-01 21:38 ID:ZiU1GFfg

>>41
Of course people were ``dumber'' in 1975, in the general sense that even very good programmers back then didn't have the advantage of being able to take decades of CS research for granted, which programmers today do, even if only subconsciously.
Standing on the shoulders of giants, and all that.

43 Name: #!/usr/bin/anonymous : 2008-08-01 21:56 ID:9rFJ9NEy

>>42 Those decades of CS research don't cover such radical stretches as you might think; nobody thought it was impossible or even impractical to make an incremental realtime garbage collector, only that it was impractical to make one in 1975. There are in fact very few techniques or technologies that weren't possible or available in 1975, that are possible or available today.

Computers haven't fundementally changed in the last 70 years- they still work basically the same way, and are likely to work the same way in another 70 years.

Programmers weren't "dumber" in 1975, but commonplace programming languages certainly were- if only as a matter of practicality. BASIC and C do things today that only a LISP system could do in 1975, and yet they can't do everything a LISP system could do in 1975.

44 Name: #!/usr/bin/anonymous : 2008-08-03 05:59 ID:ZiU1GFfg

>>43
I'm aware of that, but there's a huge difference between the cutting edge of theory and what the average programmer is aware of. The average programmer will generally know about as much about computer science as his language of choice obviously reflects. This may be especially true now, but it also applied back then.
If the language is dumber or more limited, so will the person who uses it be.

Dijkstra wasn't talking about himself or Knuth or the Sussman, but about the average student, and he was right.

45 Name: Anonymous : 2008-08-04 13:23 ID:LCKPezPD

>>42
Sounds like Alan Kay's "Point of view is worth 80 IQ points"

So, I guess that means >>1 should take a look at Smalltalk. (Thread over!)

Actually, Smalltalk - squeak, say - might make sense to start with. It was taught to ten year olds in the 1970s after all, and designed to work for that purpose. It definitely puts ticks in all the "instant gratification" boxes, it is properly object oriented, and has 30 years worth of finetuning the environment.

The downside is it might be hard to make "proper", standalone applications. But then again, same for Javascript... And it's a little "weird", compared to most write-compile-run(-fix) programming you'd see in the so-called real world.

(Personally, I'd recommend Python.)

46 Name: #!/usr/bin/anonymous : 2008-08-05 04:55 ID:Heaven

>>42

The complexity of "proper" standalone applications are overrated. Once you're ready to ship, it's very straightforward to fork off the squeak vm into a distributable.

47 Name: #!/usr/bin/anonymous : 2008-10-01 06:11 ID:G/k1r/Yw

I love this response from reddit:

"I'm not sure how to convince you in a few sentences that this is the way to go given your situation, but:

1. Download PLT scheme
2. Use the free How to Design Programs book

"If you put effort into that, you'll have a very, very good foundation for learning more about programming. I would strongly recommend against anything else for someone with no programming experience. I'd be willing to fight someone with rocks on this point."

48 Name: #!/usr/bin/anonymous : 2008-10-01 21:28 ID:9rFJ9NEy

>>47

It's a good response!

Look at the number of people complaining how hard to use Lisp is- and note they all learned something else first.

The number of people complaining about Lisp who actually had it be their first exposure to computer programming is almost nonexistent! I see similar things about Smalltalk...

Clearly, unlearning all that nonsense that python and basic fill your brain with is time consuming....

49 Name: #!/usr/bin/anonymous : 2008-10-03 08:25 ID:Heaven

My impression of Lisp/Scheme, and the reason I've never really learned them despite an interest in the paradigm, is that the fundamentals are easy enough but once you want to venture beyond them (into, say, multimedia or web programming) you run into a morass of outdated and poorly documented libraries that are unusable or inaccessible for inexperienced programmers. The "do it yourself" culture and an implicit assumption that everyone knows C seems to result in most bindings being really flaky things, compared to the well-documented, high quality libraries for imperative scripting languages like Python and Ruby.

Things seem to be improving in recent years- ltk and lispbuilder have documentation that doesn't completely suck- but the problem still exists, especially for Scheme.

50 Name: #!/usr/bin/anonymous : 2008-10-04 16:21 ID:EKrrOWWv

>>49

You're right. Python and ruby (and Java) have very good libraries. However, while other people's libraries are very good at solving problems other people had, they're not very good at solving new problems, and the fact is that all problems are new problems to a beginner.

This means that while people who learn on python and ruby (and java) tend to be able to accomplish something faster, they don't generally become very good programers, and tend to stay inexperienced (or rather nonexpert) for a very long time- sometimes a decade or longer.

51 Name: #!/usr/bin/anonymous : 2008-10-05 09:02 ID:Heaven

>>50
I don't have much to say about your post, but what a wonderful ID you got there, sir!

52 Name: #!/usr/bin/anonymous : 2008-10-19 11:42 ID:Heaven

>>50

Quite true. But maybe that isn't necessarily always bad. Not everyone that uses any given software needs to be an expert at it. Compilers and APIs are just another piece of software, and software with a good UI can be used by non-experts reasonably successfully.

It's just a matter of employing these non-expert programmers in an appropriate position.

This thread has been closed. You cannot post in this thread any longer.