What I can remember learning from various languages and technologies

An incomplete list and not in any particular order.

Visual Basic

  • Types
  • Values
  • Conditions
  • Loops
  • Procedures (subroutines)
  • Event driven style
  • Assignment

JavaScript

  • Procedure expressions
    • E.g. A callback system
  • Closures
  • Function scope
  • Observer pattern
  • Type coersion
  • Module pattern
    • Revealing module style
    • CommonJS style
  • Hash map data structure
  • JSON

jQuery

  • Call chaining

C

  • Memory allocation
  • Pointers
  • References
  • Preprocessor Macros
  • Block scope

C#

  • Classes and Objects
  • Inheritance
  • Polymorphism
  • Linked Lists
  • Array Lists

Objective-C

  • Messaging
  • Interfaces (Protocols)

Java

  • Decorator pattern
  • String Buffers
  • String Builders
  • Iterators
  • Threads

Clojure

  • Lambda expressions
  • Code as Data
  • Macros and Quoting
  • Keywords
  • Destructuring (Pattern matching)
  • Futures
  • Functional Programming
    • Map
    • Folding
    • Laziness
    • Tail-recursion
    • Recursive Accumulators
    • Immutability

Haskell

  • Function composition
  • Point-free programming
  • Monads (NOTE:Still learning)

PHP

  • Output buffers

Qt

  • Signals and Slots

CSS

  • Prescedence Value

Ruby

  • Generators

Structural Operational Semantics

  • Relations
  • Pattern Matching by construction
  • Preconditions and Postconditions
  • Invariants

Lambda Calculus (and related concepts)

  • SKI Combinators

C: void print_binary(int)

Quick C implementation of printing a 32-bit integer in it’s binary format.

Original:
http://tinypaste.com/62a96c

Improvement by joethought:
http://tinypaste.com/7507a

Final Algorithm:
http://tinypaste.com/fb3b3c

#define SIZE 32
#define MASK 1 << (SIZE - 1)
void print_binary(int _value) {
   
int count = SIZE;
   
while (count--) {
        printf
("%d", (_value & MASK)!=0);
        _value
= _value << 1;
   
}
}

EDIT NOTE: Listed progression through states.

37 notes