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.

Thursday, January 31, 2013

Heartbroken news: promising teen shot dead

My heart is broken as I read this: news.

A young talented teen who just performed at the Obama inauguration shot dead... by a bullet not intended for her. And there has been over 40 people shot dead in January alone. If statistics is of any value, and that there were over 500 homicide last year, there will be 450+ people out there breathing right now who will be shot dead by the end of this year. (and you can be one of them)

There will be people who say, "look, Chicago has tougher gun laws and look at those numbers" and then cry gun laws are useless as they embrace gun owner associations. Their reasoning is this: look if bad people have guns, we better have guns.

The talk of gun control is talking about banning high round clips and some semi-automatic weapons... That's a good first step. However, even that is facing challenge after people who lost their loved ones speak out, even Senator who got shot speak up. Waita minute, what kind of gun killed that talented teen and many others? They are probably regular hand guns and no one is talking about restricting them.

I don't feel safe. So do kids I suppose. If kids don't feel safe, how can they grow up correctly and not end up in vicious cycle of gang violence?

In addition to gun control, we need law-and-order restored in our neighborhoods! Are there enough police out there? Are there cameras all over the place to watch over the street corners? We perhaps need propaganda-like posters all over saying: "If you kill, you will be in jail" posters with gruesome pictures all over. A lot more need to be done.

Tuesday, January 29, 2013

Android 8 vs 16

Android API version 8 means the popular 2.2. There have been 9 versions after that and now the latest is at 17. See here for the version history. Android is changing frequently! Ooh, it is named after delicious-but-high-calorie things alphabetically: Cupcake, Donut, Eclair, Froyo... Ice Cream Sandwich

Which one you like better?

The one on the left is version 8. (2.2). It has buttons that looks like buttons (with various gray gradients). The "Toast" also has rounded corners. The one on the right is version 16. (4.1). Ok, the modern UI features FLAT buttons, and RECTANGLE Toasts. Come on it doesn't look as nice. I thought only Windows make things uglier with subsequent releases.

Monday, January 28, 2013

New phone: Nexus 4

My old Huawei Comet is lightweight, small, trusty but low-end phone. Once upon a time I peaked someone in the CTA playing Angry Bird on a modern phone I am like gee, how come Angry Bird does not look like that in my phone. And when I look at the kinda blurry pics taken, hmm, I can use something slightly better. And as an Android enthusiast, I deserve a good upgrade for a new higher end phone. Should I get the Samsung Galaxy III (or the Mini)? or the Nexus right from Google? Head-to-head reviews indicate that Nexus and Samsung Galaxy are very comparable. Gee, the Samsung is so expensive! Ok, the price determine that the Nexus is a better choice. This is a highly wanted product on Google Play. Frequently it is in SOLD OUT status, and I waited 2 months for it. But your local phone dealer may have it, yea they probably want you to renew contract and adhere to them forever.

Both the Samsung Galaxy 3 and the Nexus have one problem though: it is BIG to carry around. Why modern phones are so big? Ok so it is easier on the eye you say? But why do you have to watch videos on it? Get a 7-inch or 10-inch device for that. My sole complain is the size.

The Nexus's battery is not detachable! The SIM card is a Micro version and you need to poke it with a staples to open up the fragile tray. Not sure if I like this design.

Pics and videos: sure it can do better than the old phone, but don't expect phones to replace your trusty Canons yet. It even has a flash.

But when you compare head to head with an IPhone... I am sorry to say this Android, but the IPhone does look even better. I am not sure what exactly is missing here.

And I am saddened to find out some of my apps don't work well on large phones... yes, I didn't test on big phones and didn't bother to find bigger icons for bigger layouts. Some of my apps not just look bad but crashed. Ok, let me open up the code, get logcat ready and see what exceptions get thrown... Hey, all I need is re-compile and didn't have to touch the code and it now works?! What's up with backward compatibility at binary level? When I have time I will try to fix the look of some of my apps.. with larger icons and better handling... That layout thing... sometimes is hard to tweak to make it look right.

Not everyone needs modern expensive phone. A lower-end one actually provide most of what you need. Save your $ if your phone is working fine... unless you develop apps too.

Yes, Angry Bird (Star Wars) is more fun on my modern phone.