• Logical order of learning a programming language?
    8 replies, posted
I've had this question for a while, what do you think is the logical order for someone to learn the components of a programming language?
1.Learn basic semantics of language, such as how to define all of its data structures. 2.Find a prebuilt piece of code to reverse engineer it and further understand the language. [editline]24th June 2014[/editline] Wait are you starting from scratch or just approaching a new language?
I usually just start a project and then learn all the stuff in the order they come up. (You can also do simple projects on single components) So for example if I need to store a value I look up how to define a variable in that language, same for functions etc. You see it works with the basics and with the more "complicated" stuff. Later on the project you might need to create objects, pointers and all the stuff that the language you are trying to learn offers. I don't think it's a good idea to just learn stuff up front without having an actual use for it, it also just fills up your mind. (When I started coding lua for gmod, I only needed to learn about metatables about .75 years in and still only rarely find uses for them) There also isn't a "logical" order since that totally depends on what you wanna do.
Are you talking total beginners, or people with a few years of prior experience? As for me: I'll generally give the peculiarities of the language a cursory look and then just... dive in, reference opened in a dozen tabs. That is, if the paradigms it uses are similar enough to ones I already know (you obviously can't do this when trying Haskell after only writing C for the last few years). I find that this approach is quite natural, however your first few programs are gonna be terrible (or at least unidiomatic).
1. Trial 2. Error 3. Repeat
1. Give someone an object orientated language 2. Introduce them to variables such as strings and integers 3. Show them how to perform simple math 4. Give them a way to output what they did either through the compiler, command prompt, a gui, etc 5. Afterwards, explain the appropriate syntax 6. Show them how to find more default functions and how to make their own
I can't believe this wasn't said already: A 'Hello, World!' program. It's pretty much how I started out in .Net, C, Java/JS, and C#. I just started to explore stuff from there.
[QUOTE=ZestyLemons;45259873]I can't believe this wasn't said already: A 'Hello, World!' program. It's pretty much how I started out in .Net, C, Java/JS, and C#. I just started to explore stuff from there.[/QUOTE] You mean how everyone started?.
Almost all languages share the same Types (integers, longs, floats, doubles), so the first part to learning any programming language is to learn what each type means, then build on that by showing what functions each language's standard library can do to those. String manipulation is particularly good because those functions vary wildly from language to language. Then you have flow control, which changes a little bit from language to language, and then you have things like constructors, arrays, pointers, classes, and lots of other things. However, I was taught to code by jumping right in and making games. I think this is the most effective way to teach anything because unless someone actually finds the differences between types and their memory usage interesting, the most important thing in teaching anything is the ability to hold the student's interest.
Sorry, you need to Log In to post a reply to this thread.