Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

This post ("") is in public domain.

So-called "beginner advice" for programming language education, especially for self-learners

I do not recommend C as a first language. However, there are different theories about what should be the first language.

  1. Foundational approach
    • ("grammar schools and universities")
    • Focusing on step-by-step fundamentals.
    • These will indeed start with C.
    • However, Java is also widely used.
    • East-coast universities (such as MIT) use LISP. Berkeley used to use Scheme.
  2. Motivational approach
    • (To showcase "what fun things you could do with computer programming").
    • Python is the top choice.
    • Alternatively, Java with Mobile development (on Android), Javascript are also popular.
  3. Hobbyist approach (without formal education, no access to universities or schools, limited budget),
    • HTML (i.e. "learn how to make visually beautiful, static web pages"),
    • Then, enhance with Javascript.
    • Finally, enhance more with WebGL. It is a great accompanyment with high-school mathematics (vector space, trigonometry), and can provide visual stimulus to someone wanting to study introductory college-level calculus.

These "approaches" are routes that a beginner might take. Once they are on track, they must eventually move on to a "career path".

Why did I say "don't start with C"?

C and C++ tend to be only used in high-performance (or, "performance-cost-sensitive"), deep-integrations with the operating systems, and legacy software systems. Many people who learned C and C++ in schools will eventually land in a career that don't require them at all. Thus, from "return-on-investment" perspective, it is a losing bet, although it can be an enrichment to most software programmers, by giving insight into how lower-level stuff works.

What college-level programming language study-plans look like.

(Anyone not planning to go to college can skip this entire section.)

For CS education that follow the "Foundational approach", the natural sequence of programming language education is:

  • Some discrete maths (to cover: mathematical functions, sets, mappings, graphs, symbolic logic, strings)
  • Java or Python (or similar languages, such as Go, C#, ...)

After that, only "scientific and engineering computing" course plans will go on to study these, in this order:

  • MATLAB (or equivalents, such as Octave, but might also be NumPy/SciPy).
    • At this point, linear algebra and multivariate calculus will also become a prerequisite.
  • C
  • C++

Some "scientific and engineering computing" course plans will study Fortran, such as Earth and Climate Sciences.

The "Bermuda Triangle" of college-level foundational approach to computer programming

Most schools following the "foundational approach" will make these mistakes:

  • Not teaching HTML, Javascript at all.
  • Only teaching SQL in the Introduction to Relational Databases course, and not making it a non-elective CS degree requirement.
  • Inadequate teaching on "software engineering practices"
  • Inadequate teaching on "user interface design". Human Computer Interactions (HCI) or User Centered Design (UCD) are only offered as upper-class elective, or as graduate-level course.

As of today, "employability" requires a software programmer to make up for these four university-education mistakes, by self-learning HTML, Javascript, SQL, software engineering practices, and user interface design. Things might change in the future.

Another famous "Bermuda Triangle" is event-driven programming. It is sometimes referred to by its most promient feature, "event loop". Colleges don't actually teach anything about it. This is despite the fact that, any college fresh graduates who are hired to work on any software that has any user interface, are tautologically working with event-driven programming. Being knee-deep into a mysterious fuild is a harrowing experience. Frustrations and beginner mistakes (those which impact a company's software correctness) could have been avoided if the ubiquity of event-driven programming is better understood by higher education.

Keeping new learners motivated

The biggest hurdle to new learners who do not have access to formal computer programming education is the difficulty of accomplishing meaningful goals. Questions such as

"I learned a few things, but what can I accomplish with them? What benefit does that bring to myself, and to the world?" will demotivate self-learners.

To overcome the "meaningfulness doubt", a typical strategy is to be given a conductive learning environment, and a toy software project that is almost 90% complete. Once you finish the remaining 10%, the toy software project should give you gratification (such as a playable mini-game), as well as a demonstration of usefulness (such as a toy restaurant ordering system), both of which will remove the doubt.

At UW-Madison, my first CS class is to be given a 90%-complete project that is a grahical simulation of a fish aquarium. Once the remaining 10% is done, it can be used as a cute idle toy.

Are there true prerequisites even before writing the first line of code?

The four things you named, (namely, "Problem solving, programming concept, algorithms, object oriented programming"), are learned gradually as your programming knowledge grows gradually. They are not strictly prerequisites.

On the other hand, programming does require understanding of a few concepts which are taught in high-school mathematics, such as "mathematical function" or "mapping", "sets", and a mental model of "memory as post boxes", "named variables as building names used in place of memory addresses". These are necessary before you begin writing the first line of code.

If you have some high-school mathematics, Python is the best first language that will teach you the same programming constructs: lists, sets, dictionaries. See:

Python has been successfully used at many universities to attract non-CS college entrants into changing their degree program into CS. This is widely reported, in every world-class press (newspapers) you can thing of.

While I can't find a link that's not behind a paywall, I did find this one which may convince you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.