

Ask HN: What is the hierarchy of programming? - charleyrock

Meaning...what do you learn 1st, 2nd, 3rd... There are bound to be differences of opinion further out the curve, but are there universal truths about the early stages? How long does it take to become proficient in each?
======
adamzochowski
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

------
jacquesm
That's got to be the most difficult to answer question ever here.

It's like asking how to climb Mount Everest. The flippant answer of course is
'by taking the first step'.

What you learn first is different for everybody, just like that first step on
to the path that leads to the summit of Mount Everest is different for
everybody. It depends, in the first place, on where _you_ currently are.

So without knowing where you currently are it is next to impossible to answer
the question in a way that would make sense to you.

Could you maybe describe a bit of what you already know, your skills and your
experience to date? That would help enormously.

------
davidw
If you want something 'universal', Knuth's books might be a decent place to
start, although you won't be doing anything practical for a while.

I think the field is too new, changing too rapidly, and has too many people
with widely varying goals (computer science vs make a small web site in PHP)
to really have much that's 'universal' besides "get out there and practice!".

------
charleyrock
I know nothing about programming (maybe that is obvious from the odd
question). If someone had an interest in learning, where would he start? Are
the paths so varied that even the basics are not universal?

------
charleyrock
Wow - great input. Thanks very much.

------
pasbesoin
Unless you have a strong, raw intellectual motivation in the endeavor, start
by learning whatever allows you to accomplish tasks of interest to you. This
is a strong motivating factor. If you like it, you'll keep learning more in
order to accomplish more.

Tasks that save you time and effort are a good place to start. Tasks that
entertain you are another.

In this regard, a scripting language with a good interface to your system
(file access, graphics/presentation support, network support) is often cited
as a good place to start. Many people suggest Python.

As you move to tackling larger problems, and/or growing your previous work,
you'll find it beneficial to learn more about designs and techniques that aid
in staying organized, keeping your work maintainable and efficient, etc. At
that point, you'll want to look beyond the references for the language you
started in and learn more general principles. (But even when you start, look
for the BEST references in the language of your choice. The best references
incorporate some of this context and explain it well, giving you a head start
and helping you to avoid "bad" practices you may latter have to "unlearn".)

P.S. Perhaps implied in the above, the environment you want to work in /
control will influence your choice. For "general" programming -- freestanding
programs running on your machine -- you might find e.g Python the best
starting point. If you mostly want to control things in your browser, then
Javascript (along with HTML, CSS, and the DOM model -- which is already
incorporating a quantity of semi-arbitrary detail that frustrates some
people). If you were trying to ease administering a UNIX-flavor environment,
you might consider Perl. If you spend most of your time in Microsoft Office
documents, then Visual Basic for Applications (VBA) or whatever it is these
days.

How long it takes depends largely on you. Some people, particularly with a
strong motivation to accomplish specific things, learn quite a lot in a couple
of months. On the other hand, I've worked with people having technology
degrees who nonetheless seem fairly clueless.

