Language Notes¶
To be confident in Basic Programming, you will need to know the following concepts.
Variables and Scope
Control Flow
Function and Object Decomposition
Design Patterns
Databases and Data Modelling
Libraries and APIs
Debugging
Deployment and Administration
MVC
Automated Testing
For Advanced Programming you will need to understand,
Profiling and Scaling
Architecture Patterns
Workflow Patterns
Enterprise Patterns
Components
Computer Science
Advanced Maths
Refactoring
Reverse Engineering
Integrated Testing
Hardware, Networking and Operating System concepts.
How do you overcome the fear of wrong code and become more confident ?
In all probability you went to a college that sucked. The situation is fairly dire with misdirection everywhere. The gazillion framework authors, language designers who have thought of the problem are here to do the thinking for you and tell you to use their stuff. But their incentives are skewed. Yes their websites dazzle with videos, their demos and conferences are a weeping glory but learning a framework and idiosyncrasies of one language will never help to overcome the fear of writing code. Here are time and tested methods,
Trial and Error
Find a mentor and work on a project with him / her
Build and Distribute a Game or 10 Apps and maintain it on your own
Join a startup as an intern which does code reviews
Do a course completely which stresses the basics not just the frameworks
Work for free at a Non-Profit while you learn
It should not take more than 3 months to do this, although trial and error will take longer than that If you want to become more knowledgeable, reading and practicing is the only way. It will take time. The career has its ups and downs, but you will not get there in 21 days. I am happy to mentor and do code reviews. Teaching is something I enjoy. Feel free to get in touch with me if you are interested.
Programming Language Concepts¶
Namespaces
Templates
Structs
Pointers
ADTs
Serialisation
Immutablility
Lazy
Lexical Scope / Global Scope / File Scope
Curyying
Transpiler / Preprocessor / Compiler
Symbols
Monads
Continuations
List Comprehensions
Destructuring
Pattern Matching
Polymorphism
First Class Functions
Decorators
Literals - Numeric, String, JSON, Array, Dictionary, …
Loops
Infix Expressions
Statements
DSL
Macros
Type Declarations
Duck Typing
Modules
Blocks and Closures
Concurrency
Coroutines
Comments / Doctstrings
Exceptions
Multiple / Single Dispatch
Invariants / Assertions / Data Guards
Operator Overloading
Annoatations
Early bound - actions / inheritance -> Type Checking -> Design Patterns
Late bound - messages / delegation -> Duck Typing -> Reflection
OSV Syntax
Optional Values
Recursion
Mutual Recursion
Tables
Threads / Processes / Active Objects
Function objects
Function Calls
Function Pointers
Syntax Primitives¶
C¶
if, for, while, struct
if expr statement
infix
C++ / Java¶
cout << “Hello World”
auto
~Foo
::
this
Sh¶
$vars
<< ‘Here’
cmd args
Perl¶
my $foo = 5
is an expr
do, bless
qw, / /
‘a’ .. ‘z’
loop lables
goto $label (also in gcc)
DATA
Perl6¶
?? !!
say
my \var
junctions
custom operators
:types
multimethods
Python¶
*kwargs
generators
in is not and or
nested functions
yield
with
pass
decorators
Ruby¶
:symbol
do .. end
switch
“foo”.upcase()
paren free style
blocks
meta programming
“#{interpolation}”
Small Talk¶
if:
CL / CLJ¶
names-likes-this
arbitrbary nesting
macros
->
->>
go¶
declaration syntax
goroutines
Template engines¶
asp
*ml, prolog¶
Nil
JS¶
undefined, null
Scala¶
Null, null, Nil, Nothing, None
Regex¶
regular expressions is for matching known grammar
a string is a sequence of quantified unicode characters or strings.
in a string can be
1.a character x{1,1} == x
2.a character ? (x|y)
3.a repeated character x{1,2}
4.a sequence of characters m{1,1}a{1,1}i{1,1}l{1,1} == mail
4.a sequence of characters ? mail|rama
5.repeated strings (ma!){1,2}
6.escape character ,\Q \E
() is used for both grouping and match extraction
the start and end indices can obviously be extracted
in a string the position characters are given by
1.bos ^
2.eos $
3.word boundary \b
4.non word boundary \B
5.negative look ahead (?!E)
6.positive look ahead (?=E)
7.end of previous search \G (multiline mode)
special shorthands
for quantifiers
1.one or no time ? == {0,1}
2.one to inf +
3.0 to inf *
for characters
1.feeds \f \r \n \t \v
2.spaces \s \S
3.any digit \d == [0-9] \D
4.any hex,oct \xhhhh \Ohhh
5.any character .(dot)
6.word \w \W
7.bell \a
globbing and regexp
c == c
? == .
== .*
[ ]
character class [ ]
instead of long (x|y|z)
[x,y,z]
[x-z]
[^x,y,z]
[a-z&&[^x-z]]
substitution
s/regexp1/regexp2/flags
while programming in C++ extra \ is needed
althogh regexp is best a line parser, multiline parsing can be done by setting m mode
regexp are best used with utf-8. although utf-2,utf-21,utf-16,utf-32 can be used.
from java regexp
greedy matches biggest
reluctant matches smalllest first(additional ?)
possessive matches extracts first and doesnt backoff(additional+)
Assembly¶
OS
System Calls
Memory I/O
Grpahic Card I/O
Device Peripheral I/O
Network I/O
DSP
Concurrency
Arithmetic
Control Flow
Functions
Linkers
C concepts¶
argv / getopt
namespace
assert
loops
files
casts / void*
curses
RAII
Classes
fork / exec / sockets
extern / namespace
function pointer
bits / structs / union / arrays
environment
malloc
references rules
references dont work with declarations only definitions
references only work for outer scopes
references cannot be dereferenced
references cant be returned;
references cant be assigned to values
referneces can be defined only once
pointers
check type and casts particularly when mallocing
check buffer over run and check for NULLS
initialise array
free before main returns
the ascii null must be there
Process Patterns¶
A process typically typically has a
A life cycle
A way to get inputs and interrupts
A way to delegate outputs
A way to trigger events and alerts
Restarts
Memory
Producer -> Source -> Transformer / Worker -> Sink -> Consumer
Co-operative Tasks
Reactive
Asynchronous + Promises
Feedback
Feedforward
Scheduler
Types of Procedures¶
Module manages dependencies and function, object locations as well.
Commands
Queries
Routines
Authentication
Authorization
Filters
Validators
Transformers
Proxy
Router
Extractors
Loaders
Loggers
Assertions / Invariants
Exceptions
Integration
Design Patterns¶
Service Locator
DSL
Template
Obervers
Visitor
RTTI
Architecture¶
Interceptor, Pipes and Filters
Blackboard / Tupplespace
Message Passing
Flow Based
ECS
MVC, PAC, MVP
SOA, EDA, MicroServices
Signals / Slots
Flows are Data Driven on Demand Driven. Flow occurs between component couplings.
Coupling¶
Data flows across a coupling.
Messaging
Function
Control
Component Wires
Interceptors / Delegates
User Interface Coupling
Observers
Handlers
Remote
RPC
Half Objects
Request / Response