Live data from Hacker News

Ask HN: Teach me something new

news.ycombinator.com

361–370 of 782 posts

Re: Ask HN: Teach me something new

#361

In some editors (SQL server management studio, visual studio code, but badly), ctrl-shift-arrow keys lets you edit many rows of text simultaneously. Simplest example is multi-row comment, but if you align your code well, some repetitive tasks become surprisingly efficient.

Alt+Shift+Left-Click for any JetBrains IDEs. I use it for coding as well as data editing (eg. Aligned MySQL CLI results in a scratch file) all the time.

The support is excellent as when you have multiple cursors, all other standard key combos, like Ctrl+arrow work for all at once. It's also great for selecting a list of aligned text and pasting it elsewhere.

Re: Ask HN: Teach me something new

#362

I've described this on HN before; forgive me if you've already seen it. I have chronic migraine. It sounds worse than it is; I rarely suffer attacks anymore, and when I do, they're usually mostly harmless, as in the case I'll describe below. Contrary to popular belief, migraine is not a headache. It's something a little more like an epileptic seizure. Intense headaches are one common symptom, but there are a lot of o…

I'd recommend the book "the man who mistook his wife for a hat" by Oliver Sacks which I seem to remember digs into some phenomonon like these.

There are very interesting differences between certain lesions in the left side of the brain, and in the right side. For instance there are some people that are blind, but do not believe that they are, and vice versa, which lines up with your experience.

Re: Ask HN: Teach me something new

#363
post #132

In the 1800s, scholars who knew a lot of languages (including, often, several modern and ancient European languages, and increasingly also Sanskrit) started to notice some amazing patterns about similarities in words among all of these languages, including languages from very far apart and that had no visible connection at all from the point of view of their present-day speakers. As these patterns were explored, they…

I've always found it interesting that some words are constructed the same across many languages. For example, response: responsibility in

- English (well)

- Russian (ответ : ответственность)

- German (Antwort : Verantwortung)

- Scandinavian (svar : ansvar)

There's likely more! Even though the modern words have diverged completely, the concept behind the construct is the same.

Re: Ask HN: Teach me something new

#364
post #110

I watched a piano/music teaching video from the 60s yesterday that made it all "click" [1] Most modern music chords patterns are easy to find out on piano. Start on any of the white keys, and play 7 white keys left to right. That is called a mode: a series of notes separated by certain intervals to compose a song. Different modes have different vibes. Atmosphere of the song ( sad or happy) is directly correlated by h…

Ever since I learned that the frequency ratio between adjacent keys on a piano is always a constant twelfth root of 2 regardless of whether you're going black-white or white-white, I've been sort of frustrated with the way pianos are designed. Transposing a song to a different key could have been effortless if keys were structured differently, such as with uniformly alternating white and black keys, rather than the 2…

I don't think real pianos are tuned precisely like that, and the use of a dominant key may have been about historical trade-offs in tuning between different keys, but that's mostly a guess.

There's also the ergonomic aspects of key size and hand width.

Re: Ask HN: Teach me something new

#365
post #62

You can play Morse code from your bash scripts. For instance: echo "hello world" | cw -w 18 -e (install with 'sudo install cw')

and for the curious -- cw stands for Continuous Wave, a radio term for signaling that's turned on and off (like Morse code -- as opposed to modulated like AM, FM, etc).

Technically there is no such thing as a continuous wave, as any signal of finite duration (time) must be composed of multiple frequencies, and all signals are of finite duration. This is closely related to the uncertainty principle in physics, whereby quantities that are related by a Fourier transform are also related by an uncertainty principle. Duration (time) and bandwidth (frequency) are related by a Fourier transform.

Re: Ask HN: Teach me something new

#366

Take a few minutes to learn the NATO phonetic alphabet Alpha, Bravo, Charlie, Delta, Echo, Foxtrot, Golf, Hotel, India, Juliet, Kilo, Lima, Mike, November, Oscar, Papa, Quebec, Romeo, Sierra, Tango, Uniform, Victor, Whiskey, X-ray, Yankee, Zulu Gotta spell anything over a voice line? Use it. No more screwing around with "B.. like Bryan, and then U, like .... under". s-c-r-o-l-l-a-w-a-y: sierra charlie romeo oscar lim…

note that words have special pronunciation such as kehBEC not keeBEC. Pilots also pronounce numbers differently Tree (3) or Fow Er (4)

https://skybrary.aero/articles/icao-phonetic-alphabet

Re: Ask HN: Teach me something new

#367

Take a positive integer. If it's odd, multiply it by 3 and add 1. If it's even, divide it by 2. Example: 7-22-11-34-17-52-26-13-40-20-10-5-16-8-4-2-1-4-2-1-4-2-1... Any positive integer you take, you end up in a 1-4-2-1 loop. It's not proved yet but there's no number found yet that satisfies otherwise. That's the Collatz Conjecture or the 3n+1 problem. Probably the easiest conjecture to explain to someone. Good day/n…

Cool video from Veritasium about this https://www.youtube.com/watch?v=094y1Z2wpJg

Re: Ask HN: Teach me something new

#368
post #260

You probably heard about the quirks in the French numerical system. For example, 99 is translated "quatre-vingt-dix-neuf" which is literally "four twenty ten nine". This is a legacy of the base 20 numerical system used by the Celtics thousands of years ago before the modern Romance language drove it out. The hybridization with our current base 10 system came with the Roman conquest of the Gaul. Another example of the…

Yep! And, at least until the 'standardization' of Irish by a bunch of non-native speakers, modern Irish still used a base-20 system. It's actually still in use by a lot of native speakers in the Gaeltacht areas, though it's dying out as it wasn't included in the standard because it was 'too hard' (and, the cynic side of me would say, too different from English). It's a shame, but it's so nice to use and I try to use it whenever I speak Irish as it's part of the distinctly non-English heritage that is being lost in the language as it basically becomes coded English thanks to poor L2 learners.

There's also all sorts of languages that have non-base 10 counting systems. Some use 3, some use 12 and some have even more exotic ones. One in Papua New Guinea even originally has a base-27 counting system!

Re: Ask HN: Teach me something new

#369
post #110

I watched a piano/music teaching video from the 60s yesterday that made it all "click" [1] Most modern music chords patterns are easy to find out on piano. Start on any of the white keys, and play 7 white keys left to right. That is called a mode: a series of notes separated by certain intervals to compose a song. Different modes have different vibes. Atmosphere of the song ( sad or happy) is directly correlated by h…

Ever since I learned that the frequency ratio between adjacent keys on a piano is always a constant twelfth root of 2 regardless of whether you're going black-white or white-white, I've been sort of frustrated with the way pianos are designed. Transposing a song to a different key could have been effortless if keys were structured differently, such as with uniformly alternating white and black keys, rather than the 2…

Transposing is effortless on most modern keyboard instruments: you press the transpose button. Now you have a choice of what key it sounds in and a choice of what fingering you find convenient.

Isn't that better than your suggestion, where you're locked into one fingering?

Re: Ask HN: Teach me something new

#370
post #229

In statistics, the mean and median are both averages, but are technically quite different. The mean is the sum of all items divided by the number of them, while the median is the middle item in the sorted list. When they are different, this can have strange effects. For example, when estimating engineering tasks, the mean error is often positive while the median is often negative. This is why your manager believes th…

One of the rules of thumb of process management is to reduce the median, rather than the average time taken, because outliers are more likely to have one-off causes and so be harder to fix systematically. In fact, attempts to fix outliers can be a distraction and even net negative.
Post reply on HN