School

For reasons that even I don’t understand, I find myself thinking a lot about improving schools. And yesterday was one of those joyous experiences where several different thoughts suddenly overlapped, forming something new.

One of my professors is an adjunct professor who teaches at several different schools. And she was talking about how it seemed to her that a decent number of prestigious schools focus too much on theoretical and abstract concepts, but no so much on real-life applications. This nicely sums up one of the areas in which I’d like to see grade schools improved.

  • Gym class was universally an utter waste of time. I suppose it got me moving a little bit. But watching football or basketball on TV, I realize that I still don’t understand the finer points of the game. How come this never came up in gym class? And, perhaps more significantly, I’ve been exercising a bit. I lift weights a few times a week, and am looking forward to nicer weather so I can take up jogging again. (Yes, I should just go to the gym and use a treadmill. But it’s not the same.) Why didn’t I do this in gym class? Why did we spend so much time on badminton? Why is there an “n” in the middle of badminton?
  • I can’t speak for others, but trigonometry was among my least favorite classes ever. Furthermore, I’ve never applied it anywhere. The only time it came up in subsequent classes was when we integrated trigonometric functions, and at that point, no one had any clue what we were doing anyway. But why not replace a math class with zero practical applications with a finance course? Not until I took a finance course here in my sophomore year did I truly learn about things like compound interest and the time value of money. Every person in America needs to know this. You have $1,000 sitting in your bank account. How much will you make if you put it in a one-year CD at 4.25%? And you graduate and go to buy a $250,000 condo, taking out a 30-year mortgage. What will be your monthly payments at 6% interest? What if you get 4.5%? What if you get stuck at 8%? And, when you’re done with that, how much do you pay over the lifetime of the mortgage? (Hint: at 6% annual interest, you pay almost exactly $1,500/month, for $539,000+. That means that your interest is more than 100% of the principal.) You can bring up usury laws, and the fact that national banks, et alia, got themselves exempted from them, and segue into credit cards. Why did no one teach me to balance a checkbook? (Okay, it’s easy. But still…)
  • I want to learn either the guitar or the piano. And I suspect that, if you went to middle or high school, you’d find lots of people who shared my interest. What the heck happened in music class? How did I pass music class without understanding how to read music, and without being able to play anything other than the recorder in 5th grade?
  • What are geography classes teaching people? Why, when I graduated high school, did I still have no clue where Iraq was on the map? Similarly, what the heck happens inĀ  civics and such? Why wasn’t I made to read the Declaration of Independence? Why don’t I know the Amendments cold? I think I should be able to yell “14th Amendment!” to any high school graduate and have them talk about its exact meaning, including due process and equal protection. 22nd Amendment? What President was it enacted in response to? When (ballpark) was it ratified? What states refused to ratify it? (Hint: Massachusetts was one of two.) What’s required to add a Constitutional Amendment?
  • Why are we so reliant on calculators? Last semester we were looking to bring a Presidential speaker, and contemplated opening it to the public to make sure we filled the crowd. A friend pulled out a calculator. “If we charge $5 a ticket, and get 100 people…” He plugged the numbers in. “That’s $500 to defray the costs.” Not until I called him on what he’d done did he even realize the absurdity of using a calculator for 5 x 100. But it’s not that he’s stupid. It’s that we’re all so dependent on them. All the time I’ll start to plug some numbers into a calculator and solve it in my head before I finish typing it in. I think higher math classes need to give Math Minutes again. The kids might think you’re nuts for doing it in calculus class, but it’s necessary!

This is How We Do

I finally got around to processing some of the pictures I took this past weekend. I wanted to share a few.

IMG_1184

How does that one look? I like to think it passes as a ‘normal’ shot. What’s not evident is that it was underexposed, poorly metered, had a nasty green color cast, and had everything in perfect focus. Tweaking photos in Photoshop requires striking a delicate balance. Too little touch-up and the image doesn’t look that great, and too much and the image looks pathetically artificial.

I like to think this one is a good compromise. I used Levels as well as the Shadows & Highlights tool to bring out a lot of the detail that was lost: some areas were too dark (people), and others were too bright (the court). I bumped up saturation and contrast every so slightly (that’s an easy one to take too far), and then used my new favorite Photoshop tool, a ‘smart selector,’ which let me easily select the crowd, and nothing else. It worked remarkably well at letting me not get any of the players or the court. With that, I applied a slight Gaussian blur to the crowd, to throw them a little bit out of focus. It’s what it should have looked like anyway, had it been shot with a faster lens.

Here’s the same shot straight out of the camera. You can see that it’s not really bad, and, side-by-side, it actually look a little more “natural.” But the players are a little too pale, the crowd is a little too distracting, and so forth.

No Post-Processing

Now here’s another one I took:

The Shot

At a glance, this looks like a decent photo. Your eyes should be drawn right to the player as he makes his shot (I love shooting a camera with negligible shutter lag!) (The motion blur on the ball which looks kind of cheesy to me is actually legitimate.) The players, the rim, and the backboard all look nice and sharp. But if your eyes wander the crowd, you can quickly see that my attempt at a few tiers of Gaussian blur were amateurish. Having stuff like the open doors and scaffolding in the back of the gym is distracting. Again, had I been shooting a nice 200mm f/2.0 (not yet released, much less within my budget), it would have been thrown out of focus. But I was shooting with a lens at f/5.6, leaving stuff like that remarkably in focus. I started by selecting all the background junk and applying a Gaussian blur, but to mimic real life blur gets complicated in this setup. I wanted to throw the fans near the court slightly out of focus, but let the doors and walls be further blurred. This required multiple tiers of blurring, and left some strange effects. You’ll notice a few people with bodies that are mostly in focus, but heads that are exceptionally blurry. With a little more time, I could probably improve on this, but this was one of my first attempts at working seriously to manage background blur, so I instead offer it, with its myriad flaws, as an example.

Primary Results

We’re hosting an Super Tuesday Party on campus. I’ve got three TVs on, and I’m going to experiment with the “liveblogging” fad here, at least until I lose interest in posting here and get caught up in cheering (or booing) here. Rumor has it that exit polls are showing a lot of races even closer than predicted. Tonight might be very interesting, and “tonight” might become tomorrow.

Stomatron

I’ve been working on my resume as I seek to apply for a job that’s a neat blend of multiple interests–managing web projects (even in my preferred LAMP environment), politics, and even a management potential. And as I do it, I’m remembering all the stuff I did at FIRST, and reflecting on how much better it could be.

I was “fluent” in SQL at the time, but didn’t know some of the neater functions of MySQL. For example, when I wrote the web management interface to the Stomatron, I didn’t know that I could make MySQL calculate times. So I’d retrieve a sign-in and sign-out time and use some PHP code to calculate elapsed time. This wasn’t terrible, really, but it just meant that I did more work than was necessary.

More significantly, I didn’t know about the MySQL query cache. (Actually, I don’t know when it was introduced… This was five years ago.) Some of the queries were quite intense, and yet didn’t change all that often. This is exactly where the query cache is indicated.

Worse yet, I really didn’t do much with the idea of caching at all. Being the stats-freak that I am, I had a little info box showing some really neat stats, like the total number of “man hours” worked. As you can imagine, this is a computation that gets pretty intense pretty quickly, especially with 30+ people logging in and out every day, sometimes repeatedly. Query caching would have helped significantly, but some of this stuff could have been sped up in other ways, too, like keeping a persistent cache of this data. (Memcache is now my cache of choice, but APC, or even just an HTML file, would have worked well, too.)

And, 20/20 hindsight, I don’t recall ever backing up the Stomatron box. (I may well be wrong.) Especially since it and our backup server both ran Linux, it’d have been trivial to write a script to run at something like 3 a.m. (when none of us would be around to feel the potential slowdown) to have it do a database dump to our backup server. (MySQL replication would have been cool, but probably needless.) If I were doing it today, I’d also amend that script to employ our beloved dot-matrix logger, to print out some stats, such as cumulative hours per person, and maybe who worked that day. (Which would make recovery much easier in the event of a catastrophic data loss: we’d just take the previous night’s totals, and then replay (or, in this case, re-enter) the day’s login information.)

I’m not sure it was even mainstream back then, but our website could have used a lot of optimization, too. We were admittedly running up against a really slow architecture: I think it was a 300 MHz machine with 128MB RAM. With PostNuke, phpBB, and Gallery powering the site, every single pageload was being generated on the fly, and used a lot of database queries. APC or the like probably would have helped pretty well, but I have to wonder how things would have changed if we used MySQL query caching. Some queries (like WordPress’s insistence on using exact timestamps in every one) don’t benefit. I wonder if phpBB is like that. I have a feeling that at least the main page and such would have seen a speedup. We didn’t have a lot of memory to play with, but even 1MB of cache probably would have made a difference. As aged as the machine was, I think we could have squeezed more performance out of it.

I’m still proud of our scoring interface for our Lego League competition, though. I think Mr. I mentioned in passing a day or two before the competition that he wanted to throw something together in VB to show the score, but hadn’t had the time, or something of that sort. So Andy and I whipped up a PHP+MySQL solution after school that day, storing the score in MySQL and using PHP to retrieve results and calculate score, and then set up a laptop with IE to display the score on the projector. And since we hosted it on the main webserver, we could view it internally, but also permitted remote users to watch results. It was coded on such a short timeline that we ended up having to train the judges to use phpMyAdmin to put the scores in. And the “design requirements” we were given didn’t correctly state how the score was calculated, so we recoded the score section mid-competition.

I hope they ask me if I have experience working under deadlines.

Saving the Auto Industry

My whole family drives Toyotas. We love America and all, but we want good, solid cars. The U.S. is, understandably, concerned about how much oil we’re using. So we’re trying for a requirement that, by 2020, all cars sold get 35mpg at a minimum. Of course, the car companies are complaining that this is going to be incredibly difficult to do.

Two comments:

  • This is utter BS. My mom gets 50 mpg with her Prius. Honda did it in 1987.
  • Why does the government need to get involved? The way I think it should be working is that we say, “$3 a gallon for gas is ridiculous! I want a car that gets better gas mileage!” We stop buying cars that get horrible gas mileage, and, consequentially, Detroit stops making cars that get horrible gas mileage because no one is buying them. It costs me $40 every time I fill up. I wince every single time.

I found this video online. I’m not going to lie: it’s dry, and 20 minutes long. I was kind of proud to follow him most of the time as he talks about internal rates of returns and demand pull and the like. He makes some extremely obscure references, and even now, I’m not sure what he was talking about with oil at $12 a barrel.

And yet, despite it being presented in a technical, academic manner to an audience that’s definitely not normal people, he makes some points that are really, really, really worth hearing. One of the simplest ones: efficient cars are going to be made, the question is who’s going to make them. And, at least right now, it’s not us. (And it really boggles my mind, frankly. Ford makes one hybrid: the Ford Escape Hybrid. 34mpg on an SUV is impressive (I get 20-22). But what the heck market are they appealing to? They manage to completely dilute the effects of a hybrid engine by putting it in an SUV.)

GM developed a “concept car” 16 years ago that, as I recall, got close to 100 miles a gallon. Where is it?

Besides oil, another huge problem we’re facing is a ridiculously huge trade deficit. If we could make cars good enough that we wouldn’t have to keep importing cars, we could certainly help.

He presents some amazing statistics, too. 87% of the energy from fuel used in cars is utterly wasted. Only 6% of the total energy actually moves the car. (And when you figure in that the car weights significantly more than the passengers and luggage, he says that less than 1% actually moves the passengers.)

He says the solution is to lighten the car. I cringed for a minute. Lighter cars, especially on today’s roads, are asking for disaster. You can go drive your 500 pound car, and I’m sorry if I kill you when you crash into my SUV.

But it turns out that this is somewhat wrong. He showed a picture of a McLaren SLR (a $400,000+ car) that was made out of carbon fiber. It’s very light. Some idiot T-boned the car. Their car was totaled. The McLaren driver had to buff out a scratch in the paint. He suggested that, if you were to smash the car head-first into a brick wall, about 25 pounds of carbon fiber is all it would take to absorb the impact and let you walk away unharmed.

He goes on to call heavy cars “hostile cars,” and really, he’s got an excellent point. We’re making heavy cars solely for safety with other cars. But we can increase fuel efficiency, maintain (or increase!) driver safety, and decrease risk to other motorists by simply changing materials.

Oh, and one final point he makes that I thought was interesting: we think of OPEC as a cartel that has tons of power. In actuality, our power of demand far outweighs their supplier power, and we have the power in the equation. Except that we can’t stop buying oil. Years ago we saw a lull in demand, and basically gave OPEC the bird. He suggests doing it again.

I didn’t expect to watch the whole video, which is 20 minutes long. But before I knew it I was done. And it’s pretty thought-provoking.

Mnemonic

I don’t think there’s a mnemonic aid for “mnemonic,” but I’m studying for a law exam, and it’s insanely conducive to various visual associations:

  • Engel v. Vitale, the 1962 case that ruled that mandatory school prayer was an Establishment Clause violation. (You think?) Remember angels and that some thought it was vital to pray.
  • A trio of conscientious objector laws:
    • Welsh v. US: you needn’t have organized religious beliefs to object, if your beliefs are held with the strength of organized religion.
    • Gillette v. US: you can’t be a CO if you only object to one war; it has to be war in general
    • Clay v. US: it’s based on individual beliefs, not your whole sect’s beliefs. In particular, you must remember 3 prongs:
      • Oppose war in any form
      • Religious, not political, beliefs
      • There must be evidence that your beliefs are sincere
    • Remember Welsh grape jelly (and eating it individually, not in church), Gillette stadium (and protesters there opposing the Iraq war but supporting the war in Afghanistan), and, well, Clay is easier if you know that it’s Cassius Clay (Muhammad Ali). The three items are pretty easy to remember on their own.
  • There was a Pinette case where the KKK wanted to put up a cross. It was for pretty intimidating purposes, but the court “had to live with its own precedent” that it was protected free speech. Imagine that the cross was made of pine.
  • VA v. Black: you can’t ban cross-burning, but if it’s used as intimidation, it’s illegal anyway. Remember that cross-burning was usually done as intimidation against black people.
  • Loving v. VA: essentially struck down anti-miscegenation laws. After all, marriage is about loving, not skin color.
  • Baehr v. Anderson and Brause v. Board of Vital Stats were two cases with a lot in common:
    • They both had the state’s anti-gay-marriage laws ruled violations of the state constitution
    • They both resulted in the state constitution changing to define marriage differently, banning gay marriage and doing it in a way that can’t be unconstitutional (since it’s in the constitution)
    • They both occurred in “Western extremity” states (Alaska and Hawaii)
    • They both involved people with strange B-names

Of course, we’ll see in an hour if this helps, or if I just sit there thinking that I could really go for some Welsh grape jelly having no idea why I’m thinking about it.

The Problem with Wikipedia

No, not that one.

I consider myself a talented writer. And I’m obsessive-compulsive about things being well-written. So giving me access to edit things is a recipe for awesome.

So I was doing some research for class. My research into Lynch v. Donnelly made me realize that the page was pitiful. So I cleaned it up to get it to its current state. (Which still needs a lot of work.) The Nautilus, Inc. page also got some updates after another class project on the subject.

You should get extra credit in class when you become the top contributor to the Wikipedia page on the subject.