UP | HOME

Everything is f*cked

The classic era (the golden age) of computer programming, arguably, ended right with the dotcom bubble, or when MIT has been switched from its Scheme to Python as the main teaching language.

By that time the main focus of non-bullshit “computer science” and programming language research was on managing complexity, while still doing the right thing, which primarily was about crafting interfaces and modules.

The doing the right thing “mantra” were associated with mathematical ideal of minimal, optimal and obviously correct abstractions, not what majority of the degenerates would agree upon.

It is today in a stark contrast with modern APIs, where mostly unqualified and incompetent people put together a junk-food-like crap as fast as possible to show off or to get paid and never to look at it again.

Qualification, proper education and the resulting elegance of a principle-guided implementations, with careful attention to details and “nothing more to take away”, are not optional.

The decline and degradation began with Java, when it has been sold to an uneducated majority with lowest or no “standards” at all (math- and philosophy- illiterates). C++98 templates and the standard library was a total disaster too.

Then began the era of PHP (2000s) and then of Javascript (2005), which sucked in literally millions of degens into “coding” and doing “webshit”, and now we are fucked.

The golden age

The books from 70s, 80s and 90s were true masterpieces (compared to the modern low-effort crap), which sometimes taught a whole field, while being masterpieces of writing.

  • Jackson (Principles of Program Desing)
  • Liskov (Abstraction and Specification)
  • Bird & Wadler (Introduction to Functional Programming)
  • Peyton Jones (Implementation)
  • Paulson (ML for Working Programmer)
  • Joe Armstrong (the thesis and Programming Erlang)
  • Graham (On Lisp)
  • SICP (obviously)
  • HtDP (the methodological parts)
  • K&R (with the focus on just-right machinel-evel abstraction)
  • etc.

Most of C.A.R. Hoare series (and the technial writting as a craft died with it).

By the late 90s, everything fundamental (for managing complexity) has been discovered and “solved”, essentially by taking inspiration from mathematics. The main principle was “coming up with the right structure”, and the main tools are Sets and “directed graph”.

The early results of this principle-guided, focused and disciplined approach include:

  • Open Gerera (an operating system written in Lisp)
  • Smalltalk (a uniform big system done right)
  • Miranda (the language of David A. Turner)
  • Scheme (the “realization” of the MIT culture)
  • Erlang (well-researched telecom-grade language)
  • Standard ML (with Modules)
  • Ocaml (arguably a more refined dialect of SML)
  • Haskell (carefully crafted non-strict langauge)
  • LaTeX (and TeX)
  • The X-Window System (X11R6)
  • The classic vi editor of UNIXes
  • GNU Emacs (as a layered system of DSLs)
  • GCC, Binutils, bison, flex (imperative C code).

There are certain commonalities among all of these systems, and they correspond to following the universal principles and based on “just right” decisions.

  • An minimal hierarchical strucure, which reflects the domain /model.
  • Minimal, proper abstractions (sequences, packets)
  • A layered system of mostly-functional DSLs

The last (for now) system done right is Scala 3.

On the imperative side there are Golang (the right set of abstractions) and Rust (the explicit lifetimes innovation). Just use them.

What to do?

Well, nothing complex can be done fast and low-effort, unless you are ok with a junk-food.

Modern businesses (and investors) however, want everything as fast as prossible.

There is, of course, a fundamental contradiction – the demand of what is impossible in principle.

The results thus will always be failures of some kind (either technical or financial).

The old meme of producing just a few lines of code per week is still valid. Doing the right thing (principle-guided, near-optimal) dominates.

This is an instance of producing the “final” fine pieces of mathematics - a just few lines per year. But these lines are “ethernal”.

Just think of writing a system which will trade your finance. Now you want to do the right thing.

Write in org-mode

Write everything down in a strucured text.

  • Use mathematics as a illuminating candle (Sets, logic, math-for-CS in general).
  • Embed LaTeX in org files, then export.
  • Use git.

Learn the fundamentals

  • Everything has its strucure (strucured text, structured information).
  • Decomposition (of a problem) and compositon (of a program).
  • Just 3 flow-chart “patterns” (composition, branching, recursion or looping)
  • Algebraic types (sum-, product- and exponential- types).
  • Abstract Data Types
  • Modules (including ML Functors)
  • Compisition of interfaces (iterators, sequences, maps, folds, comprehensions)
  • Monads (as particualar “ADT of ADTs”)

Tools

Use the classic editors (both) along with the Language Servers and comman-line tools (such as linters and code formatters). You don’t have to tun a bloated IDE.

  • Learn Neovim (and its Lua modules).
  • Learn Emacs (packages, org-mode)
  • Learn LaTex
  • Learn linters, formattes, LSPs for your language.

Classic languages

Use the classic languages for prototyping and doeing problem-domain research.

  • Haskell
  • Ocaml (SML/NJ is an over-kill)
  • Scala 3 (Scala2 is verbose and kludgy)
  • MIT Scheme or Chez Scheme
  • SBCL
  • Python (because of the libraries and the AI bubble)

Use non-bullshit methodologis

A spiral-shaped process of continusous refinement, from yet abstract concepts to concrete implementations.

Zoom trought layers of abstraction - from the high-level to the machine and back.

Create layers of DSLs which corresponds to “natural hierachies” of the problem.

Use non-bullshit methodologies:

  • FP (just do it)
  • DDD (strtucure and “language” of the problem domain)
  • TTD (write and test the interfaces first)

Just a few lines of code per day

  • Something every day
  • Everything will require a lot backtracking and restats.
  • ABC (Always Be Compiled)
  • Re-writing is OK, it is the most important refinement.
  • Use all the tools available to make re-wiring easier.
  • Read the classic books instead of a social media (the level is abismal and toxic).

Author: <schiptsov@gmail.com>

Email: lngnmn2@yahoo.com

Created: 2023-08-08 Tue 18:39

Emacs 29.1.50 (Org mode 9.7-pre)