Things I Learned About Writing Software

I Really Learned in Music

Your
Culture, Tooling and Biology Influence Your 

Work 

(in ways you can't detect)

Your Tooling

1995 Aug;33(8):1047-55.

Increased corpus callosum size in musicians. (Schlaug)

 Our analyses revealed that the anterior half of the CC was significantly larger (15%) in musicians. This difference was due to the larger anterior CC in the subgroup of musicians who had begun musical training before the age of 7.

Rapid Assimilation of External Objects Into the Body Schema

Thomas A. Carlson, Helmholtz Institute, Experimental Psychology Division, Utrecht University

 Our experiments provide empirical support for the notion that objects can be integrated into an extended sense of the body. Our findings further indicate that this extended body sense is highly plastic, quickly assimilating objects that are in physical contact with the observer.

Your Culture

131Hz -C

262Hz- C

393Hz -G

524Hz - C

655Hz - E

786Hz - G

917Hz - (almost bflat)

1048Hz - C

(actually transposed up an octave, for readability)

131Hz -C

262Hz- C

393Hz -G

524Hz - C

655Hz - E

786Hz - G

1048Hz - C

This guy.

Diablo et Musica

Guido of Arrezo

-49

Pentatonic

Turing Complete

Hindustani

Irish-Folk

Balanese

Gamelan

Chinese- Folk

Carnatic

Western High Tonality

Baroque

Romantic

Medieval

Tuuvan Throat singing

Prog Rock

Country Music

Minecraft (LOL)

C

C++

C#

Java

JS

LISP

SCALA

GO

Haskell

Dance

IDM

*Note: This is not science, nor accurate.

UNITY

Max/MSP

“Perfect pitch for years seemed like a beautiful gift – given only to a few genetically endowed people. But our research suggests that it might be available to virtually everybody,”

Diana Deutsch (Journal of the Acoustical Society of America, 2009)

musicians who speak an East Asian tone language fluently are much more likely to have perfect pitch.

Besides a mathematical inclination, an exceptionally good mastery of one’s native tongue is the most vital asset of a competent programmer.

- Dijkstra

Programming in general is insanely anglocentric

Vehicle

Truck

GreenTruck

BlueTruck

Green

GreenBall

GreenTruck

Colors

Blue

Airplane

Inflexible Hierarchy Problem

Fragile Base Class Problem

The Gorilla/Bananna Problem

The problem with object-oriented languages is they've got this implicit environment that they carry around with them. You wanted a bananna, but what you got was a gorilla holding the bananna and the entire jungle

-Joe Armstrong "Coders at Work

Maybe more than the jungle, the universe the jungle is in.

Your Biology

The Haas effect

TIMBRE!!!!!!

no but really, it sounds like 'Tamber'

Music and Connectivism (Todd and Loy) ,

A Neural Network Model for Pitch Perception

Interdisciplinary Shoutout!

...Computin'

What every Computer Scientist Should Know About Floating-Point Arithmetic

 1991

The foregoing remarks are not intended to disparage extended-based systems but to expose several fallacies ,

David GoldBerg

<after academically eviscerating the IEEE 754 standard>

(Seriously, this got me last week)

7   2

±

The art of orchestration demands a beautiful well-balanced dostribution of chords forming harmonic texture, Moreover transparency, accuracy and purity in movement of each part are essential conditions if satisfactory resonance is obtained

Rimsky-Korsakov, Principles of Orchestration

Most modern music -3 voices

Most ancient Music 3-4 Voices at once

6-voice canon (BWV1076 - "quite nice but just an experiment").

Ilya Grigorik, "Speed, Performance, and Human Perception" -2014

Measured Human Input Throttling

flow, also known as the zone

Mihaly Csikszentmihalyi

Input System Trickery (music)

..Computin'. (The Monty Hall Problem)

..No really. Do it for 100 doors.

Humans are pattern-seeking story - telling animals, and we are quite adept at telling stories about patterns whether they exist or not

Welcome to

Middle World

In the Beginning We

Assemble Ideas

and

Aspire To Eventually Create
New Ideas

Stravinsky never mentions the sources of his themes, neither in his titles nor in his footnotes does he ever allude to whether a theme of his is his own invention orwhether it was taken over from folk music"

-The essays of Bela Bartok, 1976

N.J. Deri, Otto 1968, "Exploring Twentieth Century Music"

Lesser artists borrow, great artists steal.”

 Igor Stravinsky

Copy

Assemble

Generate

Master

Remix

The General

in the back Earns

Less Respect

Than the 

General that Leads

 

It is Harder to

Compose Something

Clear and Interesting

than Complex and Confusing

You know what the hardest thing in the world to write is?

function(n){
    if(n > 64){
        (function(){
            //business logic
        })();
       return;
    } else if(n > 15 && n < 65){
        (function(){
            //business logic
        })();
       return;
    }
    else if(n < 16){
        (function(){
            //business logic
        })();
    } else {
      (function(){
            //business logic
       })();
    }
}

Tangled

The thing that

'decides'

and the thing that

'does'

is all entangled.

 

 

You cannot change one without the other!

How many modules can your mind process at once?

//some module
Serve(){
    function large(){ 
     //business logic    
    }

    function medium(){
     //business logic
    }

    return {
        large: large,
        medium: medium
        small: small
    }
}
//one module
function drinkFromOz(n){

    if(n > 64){
        return 'large';
    }
    
    if(n < 16){
        return 'small';
    }

    return 'medium';
}
//another module
serveDrink(){
    serve[drinkFromOz(64)]()
}

What I do.

When I do it.

Coordination.

function someBigProcess(){
    
    // Here next coder, please think of 8 things at once.
    if(user && !isNotAuth && user > 0 && user.process == 'running' && !loading && user.id && !user.auth){
        return;
    }

    submitForm();
    //morestuff
}

function userIsNotLoggedIn(){
    return //put all that here.
}

function someBigProcess(){
    
    // Here next coder, please think of 8 things at once.
    if(userIsNotLoggedIn()){
        return;
    }

    submitForm();
    //morestuff
}

Write music your players can easily read, and they will play the right notes

Write code that is easier to read and other programmers will write less bugs

Noone is impressed by pointless complexity, or puzzles left for the next person to untangle.

There are no 

"Good Ideas 
for Paintings"

 

...Only Paintings

Ideas are easy, Implementation is hard.

Guy Kawasaki

Actually composing looks more like picture A also

Its mostly just labor.

Noone writes music 'through composed', noone writes programs in the order they run.

Debugging your score and debugging your program have a lot in common

Its mostly just labor.

The same anxiety happens in front of a blank IDE as a blank sheet of staff paper.

Its mostly just labor.

"Written by <Lone Genius>"

"Written by <Lone Genius>"

Practice what Matters

 

Avoid

Artifical Benchmarks of Ability

Doing something "to be better than somone else" is ruinous.

Editor Wars (noone cares you use VIM)

Gear Worship (noone cares what tubes are in your amp)

The Maynard Ferguson Effect

The search for "Authenticity'

and occasionally

"Missing the point."

Regular Practice is actually really hard.

Communication is


difficult,

fundamental,

and imporant

 

Programmers struggle to name things and debate the merits of 'expressivity' in computer languages.

 

Musicians struggle with what music should be about, how to notate it, even its very definition.

The big idea.

We collectively develop our craft to extend the capabilities of our nervous system, to interface with and understand the natural world, and to communicate with each other in more expressive ways.

Thats it. 

 

Enjoy crafting.

@5imian

Programming-and-music

By Jesse Harlin

Programming-and-music

  • 2,894