Skip to content

Instantly share code, notes, and snippets.

@jspears
Last active January 28, 2022 23:59
Show Gist options
  • Save jspears/e1e0f963329e15c00760d506dcb2dae0 to your computer and use it in GitHub Desktop.
Save jspears/e1e0f963329e15c00760d506dcb2dae0 to your computer and use it in GitHub Desktop.
A Guide to Surprise Driven Architecture

Suprise Driven Development

The longest trend in software development.

Always return sometimes.

If you write a function, have some paths that don't return anything. The longer the function the better this works. The caller will never know what to expect. Also don't always return the same thing. Creative thinking like this make relationships work.

Parameter order doesn't matter.

Most languages care a lot about parameter order, but you don't have to. Trust your gut and do whatever. Optional, snoptional it can go first. Better yet in the untyped languages figure out what the parameters are. This is where not documenting things really shine.

Compatiblity is just like your opionion man.

People have decided for whatever ill concieved reason to use your code. Don't let this opportunity to go to waste, break them regularly. The extra time they will spend fixing their code to work with yours means engagement. Soon ya'll will be kissing in a tree.

Dependencies are fun

Look I know you you could write

' hello '.trim()

but isn't

trim(' hello ')

just better. I mean look built in functions sometimes have bugs. But dependencies -- those things have been tested. So use them whenever possible. Do not trust your own developer hands. Look it takes roughly 4x the amount of time to add the dependency. Like what else you got going on. Also -- if your in nodeland -- everything goes in dependencies -- devDependencies are for loser's. Everyone should always use your version of webpack. Make em download it anyways, it's good to excersize the internet's pipe's keeps them from clogging up. Whoever dies with the most node_modules wins.

Semver is not a thing

Just use a number. Put a couple of dots in it. Viola, new version. Its not like anybody has spent considerable effort on thinking of ways to describe how much change and what kind has happened. While your at it just bump the major version. Cause you know ^ is just an idea really. Noone really knows what it means.

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