A young aspiring programmer asks you as an expert ...
# linking-together
s
A young aspiring programmer asks you as an expert and mentor:
"I want to understand the most important programming paradigms and learn about the broadest set of language features out there. What is the minimal set of programming languages I should look at? Popularity and how widely used these languages are doesn't matter, I just want the highest 🤯:🤓 ratio to maximize my learning."
Here's what I think: • C — for a simple, pragmatic, influential, and still widely used procedural language and to understand memory management • Smalltalk — for a highly dynamic language and environment, message passing and the origins of OOP • Lisp — because you wouldn't take me seriously if I left it off such a list • Haskell — for a pure functional, strongly typed language with laziness and strong compiler support (error checking, synthesis, etc.) • Forth — for an even simpler, but still highly expressive, extensible, and dynamic language • Datalog — for logic programming and constraint solvers (or maybe Prolog instead?) • Erlang — for actor model and concurrent programming What would you respond?
d
I end up taking a lot of 3-4 hour introductory courses on PluralSight or Lynda.com. I’ve taken those for Haskell, Elixir, and C. While I’ve never programmed in them, the courses have been invaluable to understand the different paradigms, and I’ve found this range (anywhere between 3 and 8 hours) of pretty nice optimization of value vs time invested. I’ve spent much much more time learning Lisp in the form of Scheme (SICP is amazing) and Clojure, and I feel Clojure specifically has improved my taste in languages beyond what it otherwise would be.
👍 1
e
Nice list 🙂 I'd add: * Assembly - to understand the low-level. * Rust - Enforcable patterns for safe memory use * *Agda*/*Idris* - To glimpse at the power of dependent types * Coq - To dive deeper into formal logic
i
• Max/MSP — It's probably the most polished visual programming language. • Notations for things that aren't programming — It's worth seeing how other domains have solved the problem of "process communication". I'm thinking various notations for music, weaving & patterning, semaphore, electrical schematics, etc • SpaceChem, Factorio, Opus Magnum, etc — Video games that take the act of programming and permute into a different kind of joyful experience.
e
For the broadest possible range, i would suggest the following languages to look at • Modula2 (highly superior to C, free compiler at the ADW website) for how to do separate compilation and modules properly (JS modules are a bad copy) • skip smalltalk, it was a cumbersome language whose only enduring contribution is named optional parameters on function calls. But the IDE for smalltalk, called Pharo is among the most advanced of any language. • Mathematica - the only commercially successful symbolic language, and has a sensible business model where schools and big companies pay for the staff of 700+ workers via license fees while students get it for free. • Icon - the evolution of Spitbol, one of the best text processing languages • Forth - the most compact language ever devised. Almost completely unreadable like Lisp, but it shows the power of stack based languages (of which Postscript is another more commercially successful example). • Skip APL, study J instead, Iverson's successor language which ditched the crazy alphabet. Another almost impossible to read language, but very compact. • Elixir (skip Erlang, as it has a very ugly syntax for the same runtime). The only runtime that can handle hundreds of thousands of threads no problem; has a unique memory approach by giving each thread its own stack and heap. • Delphi (or VB6) for an example of how an integrated product delivers terrific productivity and a marketplace of interchangeable parts). Delphi gets no love from academics but it is incredibly productive. • Filemaker Pro for an example of how to make a terrific user interface for screens and forms (and how not to make a scripting language, because its scripting language is archaic and painful to use)
d
APL had a huge impact on how I think about programming. Array programming is one part of it. The other part is the incredible compactness of the notation. You asked for a "minimal set": I'd consider swapping Forth for APL, because they both convey the idea of writing programs as a string of combinators, but APL has more depth and embodies a more radical way of thinking about programming.
e
I updated my list to mention APL, although Iverson whom i was fortunate enough to talk to before he died, had finally recognized the awkwardness of an invented alphabet, and recast it as J, which tries to beat Mathematica.
c
Adding assembly might be a good idea I agree
w
Max/MSP is worth a look. With Smalltalk, it's not the language so much as the environment, so jump straight to Glamorous Toolkit. At this point, so much of C is... dated... perhaps Go is better for non-GC, yet still focused on memory layout. Has concurrency that is interesting to compare with Erlang. For the novice, Lisp and Forth's execution models are the least mysterious.
👍 2
s
Lots of great additions, thanks! But adding more is easy — what would you remove? Also for those who suggested assembly: which kind? A good friend of mine would say, “Clearly 6502 — the last platform we built that a single individual could completely comprehend down to every component.” https://m.youtube.com/watch?v=ZsRRCnque2E
g
remove: the call-stack
e
Prof. Wirth wrote a code generator for one of his computer projects, and he write one for the National 32000, the Motorola 68000 and the Intel 386, and because the National chip was the most regular instruction set it was the simplest and smallest code, followed by the Motorola, and then the absolute worst was the Intel. And yes, just as one might predict, the Intel was by far the most popular chip, followed by the Motorola, and the National chip died out quickly. It is one of the more perverse things about computer industry that the simplest and best solution usually fails in the marketplace, because underlying our industry is the normal human desire for job protection and increasing billable hours. Hence the most irregular funky instruction set dominates, and the clean simple as can be stuff bombs out. You can see it where the really terrific MULTICS OS gets wiped out by the a monstrosity like OS/360, or COBOL beats the pants of FORTRAN. Or how Java got picked as the enterprise language of choice when it is one of the worst languages ever devised, a build-once, debug-everywhere hunk of junk (IMHO).
👍 1
I never learned the National chip, but the Moto 68,000 was a great chip, far superior to the intel architecture. Very easy to learn, with a nice macro assembler. The 6502 is very old, I don't think its assembler was particularly great, but the original Apple BIOS which Wozniak wrote is the work of genius and a testimony to how good a programmer he was. Back in the 6502 days you could poke a byte into a fixed memory location and draw on the screen. That was character graphics of course, but it had some box drawing characters, and i am telling you that the productivity on that Apple 2 was stupendous for programmers. It takes about a million lines of code to draw a letter on a bitmap screen nowadays with all the stuff under the hood. The Z80 is still used today, that is a very simple 8 bit chip. The microsoft assembler as far as assemblers go is super fantastic. it has IF / THEN / ELSE, all sorts of macros that elevate it far above what you might expect.
w
Big fan on the 68k (once wrote an entire compiler in 68k asm), but blaming crappier designs winning on "job security" is a bit simple, imho. In many of these cases, the market simply does not care for elegant (to the programmer), it cares about cost, right place right time, and lucky connections to other tech / other companies etc.
👍 1
Intel managed to make the iterations of the 386 faster (than the 68k) and cheaper (than the risc alternatives), with its horrible ISA never much of a disadvantage