Archive for the 'Uncategorized' Category

optimizing insurance ordering

Sometimes the order in which procedures are performed has an effect on the payout from insurance. This is the case when there is both a deductible and a coinsurance.

Suppose the deductible is \(d\), and the price and coinsurance of the \(i\)-th procedure performed are \(p_i\) and \(c_i\) respectively, then the total out-of-pocket cost is:

\(d + (p_1 – d) c_1 + p_2 c_2 + \cdots = (1-c_1) d + \sum_i p_i c_i\)

The second term is fixed cost; it’s the coinsurance on the first procedure that matters. This shows that to minimize out-of-pocket cost, one should, somewhat surprisingly, get the procedure with the highest coinsurance first. Essentially, every dollar of the deductible paid is subsidizing what the insurance company might have paid, but for a procedure with very high coinsurance, the subsidy is not very much to begin with.

The non-existence of Android backup and restore

People change phones. They want their programs and data to show up on their new phones. Apple has solved this problem. Somehow, Google has not. As explained here, settings can be synced through Google’s sync API. It is however useless except for Google’s own apps and whoever uses their API (maybe nobody).

But as far as full-system backup and restore options go, you either have to root your system and use Nandroid or Titanium to backup to the phone storage itself, or you have to rely on adb backup. adb is Android Device Bridge, something that is accessed through the Developer Mode on Android. It feels like Google has given up on this feature midway through and just left it flopping around, because it simply does not work. Although I haven’t had trouble getting backup to work (‘adb backup -apk -shared -all -f [file]‘), I could not get restore (‘adb restore [file]‘) to work automatically because of this bug (which incidentally is also obsoleted).
(Read the article)

Google marks bugs it doesn’t want to deal with as ‘obsolete’

Apparently Google has a habit of marking bugs it doesn’t want to deal with as obsolete. According to Google’s own Life of a Bug explainer, a bug categorized as “Obsolete” means,

Obsolete: Similar to Unreproducible, but with a reasonable certainty that the bug did exist in the reported version but was already fixed in a later release.

…which is a lie. I give two pieces of solid evidence for why this is a lie.
(Read the article)

The AlphaGo paper

http://www.usgo.org/news/wp-content/uploads/2016/01/2016.01.28_nature-cover.jpgGo is a topological counting game that has been challenging for a computer to play due to its global phase-transition like game dynamics, requiring accurate reads of position early in the game. When the AlphaGo paper (preprint) first came out in January purporting a new system that plays Go at a human-professional level, I didn’t have a chance to read it thoroughly, partly because the paper is badly written (yes, I said it), and partly because it was a lot of information. Now that the DeepMind Challenge Match against Lee Sedol is happening, with a surprise nearly every game, I thought to give it another go (no pun intended).

The main objective is to extract from the paper four key pieces of information: (1) How did computers play Go before, and what was the state-of-the-art before AlphaGo? (2) What is the novelty of AlphaGo from which it derives its improved performance? (3) How is AlphaGo actually implemented? (4) What are the future and the limitations of this approach?
(Read the article)

on the LIGO experiment

Usually, popular science “excitement” over scientific results tends to be overdone. A day of reflection on the publication of the gravitational waves detection (paper here) leads me to believe that this is really worthy of excitement, much more so than the ballyhooed Higgs boson detection a few years ago. Both are important, of course.

The reason is subtly put by the inimitable Brian Greene, near the end of the video.


(Read the article)

Disable Apple Mail attachment defaulting to inline

Did you know that Apple Mail does the presumptuous thing of sending all images (and maybe other attachment types) as inline attachments, no matter what options you choose in the program, like attaching at the end of message, like making it “Windows-friendly” (as if it’s a Windows problem),…. Nor does any of the very typically low-quality “solutions” you’ll find by misunderstanding Apple users online help, like changing message type to plain text or running that one silly line on the command line

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

Just look at that and think about what it does! None of those do anything at all.
(Read the article)

pathetic uber (cont’d)

I recently had the privilege of consorting with Uber’s “customer service” some more. Recall that last time, HackerRep (he actually called himself “Joe”) took me for a fraud and left it at that. I actually wrote back to Joe,

Me:

June 15 08:44

Why would it do that (referring to their system identifying a real human being as a fraud)? I created an account a couple of months ago from a friend’s link and tried the app a few times. After that I could not log in. It behooves you to unban me.

but alas Joe never troubled to respond. After some months, I decided to write back!
(Read the article)

android dialer idiocy

So on the Android dialer, if you turn down the system volume, the in-call DTMF tones are also turned down in volume. (See here — I’ve verified this.) Now guys, I know it saves a few lines of code, but WTF?

minute-long quartet

Written a while ago, revised it recently. Some voice crossing, welp.

Also, this. Can’t believe from version 2.10.33 to 2.18.2, Lilypond changed the base of relative pitch notation and removed a bunch of definitions syntax.


Input: \paper{
    line-width=140\mm
    ragged-right = #f
 }
\new StaffGroup	<<
		% Violino I.
		\new Staff
		\new Voice = "a" {
			\autoBeamOff
			\clef treble
			\key g \major % or e \minor
			\tempo "Moderato" 4 = 110
			\time 3/4
			b'4 b'4 b'4 \bar "|"
			d''4 b'4 d''8\( e''8 \bar "|"
			fis''4.\) d''8\( b'8 a'8\) \bar "|"
			g'2. \bar "|"
			e''4. c''8\( a'8 g'8\) \bar "|"  % bar 5
			fis'2 e'4 \bar "|"
			fis'2.\( \bar "|"
			d'2.\) \bar "|"
			b'4 b'4 b'4 \bar "|"  % bar 10
			d''4 b'4 d''4 \bar "|"
			e''4. d''8\( b'8 a'8\) \bar "|"
			g'2. \bar "|"
			e''4.\( d''8 b'8 a'8\) \bar "|"
			g'4 e'2 \bar "|"  % bar 15
			g'4 e'2 \bar "|"
			fis'4 d'2 \bar "|"
			g'4 b'4 c''4 \bar "|"
			d''4 a''4 fis''4 \bar "|"  % bar 20
			g''4 b'4 c''4 \bar "|"
			d''4 fis''4 g''4 \bar "|"
			e''4 g'4 c''4 \bar "|"
			d''4 g'4 f'4 \bar "|"
			e'4 g'4 a'4 \bar "|"  % bar 25
			fis'4 a'4 b'4 \bar "|"
			g'4 b'4 c''4 \bar "|"
			d''4 bes''4 a''4 \bar "|"
			g''4 b''4 g''4 \bar "|"
			e''4 g''4 c''4 \bar "|"  % bar 30
			d''4 g''4 d''4 \bar "|"
			c''4 g''4 b'4 \bar "|"
			a'4^\markup { \bold \italic rit. } b'4 fis'4 \bar "|"
			g'2. \bar "|"
		}
		% Violino II.
		\new Staff
		\new Voice = "b" {
			\autoBeamOff
			\clef treble
			\key g \major % or e \minor
			\time 3/4
			g'4 d'4 g'4 \bar "|"
			a'4 d'4 a'8 b'8 \bar "|"
			d''4 g'8 a'8 d'4 \bar "|"
			e'4. d'8 e'4 \bar "|"
			g'4. e'8 d'8 e'8 \bar "|"  % bar 5
			c'2. \bar "|"
			a2. \bar "|"
			fis'4 c''4. d''8 \bar "|"
			g'4 d'4 g'4 \bar "|"  % bar 10
			a'4 d'4 a'4 \bar "|"
			b'4 g'8 e'8 d'4 \bar "|"
			cis'2. \bar "|"
			a'4. b'8 g'8 e'8 \bar "|"
			d'2. \bar "|"  % bar 15
			d'2. \bar "|"
			c'2. \bar "|"
			d'4.\( g'8 g'4\) \bar "|"
			a'4\( g'4 a'4\) \bar "|"  % bar 20
			b'4.\( e''8 b'4\) \bar "|"
			g'4\( b'2\) \bar "|"
			e'4.\( d'8 e'4\) \bar "|"
			d'4\( b'2\) \bar "|"
			d'4.\( d'8 e'4\) \bar "|"  % bar 25
			d'4\( fis'2\) \bar "|"
			d'4.\( g'8 g'4\) \bar "|"
			a'4\( g'4 a'4\) \bar "|"
			b'4.\( d''8 b'4\) \bar "|"
			e'4\( g'2\) \bar "|"  % bar 30
			g'4.\( b'8 g'4\) \bar "|"
			c'4\( d'2\) \bar "|"
			d'4.\( e'8 c'4\) \bar "|"
			b2. \bar "|"
		}
		% Viola.
		\new Staff
		\new Voice = "c" {
			\autoBeamOff
			\clef alto
			\key g \major % or e \minor
			\time 3/4
			d4. b4. \bar "|"
			d4. a4. \bar "|"
			e4. g4. \bar "|"
			c'2. \bar "|"
			e4. g4. \bar "|"  % bar 5
			a2. \bar "|"
			d'2. \bar "|"
			a4. d4. \bar "|"
			g4. b4. \bar "|"  % bar 10
			d'4. a4. \bar "|"
			e'4. b4. \bar "|"
			g2. \bar "|"
			e'4. b4. \bar "|"
			e2. \bar "|"  % bar 15
			g2. \bar "|"
			c'4. d'4. \bar "|"
			b4. d'4. \bar "|"
			a4. d'4. \bar "|"  % bar 20
			e'4. g'4. \bar "|"
			b2. \bar "|"
			c'4. g'4. \bar "|"
			d'4. b4. \bar "|"
			g2. \bar "|"  % bar 25
			a2. \bar "|"
			b4. b4. \bar "|"
			d'4. c'4. \bar "|"
			b4. d'4. \bar "|"
			g2. \bar "|"  % bar 30
			b4. d'4. \bar "|"
			g4. d'4. \bar "|"
			c'2. \bar "|"
			b2. \bar "|"
		}
		% Violoncello.
		\new Staff
		\new Voice = "d" {
			\autoBeamOff
			\clef bass
			\key g \major % or e \minor
			\time 3/4
			g2. \bar "|"
			fis2. \bar "|"
			e2. \bar "|"
			c2. \bar "|"
			a,2. \bar "|"  % bar 5
			d2. \bar "|"
			d2. \bar "|"
			fis2. \bar "|"
			g2. \bar "|"  % bar 10
			fis2. \bar "|"
			e2. \bar "|"
			a,4. b,4. \bar "|"
			cis2. \bar "|"
			c2. \bar "|"  % bar 15
			e2. \bar "|"
			d2. \bar "|"
			g,2. \bar "|"
			a,2. \bar "|"  % bar 20
			e,2. \bar "|"
			b,2. \bar "|"
			c2. \bar "|"
			g,2. \bar "|"
			c2. \bar "|"  % bar 25
			d2. \bar "|"
			g,2. \bar "|"
			fis,2. \bar "|"
			e,2. \bar "|"
			c,2. \bar "|"  % bar 30
			g,2. \bar "|"
			a,2. \bar "|"
			d,2. \bar "|"
			g,2. \bar "|"
		}
	>>

There is also a piano version, dedicated to a friend who passed.

where dreams are made of

Hmm, never noticed this. In the song Empire State of Mind, the chorus has what some people consider a grammatical mistake.

In New York, concrete jungle where dreams are made of
There’s nothing you can’t do
Now you’re in New York
These streets will make you feel brand new
Big lights will inspire you
Let’s hear it for New York, New York, New York

Some people consider “of” to be ungrammatical here. Some lyric transcripts even leave it off. I don’t know, it’s there, can’t pretend it’s not there.
(Read the article)

« Previous PageNext Page »