Skip to content

Comment on Ask HN: What is the hierarchy of programming?

Comments

Concepts, typically most important are:

  . variables 
  . code 
  . conditional code (if statements) 
  . repeating code (loops/while/until/for) 
  . code grouping (procedures/methods/functions) 
  . variable grouping (records/structs)
More advanced concepts then become
  . boolean logic (extension to conditionals)
  . Object oriented coding (think: code+struct grouping)
  . namespaces (think: grouping of objects)
  . generics / reflections
  . pointers
    (certain languages expose this completely
    (some implicitly: through pass by val or pass by ref
    (some implicitly: by primitives vs objects
  . preprocessor (only certain languages)
  . recursion (repeating code but through function)
  . functional features
----

How do you pick these concepts up? Few ways, but I think the following three are most common:

1) Old School Method :: Understand what is happening on the bare metal, and then work building syntactic sugar between what is happening really, and what you want to happen.

  Assembly
  -> C
    -> OPP (C++/Java/C#)
      -> scripting (Perl/Python/Ruby)
        -> Functional (Lisp)
2) New Schooling :: Doing simple things in simple way (KISS principle), and then moving towards complicated systems ( a decent litmus test for language complexity is 'hello world' program. The more lines / syntax it requires, the more complicated language is. For example: for Java one needs to use objects / namespaces / static methods / functions / etc ) -> used by new academia
  Scripting (Python/Ruby)
  -> C#/Java/C++
3) Learning on the job :: fixing existing code, read code, tweak it, rinse, repeat. Learn from examples. Used by some vocational schools.

----

Libraries are in itself own big concept. Languages without libraries are bare, and, outside of curiosity, not practical. Very often knowing a language implies not only understanding of language grammar, but also it's libraries

You can think that libraries define half of what is considered programming language. For C++ you got STL/Boost. For Perl you got CPAN.

Kind regards

Adam Żochowski

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.