News for hackers. Stuff that matters.
Re:Ask HN: If you were to learn to code again... by austin-cheney on Friday November 24, 2023 @06:55AM (#38403049)
Yes, but I would start with C lang and avoid JavaScript entirely until I no longer needed it for employment. In the world of corporate JavaScript employment the least competent and most insecure people dictate candidate selection, how to write code, and quality of output. If this only just resulted in wasted time it would just be slightly annoying.

I still wouldn't invest time in Java. That would greatly increase my employment mobility, but I have seen too many bad practices and failed business applications come out of corporate Java. If I really wanted this kind of self-punishment I still think I would prefer Java or JavaScript because even though I like the JavaScript language so much better the Java ecosystem more than makes up for it with more mature coworkers.

Re:Ask HN: If you were to learn to code again... by LabMechanic on Saturday November 25, 2023 @10:12AM (#38413986)
C was my first language as a teenager. It is my native (formal) language, if you prefer.

Considering OP's question:

After C, I'd suggest looking into the Lisp family of languages like Scheme or Racket. I discovered them not long ago and wish I had found them sooner.

The reason is simplicity, ubiquity (Clojure), maturity (way older than C, see Lindy effect).

Then after Lisp, Python. Done.

There is nothing really to be learned thereafter. Programming languages come and go, but they have certain elements in common:

  - I/O
  - repetition (recursion)
  - conditional execution
  - arithmetic
Then there is stuff on top of that: OOP (which means data and code belong together. You can do that in C too:

https://www.state-machine.com/doc/AN_Simple_OOP_in_C.pdf

After C, Lisp (e.g., Racket) and Python, I would focus on common data structures and algorithm topics:

  Data Structures
  - Linked Lists
  - Trees, Tries & Graphs
  - Stacks & Queues
  - Heaps
  - Dynamic Arrays
  - Hash Tables
  Algorithms
  - Breadth-First Search
  - Depth-First Search
  - Binary Search
  - Merge Sort
  - Quick Sort
If you want to go to the extremes:

Lambda calculus and the formal language around Turing machines. Turing machines only need to read/write memory, move around memory, execute a finite program, have (near) unlimited memory.

Excel seems Turing complete, so maybe start programming with Excel. Don't!

Then there are what I call "industry languages", programming languages that you cannot keep in your head easily and probably need IDE assistance with:

C++, Java, Scala, Rust, etc., are production environment languages. Learn them later in life.