February 28, 2014

Getting Custom Notifications for Important E-mail

I get a lot of email, and sometimes I miss something, or I don't notice something urgent right away.

Here's how to configure Gmail on your Android phone to alert you distinctively when you get an urgent email.

First, identify what is important. It might be emails from someone in particular, or with a particular topic, etc. Most recently, I configured a special alert for emails from a particular notification service that always have a certain string in the subject.

Then, in the Gmail web UI, set up a filter for these messages in Gmail and assign them a new label which is specific to this class of messages.

Now, from your phone, go to that label, and from the menu icon in the upper right, choose "Label settings". Then, set this label to sync to your phone (for any duration), and you can then choose a notification sound. Choose a sound you don't use for other notifications on the phone.

Now, whenever you get an email from this category, you'll get a distinctive sound which tells you what's up without you having to even unlock the phone.

You may be able to use this ability to specifically notify on the emails you care about to reduce the alerting for emails you don't care about. You can turn off notifications for new messages in categories or labels that are not urgent. Then, when your phone goes “ding”, you'll know that it's something worth interrupting you for.

November 23, 2013

Common password checker

There are a lot of standards out there for password quality, usually something like "at least 6 characters, with both upper and lower case and a digit or alphabetic character".

These are horrible rules. They mean that a password like "Passw0rd" is thought to be better than "Y1&j)" or "cork-bairn-meson-most-ago". However, it is not. Clever password crackers will, first thing, try a large dictionary of known passwords before they start iterating through strings brute-force, and it's only in the latter stage that using a longer password or a bunch of different character types helps.

So, if you want to get your users to choose passwords that are more likely to be secure, the most important thing is to reject the kinds of common passwords that are most likely to be guessed. Google actually tracks the passwords that crackers try to break into accounts with and notes these as "weak", regardless of how tricky they seem.

So, I built a thing: I took the 1,139,118 most-frequently-used passwords from a large password leak (from the social site RockYou in 2009) and built a password checker. This contains every password that was used 3 or more times across the 32 million leaked accounts. ("Passw0rd" was used 207 times.)

Enter a password below and discover if it's any good. The implementation uses a Bloom filter tuned for approximately 0.1% false positives, so there's one chance in a thousand that a password will show as "weak" when it's actually not on the list. The Bloom filter makes the data transfer smaller (2 MB) and allows very fast checking of candidate passwords agains the list. Nothing is sent back to a server: the checking is done in the browser.

Candidate password: not foundweak
Loading...

Of course, even if your password wasn't found, it still might be quite weak: large password dictionaries have a billion passwords to try before they start churning through every possible string. To generate a better password, you might want to try my password generator. If you're interested in using either to help make your site more secure, let me know, I'm happy to help.

Endianness in Javascript

I just needed to determine endianness from Javascript; this is needed because ArrayBuffer and associated classes operate directly upon memory buffers, which is great when you want to slurp in some binary data without the overhead of JSON-conversion, but does imply an endianness dependency.

I probably could have just ignored the question (at the expense of all my Alpha-powered users), but I'm OCD enough to write the check.

function littleEndian() {
  var buf = new ArrayBuffer(4);
  var bytes = new Uint8Array(buf);
  var words = new Uint32Array(buf);
  bytes[0] = 1;
  return words[0] == 1; // little-endian
}

But I can't test it.

October 26, 2012

Adam Tumor Wrap-up

I started posting Adam's status to this blog because I needed a way to communicate with family and friends, and I abandoned it when his situation didn't really require it. But, having dropped it mid-situation, I left an uncertain status for anyone who came across the blog without knowing the family. Sorry about that!

Adam is doing great. He came home for visits starting at Christmas, and we had a great Christmas. A few weeks later, he started sleeping at home, and commuting into the hospital for therapy every day, which we continued through the spring, then took the summer off. In the fall, we moved to outpatient therapy a couple of times a week, which we did for the 2011-2012 school year, then took another summer off. This year, he's in preschool 5 days a week, and doing great.

We've had some complications, but they're pretty minor, all things considered.

December 14, 2010

Back at Rusk

Just like Lindsay Lohan, we're back in rehab.
Rusk is the top facility for rehab in NYC and one of the best in the country, and it’s absolutely the right place for Adam to be right now. In fact, I made a bit of a problem on Friday night and over the weekend when the administrators at NewYork-Presbyterian and Rusk failed to get him down here on Friday. The climax of that fuss was when they told me that they’d like me to put down a deposit to cover three weeks of care because Blue Shield is closed on the weekend. But I think they were just putting me off—when I asked them where I could bring the check, or if they insisted on cash, they stopped returning my calls.
That said, compared to the newly-built magnificence that is the NYP Greenberg pavilion, the physical plant here does seem a little dated & dowdy. But the care here is right, the staff are excellent, and the food is much better than at NYP (seriously, it’s like making NYP one of the best hospitals in the country required that they have the worst food I've experienced outside of an airplane).
On the subject of insurance: besides being closed on the weekend, the Google health insurance (through Blue Shield of California) has been awesome. We haven't had any problem at all with approvals, and Google's in-house Blue Shield rep has been super-helpful, including calling me Saturday evening to try to work through our problems. While it’s hard sometimes to know how much benefit our kids get from the material rewards of our work lives, I know Adam and the rest of our family are thankful for the support that has enabled his excellent medical care.
We’re hoping to get Adam out of here and home before Christmas. Wish him good luck.

December 11, 2010

Successful Head-shrinking

Here's two photos of Adam this morning, showing his now un-swollen noggin.

December 10, 2010

Back and Forth

On Tuesday, Adam came back to NewYork-Presbyterian to have an MRI and to have a shunt put in to drain the bubble under his scalp. It’s done wonders for his looks (sorry, I don't have a picture right now).
The MRI looked fine; the doctors say he’s doing great and they expect him to have a really strong recovery.
He had the shunt put in Thursday afternoon. It is a bit of tubing (with an anti-siphon valve) that runs from under his scalp (but outside of his skull) down to his abdomen, running just under his skin the whole way. It drains excess fluid, but it’s my understanding that when his surgical wounds fully heal, it will then be idle, as its source is outside of the skull. Putting it in was just a 20 minute operation.
As of Friday morning, he was cleared to leave NYP to return to the Rusk Institute and get his therapy restarted, but we ran into a bureaucratic foul-up; NYP & Rusk wasted the whole day not getting their act together, so we’re still in NYP’s pediatric wing as of Friday night. Last time we went to Rusk, we wasted two days on admitting and insurance paperwork and on actually getting over there. Right now, I fear we’ll repeat that experience, and not get therapy restarted until Wednesday; however, we’re trying to do all we can (with the help of some friends) to get down there over the weekend and get him going on Monday.
Adam is doing well; he seems more comfortable and he’s smiling a lot more. He apparently spent the day asking for pizza; it’s great to have him that engaged & expressive. His doctors all seem to be very happy with his recovery, and we’re hopeful as well.

December 7, 2010

Rehab (no, no, no)

It’s three weeks since Adam’s surgery, and he’s in the hospital for the 27th day.
Last Tuesday, Adam went from the hospital (NewYork Presbyterian) to the Rusk Institute, a hospital devoted to rehabilitation. We’ve gone from having a view of the East River to having a view of the Empire State Building. He’s an inpatient there, and he’s in various therapies each day: physical therapy, occupational therapy, speech therapy, etc.
Thus far, it’s hard to tell how much difference the therapy is making. Adam is improving, although that improvement has, for me, to some extent been balanced by a growing awareness of how far he has to go.
I’ve read a number of books about the brain, including books that investigate oddities, such as Oliver Sacks’ works. In those books, you frequently have people who can do one thing well, but can’t do something else: they can sing but not speak, or some other similar mix of capability and inability. But I’d never seen this in practice, and it’s surprising and unintuitive: since the surgery, Adam has always seemed quite functional: he speaks, and he has always successfully navigated the standard neurologist quiz: “Touch your nose. Now touch the doll’s nose.”, and so on. That capability, combined with his general crankiness, made it hard for me to recognize how many things he couldn’t do, or perhaps didn’t do, anymore. For many days, he didn’t smile, didn’t converse (although he could speak and communicate, he wasn’t very responsive and rarely said anything novel).
He is improving: he’s smiling now. And we have faith in the ability of the brain to adapt and heal, particularly in young kids. So we’re confident that he’ll be OK, but it may be a while.
As you can see, he has a big lump on his head where the sutures from his surgery are (also, I gave him a haircut, so it’s more visible). The bubble is cerebrospinal fluid communicating through the surgical opening in his skull. It’s been growing a little bit, and he’s due for another MRI to evaluate whether things are OK inside. He may well end up with a drain installed to let excess fluid drain off and relieve pressure on the brain; if they do that, we’ll be back at NYP for a few days.
Laura and I are swapping off spending nights at the hospital. A month in, this is all starting to stretch us a little thin. I’m back at work, at least mostly, and the kids are in school. Grandparents have come and gone, and my mom is here now. But the stress, the disruption, and the logistical complexity of the back and forth is wearing on us and on the kids. Our friends and neighbors have been great, with food, play dates, errand-running, etc.; thanks, all.

November 28, 2010

18 Days in Hospital

By my calculus, it’s our 18th day here, but hopefully Adam will leave in the next day or two.
Since my last update, it’s been a stretch of recovery for Adam: general progress, but with a number of smaller challenges or setbacks. He moved to the general pediatric ward last week. For a period of time, he was quite weak on his left side, and couldn’t look to that side; later, he had some small seizures. Most recently, he went through a day or so where he said little if anything original: instead, his speech was a continuous, inconsolable, series of phrases that had little connection to the situation or his desires (e.g. “Mommy lie down with me”). He also has a big bubble of cerebrospinal fluid (CSF) under the sutured area of his scalp.
However, his physical tests (MRI & EEG) look good and his surgeons don’t think that he needs a shunt implanted to keep his pressure under control. He’s doing pretty well; neurology & neurosurgery are ready to discharge him. He’s eating well. He’s using both sides of his body (for example, he will eat with a fork using his left hand). He’s a lot less uncomfortable than he was a few days ago, although he’s still apparently pretty tired of being in the hospital.
The final pathology on his tumor came back, and it confirmed the good news that it’s not malignant; they’ll have another doctor give a second opinion as a triple-check, but we’re confident that it was a “benign” tumor, which is great news.
Before After
BeforeAfter
(yes, that cauliflower blob is the tumor)
If life wasn’t complex enough, our au pair, Tabata, woke us at 3:30 last Sunday morning with bad abdominal pains; Laura took her to the emergency room, and that evening, she had her gallbladder removed. Thankfully, it’s a pretty straightforward operation (laparoscopic), she came home the next night, and she’s up & around now, although still regaining her energy. Also, a virus has swept through the family; it had me in bed for 24 hours and slowed me down for a few days; now, Laura is recuperating from her bout with it.
The current plan is that he’ll go from here in the hospital to an inpatient rehab facility, so he can get intensive physical therapy. We don’t yet know where (we’re hoping to go to one here in Manhattan associated with NYU, the Rusk Institute, but we’re not sure if we’re going to get a bed there), nor do we have any good idea how long he might be there (an offhand guess from a doctor here was 2-6 weeks).
So, it’s pretty challenging, but Adam’s improving. We have much to be thankful for.

November 19, 2010

Recovery: Two Days In

Adam is doing well. Of course, brain surgery is a Big Deal, and one doesn’t bounce out of bed the next morning. He’s feeling pretty crummy, but he’s recovering.
The surgery involved cutting a hole in the top-right of his skull, and they had to go past the right side of his brain, so his left side has been worse than his right, but it’s improving: on Tuesday, he couldn’t look left at all and his left hand was limp: now, he can look all over and he has some grip in his right hand.
Thursday was actually a little worse than Wednesday: Adam wasn’t communicating as well, just seemed a little less active, and had a couple incidents where his eyes rolled all the way back and to the right. The doctors here don’t think these were seizures, but we’re keeping a close watch on it.
He had his compression dressing taken off yesterday, and the drain in his skull removed. I think this will be a big help: the giant turban of a bandage was not only bulky and making it hard for him to lie comfortably, it was also squeezing his head, which couldn’t have been any fun. Plus, it means we now get to see his stitches.
He seems a little more aware this morning (asking for his stuffed doggy), but he slept turned to his right last night (I was sleeping next to him) and fluid puffed up the right side of his face. Again, looks ugly but apparently not very concerning to the staff here.
I don’t have a good idea of how much longer we’ll be in the ICU, or thereafter in the general pediatric ward. Here’s hoping we’ll be home by Thanksgiving.