   Some guidance/advice to the absolute (self taught) beginner
  I've written some (alternative) advice for you complete, absolute beginner (game) programmers here. Let know whats all of you guys think, opinions and suggestions.[Edited by - snk_kid on June 20, 2006 2:00:19 PM]
  I would think that the lack of learning (web/book as well as people) resources and the general lack of results would make Scheme a poor self-teaching candidate. Further, advocating a language reputed for not actually being used in any products to a group of programmers reputed for not actually finishing any products might have disasterous consiquences. [depressed]Still, likely better than C++.   ;Quote:Original post by TelastynI would think that the lack of learning (web/book as well as people) resources and the general lack of results would make Scheme a poor self-teaching candidate. Further, advocating a language reputed for not actually being used in any products to a group of programmers reputed for not actually finishing any products might have disasterous consiquences. [depressed]Still, likely better than C++.if anything it seems the two were made for each other.I can see it now: "The Incomplete Guide to Game Programming";Quote:I would think that the lack of learning (web/book as well as people) resources and the general lack of results would make Scheme a poor self-teaching candidate. I vehemently disagree.SICP, which is widely regarded as one of the best (if not THE best) introductory CS texts, uses scheme. It is also freely available on the web. HtDP also uses scheme. snk_kid mentions both.You'll be hard pressed to find two other free texts for beginners of comparable quality on the web.There is a reason why Abelson and Sussman chose scheme as their teaching language: its semantics and syntax are simple enough for a beginner to comprehend. There are not thousands of special syntax cases in scheme, and the language does not force anyone into a particular style. Scheme is appropriate for demonstrating functional, procedural and OO styles.Given the choice between, on one hand, thousands of mostly mediocre or downright misleading tutorials that teach syntax and library routines instead of programming and, on the other hand, SICP, I choose SICP and scheme. I believe snk_kid's advice is fundamentally sound, and a welcome relief from the "teach yourself programming in two hours" mindset that seems to be popular lately.snk_kid:Quote:Although one can do OO in a purely functional manner, mainstream OO languages currently do not foster this style of programming and thus it is or becomes unnatural.  I disagree with the first part. OO has many meanings, but a common theme is the encapsulation of state in different entities (instances of classes) with mutable state. These stateful entities send messages back and forth. In OO, a program is a collection of entities with mutable internal state.This is fundamentally at odds with the functional view (a program as a collection of referentially transparent functions, no state except the state that's explicitly passed as a function argument). So I don't think doing OO in a purely functional manner makes any sense, at least for common meanings of OO. Mutable state is a central part of OO, while it is disallowed in purely functional code. Writing OO style in purely functional languages is at least as unnatural as writing functional code in pure OO languages.   ;Quote:Given the choice between, on one hand, thousands of mostly mediocre or downright misleading tutorials that teach syntax and library routines instead of programming and, on the other hand, SICP, I choose SICP and scheme.You though, are not the average self-teaching beginner. I don't disagree with any of your points; from what I've used, Scheme seems like a fine learning language and certainly better than C++ in that regard.Good for learning especially in a formal academic setting with peers and academic motivations. In a self-teaching situation though with (perhaps misguided) practical motivation, I am skeptical that the motivation to learn will be there for beginners to overcome standard beginner roadblocks and to resist the inevitable "Scheme? WTF?" replies.   ;Quote:Original post by Anonymous PosterI disagree with the first part. OO has many meanings, but a common theme is the encapsulation of state in different entities (instances of classes) with mutable state. These stateful entities send messages back and forth. In OO, a program is a collection of entities with mutable internal state.This is fundamentally at odds with the functional view (a program as a collection of referentially transparent functions, no state except the state that's explicitly passed as a function argument). So I don't think doing OO in a purely functional manner makes any sense, at least for common meanings of OO. Mutable state is a central part of OO, while it is disallowed in purely functional code. Writing OO style in purely functional languages is at least as unnatural as writing functional code in pure OO languages.Perhaps i wasn't very clear, what i meant by that is by for example using immutable objects and simulating/emulating other aspects i should probably explain that and take out the "purely".   ;  I think you make some great points, and you touched on a big problem that I had in migrating to OO.  When I was learning "C++" in high school and college, it wasn't really C++.  It was C with classes, and that doesn't help anybody.  I don't know if this is C++'s fault, but I haven't seen many resources (online or real books) that teach correctly from the beginning.Aside from that, I like the content of what you said, but I think you might want to proofread it.  I noticed that your punctuation is sparse (which really hinders my reading but probably affects others less severely), and you tend to use a synonym/synonym instead of just one word or the other.If you can clean it up and add a few more specifics, or at least expand on them in later articles, I'd say this should be stickied in For Beginners.  Perhaps, even in the Start_Here page.   ;  Nice article, and I agree C, C++, C# etc. aren't good for learning to program, most people don't even learn to program, but to memorize syntax. Anyway I wonder if you could please tell what you mean with this:Quote:OO tends to be about hiding (shared) (mutable) stateOO programs have a shared mutable state, but I would say OO is more about organizing that state into seperate areas of data (and seperating these areas into even smaller sub-areas, until each area is a primitive type), than about hiding it.   ;  You say you have written this for absolute beginners, but I don't think they will get all of what you say. The first half is clear, but then the latter half mentions imperative nature of C++, OOP, shared mutable state and functional programming, a beginning programmer will have no clue as to what you are referring. Having no clue it is pretty hard to take advice you don't understand why it is good. Must say I find this part not very easy myself too although I have been programming some time and I think I get the general picture. Maybe because of my imperative mindset...Somehow I feel I belong in your target adience, being a little hobby programmer in C++ and moved to D, although I don't think I will ever be, or want to invest so much time as to become, a competent programmer.   ;  You "hide" the state in the sense that it becomes part of the object's abstraction.Although personally, I don't see that it's a big problem. I find it a lot easier to explain modelling (and thus top-level design) in OO terms. In the real world, things have state, after all. It's not that difficult to deal with. And anyway, I think seeking purity in *any* programming paradigm is likely to be a mistake. After several scattered attempts I still find it difficult to do things in a purely functional way, regardless of language; but I find that mixing in functional stuff to an existing program works great. IMHO the list comprehension is clearly one of the best things Python has to offer. I love it to pieces, I do.C++ is multi-paradigm. It's not great syntactically overall, and its functional support in particular is rather a library hack (designed to prevent you from doing own *own* greenspunning), but it's there for you - and I don't see any reason not to show it to beginners (reasons for not showing *C++* to beginners notwithstanding ;) ) at the same time as the rest of the standard library. :)(Should we perhaps move the discussion to GP?)   