Posts

Welcome to democracy

Image
Or: How to Lose Votes & Alienate People Source:  the Guardian If you've been keeping up with world news recently, no doubt you've heard about Brexit - a.k.a. the 2016 referendum for the UK leaving the European union, which recently passed. Depending on what sort of filter bubble you currently reside in (see my earlier post ), you might have also run across a lot of articles saying why this is a bad idea. In general I agree that it's not the optimal outcome, but was pretty surprised at the way the responses came out, and feel like, if anything, they made the issues worse, not better. Given that many of the readers of this blog live in democracies (it seems a popular form of government), and democracies at times will have votes you don't agree with (otherwise you're either the world's best bellwether, or leading your own dictatorship...), I figured it worth covering some of what I saw happening, and why it did or didn't seem a good idea... ...

Neuro misconceptions

Image
Image source I'm sure it's due to the frequency illusion , but having switched from tech into more of the psych/neuroscience fields, I'm starting to notice an increase in the number of articles coming out claiming new findings on how the brain works. For example, this coverage of the effects of LSD on the brain , or this one on creating a map of where each word is 'represented' . (Note: using guardian articles just for consistency, not because they're particularly good/bad). This time related to the Gell-Mann Amnesia effect , I also find articles about the brain to be fairly poorly written - e.g. misrepresent the trial, explain it badly, leap to wrong conclusions, etc. The same is true sometimes also when talking about the research, and surprisingly, even in the research papers themselves! So in case it's useful for anyone reading these things, I figured I'd note a few things to be wary of when reading any upcoming neuro-related news. With the caveat...

Sounds good - part 1.5

Image
The last few posts on sounds seemed well received, so I'm inserting a few more explanations of sound-related concepts between the first (basics) and second (spectrogram-based) installments. Consider this part 1.5, covering some of the more fundamental topics, but migrating towards spectrogram-based ideas at the end. Karplus–Strong (string synthesis): You might recall from part 1 that pressure that changes in the form of a sine wave is interpreted by our ears as a single, pure tone. As explored in the waveforms section though, other shapes (triangle, square, saw, ...) when repeated at the same frequency also sound like the same note, just the acoustics are a bit different. This leads to the question: if it's just the repetition that is important, what do other shapes sound like? It turns out, that you can start with a random shape, repeat it at the right frequency, and it will usually sound like a stringed instrument. Adding in a filter (see below), you get a nice synthes...

Kindling #4

Image
This post is from a series of review posts - for the whole list, see my  Kindling page . Now that I've finally managed to finish the novel I've been reading for almost half a year now it seemed a good time to do another book review dump in case anyone is reading these (and while waiting for music uploads to be processed for another post). Catch-22 (Joseph Heller) - On my list of 'classics to read', I didn't really find myself getting in to Catch 22, although I can see its appeal. It fits in a style of novel that I see a lot but doesn't gel with me: a collection of weird events that aren't that related, centered around unusual characters and their weird behaviors and circumstances. In an earlier post I mentioned the same problem with Kurt Vonnegut, so while it was well written, I couldn't help feel I would rather be reading about Milo's story of growing his trade empire, rather than Yossarian's. Armada (Ernest Cline) - Armada is the se...

Application architecture predictions

I'm still trying to keep up with web / app technology, and every now and again something comes up and I think: "Ooh, that seems like what I was trying to do with Project Ion " (my old experimental project, mostly dead). I figured it was worth to document these so I can see how many ideas in it eventually make it into general use, and what to work on next. So, to summarize the main ideas: 1) Reactive data-binding UI Status: Many popular libraries ( react , angular , knockout , polymer , ...) This was the biggest divergence at the time, but is now pretty much everyone. It's always a pain updating you view once your model changes, making sure all the constraints still hold, so a declarative UI that binds things tends to be a clear improvement. The idea has been around for a while now, and it's nice to see that its popularity for application development has increased. 2) Observable live data model Status: Implemented in Firebase , share.js Not surprisingly, th...

Eventful Javascript

let data = {child:[]}; treevent.Listen(data, "child[*].name[0]", (path, params, type, index, oldValue, newValue) => { console.log("woah..."); } ); data.child.unshift({name: ["first", "last"]}) For any front-end developers out there, you may have noticed the increasing popularity of reactive / event-driven / data-binding architectures. Call it what you like, but things like React , RxJS , Angular , Web Components , Meteor , Firebase , ... etc are all built along similar principles. Whenever asked about them, I always recommend usage (it's a much nicer style of coding that a non-binding way) but I also tend to complain that ' arrays aren't done properly ', which understandably confuses people, as it's intentionally reductionist. There's obvious things, like Firebase's lack of native array support , but I realized that what I more meant was that array mutations weren't handled well, which means ...

Sounds good - part 2

Image
If you haven't yet, read Part 1 first, an introduction to what sound is. I left off last time with a description of sound as changes in pressure, and notes as waves within these. On natural progression from this is: given the samples of a sound, how can you tell what notes are playing? Ears As I'm doing psychology, I'll take a small diversion here to rephrase that to: how does your ear do it? That is, given vibrations from your ear drum, how does your brain tell what notes are playing? Before answering that, first it's good to know about resonance frequency - as you can see from this video , items that make noises when hit tend to have a resonant frequency , that is, the rate at which they vibrate in a cycle. Similar to pushing someone on a swing, if you push an object at this frequency, it will strengthen the resonance. So how is this useful in regards to ears? The leading theory is that there's a section of your ear with lots of tiny hairs along a tube. ...

Interestingly uninteresting

Image
Concept This idea came about first while hiking: say you were leaving a place, and knew you'd come back in the future. You also have an object you want your future self to have, but you can't take it with you, so decide instead to leave it somewhere and pick it up on your return. Where would you leave it? To add some constraints: (a) you're not sure exactly when you'll return. Maybe 5 years, maybe 50. Also, (b) you prefer populated areas to those with lower density (faster to pick it up when you return). In maths terms, you're trying to minimize #visits(place) / #visits(surrounding areas) - that is, the fewer times people visit where you leave it, the better (ideally 0) but it's also good if people visit the places close by often. I eventually settled on somewhere like under unkempt plants near an industrial zone of a stable business (unlikely to change, also near road/foot traffic going to the building), but realized that really want I wanted was a really...

Sounds good - part 1

Image
I've spent a bit of time recently on one particular coding project of mine: Go-Sound , which is a library for sound manipulation and analysis written in Golang. When explaining it to people however, it turns out that not many people know how sounds work - indeed, I didn't until recently - which is interesting as it's something we use all the time (statistically, you're probably hearing something while reading this) but don't really know much about. This post is an introduction to the library, but also hopefully serves as a tutorial about what sound actually is. Sound = changing pressure When you hear a sound, what are you actually sensing? Sound waves are actually changes in pressure that are picked up by your eardrum. When you hit a drum, or pluck a string, or blow air through a tube, you are vibrating the air, and these pressure changes travel out in all directions - if they hit an ear, those changes will get interpreted as sounds. Once convenient way to rep...