Skip to content

Instantly share code, notes, and snippets.

@cedrickchee
Last active October 8, 2019 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cedrickchee/8bfd03598b469b69969dff6a8fac08d3 to your computer and use it in GitHub Desktop.
Save cedrickchee/8bfd03598b469b69969dff6a8fac08d3 to your computer and use it in GitHub Desktop.
My collection of thoughts on accidental complexity

Fighting Accidental Complexity in Software Engineering

It's almost the end of 2019. Looking back, in retrospective as a software engineer, I see the software we created is extremely complex to build and maintain. Example, many websites or web apps are bloated (2 MB just to load a static website?), deployment used to be simple. I wonder how we ended up in this state.

My curious self launced me into a research mode and the following is what I've learned from the Interweb.

Web Front-end

In a nutshell, UI is difficult to build. But, we're getting better :-)

  1. Rich Harris's on "Rethinking Reactivity, the history and future of reactive programming"
  • He delivered the presentation at "You Gotta Love Frontend" - Code Camp 2019 [slide deck]
  • A refreshing approach to solve this problem space:
    • Reaching out to the "forgoten" power of compiler and language (yeah, wisdoms back in the good ol' days and lessons from computer science).
  • Rich created Svelte, a UI framework that compiles your UI components into optimal JavaScript at build time, instead of doing what most frameworks do which is lots of unnecessary work at run time.
  • FRAMEWORKS ARE NOT TOOLS FOR ORGANISING YOUR CODE, THEY ARE TOOLS FOR ORGANISING YOUR MIND.
  1. Pete Hunt's React talk about "The Secrets of React's Virtual DOM" at FutureJS 2014 conference
  • Some inspiring quotes:
    • "The art of programming is the art of organizing complexity, of mastering multitude and avoiding its bastard chaos as effectively as possible." — Edsger Dijkstra
    • "All non-trivial abstractions, to some degree, are leaky." — Joel Spolsky
    • "Simplicity is prerequisite for reliability." — Edsger Dijkstra
    • "What matters for simplicity is that there's no interleaving." - Rich Hickey on definition of simplicity
    • Simple is not equal to familiar
    • "Intellectuals solve problems. Geniuses prevent them." — Albert Einstein, never used data binding <- :lol:
    • "We can create precisely the same programs we're creating right now with drastically simpler tools" — Rich Hickey
    • "Programmers know the value of everything and the cost of nothing." — Alan Perlis
    • "Simplicity is the ultimate sophistication." — Leonardo da Vinci
  • In computer science, the expressive power of a language is the breadth of ideas that can be represented and communicated in that language. The more expressive a language is, the greater the variety and quality of ideas it can be used to represent.
  • Practical expressivity is a measure of ideas expressible concisely and readily in a language.
  • "Don't trade simplicity for familiarity".
  1. More... coming soon.

Web Back-end

  • "Backends are needlessly complicated." - Dark
    • According to their founders, "Dark is a holistic programming language, editor, and infrastructure for building backends without accidental complexity."
    • My opinion: the idea is good but their execution (and implementation) is not, AFAICT (still waiting for my Beta access). Their idea was inspired by Bret Victor’s work. I get to know about Bret's work when I discovered Light Table in 2013. My mind was blown away by it, but sadly, it doesn't take-off.
  • Decisions fatigue
    • Minimalistic library vs. batteries-included framework
    • Convention over configuration
    • Example: should we stick to Ruby on Rails/Django or use Express Node.js for building REST-ful API server?
  • Configurations "hell" - solved by zero-config tools (i.e. CRA CLI)
  • ... there's more

"A balancing act".

"No silver bullet"

"If there’s one rule in programming it’s this: there will always be trade-offs."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment