I've had a very odd learning experience in programming. I was sort of taught C++, but I didn't get a lot out of it. Here's what I did get out of it: headers and variable declaration. And I tried to teach myself PHP, in which I learned a lot of. The problem is, a lot of my knowledge is widespread, random, and designed for specific situations.
So, my questions is: What basics are there to programming in most languages?
The term "basics" implies a short list, but to be an effective programmer you have to learn a LOT of concepts. Once you do learn them, though, you'll be able to apply many of the same concepts across languages.
I've compiled a (long!) list of concepts that are important in several, if not most, programming languages.
-
Language syntax
- Keywords
- Naming conventions
- Operators
- Assignment
- Arithmetic
- String
- Other
- Literals
- Conditionals
- If/else
- Switch/case
- What is considered true or false (0? Empty String? Null?)
- Looping constructs
- for
- foreach/iteration
- while
- do-while
- Exception handling
- importing/including code from other files
-
Type system
- Strong/weak
- Static/dynamic
Memory management
-
Scoping
- What scopes are available
- How overlapping scopes are handled
-
Language constructs/program organization
- Variables
- Methods
- Functions
- Classes
- Closures
- Packages/Modules/Namespaces
-
Data types and data structures
- Primitives
- Objects
- Arrays/Lists
- Maps/Hash/Associative Array
- Sets
- Enum
- Strings
- String concatenation
- String comparison and equality
- Substring
- Replacement
- Mutability
- Syntax for creating literal strings
-
Functions, Methods, Closures
- Method/function overloading
- Method/function overriding
- Parameter passing (pass-by-value/pass-by-reference
- Returning values (single return/multiple return)
-
Language type (not mutually exclusive)
- Scripting
- Procedural
- Functional
- Object-oriented
-
Object-oriented principles
- Inheritance
- Classical vs Prototypical
- Single, Multiple, or something else
- Classes
- Static variables/global variables
- access modifiers (private, public, protected)
-
API (or how to do basic stuff)
- Basic I/O
- Print to Standard Out
- Read from Standard in
- File I/O
- Read a file
- Write a file
- Check file attributes
- Use of regular expressions
- Referencing environment variables
- Executing system commands
- Threading model
- Create threads
- Thread-safety
- Synchronization primitives
- Templating