05.26.19

How do you share your bad news?

Posted in Uncategorized at 9:41 pm by ducky

My mother died. It wasn’t a big surprise — she had had cancer for three years, and was not having a good time.

I am discovering that I am human: I burst into tears somewhat unpredictably, I find myself regularly thinking, “Oh, I should tell Mom about… oh wait, no I can’t.” I had heard people talk about those effects, so I know those would happen.

But nobody told me how to break the news. If there is a convention in our culture for how to break the news, well, I must have been sick the day we covered that material.

It was straightforward to notify her friends. I phoned them and told them. It was right and appropriate and the mere fact that I phoned them was an indication that something was wrong. It was sometimes hard for me to get the words out, but her friends understood, in part because they also were grieving.

Telling strangers was slightly harder than telling her friends. Sometimes I had to tell a company, e.g. ones Mom was a customer of. If the company was big enough that they had a branch dedicated to closing accounts for deceased people, it wasn’t so bad, but for smaller companies, sometimes the person on the other end would not be emotionally prepared, and it would remind them of some loss of theirs and set them off, which would set me off.

(There was exactly one company, her newspaper, which was insensitive. The agent kept very aggressively trying to get me to take over her subscription even though I don’t live in Mom’s town.)

But nobody prepared me for the angst of how to tell my friends and acquaintances, especially those who lived in other cities. Send them an email with the subject line, “Mom died”? Send a chatty email about the weather and say, “oh, by the way, Mom died yesterday”? Or do I wait and say, “oh, by the way, Mom died last month”? Or should I wait until I see them in person, which might be a year or two from now? Or do I just not tell them — ever?

For people I run into who I know and like but am not super close to, a simple “How’s it going?” makes my brain freeze for a minute. Do I just give the pro forma “fine?”. Do I blurt out “my mom died”? Do I wait for an appropriate place in the conversation? Is there an appropriate place? Am I going to burst into tears or am I going to be able to maintain composure?

I thus have been completely bumbling along and inconsistent. Some people I have told unbidden. Some people I’ve told when asked how I was. Some people I just… haven’t told… yet. I tell myself I’m doing the best I can, but I know I am lying to myself. I don’t even have the foggiest idea what “best” looks like.

So I’m blogging this. Perhaps this will catch some of the people I haven’t told yet.

05.18.19

My mother RIP

Posted in Uncategorized at 5:01 pm by ducky

My mother, Judith Newlin Sherwood passed away, April 26, 2019 in her home in Bellingham, Washington. She was 80 years old. Memorial services will be held at 3PM on Friday May 24, 2019 at the Bellingham Unitarian Fellowship in Bellingham, WA. She is survived by her sister Joyce, brother Joe, her three children — Anton, Tim, and me — and her former husband Bruce.

Mom was born in 1939 to Mildred and Jason Newlin in Indianapolis, Indiana. Her childhood was spent in Carmel, Indiana,  just north of Indianapolis, close to relatives and the wonderful fields and farms of (then-rural) central Indiana. When she was twelve, her family moved to West Lafayette, Indiana.  She met Bruce Sherwood at West Lafayette High School and married him in 1959, after their junior year in college.  During their senior year, they were they first married couple to appear on College Bowl, and on the first team to win four games in a row.

She completed her preparatory education and life in central Indiana in 1960 when she graduated from Purdue University.

She and Dad then spent a year in Padova, Italy after they graduated, where my brother Anton was born.  They then finished their educations at the University of Chicago, where  Mom earned a masters in Statistics.  They then spent three years in Pasadena, CA.

In 1969, Mom and Dad, now with three children, moved to Champaign, Illinois. They both established careers there that supported education delivery in a distinctly technological and novel way at the PLATO project at the University of Illinois at Champaign-Urbana. During most of my childhood, Mom worked as an on-line “consultant”, helping novice programmers debug their programs.

Having raised a family, acquiring invaluable experience and skills in a quietly major technologically innovative project, Mom’s life changed focus to a different type of spiritual growth. She moved from Champaign in 1984, to Pittsburgh, PA, to Mt. View, California and finally to Bellingham. She formally retired in California in 2002 with nearly 35 years of experience in computing technology.

In 2004, Mom made Bellingham, WA her home, joining the community taking and taking a seat at a few tables. Her hobbies included quilting and duplicate bridge, and she was active in the Hearing Loss Association, the Unitarian Church, and local associations. She is remembered by many for her cheerful kindness.

The family asks that donations in lieu of flowers go to the Hearing Loss Association of America or the Unitarian Universalist Service Committee.

 

06.17.18

Ducky’s Vegan Paella Recipe

Posted in Recipes at 1:14 am by ducky

I had paella for the first time courtesy of my nephew Z and his wife R, and it was awesome.  A few weeks later, I had it at a restaurant and decided I had to have it!  After some trial-and-error, here is what I came up with:

In a saucepan, boil:

  • 3 C water
  • 2 heaping teaspoons full of Vegetable Better Than Boullion goo ← unsolicited endorsement, this stuff is great
  • 2 T lemon juice
  • 2-6 saffron threads
  • 1 C arborio rice ← Important! Arborio absorbs more water than regular rice

Meanwhile, sauté with a flat-edged spatula:

  • 1/3 cup oil
  • 4 stalks celery
  • 1 onion
  • 1/4 t cayenne OR 1 jalapeño
  • 1 poblano or 1 green pepper (poblano is slightly spicier)
  • 1 yellow or red pepper
  • (optional: green onions)
  • 4 garlic cloves

I listed the above in the rough inverse order of how much cooking they need.  I tend to put the garlic in RIGHT before I put in the spices.

After sautéeing until the onions are transparent:

  • 2 HEAPING t smoked paprika (which is probably more like 3 or 4 level teaspoons)
  • 12 turns black pepper from a pepper grinder (1 tsp?)
  • 7 turns white pepper from a pepper grinder

WARNING: stuff, especially the spices, will want to stick to the bottom of the pan.  I use a flat-edged wooden spatula to be able to get the crud off the bottom.  Adding a little more oil will reduce but not eliminate the desire to stick to the bottom.

Put in the spices and stir/cook for not very long (another 3-5 min?), then stir in:

  • 2 med tomatoes
  • all the stuff from the saucepan (rice plus liquids)
  • 1 C frozen peas
  • (optional) 1 handful of parsley or cilantro

I don’t have a good way of describing when to stop boiling the rice mixture and put it into the big pot.  When it gets close, the rice grains will get soft on the outside but still have just a little piece in the interior which will still be al dente in the interior.  At the end, the rice needs to be soft all the way through, but not overcooked; the timing works out for me such that the big pot is ready to receive the rice mixture at a time when the rice isn’t soft all the way through yet… so I usually put in the rice into the big pot when it is _slightly_ al dente still and let it do its final softening in the big pot.

I sometimes add some water here so that the water level is almost to the top of the veggies.

Simmer until the rice is soft all the way through, and most of the liquid should be below the level of the top of the rice.  (5min?  15min?)

I understand that the “authentic” way to do paella is to boil the rice with everything in the big pot, it’s a bit faster to start the rice cooking while the veggies are sautéeing.  It’s also authentic to stop stirring and let the bottom of the food brown, but I am too afraid of burning it so I have never managed that trick.

I try to adjust the quantities based on the size of the vegetables I have on hand.  If I have a huge honkin’ onion and huge honkin’ tomatoes, I might use three small peppers, 1.5 cups of rice, etc.  If I only have one small onion, I might add some scallions or shallots.

This is a very robust recipe. When I make it, I vary the ingredients quite a bit.  I don’t have set times, the heapingness of the teaspoons is very hand-wavy, etc.   I frequently need to add a little bit of oil late in the process to help keep stuff from sticking.

I think this is a recipe which you should not be afraid to vary a bit.  If you like things spicier, use a little more cayenne and a little less paprika.  If you like things less spicy, use a green bell pepper and no cayenne or jalapeño.  If you don’t have onions but do have scallions, use scallions.  Double batches work just fine.

It probably would work better if you had a real paella pan, but I don’t have one.  I make it in a dutch oven (with a side saucepan for cooking the initial rice mixture).

03.11.18

Refugee sponsorship

Posted in Canadian life, Politics at 7:39 pm by ducky

I lead a group which is sponsoring a refugee family.  Enough people have asked me how that works that I am compiling the answers here.

Legal Background

In Canada, there are three ways refugees come into the country:

  • Government sponsored, where the federal government provides all of the financial support for the first year and contracts with organizations called settlement agencies to provide the logistical support and hopefully some emotional support as well.  In BC, the main settlement agencies are MOSAIC and ISSBC.
  • Blended Visa Office Referral, where a charitable organization (frequently churches) bring in a family who they don’t know.  The organization — called a Sponsorship Agreement Holder or SAH — can do this by themselves or they can partner with a group of individuals (the sponsorship group), but the onus of vetting the sponsorship group and the legal liability lies with the SAH.
    • The SAH periodically gets an anonymized list of families approved for resettlement in Canada.  The entries usually give the family size, the ages of the children, sometimes the ages of the parents, their nationality, where they are now, if they have any special needs, and if there is a particular area they would like to go to.  (For example, they might have a cousin in Calgary or might really want to live near the ocean.)  The SAH communicates to the sponsorship group what families are available, and the sponsorship group will indicate if they are interested in sponsoring one of the family on the list.  The SAH will then communicate with Immigration, Refugees and Citizenship Canada (IRCC); IRCC decides who “gets” the family if more than one SAH expressed interest.
    • The SAH is legally responsible for 100% of the logistical and emotional support and slightly more than half of the financial support.
    • If there is a sponsorship group, the sponsorship group is morally responsible for what the SAH is legally responsible for.
    • The government provides 50% of the income support but not the start-up costs — furniture, staples, cleaning supplies, clothes, etc.
  • Privately sponsored, where a group of at least five Canadian citizens and permanent residents (a “Group of Five”)  OR a SAH enter into a legal agreement to bring in a family of known people.   Under this sponsorship type, the group is 100% responsible for financial, logistical, and emotional support for the family for one year.  (I call this the “let’s bring in grandma” sponsorship.)

 

Emotional and Logistical Support

I have mentioned emotional and logistical support multiple times.  What do I mean by that?

As an example, since we got the news of when they were going to arrive, our team has:

  • arranged temporary housing;
  • gotten them a phone and cell plan;
  • stocked their temporary housing with some food;
  • found a permanent apartment;
  • helped them fill out a massive number of forms (including the childcare tax credit and the medical services plan enrollment form);
  • helped them get Social Insurance Numbers (analogous to the US Social Security Number);
  • helped them open a bank account;
  • gotten them winter coats;
  • escorted the father to a medical appointment;
  • showed them how to use their debit cards to buy transit cards;
  • took them shopping for essentials (like underwear!);
  • helped them phone their friends back in the camps;
  • drove them to the local branch of their church;
  • did a lot of talking, orienting, and many other details too minor to call out explicitly.

In the next few days, we will:

  • co-sign the lease on their apartment;
  • move donated furniture from at least four different places into the apartment;
  • help them buy a small amount of furniture;
  • help them buy groceries and cleaning supplies;
  • help them register their child for school;
  • help them register for English classes;
  • show them how to use public transit;
  • help them get library cards;
  • help them get to eye and dental exams.

Longer-term, we will check in periodically to make sure they are adjusting well and give help as needed (e.g. to help mediate disputes or help them find trauma counseling if required), and help them find jobs.

Our particular experience

At the height of the publicity about the civil war in Syria, in late 2015, there was a huge outpouring of support for Syrian refugees.  I was not immune, and posted quietly on Facebook that I was thinking of sponsoring a family and immediately got a huge response.  Some people pledged money but couldn’t pledge time (because they lived elsewhere and/or had other obligations); some people pledged both.

I researched what was required and discovered that, because we didn’t know anybody personally, BVOR looked like the way to go.  I looked through the list of SAHs and found that the Canadian Unitarian Council (CUC) was a SAH that I thought would be easy for me to work with, so I started working with the Unitarian Church of Vancouver (UCV)’s Refugee Committee.

I had to prove to the UCV Refugee Committee that we were trustworthy, including routing at least 2/3 of the required funds to UCV before they would advise CUC to accept us.  (We put 100% of the amount, which helped show we were trustworthy.)  We also had to fill out some forms for CUC.

Unfortunately, by the time we got our act together in 2016, the Canadian government had let in as many refugees (45,000) as it had decided it was going to let in that year.  In 2017, the government set the BVOR quota very low, reserving most of the spots for private sponsorships, which were mostly for family members of the Syrians who arrived in 2015 and 2016.

(In mid-2017, I happened to be standing next to a TV in a deli where some MP was getting interviewed.  She said, “The number one question I get asked when I go back to my riding is, ‘Where are my Syrian refugees?'”  So we were not the only team waiting.)

2018 was a new year with new quotas, however.  Furthermore, the rest of the world had reminded Canada that Syria wasn’t the only place where things were bad.  So the BVOR list started getting populated again with families from different places.  There still weren’t a lot, but there were some.

So while in 2016 we planned on sponsoring a Syrian family of four, in January 2018 when we spotted an Eritrean family of three, we requested a match with them.  The government confirmed the match, and we sent in our paperwork on 30 Jan 2018.  On 2 Mar 2018, we got word that they would arrive on 7 Mar 2018.  Wheeee!  It was a bit of a scramble.

“Our” family

I don’t want to say much about the family we are sponsoring because there are privacy/security concerns and because refugees are in a very vulnerable position, not knowing the country, culture, or language.

I think I can disclose that the family had been in a camp in country X for EIGHT years.  (I am not clear on the details yet, but I think they might have been in a camp in country Y for a few years.)  They were not allowed to leave the camp, so their child had NO memory of anything except that camp.  There also were no TV or movies in the camp, so he didn’t even have any visual images of other places.  I can’t even imagine what it was like for him to see grassy fields and forests and snow-covered mountains and airplanes and stoplights and microwave ovens.

Mom and Dad don’t produce much English, but they can understand some English.  My husband has run errands with them with no translator, and by speaking slowly, directly, and simply, he can communicate.

Green Hills Welcoming Committee

Our team needed to have a name so that UCV could keep track of it as an entity, and we chose “Green Hills Welcoming Committee”.

Our time-donating team originally had six people on it.  One dropped out because of health issues; one dropped out due to logistical issues.  One husband has become more involved, and I picked up two team members from the UCV Refugee committee (including a former Eritrean refugee, who has contributed an enormous amount).

I have to say, we have an awesome team.  We have worked very well together, encouraged each other, trusted each other, and come through for each other.  We also have spread the load out so that no one person is overwhelmed.

  • Person A has an infant, so is limited in how much she can do hands-on.  She’s our researcher.  She figured out which forms we needed and filled out as much as possible before the family got here (and documented everything she found).  She’s made calls to figure out what we need to do to get the child enrolled in school and the parents enrolled in language classes.
  • Person B and Person C are hosting them in their house.  They have been taking care of hospitality things: feeding them, making them feel welcome, entertaining the child, etc.
  • Person D, the former refugee, has been doing the translating and introducing them to the local community.  (For example, he went to church with them.)   He’s also been doing the lion’s share of ferrying them from one place to another and helped a lot in the housing search.
  • Person E has been doing the bulk of the housing search, with significant help from Person D.
  • Person F has been doing a lot of the helping and coaching for things involving bureaucracy.  Person A got the forms ready and Person D can translate, but Person F is the one who has done the follow-through and gotten the forms signed and in the mail, and negotiated with the bureaucrats.   He’s also taken the family on errands when Person D wasn’t available.
  • Person G — the treasurer of the UCV refugee committee — has been the advisor.  She’s always been there to give advice on how to handle things or explain how something has to be done.

The timing is also really really fortunate: only one team member has a day job.  One has a night job, one is retired, one is on maternity leave, and three are between jobs/contracts.  (Myself, I got laid off on 15 Feb.)

So far, so good.

02.27.18

Why AI scares the s*** out of me

Posted in Hacking, Technology trends at 12:11 pm by ducky

There is a trope in our culture that sentient robots will to rebel someday and try to kill us all.  I used to think that fear was very far-fetched.  Now I think it is quaint.

I mean, we already live in a world of flying robots killing people. I don't worry about how powerful the machines are, I worry about who the machines give power to.

We don’t need to worry now about malevolent sentient AI killing us.  We’re going to first need to worry about malevolent sentient humans using weaponized AI to kill us.  After we survive the malevolent humans wielding AI, then maybe we can worry about malevolent sentient AIs.

Partly what worries me is the amazing speed of advances in AI.  There are incredible advances in natural language processing, as I mentioned in Mind Blown By Machine TranslationBoston Dynamics and others are making big advances in robotics; Tracking Point has developed AI-guided semi-automatic rifles; the US military is looking into swarming, self-guided drones.  I am certain that autonomous drones are going going to get very, very good at killing people in a very short amount of time.  There has already been at least one drone swarm attack.

At the same time as humans will become less needed in the military, they will become less needed in commerce.  If self-driving trucks can deliver packages which were robotically loaded at the warehouse, then UPS won’t need as many truck drivers and Amazon won’t need as many warehouse workers.  If an AI can spot cancer as well as dermatologists can, then we won’t need as many dermatologists.   If an AI can estimate insurance losses as well as humans, we won’t need as many insurance claims assessors.

There’s an immediate, obvious concern about what to do with a whole bunch of people once they don’t have jobs.  A number of people and organizations have been promoting basic income as an idea whose time has come, and there are a number of pilots, e.g. in Finland.  Note, however, that people who don’t have an income don’t have much power, so getting a basic income law passed after most people are out of a job might be difficult.  Traditionally, when there was gross inequality, the mob gathered pitchforks.  This has worked in part because the military is generally uncomfortable firing on civilians.

What happens when it is easy for robots to quickly kill anybody carrying a pitchfork?  Think about that for a second.

It gets worse.

CGP Grey has a video called Rules for Rulers, which I recommend watching.  Basically, rulers need to keep the people below them happy, which generally means “giving them stuff”.  They, in turn, need to keep the people below them happy.  If you don’t give enough stuff to the people below you, you are in danger of getting forcibly removed from your position.

If your country gets its wealth from its people, then you have to keep the masses happy or the country isn’t able to sustain enough wealth to keep everybody happy.  However, if  you only need a few people to generate the wealth of the country (e.g. diamond miners), then the masses are largely superfluous.  This is, Grey says, why resource-rich countries (like so many in Africa) are really awful places to live, and why the developed world is really a very nice place to live.

Okay, now let’s do a thought experiment.  If we get to a point where robots can do everything humans do, and the elites control the robots, then what do we need masses for?  What incentive do the 1% have for keeping the other 99% alive?  Do you really think that the 1%, who now own more than 50% of global wealth, are going to be moved to fund basic income out of the goodness of their hearts?  History does not suggest that they would be inclined to do so.  Mitt Romney complaining about 47% of Americans paying no income tax is an example of how some elites consider the masses to be freeloaders.  Romney expressed this opinion at a time when 49% of Americans are non-earners, but 94% of people below the poverty line are elderly, children, students, disabled, or family caretakers; what happens when a lot of able-bodied people are non-earners?   I guess the masses will just have to eat cake.

I don’t know if the elites would go so far as to willfully kill the masses, but  I can certainly imagine the elites neglecting the masses.  (With climate change, I can even imagine the elites thinking it would be a good thing if millions of people died off.  It would certainly reduce carbon consumption!)  Even if they aren’t malicious, they might look at the problem, say “there is nothing I can do”, wall themselves off, and pull up the drawbridge.

I am imagining that in 20 years, there just might be some really deadly pandemic with a very very expensive treatment.  And the elites might not prioritize finding an inexpensive cure for people outside of their social circle.  Oh, don’t think that could happen?  Check out the history of HIV treatment.

P.S. — I am a little nervous about posting this.  If some AI in the future tries to figure out who the troublemakers are (so that its bosses can exterminate all the troublemakers), this post maybe will mark me for execution.  🙁

Addendum: this story says exactly the same thing.  It’s not just me.

02.20.18

Ducky’s Vegan Cajun Red Beans and Rice Recipe

Posted in Recipes at 9:39 pm by ducky

I had a Significant Other many years ago who was from Louisiana, and taught me to love Red Beans and Rice.  Later, I became a vegetarian.  That was mostly okay, but I missed Red Beans and Rice.  I eventually got tired and worked out a vegetarian version and was really happy with how it turned out.  Here’s my recipe:

Soak 1 lb dried red beans overnight.

After they are well and truly soaked, drain off the water and put them in a slow cooker  Cover them with water or broth. (I really like Better Than Bullion goo; I use about 2 big teaspoons for one batch of this recipe.)

Chop two sausages of Tofurky Andouille sausage (comes in 4-packs) into thin disks and brown lightly.

Then saute with the sausage:

  • 4 diced celery stalks
  • 1 diced onion
  • 1/2 to 1 green pepper
  • 6 cloves garlic

After you’ve sauteed all the stuff, add it to the slow cooker.

Also toss into the slow cooker:

  • 1t salt
  • 2t white pepper
  • 1 bay leaf
  • 1 waaay heaping teaspoon of smoked paprika
  • 3/4 t of cayenne pepper
  • about 2cm of jalapeno
  • 20 turns of a black pepper mill (I think this works out to about 2t)

Everybody’s slow cooker is going to be different, but I think mine takes about six hours on high.   It’s done when the beans are mushy.  For authenticity, at some point when the beans start to get mushy, smash 1/4 of them against the side of the slow cooker.  This makes the stew thicker and mixes more of the bean flavour into the liquid.

Serve over rice.

Notes:

“Red beans” are a specific type of beans. Beans which happen to be red, like kidney beans, are not the same. If you can’t find dried red beans, you can probably find canned red beans, but they are more expensive. (You don’t have to soak them overnight, however.)

The Tofurkey Andouille sausage is really important for getting the taste right.  Other kinds of vegetarian sausage won’t give the right taste.  Tofurkey Andouille sausage is slightly hard to find, but our Whole Foods carries it.

The beans freeze well, but the rice does not.

11.07.17

Mind Blown By Machine Translation

Posted in Technology trends at 12:10 am by ducky

I have been studying machine learning lately, and have come across three recent research findings in machine translation which have each blown my mind:

  1. Computers can learn the meanings of words.
  2. Computers can make pretty good bilingual dictionaries given only large monolingual sets of  words (also known as “a corpus”) in each of the two languages.
  3. Computers can make sort-of good sentence-level translations given a bilingual dictionary made by #2.

Learning the meanings of words

Imagine that you could create a highly dimensional coordinate space representing different aspects of a word.  For example, imagine that you have one axis which represents “maleness”, one axis that represents “authority”, and one axis which represents “tradition”.  If the maximum value is 1 and the minimum 0, then the word “king” would thus have coordinates of (1, 1, 1), while the word “queen” would have coordinates (0, 1, 1), “duke” would maybe be (1, .7, 1), “president” would maybe be (1, 1, .6).  (If Hillary Clinton had been elected U.S. president, then maybe the maleness score would drop to something around .8).

You can see that, in this coordinate space, to go from “woman” to “man”, or “duchess” to “duke”, you’d need to increase the “maleness” value from 0 to 1.

It turns out that it is relatively easy now to get computers to create coordinate spaces which have hundreds of axes and work in exactly that way.  It isn’t always clear what the computer-generated axes represent; they aren’t usually as clear as “maleness”.  However, the relative positioning still works: if you need to add .2 to te coordinate at axis 398, .7 to the one at axis 224, and .6 to the one at axis 401 in order to go from “queen” to “king”, if you add that same offset (aka vector) — .2 at axis 398, .7 at axis 224, and .6 at axis 401 — to the coordinates for “woman”, then the closest word to those coordinates will probably be “man”.   Similarly, the offset which takes you from “Italy” to “Rome” will also take you from “France” to “Paris”, and the offset which takes you from “Japan” to “sushi” also takes you from “Germany” to “bratwurst”!

A function which maps words to coordinate spaces is called, in the machine learning jargon, “a word embedding”.  Because machine learning depends on randomness, different programs (and even different runs of the same program) will come up with different word embeddings.  However, when done right, all word embeddings have this property that the offsets of related words can be used to find other, similarly related word pairs.

IMHO, it is pretty amazing that computers can learn to encode some information about fundamental properties of the world as humans interpret it.  I remember, many years ago, my psycholinguistics professor telling us that there was no way to define the meaning of the word “meaning”.  I now think that there is a way to define the meaning of a word: it’s the coordinate address in an embedding space.

As I mentioned before, it’s surprisingly easy to make good word embeddings.  It does take a lot of computation time and large corpuses, but it’s algorithmically simple:

  1. Take a sentence fragment of a fixed length (say 11) and have that be your “good” sentence.
  2. Replace the middle word with some other random word, and that’s your “bad” sentence.
  3. Make a model which has a word embedding leading into a discriminator.
  4. Train your model to learn to tell “good” sentences from “bad” sentences.
  5. Throw away the discriminator, and keep the word embedding.

In training, the computer program iteratively changes the word embedding to make it easier for the discriminator to tell if the sentence is “good” or “bad”.  If the discriminator learns that “blue shirt” appears in good sentences, that “red shirt” appears in good sentences, but “sleepy shirt” does not appear in good sentences, then the program will move “blue” and “red” closer together and farther from “sleepy” in the word embedding.

Christopher Olah has a good blog post which is more technical (but which also covers some additional topics).

Computers can make bilingual dictionaries with monolingual corpuses

A recent paper showed how to make pretty decent bilingual dictionaries given only monolingual corpuses.  For example, if you have a bunch of English-only text and a bunch of French-only text, you can make a pretty good English<->French dictionary.  How is this possible?!?

It is possible because:

  1. words in different languages with the same meaning will land at (about) the same spot in the embedding space, and
  2. the “shape” of the cloud of words in each language is pretty much the same.

These blew my mind.  I also had the immediate thought that “Chomsky was right!  Humans do have innate rules built in to their brains!”  Upon further reflection, though, #1 and #2 make sense, and maybe don’t imply that Chomsky was right.

For #1, if the axes of the word embedding coordinate space encode meaning, then it would make sense that words in different languages would land at the same spot.  “King” should score high on male/authority/tradition in Japanese just as much as in English.  (Yes, there could be some cultural differences: Japanese makes a distinction between green and blue in a different place in the colour spectrum than English does.  But mostly it should work.)

For #2, language represents what is important, and because we share physiology, what is important to us is going to be very similar.  Humans care a lot about gender of animals (especially human animals), so I’d expect that there to be a lot of words in the sector of the coordinate space having to do with gender and animals.  However, I don’t think humans really care about the colour or anger of intellectual pursuits, so the sector where you’d look for colourless green ideas sleeping furiously ought to be empty in pretty much every language.

The way the researchers found to map one word embedding to another (i.e. how they mapped the embedding function one program found for French to one they found for English) was they made the computer fight with itself.  One piece acted like a detective and tried to tell which language it was (e.g. was the word French or English?) based on the coordinates, and one piece tried to disguise which language it was by changing the coordinates (in a way which preserved the relational integrity).  If the detective piece saw a high value in a word’s coordinate which didn’t have high values in English, then it would know it was French.  The disguiser then learned to change the French coordinate space so that it would look more like the English coordinate space.

They then refined their results with the Procrustes algorithm to warp the shape of the embedding spaces to match.  They picked some high-occurrence words as representative points (since high-occurrence words like “person” and “hand” are more likely to have the same meaning in different languages), and used those words and their translations to figure out how to bend/fold/spindle/mutilate the coordinate spaces until they matched.

Computers can translate sentences given a dictionary

The same research group which showed how to make dictionaries (above) extended that work to machine translation with only monolingual corpuses (In other words, no pre-existing hints of any kind as to what words or sentences in one language corresponded to words or sentences in the other language.)  They did this by training two different models.  For the first model, they took a good sentence in language A and messed it up, and trained the model to fix it.  Then once they had that, they fed a sentence in language B into a B->A dictionary (which they had created as described above) to get a crappy translation, then fed it into the fixer-upper model.  The fixed up translation wasn’t bad.  It wasn’t great, especially compared to a human translator, but it was pretty freakin’ amazing given that there was never any sort of bilingual resource.

 

When I read A Hitchhiker’s Guide to the Galaxy, I scoffed at the babelfish.  It seemed completely outlandish to me.  Now, it seems totally within the realm of possibility.  Wow.

 

08.16.14

The Perfect To-Do List Manager

Posted in Hacking, Random thoughts, Technology trends at 5:11 pm by ducky

There are a huge number of to-do list managers (TDLMs) out in the world now, but none of them do what I want.  Apparently, it’s not just me: I just read an article which said that when students were asked what mobile apps they really wanted, 20% said they wanted “a comprehensive to-do + calendaring + life management app that helps them better organize their lives”.  TWENTY percent!

Is it really that hard?

I have strong opinions about what I want, and I don’t think it’s that hard, so I will describe my desires here in the hopes that somebody will make me the perfect TDLM.  (Some of the features you can see in a TDLM which I wrote for a class project.  Sometimes I think about writing my perfect TDLM, but I’m busy with other things.  I want it to exist, not to write it myself.)

The most important thing is that the TDLM should make you feel better about your tasks.  The biggest problem with TDLMs right now is that they make you feel guilty: the list grows and grows and grows because there are an infinite number of things it would be nice to do and only a finite amount of time.  This means that every time you open the TDLM, you feel overwhelmed by guilt at all the things you haven’t done yet.

1. Hide stuff you can’t work on right now because of blocking tasks.  Don’t show me “paint the bedroom” if I haven’t finished the task of “choose colour for bedroom”.  (This means you need UI for showing what tasks depend upon which other tasks, and I warn you that’s not as easy as you think.)

2. Hide stuff you won’t work on right now because you are busy with other things.  Don’t show me “paint the bedroom” if I have decided that I’m not going to start that project until I finish doing my taxes.  “Do taxes” is not truly a blocking task — it’s not like I am going to use the tax forms to apply the paint — but hide it anyway. (This means you need UI for showing what the sequencing of tasks is.)

3. Hide stuff you won’t work on right now because it is the wrong time of year.  Maybe you want a task of “buy new winter jacket”, but you want to wait until the end of winter to get take advantage of the sales on coats.  You should to be able to tell your TDLM to hide that task until March.  (Or until May, if you live in Manitoba.)  Or “rotate tires” is something which only needs to happen every six months.

Note that this implies connecting the TDLM to a calendar, at least minimally.

4. Allow recurring to-do list items.  I don’t want to have to make a new task for our wedding anniversary every year.  I want to set it once and forget it.  Usually people put things on their calendars for repeating events, but “Wedding Anniversary” goes on August 22ns and is not a task.  “Plan something for anniversary” is a recurring task but should be hidden until at about August 1st.

The TDLM should distinguish between recurring tasks which expire and those which do not.  Non-expiring tasks are ones like “pay phone bill”.  Even if you forget to pay it by the due date, you still need to deal with it.  On the other hand, “run 2km” is an expiring item: if you couldn’t do your 2km run on Monday, it probably does not mean that you should run 4km on Wednesday.

5. Make me feel super-good about finishing tasks.  A lot of TDLMs handle checking something as done by making it disappear.   This is the worst.  I’ve spent hours, weeks, or months looking at that dang task, and when I finally finish it, I want to savour the moment!  I want my TDLM to cheer, to have fireworks explode on the screen, and maybe even have the text of the task writhe in agony as it dies an ugly painful death.  I want there to be a display case in my TDLM of things that I have finished recently that I can look at with pride.  “Yeah”, I can think, “I am ***DONE*** with painting the bedroom!”  Maybe I don’t need full fireworks for a simple, one-step task which took 15 minutes, but if it was a 2000-step task which took 5 years (like getting a PhD or something like that), I want the TDLM to cheer for a full five minutes.

6. Let me see what I did. Sometimes, I feel like I didn’t get anything done, and it is reassuring to look at a list of the things that I actually did accomplish.  It might be nice to show it in a horizontal latest-first timeline form:

  • 4:47 pm Laundry
  • 3:13 pm Groceries
  • 12:11 pm Replace laptop display
  • (etc)

I would also like to be able to modify the task completion times.  “Oh, I actually finished replacing the laptop last night, I just didn’t feel like telling the TDLM because it was late and I was tired.”

7. Let me see what I am going to do.  People usually use calendars for this, but as I mentioned before, calendars are kind of the wrong tool.  I don’t really want to see “buy birthday present for Mom” in the same place as “Meet with boss, 10:30 AM”.  Plus, a strict time-base is makes zero sense if the dependencies are other tasks.

8. Let me import/modify/export task hierarchies.  Suppose you want to have a wedding.  (Mazel Tov!)  There are predictable things which you need to do: book a space for the wedding, a space for the reception, book an officiant, book a caterer, choose a menu, etc.   If, say, you want a wedding sort of like your friend Joanne’s, it would be nice if Joanne could email you the hierarchy of tasks that she did for her wedding, and you could just drop it in to your TDLM.  (Perhaps that way, you wouldn’t forget to rent a dance floor.)

But maybe you have some Greek heritage and Joanne does not, so you need to add “get a stefana” to your list.  You should be able to do that — and then export your new wedding task list for your brother when he gets married.  Even better, you ought to be able to upload it to a site which hosts lots of packaged tasks, maybe even a whole section on weddings (so your brother could pick and choose which wedding task list he likes best).

Needless to say, the exported task hierarchy should be in a form which lends itself well to version control and diffing.  🙂

9. Let me share my task list with other people.  I would like to be able to share my “home” task list with my husband, so that he could assign me tasks like “buy three kitchen sponges”.  Ideally, I’d think I’d like for there to be three task lists: his, mine, and ours.

My husband and I would probably set things up to both have read/write permission on all three — there are some things that only one of us can or should do.  I can imagine other couples might want to not have write permission on each other’s, only on the “ours” one.

10. Make it easy to discuss tasks.  This means assigning a simple ID and URL to the task.  If Jim and I are going to share tasks, we are going to discuss them.  It would be nice to be able to say, “Task #45” instead of “that one about the paintbrushes”.  It would also be nice to be able to email a link to him which will take him right to Task #45.

11. (Nice to have) Allow putting a time estimate on the task.  If you know that it takes you about two hours to get to your locker, change clothes, stretch, run 2km, stretch, shower, change clothes, and get back to your workplace, then it might be nice to put in an estimate for the “run 2km” task.

If you can put a time estimate on a task and adjust it later, the TDLM could keep track of estimated vs. actual, and start to help you adjust your estimates.  “For tasks which you estimate are going to be about 3hrs, you spend an average of 4.15 hrs.”

It would also be nice if the TDLM could help you make estimates based on similar tasks which you completed.  When entering an estimate for painting the living room, it would be nice if the TDLM mentioned, off to the side, how long it took you to paint the bathroom and the bedroom.  (It’s even okay if it also tells you how long it took you to paint the landscape or your fingernails; presumably you’d be smart enough to figure out which tasks were relevant.)

12. (Nice to have) Make the TDLM geo-aware.  It would be kind of nice to be able to hide tasks until I was at or near a particular location.  For example, if I am not in a big hurry to paint the bedroom, hide “buy paint” until I am actually at the paint store.

Something requested by the students in the article I mentioned earlier was being told to leave in order to make it to the next appointment.  “Doctor’s appointment at 3pm” is a calendar event, but “get to doctor’s office” is a task which needs to happen at a time which depends upon how long it takes to get to the doctor’s office from where you are.  That’s another way that geo-awareness could be useful.

13. (Maybe nice to have) Be able to mark urgency.  I am not actually certain how useful this is.  I have had TDLMs which allowed me to mark urgency, and I found that I almost never used it.  I think people will expect it, however.

14. (Nice to have, but difficult) Integrate with my applications.  Tasktop Technologies has a product called Tasktop Dev, which kept track of what you did in the source code editor (and some other applications, e.g. web browser and Microsoft Office) while you were working on a specific task.  (You had to tell it, “now I am working on task #47” so that it would know to start watching.)  Then, there was a record of what you worked on for that task.  That was useful if you needed to stop and restart the task (especially over a long period of time), or if you needed to go back a long time later and see what you had done.  (“What was the URL of that caterer with the really nice cheesecake?”)

In a work environment, it would be nice to integrate it with other task management systems (AKA “bug trackers”) like Jira or Asana or Bugzilla.

This is what I want.  If it persists in not existing, I might have to do it myself someday.

12.15.13

Unemployment map

Posted in Maps at 8:54 pm by ducky

I have developed some maps which show seasonally adjusted unemployment rates, by month, by county, for the past 23 years, as either a cartogram or as a standard mercator projection.

One of the stories that my unemployment map tells clearly is just how bad the financial meltdown in 2008 was, and how sudden.

This might surprise you if you saw the video of unemployment by county by LaToya Egwuekwe which went viral.  It is a fine video for what it is, but I think it is slightly misleading.

Her video showed pretty clearly that things started to slide a little bit in late 2008, but the real rise in unemployment hit in 2009, with the worst being in June 2010.

unemploymentRollingAverage

Still from unemployment video by LaToya Egwuekwe

I was quite surprised when I saw this, as it didn’t match what I knew of the situation.

Below is what the national unemployment rate actually looked like over time. (The seasonally adjusted rate is darker; the unadjusted rate is lighter.)

unemploymentNational

The seasonally adjusted unemployment rate actually peaked in October 2009, not in mid-2010.

Why the difference?  If you look at the fine print of Egwuekwe’s video, it is a map of the 12-month rolling average of unemployment, which is a lagging indicator.  This means that, for example, in October 2008, right after the financial meltdown, the unemployment numbers she used for the map included November 2007 through September 2007 — which were generally pretty good.  Similarly, the unemployment later seemed to be higher than it really was because the rolling average included the previous year — which included very high unemployment.

Here is a comparison of the seasonally adjusted unemployment rate and the 12-month rolling average for 2007 through the present:seasonalVsRolling

It is perfectly understandable that Ms. Egwuekwe would use the 12-month rolling average instead of the seasonally-adjusted unemployment.  Why?  Because the Bureau of Labor Statistics does not publish seasonally adjusted unemployment rates at the county level, and it is a royal pain to calculate the seasonally adjusted unemployment for each county individually.  (I should know, because I did calculate seasonally adjusted unemployment for each county individually.)

She could have used the unadjusted unemployment rate for a county, but there can be so much seasonal variation that it is hard to see the longer-term trends.  This is particularly true in agricultural communities.  For example, here is a graph which shows the unadjusted unemployment rate for Clark County, IL in light blue, and the seasonally adjusted rate in darker blue.

unemployment17023

(For comparison, the national unemployment rate is in light green.)

Thus, if Ms. Egwuekwe had used the raw unadjusted unemployment numbers for her video, the short-term fluctuations would have made it difficult to see the longer-term trends.  It was a reasonable tradeoff to make.

One other complaint I have about maps like hers, and well, almost all thematic maps, is that they give too much visual weight to rural areas compared to urban areas.  When you see a map like the one at the top of the post, you probably do sort of a visual averaging to figure out what the overall unemployment is like.  However, because there are a huge number of people in cities, and because cities are very small compared to the vast stretches of rural areas, what you see in rural areas dominates the map.  A population-based cartogram — where jurisdictions are distorted so that the area of a jurisdiction is proportional to its area — gives a map which is less misleading.

Again, it’s completely understandable that people would normally use maps which show area instead of population.  It’s a royal pain to generate a cartogram.  (I should know, I did generate cartograms.)

Here is a population-based cartogram of the unemployment in June 2008, before the financial crisis hit, when the US seasonally adjusted unemployment rate was 4.6%:

unemploymentZ3Jun2006

(Green is good; yellow is bad.  Full green is 0% unemployment; full yellow is 17% unemployment.  States are outlined.)

Now here is an image from the worst month after the financial meltdown, October 2009:

unemploymentZ3Oct2009

 

The financial crisis hit fast, and it hit hard.

The good news is that it is getting better.  Here is a map of the latest month which I have data for, June 2013:

unemploymentZ3jun2013

 

 

Note: it is a little difficult to recognize places when they are distorted.  On my unemployment maps web page, you can show city names; you can click on a county to get more information about that county.

 

11.17.13

City Labels on Maps

Posted in Maps at 6:35 pm by ducky

When I watched people look at my cartograms, I saw that they frequently had trouble figuring out which distorted shapes on the map corresponded to which shapes on the more familiar non-distorted maps they were familiar with.

Cartogram without labels

Clearly, I needed to give them some reference points.

The first thing that I thought of doing was distorting Open Street Map tiles to match the cartographic distortion.  That didn’t work out so well, and I decided that I could get 90% of the benefit just by showing city names.

The next thing I tried was to make tiles with city names on them.  This turned out to be difficult because city names frequently crossed tile boundaries, and the city names were variable widths.

What worked: I made markers with custom icons, where the icon was an image of the city name, and placed the icons at the appropriate location on the cartogram.  This worked well: the city names moved with the background image when dragged, and creating the custom icons was quite lightweight.

Having solved how to show city names, I then needed to figure out when to show city names.  Clearly I should show bigger cities first, but if you zoom in, you want to see smaller cities.  I don’t know how Google does it, but they probably can afford to decide on a city-by-city basis at which zoom level that city should appear, but there are an awful lot of cities and an awful lot of zoom levels, and my name’s not Google.  I can’t afford to do that.

I experimented with coming up with a formula to specify what population threshold to use for which zoom level, but I was unsatisfied with that.  I couldn’t find a formula which would show enough cities in lightly-populated areas but not too many in densely populated areas.

The next thing I tried was to figure out which area of the map was showing, and to label only the top six (by population) visible cities. This means that you see only really big cities when zoomed out a lot:

Six biggest cities labelled

But when you zoom in (or move so that one of the labelled cities stops being in the view), more cities appeared:

(When I did this, I was surprised to find out how small (in population) some major cities are.  Jacksonville, FL is bigger than Miami.  Indianapolis is bigger than Boston.  El Paso is bigger than Seattle.  Now, partly that’s because I’m labelling cities and not metro areas, but it still surprised me.)

Even only showing six, there were still times when the cities names got crowded.  Also, when way zoomed out, big sections of the country didn’t have any labels.  What I finally did was look at the top 23 visible cities, and if there was a larger city nearby (in pixels), I skipped the smaller city.  This seems to work really well:

It sure beat keeping a list of which cities to show at which zoom level!

 

« Previous entries Next Page » Next Page »