Code should be elegant, too.

Month: March 2019

I think that one of the big impediments to learning musicality is that many people lack the language to verbalize music. Over the years I’ve picked up various techniques and terms for this that help me to think about the structure of music, talk about it, and yes, even dance to it.

So to aid other dancers who may not yet be familiar with these very useful musical terms: here they are.

Tempo

Tempo is how “fast” a song is – in other words, the number of beats of music per minute (BPM.) This is an easy one, since as a dancer it also determines how many steps you will take per minute. Importantly, it is possible for a song with a fast tempo to nonetheless be pretty low energy, and conversely songs with a slow tempo can be high energy (think dubstep.)

This relates to dance since we have to dance differently to fast songs than slow songs. In particular, to fast songs you have more movements to complete in less time, so you can accomplish this by taking smaller steps and making smaller movements overall.

For my Westie friends, the standard BPM range for West Coast Swing songs is between about 80 and 120 BPM.

Saying a Rhythm Aloud

This is actually a surprisingly important skill across multiple dance disciplines. Ever wonder if a song is a Rumba or a Cha-cha? The rhythm is what makes the difference.

There’s volumes about this in music theory, but as dancers the skill we really want is the ability to count sixteenth notes, since that is about as fast as you can dance in a partner dance.

Most of us will be familiar with counting quarter notes: “one two three four.” And most dancers also know that they can stick an “and” halfway between the numbers to count eighth notes: “one and two and three and four and.” But did you know that you can also take this a step further and count the notes halfway between the “and” and the numbered notes?

It goes like this: “one-e-and-a-two-e-and-a-three-e-and-a-four-e-and-a”. For this concept, sheet music can help to visualize it, and this video gives an excellent overview:

So why does this matter? Well, in ballroom, the rhythm is what makes a song “be” a certain type of dance. As one example: cha-chas all have the rhythm “one two three four-and-one.” The “cha-cha-cha” of the dance falls on the “four-and-one” triplet in the song’s major rhythm. Similarly, Sambas are danced to songs with a “one a-two three a-four” rhythm.

And since I’m a Westie, you probably guessed that this would eventually relate back to West Coast Swing. A common term we hear in the WCS world is “Blues Timing” or “rolling count” – but some people aren’t familiar with what this actually IS.

Since we now have a way of describing rhythm, we can describe it as well: Blues Timing is when we change the timing of our triple steps by taking the second step (which would normally fall on the “and” beat) a tad later later, on the “a” beat. We use this and other techniques such as kick-ball-changes in order to represent music which is itself emphasizing the “a” beats, as in: “a-one a-two a-three a-four.”

In WCS this is one of the defining characteristics of the blues songs we hear in competition, so it’s an important technique to know! They aren’t playing the blues songs “for the old people” as a friend put it once – they’re playing them so the judges can see if you know Blues Timing and blues phrasing (covered below.)

As one example, listen to “Wild Turkey 101 Proof” by Kenny Wayne and try counting it “one and two and three and four and” – you’ll find that it just doesn’t feel quite right because of the emphasis of the bass guitar on the “a” sixteenth notes, rather than the “and” beats that are more prominent in contemporary music. Then try counting it “a-one a-two a-three a-four” and you’ll find it fits the music much better:

Staccato versus Legato

Staccato and legato are musical terms which describe the character of a given note. In particular, it describes whether a given note in the music is isolated from the notes that come before and after it, or whether it flows smoothly into the next note.

An example of a staccato note in a song would be a drum hit, or clapping sound. After it occurs, there’s a period of silence before the next note by the same instrument. Conversely a legato sound would be something like a long violin note or a singer singing a melody without pronounced pauses between the notes.

These can be useful cues for the musicality in our dance. Short, Staccato notes lend themselves to body isolations and rapid changes in speed. Legato notes in turn lend themselves to longer, flowy movements without quick stops and starts. This is a great place to start on your musicality if you’re not sure how to dance to a song: simply find the most prominent instrument, and determine whether it is playing staccato or legato, then dance accordingly.

Measures/Bars

Another important thing to note is the number of beats in a phrase. Music is generally written in 4-beat measures (or bars.) That’s the same intervals we were counting above, and you’ll notice that it doesn’t go all the way to 8! This is one of the ways that dancers differ from musicians – musicians like to count to 4 since that’s how long a measure is, and how sheet music is structured. Dancers like to count to 8 because… well, we’re not usually done with our pattern after just 4 beats! We don’t want to start over in the middle!

This is the reason some top pros (Robert Royston is a prominent one) are advocating that dancers start counting in fours rather than in eights – it helps keep your mind on the music and put dancers back in sync with the music and musicians.

Time Signature

A song’s time signature is a quick way of describing how the song’s repetition is structured. The time signature of a piece is often written as a fraction, and the most common is 4/4 time. The top number refers to the number of notes in a bar/measure. While the bottom number represents the size of those notes. So, 4/4 time means: 4 beats to a measure, with each being a quarter note.

While 4/4 time is the most common time signature, all sorts of them exist. But other common ones include 3/4 for waltzes, and 6/8 for Viennese waltz.

Bonus: if you’re ever DJ’ing and want to really troll a room full of dancers, find a song in 7/8 time and put it on at the end of the night. Everyone will be off time and think they’ve suddenly forgotten how to count music!

Phrasing

Phrasing is another of those terms that is thrown around a lot, but often not actually defined. Simply put a phrase is a complete unit of repetition, and could be played as a self-contained musical segment without sounding “incomplete.” Importantly, when a phrase ends, it is very common to change the music in some way, by increasing or decreasing the song’s energy level, changing the lyrical structure, or adding/removing one or more instruments to the piece.

As dancers, phrasing is crucial. By definition, music is repetitive – without repetition, music is just called “noise.” But the phrase changes are the moments where something new is introduced to the song – and as dancers we aim to express the song through our bodies, so it’s important that we introduce something new to our dancing as well, to reflect the song we’re dancing to.

In most modern music there are 8 measures to a phrase, for a total of 32 beats in a phrase. This means that you could actually count to 32 over and over and nail the phrase change every time! I don’t recommend this, since as we dance we need to be focusing on more than just counting in our heads… but this is a great exercise to do on your own while driving and listening to music!

It’s also important to know that in 12-bar blues there are 12 bars to a phrase! So as Westies when we dance to a lot of blues songs, there will actually be 12 bars of 4 beats each for a total of 48 beats in a phrase. As an example, try counting along with the first 48 beats (33 seconds) of Creeper Returns by Mark Hummel and notice how the last 8 beats of the phrase are a buildup before the end of the phrase:

Song Parts

Now that we know what a phrase actually is, we can start to talk about the song as a whole by giving names to the phrases! For instance, a typical song might look something like this:

Intro

First Verse

First Chorus

Second Verse

Second Chorus

Bridge

Outro

Let’s define these terms:

Intro

The intro is, put simply, the song’s introduction. It is often not repeated again later in the song, is musically distinct from the first verse, and may be anywhere from 16 to 64 beats long, depending on the song. A good example is the beginning of Secret by Maroon 5 – notice how much time in the song is spent even before a repeating melody is introduced, and how much more before the vocalist begins singing the first verse about 1:34 into the song:

As a dancer, the intro is an important opportunity to “groove” to the song before it’s really gotten started. For most songs, musically, it doesn’t make a whole lot of sense to start throwing dips and spins into our dancing. Rather we will usually want to keep it simple, focus on connecting to our partner, and getting ready for the first verse.

Verse

The verse is what could be thought of as the “main” part of the song. in songs with lyrics, this is where most of the song’s story is told. Verses are generally very similar to one another in terms of instrumentation, but the vocals will almost always be different. As an example, consider the lyrics for the first verse of Don’t by Ed Sheeran:

I met this girl late last year
She said, “Don’t you worry if I disappear.”
I told her I’m not really looking for another mistake
I called an old friend thinking that the trouble would wait

And compare this to the lyrics of the second verse:

And for a couple weeks I only wanna see her
We drink away the days with a take-away pizza
Before a text message was the only way to reach her
Now she’s staying at my place and loves the way I treat her

We can see that not only are they different words, but they also tend to make up chapters in the songwriter’s story. Bonus tip: the “knock knock knock on my hotel door” that you want to hit while you’re dancing is at the start of the third verse. This is why having terminology to describe these things is useful!

Chorus

The chorus generally contrasts with the verse by being higher energy, and containing lyrics which are repetitive – often both within a single chorus, and also between multiple choruses in the same song. This is also often where the song’s “hook” is in pop music – the catchy bit of music paired with the memorable lyrics that makes the song stand out in people’s minds. It’s also often where the lyrics that the song’s title comes from are sung.

Bridge

A song’s bridge is a part that comes in the middle of the song, and is often used as kind of a “break” from the repetition between verse-chorus-verse. This is often where instrumental solos will happen, and the bridge usually isn’t repeated.

A good example of this comes at 3:07 in the song Madness by Muse, as the third verse ends and the electric guitar comes in, carrying us into the fourth chorus (notice also that this song starts with a chorus instead of the first verse – this is why having names for things is useful!):

Pre-Chorus

Some songs will have a pre-chorus, sort of a “bonus” chorus – usually 16-32 beats that immediately precede each chorus, while having a slightly lower energy level than the chorus, while still being higher energy than the main verse. These provide sort of a “build up” or transition between the verse and chorus, and are usually repeated before each chorus of the song.

One good example of a pre-chorus is in the song Gibberish by MAX. Notice how the first verse wraps up about 28 seconds into the song, then the pre-chorus slowly raises the energy level for 32 beats before the chorus kicks off at 51 seconds in. You’ll also hear the pre-chorus again before the second chorus starting at 1:25 in:

Outro

Just do a dip or whatever.

Just kidding, but the outro is pretty self-explanatory – it’s a piece of music that, like the intro, is not repeated anywhere else in the song, but comes at the end. Not all songs have outros – some just end after a verse or chorus is done, but others do, so it’s nice to have a term for it.

Conclusion

Music, as with all forms of art, can’t always be boiled down to categories we can put names to. There’s exceptions to each of the rules and categories I’ve laid out above. But due to the highly structured nature of music, it lends itself to being named and categorized.

I hope you’ve found this blog post useful. As a pretty analytical person and a lover of language, I really enjoy having terms to use to refer to the things I’m thinking off, and have found the terminology defined here very useful.

I also have no way to know for sure, but I strongly suspect that knowing these things has helped me become a better dancer. It helps me remember and make sense of things I’ve been taught in lessons. And when I make a mistake in my musicality, it also helps me make sense of what went wrong it later so that I can improve!

Occasionally for one reason or another, someone asks me how I type special characters such as accent marks in a “normal” keyboard (ex: Me gustaría ir a Cancún este año.) Leaving aside that U.S. keyboards are no more or less normal than any other country’s keyboards, it’s a pretty good question without an obvious answer. There are two main ways I use to type these sorts of characters:

Alt Codes

This method works on any Windows computer with a standard keyboard and requires no setup. Simply hold down the alt key and then type numbers on the number pad (if you don’t have a number pad on your keyboard, check out this article for instructions.) Example: alt+164 creates the ñ character.

Seriously, you can try it right now! Open Notepad and start holding alt and then typing 2-3 digits on the numpad! You can create all sorts of interesting characters this way. ♥♪♫♀☼§☺⌂

Unfortunately this requires memorizing the appropriate alt codes for the characters you want to type, but many languages only use 5 accented vowels plus a handful of other characters, so learning them isn’t too onerous. You can use online resources like those at altcodeunicode.com to find the ones you want for a given language.

United States – International Keyboard

This requires you to customize the language settings for your operating system, but is my favorite method of writing non-English characters for its ease and versatility.

To get started, open your “Region & Language Settings” and select the options for English (United States):

Then Add a keyboard:

Then select the United States-International keyboard:

Now Windows recognizes two different keyboard layouts. You can switch between them by clicking on the new keyboard selector which will appear on your taskbar when you have multiple keyboard layouts, or by pressing Windows Key + Spacebar.

Once you have United States-International selected, now you can type right-leaning accent marks my typing an apostrophe followed by any vowel. As an example: ‘ + a (Ex: á.) You can combine all sorts of punctuation with characters this way:

Backticks (`) become left-leaning accent marks: à

Apostrophes (‘) become right-leaning accent marks: á

Quotes (“) become umlauts: ä

Tildes (~) combine with many letters like n: ñ

Carets also combine with vowels: â

And if you want to type one of these characters by itself, either follow it with a character that it can’t combine with, or simply hit spacebar if you’re not sure. Overall I find that this keyboard layout gives me a pretty straightforward way to type characters in most of the other languages I’ve learned, while still being able to type in English as I normally would.

For more information, check out Microsoft’s Support article on the United States International Keyboard.

Hopefully if you have found yourself attempting to write in another language, but stumped by how to get your keyboard to type the right characters, this will help!

I maintain a list of programming blogs which have had made a big impression on me, so that I can go back and read them once in a while. I recently realized that there’s probably people who would also like to go through them, so… here they are!

This is one of my favorites, because it deals directly with connecting dev work with business value – a gap that is both very important, and very challenging to bridge:

The core idea is: put uncertainty and risk at the center of a conversation between the developers and the rest of the business (instead of everyone pretending such nasty things don’t exist). Doing so allows the entire business to tackle those genuine challenges together.

The truth is that users will often ask you for a solution when it would really be more helpful to tell you that they have a problem. […] Sometimes users will tell you that they want a toaster in their car, when what they really mean is that they don’t have time to make breakfast in the morning.

We need to avoid [the cycle of blame]. We want the engineer who has made an error give details about why (either explicitly or implicitly) he or she did what they did; why the action made sense to them at the time. This is paramount to understanding the pathology of the failure. The action made sense to the person at the time they took it, because if it hadn’t made sense to them at the time, they wouldn’t have taken the action in the first place.

This is a great blog about relations from a mathematical perspective, explained very well in layman’s terms, which I found really helpful in creating a mental model for why relational databases are so darned good at modeling real world things.

It wasn’t until I first read this article that I realized why the Venn Diagrams for JOINs are hard to remember: because they’re wrong. Rather, this article explores using JOIN diagrams to explain JOINs, which is a much better way to think about them.

While I’m a big fan of automated testing and TDD, it’s important to understand the counterarguments. This blog makes a great case for balancing the cost of creating, running, and maintaining a test suite against the amount of risk it helps you mitigate.

So when they wrote their first function for this project three years ago they wrote a unit test for it. The test has never failed The question is: How much information is in that test? That is, if “1” is the passing of a test and “0” is the failing of a test, how much information is in this string of test results:

11111111111111111111111111111111

There are several possible answers depending on which formalism you apply, but most of the answers are wrong. The naive answer is 32, but that is the bits of data, not of information. You could be an information theorist and say that the number of bits of information in a homogeneous binary string is the binary log of the length of the string, which in this case is 5. But that isn’t what I want to know: in the end I want to know how much information I get from a single run of this test. Information is based on probability. If the probability of the test passing is 100%, then there is no information — by definition, from information theory. There is almost no information in any of the 1s in the above string. (If the string were infinitely long
then there would be exactly zero bits of information in each test run.)

A collection of fictional stories – each of which is a metaphor for a programming lesson or problem, written in the spirit of Zen kōans. Some of my favorite entries are The Tool-Shed and The Hidden Variable.

An article about learning to be honest about not knowing things, and in a profession characterized by constant change and learning, how to know which things are worth knowing.

As I surveyed the patterns in my daily information bombardment, one dichotomy appeared rather quickly. Boiling it down to a quick litmus test: some things can be easily Googled for when needed, and some things cannot. This is a useful barometer, a differentiator between things to reference versus concepts to know.

“A programmer loses X minutes of productivity when you interrupt them” is a common phrase that is bandied around in the programming industry – universally acknowledged, but tough to communicate to non-programmers and rarely backed up with research. This blog does exactly that: explains some research that demonstrates this to be true.

Joel Spolsky was a very well-known blogger on programming and software design topics before co-creating the little-known website Stack Overflow. I thought about picking one article, but honestly the blog is filled with many gems and in my opinion any career programmer should read through it at least once. Even when I disagree with him, he explains his point well and in an entertaining way. Some highlights:

A humorous article that makes fun of the programming industry with a mix of metaphor and hyperbole.

“Double you tee eff?” you say, and start hunting for the problem. You discover that one day, some idiot decided that since another idiot decided that 1/0 should equal infinity, they could just use that as a shorthand for “Infinity” when simplifying their code. Then a non-idiot rightly decided that this was idiotic, which is what the original idiot should have decided, but since he didn’t, the non-idiot decided to be a dick and make this a failing error in his new compiler. Then he decided he wasn’t going to tell anyone that this was an error, because he’s a dick, and now all your snowflakes are urine and you can’t even find the cat.

Also known as “the funniest man at Microsoft Research” – his articles and presentations are unfailingly humorous, and he manages to mix his absurdist humor with pointed jabs at the state of the industry as a whole.

In some way that I don’t yet understand, I’m glad that theorists are investigating the equivalence between five-dimensional Turing machines and Edward Scissorhands. In most situations, GUI designers should not be forced to fight each other with tridents and nets as I yell “THERE ARE NO MODAL DIALOGS IN SPARTA.” I am like the Statue of Liberty: I accept everyone, even the wretched and the huddled and people who enjoy Haskell. But when things get tough, I need mission-critical people; I need a person who can wear night-vision goggles and descend from a helicopter on ropes and do classified things to protect my freedom while country music plays in the background. A systems person can do that. I can realistically give a kernel hacker a nickname like “Diamondback” or “Zeus Hammer.” In contrast, no one has ever said, “These semitransparent icons are really semi-transparent! IS THIS THE
WORK OF ZEUS HAMMER?”

More coming soon ™ – as a find new blogs or remember ones that I think should be included, I’ll add them here. Enjoy!