Wrong Number #

With my home phone, I sometimes get “wrong number” calls. Someone dialed the wrong number, or someone gave out the wrong number, or someone forgot to dial the area code. I also get these types of emails. Other people make a typo when giving out their email address, or they use the wrong domain, or they just don't know their own email address. Here are some examples of emails that should've gone to someone else:

  • Relatives emailing me about a party (but they're not my relatives)
  • Construction projects in Dubai emailing me about my workers being lazy
  • Business partners in China emailing me about ceramic manufacturing
  • London Business School emailing me updates about classes I can take
  • Citibank India emailing me financial information about my account (this has happened for three different people, all of whom accidentally used my email address)
  • Someone emailing me the design for the anchor bolts he wants me to manufacture
  • A hotel chain emailing me about work I'm doing for their new hotel
  • A mattress company emailing me about mattresses I've ordered for that hotel
  • Someone asking me for a job at my company
  • Someone who wanted a refund for the flight I booked for him
  • A pizza restaurant emailing me NDAs I need to sign before I can meet with them
  • A company that was pleased with my interviews and offered me a job paying $55,000/year, plus a Blackberry and a TiVo (!)
  • A London jobs site sending me updates on on jobs I've applied to
  • Monster.com India sending me updates on legal jobs
  • A pregnancy site sending me information about my 27th week of pregnancy
  • A photo site sending me my password
  • A dating site sending me potential matches
  • An email asking about various legal cases I'm involved with
  • Yahoo sending me accounts for which my email is listed as the secondary email address
  • Someone sending me pictures from a hike I went on
  • Invites from several social networking sites from people I don't know
  • Someone asking me to send my software to an address in … Nigeria

Citibank India especially worries me. They didn't try to verify my email address. What you're supposed to do if you run a web service with accounts:

  1. Let me sign up online.
  2. Mark the account “unverified”.
  3. Send me an email with a verification code or link.
  4. Only once I verify the email address should you mark the account “verified”.
  5. Only send sensitive information to verified accounts.

Citibank India and Monster India do not do this. You should also never send passwords to people over email; send them a link that lets them reset their password.

I'm not sure why I get so many “wrong number” emails, but my guess is that it's because there are lots and lots of people named Amit Patel, and if you search for that name, you end up with me, so people assume I'm the Amit Patel they're looking for. If I'm getting repeated emails or if it seems like an important email, I'll send them an explanation of how they have the wrong email address; other times I just delete the email.

Heroes: Kaito Nakamura is immortal? #

Kaito Nakamura (Hiro's father) likely has some power. I think his power is immortality. Here's why:

  1. In Landslide, he mentions to Hiro that he's been waiting for generations for some spirit/power to manifest, and didn't think it was in Hiro, but now he sees that it is. Has his family been waiting this long, or has Kaito himself been waiting?
  2. In the preview for Season 2, Hiro sees a samurai warrior on a horse. It looks like George Takei's eyes in there. It is just family resemblance, or is it Kaito himself in there?

Immortality is also time-related, so maybe there's a time theme to the powers in that family.

Another power I'm waiting for is the ability to see alternative futures. Linderman somehow knew that he needed to get Niki and DL together so that he could use Micah's power to help Nathan win the election. If Niki and DL hadn't gotten together, even Isaac's power wouldn't have predicted that Micah would be born or that he would have the power he does. I think we need a different sort of foretelling power than what Isaac has; it's possible Kaito has this. My top choice for Kaito's power though is still immortality.

Update: [2007-09-30] Given the events of Four Months Later, both in revealing Kensei, and in the events on top of the Duveaux Building, it seems unlikely that Kaito is immortal.

Update: [2007-11-09] My original theory was that Kaito was Kensei, and immortal, but although Kaito is not Kensei, it looks like Kensei is indeed immortal. And he's probably trying to destroy the world in an attempt to put his broken hearted self out of his misery.

Labels:

Emacs: highlighting parentheses #

Emacs has several packages for dealing with parentheses. Emacs comes with ways to highlight the matching parenthesis when you're on one; try show-paren-mode. One of the newer add-on packages is Nikolaj Schumacher's highlight-parentheses mode, which shows the parentheses that enclose the current cursor position. I tried modifying it to highlight the containing expressions instead of only their parentheses:

(defun hl-paren-highlight ()
  "Highlight the parentheses around point."
  (unless (= (point) hl-paren-last-point)
    (save-excursion
      (let ((pos (point))
            (match-pos (point))
            (level -1)
            (max (1- (length hl-paren-overlays))))
        (while (and match-pos (< level max))
          (setq match-pos
                (when (setq pos (cadr (syntax-ppss pos)))
                  (ignore-errors (scan-sexps pos 1))))
          (when match-pos
            (if (eq 'expression hl-paren-type)
                (hl-paren-put-overlay pos match-pos (incf level))
              (hl-paren-put-overlay pos (1+ pos) (incf level))
              (hl-paren-put-overlay (1- match-pos) match-pos 
                (incf level)))
            ))
        (while (< level max)
          (hl-paren-put-overlay nil nil (incf level)))))
    (setq hl-paren-last-point (point))))

Unfortunately, as you can see, it's a mess. I tried better colors (white, gray, etc.) but I just couldn't make it usable. So I gave up on highlighting the regions and went back to highlighting just the parentheses. It's a bit better:

(defun hl-paren-highlight ()
  "Highlight the parentheses around point."
  (unless (= (point) hl-paren-last-point)
    (save-excursion
      (let ((pos (point))
            (match-pos (point))
            (level -1)
            (max (1- (length hl-paren-overlays))))
        (while (and match-pos (< level max))
          (setq match-pos
                (when (setq pos (cadr (syntax-ppss pos)))
                  (ignore-errors (scan-sexps pos 1))))
          (when match-pos
            (if (eq 'expression hl-paren-type)
                (hl-paren-put-overlay pos match-pos (incf level))
              (hl-paren-put-overlay pos (1+ pos) (incf level))
              (hl-paren-put-overlay (1- match-pos) match-pos 
                (incf level)))
            ))
        (while (< level max)
          (hl-paren-put-overlay nil nil (incf level)))))
    (setq hl-paren-last-point (point))))

However it's still a bit too … colorful. So I changed it to simply make the enclosing parentheses bold:

(defun hl-paren-highlight ()
  "Highlight the parentheses around point."
  (unless (= (point) hl-paren-last-point)
    (save-excursion
      (let ((pos (point))
            (match-pos (point))
            (level -1)
            (max (1- (length hl-paren-overlays))))
        (while (and match-pos (< level max))
          (setq match-pos
                (when (setq pos (cadr (syntax-ppss pos)))
                  (ignore-errors (scan-sexps pos 1))))
          (when match-pos
            (if (eq 'expression hl-paren-type)
                (hl-paren-put-overlay pos match-pos (incf level))
              (hl-paren-put-overlay pos (1+ pos) (incf level))
              (hl-paren-put-overlay (1- match-pos) match-pos 
                (incf level)))
            ))
        (while (< level max)
          (hl-paren-put-overlay nil nil (incf level)))))
    (setq hl-paren-last-point (point))))

That's nicer, although perhaps too subtle. I added more bolding:

(defun hl-paren-highlight ()
  "Highlight the parentheses around point."
  (unless (= (point) hl-paren-last-point)
    (save-excursion
      (let ((pos (point))
            (match-pos (point))
            (level -1)
            (max (1- (length hl-paren-overlays))))
        (while (and match-pos (< level max))
          (setq match-pos
                (when (setq pos (cadr (syntax-ppss pos)))
                  (ignore-errors (scan-sexps pos 1))))
          (when match-pos
            (if (eq 'expression hl-paren-type)
                (hl-paren-put-overlay pos match-pos (incf level))
              (hl-paren-put-overlay pos (1+ pos) (incf level))
              (hl-paren-put-overlay (1- match-pos) match-pos 
                (incf level)))
            ))
        (while (< level max)
          (hl-paren-put-overlay nil nil (incf level)))))
    (setq hl-paren-last-point (point))))

It bolds the parentheses and also the first s-expression inside the opening parenthesis. It doesn't understand when the parentheses begin a form (instead of all the other uses of parentheses), so it sometimes highlights the first s-expression even when it's not special in any way. Despite this wart, I like this form of highlighting so far.

Update: [2007-05-29] However, there is one more thing I wanted. I de-emphasize parentheses by using a lighter color for them; I want the enclosing parentheses to be bold and black. However I want the enclosing first s-expressions to be bold, but not necessarily black. Note in the above example the keywords are normally blue, but when enclosing the current point they are black. I fixed this by adding separate highlighting for the enclosing parentheses and the first s-expression:

(defun hl-paren-highlight ()
  "Highlight the parentheses around point."
  (unless (= (point) hl-paren-last-point)
    (save-excursion
      (let ((pos (point))
            (match-pos (point))
            (level -1)
            (max (1- (length hl-paren-overlays))))
        (while (and match-pos (< level max))
          (setq match-pos
                (when (setq pos (cadr (syntax-ppss pos)))
                  (ignore-errors (scan-sexps pos 1))))
          (when match-pos
            (if (eq 'expression hl-paren-type)
                (hl-paren-put-overlay pos match-pos (incf level))
              (hl-paren-put-overlay pos (1+ pos) (incf level))
              (hl-paren-put-overlay (1- match-pos) match-pos 
                (incf level)))
            ))
        (while (< level max)
          (hl-paren-put-overlay nil nil (incf level)))))
    (setq hl-paren-last-point (point))))

I'm pretty happy with this variant of highlight-parentheses.el.

Update: [2014-05-10] Also check out the rainbow-blocks and rainbow-delimiters modes. For Python or Ruby code, highlight-indentation-mode may be useful. Update: [2019-08-05] Also see prism.

Labels:

New EPA mileage ratings: what do you get? #

For my car, after experimenting with different driving styles to see what works best, I'm now getting 26–27 mpg city and 31–32 mpg highway at 75mph and 32–33 mpg at 65mph. The EPA rating for my car is 25 city / 31 highway. However the EPA is now lowering all of their estimates to match the average driver, and with the new estimates, my car is listed as 22 city, 29 highway*. This might make people feel better about their own driving habits instead of making them think about improving them.

High gas prices are what leads many people to look at gas mileage, but gas prices are not that important. Everyone looks at gas prices because they're printed in big bold numbers at every gas station. Fewer people look at the gas mileage. Learn techniques for using less gas while driving. When the light turns red, take your foot off the gas. Watch for light timing (many lights are timed so that if you drive at the speed limit, you'll get more greens.) For city driving, don't accelerate quickly, and don't drive so fast. Your driving habits make more of a difference than which gas station you go to. And even fewer people look at how much they drive. Plan ahead. Reduce the number of trips you take, and combine multiple errands together into one trip. Move closer to your workplace (this is one reason renters are better off than home buyers—a topic for another blog post). If you're looking to save money on gas, how much you drive is probably the place you should be looking first. Keep track of miles (or gallons) per week.

It's nice to see the EPA adjusting the ratings, but the lower estimates don't match what I've measured with my own driving. The old estimates match closer.

* This is just an estimate that doesn't take into account wind resistance. My car's coefficient of drag is 0.31, and as a result my real-world highway gas mileage is higher than the estimates. It might be better to take into account drag area as well.

Labels:

Heroes: Linderman, Sylar #

Spoilers! Spoilers!

If you've seen 0.07% and Five Years Gone, you'll know that everything has gone crazy. People with powers are being hunted in the future.

But we already expected that.

Linderman, in 0.07%, says that he wants to help the world unite. When I saw that episode, I wondered, “unite against what?” Either Linderman is stupid, and thinks the world will be great, or he's smart, and thinks the world will unite against people with powers. In Five Years Gone we see that indeed, the world united against people with powers. I suspect Linderman knew this would happen.

We also hear from Linderman that he used to know other people with powers, but they turned to the dark side. He may not think highly of other people with powers.

We also learn that Linderman is behind Primatech Paper, which is trying to track down and sometimes kill people with powers, even though Linderman has powers.

In Five Years Gone we hear that the Linderman Act is what led to persecution of people with powers. If it was named after Linderman or funded by Linderman, it would be consistent with Linderman not liking other people having powers.

So I think some experience in Linderman's life led him to think other people with powers are dangerous, and that he needs to save the world by eliminating everyone else with powers.

Sylar too is quite interested in eliminating everyone else with powers. From the very beginning he's been killing them. With his first victim, he talked about “fixing” Davis by killing him. When Sylar became President, he talked about making tough decisions to save the world. He also talked about eliminating all competition.

So it seems that both Linderman and Sylar have the same objective: remove everyone else with powers. They both talk about “helping”. Sylar's job was fixing things; Linderman's job was healing people. Sylar and Linderman seem similar in many respects.

I'm also quite impressed by Heroes in that I can't predict what's going to happen, so I'm likely wrong about Linderman too.

Labels: