Big Ideas behind buzzwords

There are very few really big ideas in software engineering, which are related to the other branches of engineering and ultimately to the Nature itself, as a way to describe complex phenomena of the world outside and to build our own robust complex systems.

To understand the fundamental principles and ideas we should, perhaps, grasp the principles on which life itself based. Beautifully enough, there are very few of them.

Basically, life performs exact pattern patching on atomic structures (physical molecules), along with message passing (by sending and receiving of certain molecular structures). Life also has procedures (implemented as proteins as a sequences of the very same basic aminoacids) which transforms molecular one structures into another (the way a mathematical function would do) and it uses triggers and pipelines made out of chained "physical" procedures. That it.

The important principle is that Life (and underlying Nature) has no notion of a Number, and therefore no counters, no clocks, no numerical state. Only physical structures and electrical signals. There is no math outside our heads.

The big idea is that we should deeply understand and reuse the principles and mechanisms of life, the process of Evolution eventually selected what works. Molecular biology as a complementary discipline for good software engineering.

  • Sets - the basis of groups, categories, types and logic.
  • Sequences - the notion of a Set together with Ordering and duplication (copying).
  • Structures - an ordered sequence of elements (usually named slots).
  • Patten Matching - structural matching and type-based matching.
  • Procedures - enzymes of code. first-class functions.
  • Abstraction Barrier - separation of logic (use) form implementation (atoms and Life).
  • Code Is Data - everything is made from the same atoms (zeroes and ones, s-expressions, objects).
  • Message Passing - the natural way of communication. Life itself relies on it.
  • Pipelines - processes (defined by procedures) should be compose-able (ATP pathway).
  • Inheritance - inclusion of attributes of nested (related) concepts.
  • Duck Typing - purism is incompatible with Nature. If it walks like a duck and quacks like a duck...

There is a very incomplete list of really big ideas:

  • Immutability - do not write over, write on an empty space (of a chalkboard).

This is probably a single the most important idea of CS. It states that avoiding mutation (over-writing of a value) and producing a new value in a distinct memory location instead is a proper way of doing a computation. Of course, there are always exceptions, situations when we must overwrite a value, but these are about 5% of common tasks. The benefits are various, including not having any looking and caching issues on multicore CPUs, since access to the data is mostly read-only. Mutation, when needed, must be coded carefully, having in mind concurrent access patterns - ordering, locking and caching.

  • Pointers (References) - this is how people point with their fingers.

This is, probably, the most fundamental way of how our brain processes information - to bring something in a focus (direct an attention to) we could point to it with our finger or a hand. Children do it all the time. (There is, of course, no nonsense that we should point with fingers only to such objects and with hands to such and such, so, a typed-pointer is an unnatural concept, as a homogeneous list).

  • Pattern Matching - the ways to say "it looks like a something".

It is not just about regular expression (finding patterns in strings of text), it is how we could say "an airplane looks like a bird". Human vision (subsystems which doing recognition) is mostly pattern matching. When we're reading text we recognize words by matching them which ones we know (no fluent reader scans and interprets each letter of a word one-by-one - we anticipate (with priming) and pattern-match them).

  • Type Tagging - this is labeling, to write on a box what is inside.
  • High-order first-class procedures.

Logically, a procedure is just a value like all other values.

From Lisps:

  • Layers upon layers of DSLs.

This is, perhaps, the single most important idea in so-called "high-level" programming.

From Haskell:

  • Segregation (separation) of "pure" and "impure" code.

Procedures which causes (produces) side-effects, which means change some state variable "outside" of it should be distinguishable syntactically, by using a naming convention, and ideally, live in separate object files, to be linked in separate threads.

From Erlang:

  • General Server Abstraction to be used by the rest of the code.

TODO: clarify form Armstrong book

  • Message-passing DSL embedded into language.

receive, !, etc.

Ideas behind buzzwords:

  • Refactoring - simplifying, re-writing an existing piece of code without changing its semantics.

This is like finding a better, simpler, more intuitive, familiar explanation for a child, and replace more clumsy, cluttered, longer. Simplify! Clarify''. Clarity is an evidence.

  • TTD - thinking of and writing the test cases for a procedure before its code.

"Nothing clarifies thoughts like writing them down". This is about clarifying usage (interfaces) before cluttering one's mind with implementation details. Proper test-coverage beats any compiler.

  • Agile - small, complete, distinct steps done often enough.

TODO: clarify: a spiral-shaped, recursive process of continuous refinement (self-improvement) by small steps. Improve a distinct part, and apply improved "procedure" to itself.

  • CI - automation of every mechanical task - an assembly line running non-stop.

Fail early, fail loudly, fail often.

Last modified 3 years ago Last modified on Sep 5, 2017, 10:31:29 AM
Note: See TracWiki for help on using the wiki.