[personal profile] koanhead

Introduction



This entry is a set of preliminary notes for something more fleshed-out in the future; in particular I intend that the eventual work should contain material apropos to learning styles which are different from mine. For the time being, this is a record of my recommendations for myself (and for those who learn in the same way as I do) about how to learn a new language.

Paradigms



First of all it's important to realize that programming languages all follow a certain set of common paradigms. Here are the paradigms I know about, with poor examples:

Imperative (SQL, COBOL)
Procedural (C)
Object-oriented (Smalltalk, C++, Javascript)
Functional (Lisp, Haskell, Erlang)

Many languages, such as Python, are designed in such a way as to implement all or part of more than one paradigm. Some are explicitly called "multi-paradigm" languages, and some make you guess about it. In general, if a language doesn't specify its paradigm, then it's a multi-paradigm language (or so vaguely specified that you may wish to think twice about using it.)

Within each paradigm are certain patterns which are characteristic of languages which occupy the paradigm. For example:

Imperative: duh, iunno
Procedural: Named subroutines, flow control, iterators
Object oriented: Classes, subclasses, object instances, inheritance
Functional: Map / reduce, currying

Mathematical Patterns



Languages also are based on mathematics. In order to represent mathematics in a programming language, one must start with a theory upon which one can derive arbitrary mathematical statements. Set theory and type theory are two examples of such foundation. Most programming languages may be regarded as set-theoretical languages, particularly object-oriented ones. Others, notably Haskell, are type-theoretical languages (in particlar, Haskell uses Hindley-Milner type system, which is something I don't understand particularly well, so won't say much about it.)
As with the language's paradigm, the underlying mathematics determines certain patterns which recur in languages founded thereon.

->I should put some examples here, but I can't think of any at the moment. Derp.

A knowledge of the basic common structures in languages of certain types comes more-or-less naturally with experience, but I hope to short-cut this process for others (and for myself when I inevitably forget this information).

Programming has been said to consist of Algorithms and Data Structures.
->I can't be arsed to attribute that quote just now.

Data Structures



Simple



A variable is a key-value pair; the key is generally of a uniform type (called an "identifier" in most languages and constrained in the same way as function names, etc.) and the value is generally of a type specified by the programmer or inferred by the compiler.

Complex



Arrays

Classes and Objects

Types and Typeclasses

Functions and Functors and Monads, oh my!


Algorithms



Iterators



Flow control





idk wut



Tricks



Tutorial videos



There are ever so many programming language tutorial videos on the Web in various spots. If you can find one on the main web site for the language in question, then it's likely to be pretty good.

In my experience it's good to watch these tutorials (provided they are short) even if you can't really follow what's going on, because you will retain information you don't yet understand but which will make sense later in another context.
From:
Anonymous
OpenID
Identity URL: 
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Expand Cut Tags

No cut tags

Profile

koanhead

October 2016

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Page generated Oct. 20th, 2017 04:01 pm
Powered by Dreamwidth Studios