2 title: "Say O(n²) Eighty Eight Times Fast"
4 reddit: https://www.reddit.com/r/programming/comments/2hth4h/say_on%C2%B2_eighty_eight_times_fast/
5 hacker news: https://news.ycombinator.com/item?id=8384945
8 The symbol `<` is spoken "less than", but how did you know that? Unfortunately, it's common practice for documentation and educational material to teach words and symbols without an adequate explanation of how to say them. And often, googling it doesn't work.
10 Why does it matter? Of course for communicating, but also for your own skill and understanding. When you read, you still think the word verbally, so you would end up choosing a word like "left angle bracket" which is less intuitive, and probably leaves a lingering sense of uncertainty about it. Yuck.
12 Separately, some technical terms have multiple equivalent spoken variations and which one is best to use when and why is an unsolvable mystery. One such case is the verbal equivalent of [Big O notation](https://en.wikipedia.org/wiki/Big_O_notation) (update: what I mean here is not strictly big o notation, but the language around it for computer science context). I've done a few interviews recently, and I noticed that my interviewers used a variety of terms, and my own phrasing has awkwardly shifted around too. Maybe we can figure something out together:
16 <button onclick="nextWord()">How to talk about O(n²) in conversation?</button><br><br>
18 <p id="demo">"__________________"</p><br>
19 Vote: <button onclick="yesVote()">It sounds good</button> <button onclick="mehVote()">It sounds ok</button>
20 <button onclick="noVote()">It sounds wrong or confusing</button>
24 // @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPLv2.0 or later
26 "asymtotic bound of n squared",
27 "asymtotic bound n squared",
28 "asymtotic run time of n squared",
29 "asymtotic run time n squared",
30 "asymtotic growth of n squared",
31 "asymtotic growth n squared",
32 "asymtotic growth rate of n squared",
33 "asymtotic growth rate n squared",
36 "run time of n squared",
38 "growth of n squared",
40 "growth rate of n squared",
41 "growth rate n squared",
42 "computational complexity of n squared",
43 "computational complexity n squared",
44 "computational efficiency of n squared",
45 "computational efficiency n squared",
46 "computational growth rate of n squared",
47 "computational growth rate n squared",
48 "big oh complexity of n squared",
49 "big oh complexity n squared",
50 "big oh efficiency of n squared",
51 "big oh efficiency n squared",
52 "big oh growth rate of n squared",
53 "big oh growth rate n squared",
54 "algorithmic complexity of n squared",
55 "algorithmic complexity n squared",
56 "algorithmic efficiency of n squared",
57 "algorithmic efficiency n squared",
58 "algorithmic growth rate of n squared",
59 "algorithmic growth rate n squared",
60 "time complexity of n squared",
61 "time complexity n squared",
62 "time efficiency of n squared",
63 "time efficiency n squared",
64 "time growth rate of n squared",
65 "time growth rate n squared",
66 "asymtotic complexity of n squared",
67 "asymtotic complexity n squared",
68 "asymtotic efficiency of n squared",
69 "asymtotic efficiency n squared",
70 "asymtotic growth rate of n squared",
71 "asymtotic growth rate n squared",
72 "complexity of n squared",
73 "complexity n squared",
74 "efficiency of n squared",
75 "efficiency n squared",
76 "growth rate of n squared",
77 "growth rate n squared",
78 "big oh of n squared",
82 "order of complexity of n squared",
83 "order of complexity n squared",
86 "quadratic asymtotic bound",
87 "quadratic asymtotic run time",
88 "quadratic asymtotic growth",
89 "quadratic asymtotic growth rate",
93 "quadratic growth rate",
94 "quadratic computational complexity",
95 "quadratic computational efficiency",
96 "quadratic computational growth rate",
97 "quadratic big oh complexity",
98 "quadratic big oh efficiency",
99 "quadratic big oh growth rate",
100 "quadratic algorithmic complexity",
101 "quadratic algorithmic efficiency",
102 "quadratic algorithmic growth rate",
103 "quadratic time complexity",
104 "quadratic time efficiency",
105 "quadratic time growth rate",
106 "quadratic asymtotic complexity",
107 "quadratic asymtotic efficiency",
108 "quadratic asymtotic growth rate",
109 "quadratic complexity",
110 "quadratic efficiency",
111 "quadratic growth rate",
114 "quadratic order of complexity",
130 function nextWord(vote) {
131 if ('undefined' !== typeof vote) {
132 var xmlhttp = new XMLHttpRequest();
133 xmlhttp.open("POST","/On2voting.py",true);
134 xmlhttp.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
135 xmlhttp.send(JSON.stringify({vote:vote, word:word}));
138 if (words.length >= 1) {
139 wordIndex = Math.floor(Math.random() * words.length)
140 word = words[wordIndex];
142 document.getElementById("demo").innerHTML = '"' + word + '"';
143 words.splice(wordIndex, 1)
149 My next blog post [has the results](/blog/on2-vote-results.html).
151 Where did I get these terms? Just a few clicks around the internet and my own experience. I started idly writing a few, which started to become a [Backus–Naur Form (BNF)](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form). Then I got quite annoyed that I couldn't figure out how to properly pronounce Naur. Turns out it's [like now-ah](http://forvo.com/search/naur/). Then I wrote a python program which expands the BNF to all possible combinations:
154 from itertools import product
156 def bnf_expand(*args):
159 result.extend([" ".join(filter(None, x)) for x in product(*arg)])
162 # the BNF in reverse of normal order
163 asymtotic = ['asymtotic', '']
164 asymtotic_modified = ['bound', 'run time', 'growth', 'growth rate']
165 commonly_modified = ['complexity', 'efficiency', 'growth rate']
166 common_modifiers = ['computational', 'big oh', 'algorithmic', 'time',
168 unmodified = ['big oh', 'order', 'order of complexity', 'time']
169 O = bnf_expand([asymtotic, asymtotic_modified],
170 [common_modifiers, commonly_modified], [unmodified])
172 On2 = bnf_expand([O, of, ["n squared"]], [['quadratic'], O],
173 [['oh n squared']], [['oh of n squared']])
175 # Print the top level expanded BNF
179 The result is 92 terms which can work the same in a conversation (unless your votes/comments say otherwise). And that doesn't even consider whether to say someting _is_ O(n²), _has_ O(n²), or _is of_ O(n²).
181 The list is a bit long, so I put them in javascript and made some buttons.
183 You might call all these words "terms of art", or "jargon", or "lingo"... orrr, let's call the whole thing off.