Tuesday, February 26, 2013

Windows Annoyance (part 6)

In Windows 8, if you open up an PDF attachment in browser email. You will get the PDF file AT YOUR FACE by the Reader app. It fills up the entire screen. Not even obvious how to close it. Ok I figure out how to close it, but how to do you print it? Oh there is no print option? Come on!

To print, you will need to bring the charm bar out (Windows-C) or slide on that finger mouse pad, then click on "Devices" as your printer is one of your devices. Then you can print. (I had to look this up on the web)

I'm like come on, if the Reader app MUST occupy the full screen, at least give print as an option when you right-click on it. File->Print is totally intuitive, it's been like that for decades, where is the menu? Needing the charm bar here is totally unintuitive. Jumping out of the desktop into the full screen Reader app is already not so user friendly.

Friday, February 22, 2013

Forbes's Top 10 Most Miserable Cities

See here for entire list.
  1. Detroit
  2. Flint
  3. Rockford
  4. Chicago
  5. ...

The article says:

Chicago residents must endure long commutes (31 minutes on average), plummeting home prices (37% the past five years), brutal winters and high foreclosure rates
Ok, brutal winter is not Chicago's fault. But it isn't really that bad. 31 minutes commute isn't that bad, come on. Yes, plummeting home price is. What about violent crimes?

Wednesday, February 20, 2013

Rounded box

Once upon a time (a long while ago), an "architect" level guy wanted to restyle a certain webpage. In that wacky company, an "architect" is a tell-er, who actually has NO CLUE how to do ANYTHING. They just wanted a rounded boxes because rectangles are not in style (among other things). Gee, I was uninformed... especially in area of CSS. So I did a <table> with <td> entries of background image of rounded arcs, created by carving a circle into 4 pieces, and lines, and the center being the meat. Yes laugh at me all you want. It does the trick but it is fairly clumsy.

The style to use is "border-radius", and there are "moz" and "webkit" versions to make Firefox and mobile browsers play nice:

Here, I am inside a round box
<style type="text/css">
div.myroundbox {
 border: 1px solid #CCCCCC;
    background-color: #EEEEEE;

   -webkit-border-radius: 15px;
 -moz-border-radius: 15px;
 border-radius: 15px;
 padding: 10px;
} 
</style>

<div class="myroundbox">
Here, I am inside a round box
</div>
This is an excellent guide:
http://www.css3.info/preview/rounded-border/

Friday, February 15, 2013

"College" Algebra on the train

Saw a gentleman in 20s-30s working with algebra problems on the train with headphone on and gee those look DIFFICULT. Yes, even for me (without pencil and paper). This homework involves solving equations with some 4-degree polynomials. Something like 3x^4-2x^3+3x^2+17 or something. Not obvious how to factor it at all. Fortunately that homework was multiple choice, and some choices have complex numbers a+bi in it (and of course the conjugate a-bi). The gentleman was helplessly trying to do "long division" trying to factor that thing. If I was to do that homework I would not don't bother factor that polynomial, plug in the choices to see which one solves the equation! I wanted to discuss math with this gentleman but he got headphone on.

Now that's one homework problem I want to protest about: It says, "Solve: x^2+2x+1=0" Come on, this is worded wrong, just what are we solving? It should say "Solve for x"

Given this gentleman's age and the nature of these unpractical problems it is very likely he is taking a class known as "College Algebra" or "Pre-Calculus" so he can brag to his friends who didn't attend college he is taking some serious stuff. I want to tell that gentlemen his calculus probably won't involve any complex things.

So that homework involves complex numbers, but in real life problems you rarely ever need to factor ugly polynomials and look for complex solutions, especially when the degree of polynomial > 2. So this is sort of pointless drills.

If teaching that subject I guess the goal is to tell them the beauty of being able to factor a polynomial will yield solutions. Not trial-and-error factoring an ugly polynomial pulled from thin air. Have they seen the glorious beauty of deriving the Cubic and Quartic formulas? and that there are no general solution after that? THAT'S glorious and enjoyable mathematics, the endless drill is not.

Oh and there is nothing "college" about complex numbers. Come on, define i=sqrt(-1) and there you go. High school students can do this. Perhaps Even elementary students. Why not? I propose whack this class completely and jam a bit more information into that first class of Algebra.

Complex numbers open a new important chapter of mathematics... i allows solving problems not solvable before, and its humble beginning is in the quadratic formula.

Friday, February 8, 2013

Prime number in spotlight again

News! Largest prime number found! 17 MILLION digits. Details in here. I don't know how much paper needed to even write this number down. Yes, this is perhaps useless information. Once upon a time, I took a Number Theory class so I have heard of Mersenne primes. During that quarter, I even understood some of the theorems involving them listed here.

Now as the Time article says, there are infinitely number of primes out there so this would be a never ending task. Euclid! This important guy wrote the classic geometry text Elements that included this famous proof. That proof-by-contradiction demonstrates the elegant nature of pure logical argument. If you have not seen it you do not have a clue what mathematics is about. People who think math is just calculation drills are extremely shallow.

See here for example, for a write up of Euclid's proof. Got it? (Ok, this is listed in High School category, yikes I didn't learn this until college)

What makes math hard for many folks is that the (formal) language is kinda cryptic... That link above actually says it pretty well. If you still don't get it, let ME try:

Ok, suppose there are finitely many primes. We label them p1, p2,... pn. Now, multiply them all up and add 1 to it.
Is this number a prime? No, because all the primes were used so it can't be prime.
Is this number a composite? No, because none of the n identified primes would divide into it evenly, there is that 1 remainder.
See, we get in to a difficult situation so the original assumption of finitely many primes is wrong and therefore there must be infinitely many primes.