Friday, July 8, 2011

A Polynomial Odyssey

Classify all polynomials with real coefficients which map rational numbers to rational numbers and irrational numbers to irrational numbers.

Friday, June 10, 2011

Why Not Use Flash?

My last post was a bit whiny, but I'd like to expound on the usage of flash in Google Music, and why it gives choppy music on many of my machines.  This is something of a study in why you should avoid flash at all costs...

And really, an oft-quoted reason, the lack of flash support on iOS is not all that good a reason by itself unless the website is targeting mobile platforms.  iOS accounts for about two percent of web traffic, so it is entirely possible to ignore them.

I can give you a much better reason.  Just read this.  That's the reason flash is choppy on some of my machines (and there's a workaround I have been too lazy to use everywhere).  The gist is that there is a bug in the 64-bit flash plugin having to do with playing audio (uncovered because other things became less lenient), and resulting in choppy audio.  Even though this is a closed product, some very smart people figured out exactly what the problem was, created a workaround, and reported the problem to Adobe.  The true fix is literally is as simple as replacing one function call with another similar one.

That was in November 2010.  Adobe still has not fixed it.  What does that say to website developers?  Yes, you are presenting what is at best an irritating experience to people unfortunate enough to come to your site.  And yes, someone else already did the work to figure out why.  And yes, we can fix it easily.  But we won't.

On a more positive note, the workaround does fix it completely.  :)

Tuesday, June 7, 2011

Google Music, More Disappointment

Time for more bitching about Google Music.

The first and biggest complaint about Google Music Beta was obviously the crappy desktop app that doesn't support Linux, or for that matter Google's own ChromeOS. I guess users must not want to store music locally on a Chromebook.

The second complaint is that some enterprising person figured out how the uploading is done and fixed Google's own problem, only to have the underlying protocol changed out from under him breaking his extension.

But I soldiered on. The Google Music Manager runs under Wine. See this forum. Specifically, download the files, unzip the file, get a recent version of wine:
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.3
and finally run from the unzipped directory:
wine1.3 MusicManager.exe

Now I can upload music. This gives me a whole host of new things to complain about, but let's call them feature requests:

Wednesday, June 1, 2011

Huge Oversight, Google

Yay, I just got an invitation to Music Beta.

However, they don't support Linux, so I can't use it.1

I can see the logic behind not supporting Linux. It is only 1-5% of the desktop market. But it is announced at a developer conference, where I'm sure the Linux market share was a bit higher. And among new technology adopters, I'm sure Linux market share is a bit higher. New products need adoption, and you don't really want to prevent that because of what seems to be an oversight.

Google makes plenty of good web apps (and a handful of crappy desktop apps). They couldn't have done this in Chrome?

Their inability to come to an agreement with music labels and their poor choices in implementation do not bode all that well for the service. A lesson for us all.

1Without fuss.

Wednesday, April 27, 2011

Further LaTeX for Blogger Updates

Just threw a few more changes in.  Angle brackets should be handled better, and the image src is URI encoded so generally it should behave better around weird input.

Even more, I've thrown up installation instructions on the repository's GitHub wiki.

Supporting Blogger's New Editor

One of my annoyances with the user script for typesetting LaTeX in Blogger was how it just didn't work with the new editor (otherwise known as issue 7).

No more!


\int_0^1 x^2 dx = \frac{1}{3}

(This post was written in the new editor!)

Tuesday, April 26, 2011

LaTeX User Script Updates

Just so you know, I've been able to clean the code for the user script to the point where I think I can easily extend it: in particular, the double escaping is gone and there is much less string manipulation. The script now handles double quotes inside equations properly.

The issues list on GitHub shows what's remaining.

Thursday, April 21, 2011

Trying Out GitHub

I previously wrote about my trivial fix to a user script for LaTeX markup in Blogger.1  Now that I've explored more, I know more options, but I still haven't found a single solution which does everything I would like.

My primary requirement is to easily typeset math which can be read not only on the website, but also from the RSS feed.  To that end, the user script mostly works.  However, it doesn't look nearly as nice as MathJax.

So, long story short, I believe there are a few more changes I want to make to the user script.  I have decided to explore GitHub for code hosting.  It's early yet, but it has a very nice interface.

So if you want to follow along, see my new repository.

1Clicking on the original link failed to automatically install the user script.  I have fixed it.

Tuesday, April 19, 2011

Review: Getting Things Done and Remember The Milk


After setting up Gmail to get things done, I spent some time with the book.  I may be late to the party, as everyone seems to know the essentials already.

The gist of the GTD philosophy is to always stay focused on the next action which can be done on any given project.  Projects are defined liberally to be anything which consists of a series of one or more actions.  For example, renewing my driver's license is a project with at least three steps:  find out what documents I need, gather the documents, and finally go to the DMV.  Since each step depends on those before, at any point in time only one action can be taken.  On the other hand, clearly some projects have many actions which can be taken in parallel.

The premise is that it doesn't make sense to keep all those non-actionable items on your mind.  They should be waiting in the wings until you can act on them.  Once you consider only the actions you can take now, you can stop worrying quite so much.

Thursday, April 14, 2011

An Easy Classic

You are given twelve marbles, one heavier than the others, and a balance.  Find the heavy marble using the balance no more than three times.

Monday, April 11, 2011

Outsmarting the Wolf

In order to outsmart the wolf, consider your relative angular speed as you swim along concentric circles. Without loss of generality, we may assume the pond has radius 1 centered at the origin. As you swim along the path r = r_0, the wolf can cover the same central angle more quickly if r_0 > \tfrac{1}{4}, more slowly if r_0 < \tfrac{1}{4}, and at precisely the same speed if r_0 = \tfrac{1}{4}.

From this, we can develop a simple strategy. Swim out near to but just shy of the circle
r = \tfrac{1}{4}. Since we can cover the same angle more quickly than the wolf, we may swim in a circle until the wolf is directly behind us. We can cover the remaining distance of slightly more than \tfrac{3}{4} in less than the time it takes the wolf to cover its distance of \pi.

To be more precise, we can successfully implement this strategy of first swimming to
r = r_0 exactly when 1 - \tfrac{\pi}{4} < r_0 < \tfrac{1}{4}. There is a tradeoff. The smaller the r_0 we choose in this interval, the faster we can get to the edge of the pond. On the other hand, the larger we choose r_0, the further away the wolf is when we reach the edge.

Sunday, April 10, 2011

Outsmart the Wolf

Here's a brain teaser (h/t Rob):

You start at the center of a disc-shaped pond.  A wolf is at the edge of the pond, and the wolf runs four times as fast as you can swim.  He will always run along the edge toward the spot that's closest to where you presently are.  How do you get out of the pond without the wolf there to eat you?

Wednesday, March 16, 2011

Delayed Emails in Gmail with Chrome

A missing feature pops up every now and again in Gmail. We can't delay emails. There are certainly times when it would be useful to send a finished email not just yet. I may send emails when it is not the best time for the recipient to read or respond. And when they return to their email later, mine will be one of many and not receive all that careful consideration. I think this can be a useful feature.

Boomerang1 adds delayed emails and much more. For example, it can return conversations to the inbox if no one has responded in some time.

1This is the link for the Google Chrome extension.

Tuesday, March 15, 2011

Polygon Labels

Assign the numbers 1, \ldots, 2n to the vertices and edges of an n-gon in such a way that each edge is the sum of the two adjacent vertices.

(h/t Jess)

Wednesday, March 9, 2011

Netflix Canceled

I went ahead and made it official: no more Netflix.

Better selection of physical DVDs (when the DVD isn't scratched), but no streaming just doesn't do it for me.

Notably, they have updated their exit survey to include Amazon Prime as a possible reason for leaving. :)