[comment]: # "markdown: { smartypants: true }" ## Software Engineering's
Greatest Hits
> By the mouth of 2 or 3 witnesses... - God
(not my words!)
> Software engineering is programming, with respect to time and _across_ people
(paraphrasing Rob Pike as quoted by Russ Cox, paraphrasing Titus Winters)
Go with Versions (2018)
https://youtube.com/watch?v=F8nrpe0XWRg&t=200s
3:20 - 3:58 (or 4:39)
A "Live at Head" Language
https://youtube.com/watch?v=tISy7EJQPzI&t=497s
8:17 - 9:40, 9:54
> The most important archaeological finds of the 22nd century.
Creeds of Craftsmanship . com
The Zen of Python (2004)
(2015)
Zen of Zig (2017~)
Communicate intent precisely.
Edge cases matter.
Favor reading code over writing code.
Only one obvious way to do things.
Runtime crashes are better than bugs.
Compile errors are better than runtime crashes.
Incremental improvements.
Avoid local maximums.
Reduce the amount one must remember.
Focus on code rather than style.
Resource allocation may fail; resource deallocation must succeed.
Memory is a resource.
Together we serve the users.
Axioms of AJ (2022~)
(draft)
"Perfection is achieved, not when there is nothing more to add,
but when there is nothing left to take away." - Antoine de Saint-Exupéry
return something, or return nothing
return await, or await without return
let errors bubble until they burst
(Correct or Classify, but do not Catch)
Gatekeepers at the gates, Doorkeepers at the doors
No worthless abstractions
(
Abstractions should be deep - John Ousterhout
)
But by the 3rd or 4th time, you should know what it is
Optimize for the happy path (not for exceptions)
When it is broken, it is the right time to fix it - Chinese Fortune Cookie
The constraint of the medium defines the Art - Sariah Bunnel
(
"Anything goes"
is
not
a workable constraint)
If it sounds cool, DON'T DO IT! 🚨
https://github.com/coolaj86/AJScript/issues/28
### 1. Less is more
> **Perfection is achieved** not when there is nothing more to add, > But when there is **Nothing Left to Take Away**
- Antoine de Saint-Exupery
(and Douglas Crockford)
JavaScript: The Better Parts (2015-2018)
https://youtube.com/watch?v=XFTOG895C7c&t=120
2:00 - 3:11
> Features add complexity,
we want simplicity. >
Features hurt readability,
we really want readability.
> Readability is the most important feature of a programming language
> because **readable** means **reliable**.
- Rob Pike
Simplicity is Complicated (2015)
https://youtube.com/watch?v=rFejpH_tAHM&t=325
5:25 - 6:59 (or 7:26 or 8:51)
> All of these languages are evolving by **adding features**.
> That means they're becoming more **complicated**.
> Their complexity is growing, while they are simultaneously becoming **more similar** to one another.
> I would summarize that is **bloat without distinction**. - Rob Pike
Simplicity is Complicated (2015)
https://youtube.com/watch?v=rFejpH_tAHM&t=65s
1:05 - 1:42
3:05 - 3:23
> Composition over Inheritance
- The Gang of Four
(and every thought leader Richard Feldman has ever heard of)
Why isn't Functional Programming the Norm? (2019)
https://youtube.com/watch?v=QyJZzq0v7Z4&t=1192s
19:52 - 23:08
> If you write the most clever program you can, given the unknowns (bugs), it's more complex than you can understand
Overheard at the Water Cooler...
https://youtube.com/watch?v=OYMk4Zws-jE&t=3716s
1:01:56 - 1:02:34
> RISC
### 2. Emergent Design (Delay Decision-Making)
> We did what we always do when there’s a problem without a clear solution:
> we waited.
> Waiting gives us more time to add experience and understanding of the problem
> and also more time to find a good solution.
https://go.dev/blog/toward-go2
(2017)
> Don't make the most difficult to change decisions at the start - that's when you have the least correct information to guide it. - Yours Truly
> If type hierarchy is the foundation of your program
> it's often easier to struggle along with an incorrect type hierarchy
> than it is to change it.
Go Programming (2010)
https://youtube.com/watch?v=jgVhBThJdXc&t=652s
10:52 - 11:22
> We can't always identify the correct solution,
> but we _can_ identify _incorrect_ solutions.
(paraphrasing of John Ousterhout)
A Philosophy of Software Design (2018)
https://youtube.com/watch?v=bmSAYlu0NcY&t=710s
11:52 - 12:12
> Perfect is the enemy of good (1770)
> **[Abstractions] should be deep.**
> A shallow [abstraction] doesn't help you in the fight against complexity.
- John Ousterhout
(paraphrased from David Parnas)
A Philosophy of Software Design (2018)
https://youtube.com/watch?v=bmSAYlu0NcY&t=753s
12:34 (or 13:05) - 14:20 (or 14:52)
15:17 - 15:50 (or 16:26 or all of it)
```java private void addNullValueForAttribute(String attribute) { data.put(attribute, null); } ```
> The **body of a function** should fit in **a single scroll**, > more or less.
> The **functionality of a module** should fit in a **file**, > more or less.
## GEFN