systems

Musical scales with inline flats and sharps

October 19, 2019 music, systems No comments

I have started to learn playing scales on the trumpet. Mostly because it should be helpful for playing faster runs, and also for improvising.

When I play from scores with the usual presentation of scales, I find it difficult from time to time to make out whether the following note is sharp or flat. This is because that is usually indicated at the beginning of the line, in the key signature. So I have to look left, count lines, etc.

So I have prepared scores where the flats and sharps are written immediately in front of each note. There are usually no “cancelling” naturals, because it is taken for granted that if there is no flat or sharp, the next note is meant to be played natural.

To begin I started with the 4 main scales: major, natural minor, harmonic minor and melodic minor.

Of course, there is also value in learning the key signatures, and the positions of the half-tone-steps, and the whole system that holds these scales together. But I think that can be separated, and playing trumpet, and playing these scales in particular, is already hard enough.

I used the free musescore program to create these files. It works really well, and the result looks very good! WordPress doesn’t like me to upload the musescore (mscz) files of the scores – so please email me if you’d like to have a copy.

Here is a list with clickable links for the PDF files. Below are the scores as images, also clickable:

Major Scales
Major Scales
Natural Minor Scales
Harmonic Minor Scales
Harmonic Minor Scales
Melodic Minor Scales
Melodic Minor Scales

Replacing a toilet

July 27, 2018 challenge, family, generic, systems No comments

After a long time, we replaced our toilet last week. The old one didn’t work well for years and years!

We found these two videos helpful, showing in detail how to remove a toilet, replace the wax ring, and then, install the new one. The second video also comes with written instructions. The videos made it look quite straightforward, and so they were very encouraging; and it did work out quite well. It took just about 2 hours.

But here, I provide numbered steps, to follow along one-by-one, as a detailed plan. This way, you will always know what to do next—which can often be tedious, and the most challenging.

1. Empty space next to toilet, clean, etc.
2. Prepare space to lift old toilet to (Step 16)
3. Put new toilet in place to lift from
4. Flush (old) toilet
5. Wipe down toilet
6. Clean bowl, etc.
7. Turn water valve off
8. Flush until will not flush anymore (remember Step 7: water is disconnected)
9. Disconnect water hose
10. Plunge bowl
11. Sponge bowl dry
12. Scoop out water tank, sponge dry
13. Scrape off silicon connecting bottom of toilet to floor (if needed)
14. Lift lids of screws on the bottom / sides
15. Unscrew the bolts that fix the toilet to the floor
16. Lift toilet out
17. Remove the two bolts
18. Scrape out existing wax gasket
19. Clean floor which was underneath the toilet
20. Place new wax gasket
21. Place new bolts (upside down, on sides)
22. Lift new toilet into place. Make sure back is parallel to wall, level perpendicular and parallel to wall
23. Weight down to smoothe out the wax connection
24. Tighten new screws on bolts
25. Connect water, test flush
26. Cut off tops of bolts (saw)
27. Place lids on bolts
28. Connect new seat
29. Test flush
30. Clean up

This is an optimistic list; if anything goes wrong (e.g., at step 13, 18 or 29), you’re on your own. Our new toilet is just a one-piece, so I didn’t cover the case of a separate water tank.

Bezos using the I-words

December 13, 2017 challenge, economics, systems No comments

I came across a more or less generic interview with Jeff Bezos, the founder of “amazon,” a few days ago. It took place in May this year; they chat about management questions, how to run a business, this and that, etc.

But at one point he uses the I-words: impossible and inconceivable.

It is impossible for me to imagine a scenario, where ten years from now a customer comes to me and says, “Jeff, I love amazon; I just wish you delivered a little more slowly.” This is so inconceivable, …

Here’s the link to the quote in the youtube video, jumping right ahead. The context is that the “leader” of a business should “identify” 2 or 3 “big ideas,” and “enforce great execution against these big ideas.” Here, since this scenario is so “impossible” it is easy to dedicate a lot of energy to working on fast delivery. At some other point in the interview he enumerates what he calls the big ideas at amazon, the “consumer business”: low prices, fast delivery, and vast selection. (On the other hand, he is quoted with a different set of 3 big ideas, as well.)

Such a strong conviction and judgement about what is not possible is not common in my world. I almost feel like I go out of my way to avoid talking like that, and so do my friends and colleagues and people I hang out with.

So this morning scenarios popped into my head, of what he deems impossible:

  1. Let’s say you’re at the other end of the world, and don’t want the delivery to happen until you have returned home. Then fast delivery would be undesirable.
  2. Or: your house is full, and that couch you are ordering will not fit until next week, you’re not ready till then.

So in these two cases (or call them “scenarios”), you would like amazon to deliver a bit more slowly.

Surely you can think of other scenarios?!

(Disclaimer: I don’t do any shopping at amazon, and encourage you to avoid them as well. No brown boxes in our house! I’m actually astounded how excited people are about them. You can find a few reasons starting from these search results for boycott amazon from duckduckgo.com)

Alcoholism: The Sinclair Method

November 14, 2017 challenge, economics, food+drink, generic, systems No comments

As far as I can tell alcoholism is quite a terrible disease. I think I am ok, but I used to be addicted to smoking. I stopped smoking two and a half years ago. I’m glad to not be addicted anymore. But recently I came across a treatment for alcohol addiction. I found it compelling, so I wrote this up this short article!

It is called The Sinclair Method, developed by Dr. John Sinclair in the 1960’s. I’ll try to describe it in a few words: You may have heared of Pavlov’s Dog and what is called “Conditioning”. So the bell rings and the dog salivates because the dog is trained to expect food when the bell rings.

It turns out that Dr. Pavlov also found a way to uncondition the dogs. This happens when the stimulus is presented without the reward. As wikipedia writes, “when a conditioned stimulus is presented alone, so that it no longer predicts the coming of the unconditioned stimulus, conditioned responding gradually stops.”

The Sinclair Method consists in the addicted person taking a drug which makes it so that when they drink alcohol, the brain does not perceive the reward as it was without the drug.

In other words, the Sinclair Method thinks of alcohol addiction as a learned behaviour that can be unlearned. The unlearning takes the “fun” out of drinking. But once you’re addicted and desparate, you may find that not much of a loss. And the drug is otherwise said to be harmless.

I found this approach quite convincing. (It appears the drug does not help with nicotin addiction).

The drugs are called Naltrexone, Naloxone, and Nalmefene, keyword “opioid antagonists”.

The Internet has a lot to say about this method. Please read up:

Reddit has a few related forums:

Thanks! Hope this helps. Please do send me any feedback about this if you have!

Snowden, NSA, etc.

January 20, 2014 internet, systems No comments

It’s been a while since Edward Snowden started revealing details about the global surveillance operations of the NSA. I’ve been meaning to write down a few thoughts for a long time, but didn’t quite find the time; however they still seem interesting enough now, so let’s go.

1. Insulting the whole world

It hardly makes sense to begin without stating that these actions are insulting, disrespectful and abusive to every human being (who uses a phone, or the Internet) on the planet.

How dare the American government think they are entitled to listen in on everyone’s phone conversations, read everyone’s emails and track all other online activities.

This also goes for everyone defending these actions. How dare you?!

The reporting from the American side often makes distinctions between surveillance of American citizens, and surveillance of those who are not such citizens. Sometimes it sounds as if American citizens are more worthy of some kind of better treatment. That is of course also insulting, disrespectful and abusive.

2. Spam

When I first heared of the extensive surveillance systems, I thought, well, if they really have this much equipment and so many resources, it would be nice if they could solve a real problem: namely email spam, blog post spam, and similar.

However, they do not occur to be working on that.

One concludes that this is not high on their priorities.

3. Bittorrent

Early on, one could read that the NSA stayed away from analyzing Bittorrent traffic. Which makes a lot of sense, since there is so much of it.

On the other hand, this leaves quite a gap to set up communication channels.

4. Pair programming

Within the first few weeks there were reports that the NSA switched to Pair-programming, pair administration, etc. Basically, don’t let anyone touch the systems without someone else watching. Take turns. Call it “Access Control Layer 1?”

The reports I read, didn’t point out how natural such a policy is. It is also not necessarily more expensive, some software companies use pair programming to avoid costly mistakes, programming bugs, etc.

So one wonders whether the original access  control did not have this additional layer in order to actually allow unauthorized access. After all, Mr. Snowden did not access the system for personal gain; how many others with access were not that noble? How much easier to avoid laws and cut corners without such a layer.

Also, has this policy been reverted in the mean time? It would be possible to do so without issuing a press release, of course.

5. An extra button

Also early on, it was reported that the data that passes through the NSA’s system is enormous. On the other hand, if you look at any particular person, the data traffic they generate will most of the time be quite managable.

So I am guessing that if anyone shows up in manual surveillance (an operator inspects certain communications), they will have a button within their user interface, “Track this individual closely”. Save all that traffic for later viewing. I would estimate that adding 100 people per day would be easy to manage in terms of traffic.

6. Germany

I follow German news of course. When it was first revealed that the NSA was listening in on phone calls of the German chancellor, I thought, well at least governments have the resources to set up communications based on One-time pad encryption. Also, Germany has local chip factories  to make sure the chip does what is desired by the owner, and not what the NSA desires.

(I find the response of European governments quite weak, I think it is underestimated how easy it is to argue with Americans)

7. Logging

In the wider context of privacy on the Internet (user profiling using cookies, etc), it had occurred to me a long time ago, that such policies should also cover web server logs. After all, such logs capture some information about individuals, sometimes not too much, but in the aggregate, I think it would be useful to look into stronger protection. Such protection, in one of my thoughts, would consist in having people, and organizations, be granted a “License to Log”. Such a license would be lost in the case of illegal activities, irresponsible behaviour, and so on.

These kinds of thoughts seem to be totally useless now.

8. Metadata

It hadn’t occurred to me that what they call “metadata” is useful, but now it does seem intuitive that it is very helpful. Basically every person is placed in a circle of their acquaintances, in circles of similarities according to many different categories.

This is similar to Facebook asking users to list their favourite books and music, etc. Facebook will also benefit from this as similar metadata of its users (Who to show which ads, as the most basic example).

9. Cost

One can only feel sorry for the average American. Basically these surveillance systems cost each tax payer a few hundred dollars a year. Without any benefit to them, it would seem.

10. Balance of powers

I often hear praise for the American democracy and how there is a balance of powers.

Cannot be spotted here. It’s rather obvious that there is no supervision of the NSA. Last week it was reported that a senator inquired whether they as senators are also covered by the systems. Asking the question itself was already revealing, needless to say the answer was disappointing.

One can make the case for secret courts in democracies, but I think it is obvious that these should be only used extremely sparingly. That is not the case here.

Ok, that’s all for now. You probably have your own thoughts about this. I’m sorry I couldn’t include links everwhere. Please share below, add corrections or other comments, if you could!

 

How to use the Web completely securely and keep your communications totally private (in the year 2013)

September 7, 2013 internet, systems No comments

 











































On copyright terms and heirs

March 26, 2013 economics, systems No comments

The way copyrights have been set up is that the rights that are granted are good for a number of years past the author’s death. Creative works are generally thought to be created by real people. It wouldn’t make sense in a  macabre way to have these rights terminate when the author dies, since they can be quite valuable.

On the other hand, another motivation for such a rule is also presented: this way artists can provide for their family and children after their death; the heirs inherit the copyrights and can enjoy some income from the license fees for some definite time after. Many careers, types of work, and businesses are like that: an “asset” is built up over time, which can be passed on independently of who started it, with much effort, presumably.

So a taxi driver might pass on their business when they cannot work anymore, or a plumber. For the taxi driver, the asset would be the business licenses and the car, for the plumber mostly the list of clients, possibly the store. It’s not completely fair, in a way, since a bus driver wouldn’t have much to pass on, or a teacher.

Nevertheless, you could agree that artists should have something similar, although it is still difficult to make it work, see this techdirt article, Rethinking Handing Copyright On To Heirs Beyond Death, for example.

Now, one of the annoying things in the world of copyrights is that governments keep extending the terms (US, Europe).

I find this interferes with the heir-motivation. Here’s my thinking:

When I buy let’s say a book or music CD, it comes with copyrights, and these rights are set to expire. At the time they expire, my heirs will have rights with regards to the book or music CD. Be it to publicly perform the work, to reproduce it, distribute it, or create derivative works. All those rights are taken away by these extensions!

Locations from IP addresses and the mobile future

March 24, 2013 internet, systems No comments

Let me start with mentioning that I’m writing this post on March 24, 2013. This kind of stuff is sure to change over time.

One of the things about the Internet is that it doesn’t have location built in. You don’t get to know where someone was when they wrote you an email, website operators don’t get to know where their visitors are when they visit the site. People don’t get to know where the craigslist servers are which put all those bytes together that make up a listing, and so on, and so on.

So people try to approximate. Because it is deemed to be useful information: country, region, city, latitude, longitude, ZIP code, time zone data and more. Even if it is not absolutely reliable, you can still derive some information, some picture. Different services are available, some free, some quite inexpensive, and some quite expensive. Most come in a form of a database file that you download, after paying for a license to use the data. Periodic updates to the database are made available. Web services are also available; this is where  an IP address is submitted, over the Internet itself, to the service provider, and they immediately respond with their location data for this address. You can read more about IP Address Location at wikipedia.

Of course, these services don’t work when people use so called proxies and VPN‘s. In fact, proxies are set up precisely for the purpose of fooling services which are ordinarily restricted by location (e.g. for accessing Netflix or Spotify from non-US locations) into handing over the goods. Such proxies are not particularly costly to use.

Now, when you look at determining location for mobile devices, these models become quite questionable. Surely the network is not aligned with city boundaries, and surely a mobile device’s Internet address does not change smoothly as you move about. Of course, you can move faster than a database update.

So I thought I’d try out different IP Address location services – with my mobile device, using the “Data Plan,” not our home’s router or Wifi. I was in Vancouver, British Columbia, most definitely, the whole time.

Results

Source Reported Location
http://www.ip2location.com/demo Calgary, Alberta
http://www.iplocation.net/ Calgary, Alberta
http://www.ipaddressguide.com/ip2location Calgary, Alberta
http://ipinfodb.com/index.php Calgary, Alberta
http://www.maxmind.com/en/geoip_demo Toronto, Ontario
http://www.infosniper.net/ Toronto, Ontario
http://www.ipligence.com/geolocation Vancouver
http://www.geobytes.com/IpLocator.htm?GetLocation Vancouver, BC
http://freegeoip.net/ Vancouver, BC
http://showip.net/ Vancouver, BC (this is said to be based on the free version of MaxMind, the paid version of which placed me in Toronto)
http://www.hostip.info/ “Location: … actually we haven’t a clue.”

So, you see, some got it right, and some did not. (I didn’t even bother to read or record the latitude/longitude that were given in some cases.)

Car Collisions at Hastings and Kamloops

January 12, 2012 economics, generic, systems No comments

I walk my daughters to school, once or twice a week (my partner takes them on the other days). It’s ten blocks. They wake up early, so it’s mostly a stroll, no rush; about ten blocks through the quiet side streets.

On the way back I take a different route, along the busy Hastings Street in East Vancouver.

Three times in the last few months, an accident happened at the intersection with Kamloops Street. Car crashes. The first one was while I was at the intersection, talking to a friend at the traffic light.

The third one was the most severe. It happened yesterday, January 11, 2012; this time I had a camera with me:

Hastings Street goes from left to right in this picture, and Kamloops from the top to bottom-left; top is South, right is East. The “other car” had already been moved out of the intersection. Here’s a Streetview link.

I don’t know if anyone was hurt. There was an ambulance, but no movement around it.

All three accidents happened when the 3-lane traffic along Hastings is stopped through a traffic light, so that pedestrians can cross, and cars can cross that are going along Kamloops Street. The cars coming from Kamloops/South collide with cars going East on Hastings. Either the Kamloops cars cross too early or too late, or the Hastings cars ignore/fail to notice the traffic light. I don’t really know.

Now with passing this intersection twice a week over ca. 12 weeks (school started in September), and coming across 3 accidents, it seemed to me the other 3 days of a week should generate the same number of accidents, so it would come to 3 (accidents) * 3 (other days) / 2 (“my” days) = 4.5 “other accidents”, for a total of 7.5 accidents in ca. 3 months. Statisticians will probably point out that this is not a good estimate. But let’s make it 7 accidents in 3 months, or 7 *4 = 28 accidents in a year.

Statistics / Mapped

That seemed like a lot to me. So I asked another friend if he knows where to get more definite statistics from the city. He pointed me to one of his contacts, who in turn remembered a recent map put together by Eric Promislow:

ICBC Car Collisions 2006-10: A Google Map Visualization

It displays accident counts by intersection for the City of Vancouver, for the years 2006 to 2010. He obtained the numbers from the Insurance Corporation of British Columbia (ICBC) – who get the reports from the police.

Nicely done, Eric.

So, for the intersection of Hastings Street and Kamloops Street, there were 117 collisions reported between 2006 and 2010. By year, the counts break down like this:

2006: 17
2007: 23
2008: 25
2009: 25
2010: 27

Interpretation

So, a more or less regular pattern. One collision roughly every two weeks, for the last 4 years. Predictable. Regular. If you take a look at Eric’s map, you’ll see there are quite a lot of intersections with even more collisions. (In fact, just one block west on Hastings Street, the intersection with Nanaimo Street has many more accidents: 300 for the period, but I never saw anything of those.)

It almost looks like the only ones to be surprised about any of those collisions would be the participants, bystanders and witnesses. When I mentioned the first two accidents to some friends from the area, they said, yes, there are crashes there “all the time.”

Now my calculation from above looks spot-on: I estimated 28 accidents for 2011, and there were 27 recorded for 2010. But all accidents that I counted occurred around 9 o’clock in the morning, since I was walking home from the school.

So I thought, if Eric had the data by time of day, I would be able to compare. But he didn’t. He wrote, “ICBC withholds finer-grained info, claims privacy issues.”

Questions

I have a few questions:

  1. Do the accidents at the intersection of Hastings and Kamloops Street occur mostly around 9 o’clock?
  2. Do the morning accidents at the intersection of Hastings and Kamloops Street occur mostly when a car crosses from the South along Kamloops, and the other car is going East on Hastings?
  3. Do  intersections with a similar number of collisions have anything in common? What kinds of commonalities?
  4. Does it make sense to blame the accidents only on the individuals involved?
  5. Does the City of Vancouver track this data and analyze for prevention?
  6. Does the City of Vancouver carry any responsibility?
  7. What aspects of an intersection can be improved?
  8. How many hours of additional driver training reduce the number of accidents by how much (regular training, one-time training)?
  9. How many km/h of speed limit reduction result in which reduction in the number of accidents?

About point 3: due to the large numbers of existing collision-prone intersections, and the predictability of collisions occuring, if indeed commonalities exist then one can try out different strategies to lower the numbers, and compare what works and what doesn’t, for example with A/B Testing. Better than doing nothing (my impression). Especially if you think across several cities. I’m not aware of this happening.

Another friend of mine pointed out that causing an accident is not (even) considered a crime. I think that would go a bit far, mainly because establishing who is at cause is quite difficult. But I think it’s worth noting: causing damage, and potentially traumatizing, if not physically hurting, innocent bystanders is actually legally sanctioned to that degree. The proven (proven by statistics such as these) risks are accepted or better, ignored by car drivers.

On the other hand, if 6. was legally accepted, and the City of Vancouver would have to pay for their share of responsibility in a lot of the accidents, I think it would not be able to afford keeping the streets open.

Also, thinking further about this I noticed that car insurance companies are compromised in the sense that for them, the more accidents, the better: more business, more revenue, more stability, more profits. As far as I know, in British Columbia, ICBC is not privately owned and controlled, so that should help working these problems out.

Oh, well

You know what? I just realized, there were two other accidents on the other side of the intersection in the last few days. But I came across these when picking up my daughters from school, on the way home, so shortly after 3 o’clock. This is getting a bit much. And 2011 looks even worse for this intersection, because my estimate should be based on higher observation counts.

But most of all, I prefer and recommend walkingcycling or taking the bus: that’s what I call civilized.

Update August 2013

One and a half years later. Things change. I witnessed no more accidents. Didn’t check the statistics though. Writing this post made a difference?

Of mice and traps

December 19, 2011 bc, economics, systems No comments

Two or three summers ago, we had problems with mice in our house. We have a live trap, sometimes it works. When there are not too many mice, it is quite all right.

I usually get the task to empty it, which is not much of a big deal. I take it to a sports field that is half a block away. After opening the trap, the mouse jumps out. The first two times, crows snatched up the mouse pretty quickly. So now I usually stay around for a while, and the mouse manages to disappear in the grass.

This time, while I was waiting, a man came by, walking his dog. He asked, so I explained, yes, it’s a mouse trap.

He became really angry. i was shocked, because to me it was all really harmless. He asked whether I knew that dogs use the field. He asked if he should call the police. I said yes, since he was pretty intimidating in his anger. Of course, he didn’t. I didn’t know what he was so angry about, I was just glad when he finally left.

Funny thing, and I did notice something odd during this confrontation, when I returned home with the trap, I thought to check it, and actually, yes, the mouse had returned to the trap.

I took it back right away (Mr. Angry wasn’t around anymore).

Later, thinking this over, the only explanation I came up with was that I never mentioned to him that it was a live trap; he may have thought it is a glue trap, or some kind of poison trap. I guess, in his mind, he would not like his dog to sniffle into one of those. So, at the time, using one of those was quite outside of my horizon. At the same time I think a live trap was completely outside of his horizon. Hence the dispute.

Exterminator

The live trap didn’t work well enough. After a few months we got an exterminator to help.

He was a nice man, and we had a friendly conversation about mice and this and that, so at the end I thought I’d ask him a question that I had been wondering about, especially with the saying in mind, “building a better mouse trap”: What would he think a mouse trap designed by Steve Jobs would look like?

He said, “Oh, the guy who does Microsoft?”

Well, no, that’s not who I meant. I think that would be quite a horrible trap. Spreading viruses comes to mind.

Nice

Quite a while later, I told an acquaintance about the exterminator and the Steve Jobs disconnect. She was super excited about the idea of a mouse trap designed by Steve Jobs himself. She said, it would be so nice and elegant, you would want to put one in every room of your home.