Wednesday, February 28, 2007

Snowing Up

I would like to report that, right now, outside my office window and for as far as the eye can see (which isn't too far), it is snowing UP. I take it this means that the snow that has accumulated on the ground will fly away to Kansas or somewhere. Bonus!

Tuesday, February 27, 2007

Finished My Round-Trip Project

My project for my software engineering class for the past five days was to use three technologies (Apache, PHP, and MySQL) to make a webpage that would take data from a form, store it in a database, and another webpage that would read it from the database and display it. This "round trip" is a part of the technical backbone for our group project.

I worked hard on this all weekend, got most of it done by Sunday night, and finished up the rest last night. It took me a lot of work and many parts of it were pretty fiddly, so I feel like a super stud for getting it to work.

Since the purpose of my work was to make this process faster and easier for the rest of the group (which consists of the entire class; there are only 5 of us), I also wrote up a 9-page document with installation instructions, tips, the code that I used, and screenshots of the web pages. I'll bring copies of that to class tonight.

A Cure for Nearsightedness?

Today's Medical Examiner in Slate is partly about a potential cure or treatment to keep nearsightedness from progressing in children. It was a strange read for me, because the cure sounds so much worse than the disease. Apparently by putting eye-dilation drops in your children's eyes every night, which forces them to wear glasses that change color in light (so their eyes aren't damaged by being dilated) and possibly to wear bifocals for reading (since you can't focus close-up when your eyes are dilated), you can keep their nearsightedness from progressing.

I started needing glasses when I was around 7, and I hated them at first, and my eyes got rapidly worse in those first few years, and continued to get worse for a while after that. I have to wear glasses to do pretty much anything (even read a book). But I think I would have hated nightly eyedrops and wearing light-sensitive bifocals for years way more than I hated just wearing glasses.

In fact, if you told me right now that by doing that for five years, I could have perfect vision restored to me, I wouldn't take the deal. And I'm an adult.

I wore contacts for a while in high school. I was so happy to not have to wear glasses - mainly for reasons of vanity. At some point I got a little eye infection and had to wear my glasses again for a while, and it made me realize how wonderfully convenient and easy glasses are compared to something you wear on your eye. (Sorry, Sally!) Truly they are just not a big deal.

I know some people have really terrible eyesight, and maybe the results of this research can become something useful, but for now, it doesn't sound like a useful finding to me (even assuming it is confirmed in subsequent research). I feel so strongly about it that I'm not even sure about the ethics of carrying out the research. What am I missing?

Monday, February 26, 2007

"Fourthmeal"?

I have visited Taco Bell a couple of times lately (which is unusual for me) and both times noticed prominent advertisements for "Fourthmeal," Taco Bell's name for a meal that putatively exists between dinner and breakfast. (In other words, that meal that teenagers and adults-who-live-like-teenagers get late at night from Taco Bell.)

I happen to think this is a potentially brilliant marketing concept. If you can legitimize late-night snacking as a meal, and eventually convince people that they have to eat this new fake meal every day, it could work.

But "Fourthmeal"? I can't think of any name less likely to stick or become widely used. Couldn't they get someone to come up with a catchy name that they could promote the hell out of?

(By the way, if you go to the Fourthmeal site linked above, you will have to choose your gender in order to enter. Is that creepy to anyone besides me?)

Friday, February 23, 2007

Software Project

My Software Engineering Principles class has so far been rather like a seminar. There are only five students, and typically we just meet, and everyone should have read up on the topic we're going to discuss, and then we discuss the topic and what we've read. Sometimes we have to write a little reflection or some "nuggets" (pithy statements on a topic), but pretty much it's just been reading & talking. I like it!

But, since the follow-up class to this (Software Engineering Practices, my "senior experience" course) is all about working on a big software project, we're going to have a miniature software project for this class, and we started on that Tuesday.

Dr. Paul's idea, which nobody vetoed, is that we should write a requirements management tool. (Requirements are very precise statements about what a piece of software is meant to do and not do. They essentially form the contract between developers and customers/clients. Requirement engineering is what you do before you start working on design or actual coding, in theory.) The most commonly used requirements management tool is probably, alas, Microsoft Word.

I am not one of those anti-MS people, but the problem with keeping requirements in Word (or any word processing software) is that it limits them to being a flat document. What you really want is for requirements to be "live", to facilitate tracking changes over time, to allow for dependency relationships between different requirement statements, and to be able to link requirements to specific parts of the design and the actual code. And of course you also want to be able to produce them as a document.

What Dr. Paul would like is for our application to be open source, web-based, and backed by a database, and for it to support the Volere shell and template. (Volere is basically a style of requirements - sort like how APA or MLA are styles for writing papers.) He suggested (though this is up to us, ultimately) that we could use CSS (cascading style sheets, into which you feed HTML files that it then formats in a consistent way, so that you can take the same HTML pages and show them different ways), PHP (a scripting language that generates HTML pages), and mySQL (an open source database) to solve our technology needs.

Of course, in our first meeting on this (the day he told us about it), we all started jumping in talking about coding the thing, and he sort of interrupted us to say, essentially, "Uh, how about using proper software engineering practices since that's what this class is about, dummies." So we discussed our software lifecycle model (settling on a risk-based iterative model, for now), and started working on requirements. (Too bad we don't have a web-based, open source requirements management tool! Oh yeah.)

So as of this moment we have a pretty good list of proto-requirements. Near the end of class last night we discussed deliverables for Tuesday, so that everyone would have something to work on. Warren is going to get our proto-requirements partly into the Volere template (which has the dual purpose of making our requirements nicer while increasing familiarity with the Volere template) and think about a database schema. Nobody else volunteered for a specific responsibility (despite the suggestion from Dr. Paul that we do so) besides me.

My job is to download PHP, mySQL, set up an Apache server on my own machine, and figure out how basically to make the round trip from a web page where you enter something, to a database, and back out to a display page. I should have this done by Tuesday and be ready to show the class the code and process for how this is done.

(What I mean by "make the round trip" is to code up a page that has blanks where you type stuff in, and then it takes the typed in stuff and stores it in the database, and then you can go to another page to see what is in the database.)

I've never worked with PHP or mySQL before, or really done any web-based stuff at all, so this should be a fun challenge to put together by Tuesday.

Another Way to Increase Self-Efficacy

...is to be forced to change your car tire on the way to work at 8 AM.

I can't recommend it, though. Phew.

Thursday, February 22, 2007

Exercise and Self-Efficacy

If this rat thinks he can win at slots by trying, he's just plain wrong. At home I have a book (A Kind and Just Parent, by William Ayers) in which the author (who taught teen boys in juvenile detention) explains why he encourages them to lift weights, even during school time. He says that by working out with weights, the boys are able to apply effort and see results - and learn, hopefully, that they can change themselves by trying. (At least, that's my vague memory from reading the book a few years ago.)

I often say that exercising, and especially weight-lifting, makes me feel "like a stud." What I really mean is that it increases my self-efficacy. Self-efficacy isn't my own invented concept, and you can read about it elsewhere, but what follows is my own take on it, which is not necessarily quite correctly in line with the original idea.

Self-efficacy is the belief that you can succeed at something through effort. I believe I could get a PhD in mathematics if I tried hard enough, but I don't believe I could ever be good at basketball - I have high self-efficacy in one area and low self-efficacy in the other (regardless of whether I'm correct in my judgments). But what I'm more interested in is self-efficacy in general - to what extent do I believe my results are influenced by my efforts, versus by factors beyond my control?

It seems to me from what I've read [note: this is a hedge to avoid providing references] that instilling self-efficacy (the idea that you can succeed through effort) in your children is much more important than instilling self-esteem (the belief that you're an OK person deep inside). In education, you can reinforce this by telling a kid who's done well on a math test, "You've been working really hard on that, I can tell," rather than, "Wow, you're really good at math." Ideally you would also put your child into situations where their effort really does determine their outcomes - not in situations where they will succeed (or fail) no matter what.

Anyway, I feel like I do increase my own self-efficacy when I exercise, and I bet this is true for most people, at least if they start with some activity they can make a good go at, because typically you make a lot of progress in the beginning of a new activity (especially if you're out of shape to begin with), and it really builds confidence.

I try to control my eating, but even if I have (momentarily) given up on that, and I get into a regular pattern of exercising, I suddenly get the feeling that I can fix my eating habits too, and then I start eating properly. In any given week, there is a high correlation between my exercise and eating habits, and I don't think it's just that I have "more will power" some weeks than others (though this might be true in some way). I really think exercise drives the whole thing for me.

Because it makes me feel like a stud.

Wednesday, February 21, 2007

What Is a Geometry?

That was the question answered in my Geometry class last night. Here, for your entertainment, I will produce a (non-rigorous) version of the answer.

Let's start with the idea that geometry is about congruence - which figures are congruent to each other? In Euclidean geometry, as I said yesterday, figures are congruent if you can make them line up by rotating them, moving them around, or flipping them over.

So basically, a geometry is a set (in our class so far, typically this is the complex plane - which is basically just a flat 2-dimensional space that extends infinitely) plus rules about what figures are congruent.

What types of rules pass as a geometry? Well, the basic thing is that congruence is an "equivalence relation," which means it has to satisfy these criteria:


  • A figure is always congruent to itself. [reflexivity]

  • If figure A is congruent to figure B, then B is congruent to A. [symmetry]

  • if figure A is congruent to figure B, and B is congruent to figure C, then A is congruent to C. [transitivity]

These properties, which define an equivalence relation, are also true for common ideas like "equals" or "makes the same amount of money as" or "lives in the same city as" - basically, stuff that seems like it's related to things being equal. They aren't necessarily true for other types of relations, like "likes" (Sally likes me, and I liked David, but Sally didn't like David - liking is not transitive - and actually it's not reflexive or symmetric either) or "is bigger than" (which is transitive, but anti-symmetric and anti-reflexive).

So, getting a bit more formal, a geometry is a set (such as the complex plane) plus a group of allowable functions on the set, where the group of allowable functions forms an equivalence relation. Since we're doing this with algebra, not by picking up pieces of paper and moving them around ala Euclid, this can be set out rigorously with...well, math. Here are some types of transformations, or functions on the complex plane:



  • Rotation - You can rotate around the origin (0) or around some other point.

  • Translation - This means moving the plane side to side, up and down, or diagonally, without rotating it.

  • Reflection - This means making the figure into a mirror image of itself across some line, such as the x-axis, or y-axis, or anywhere else you want.

  • The identify function - this just maps each point to itself. It doesn't change anything.

So the next part of class was investigating some combinations of these to see if they could constitute a geometry.

For instance, if your only function is reflection across the x-axis, this is not a geometry. Why? Because under that system, a figure is not congruent to itself. (It's only congruent to its reflection.)

But if you add the identity function, so that you have the identity function plus reflection across the x-axis, you have a geometry! You can formally test the properties of an equivalence relation in this case like this:



  • Reflexivity - the identify function must be included

  • Symmetry - if a function f is included, it must have an inverse, and the inverse must be included.

  • Transitivity - if functions f and g are included, the composition of f and g - that is f(g()) - must be included.

Another geometry could include only translations. Does this satisfy?



  • Reflexivity: f(z) = z + 0 is a translation and is also the identity function. So that's good.

  • Symmetry: if f(z) = z + w is a translation, then f(z) = z - w is its inverse, and is also a translation. Check!

  • Transitivity: if f(z) = z + a and g(z) = z + b are translations, then f(g(z))) = z + (b + a) and that's also a translation.

A less mathy way of saying this is to remember that translation means moving things around without rotating or flipping them. Is a figure congruent to itself? Sure - you just move it around not at all. If you can move one figure onto another, then you can surely move the other onto it instead, so it's symmetric. And if you can move figure A onto figure B, and figure B onto figure C, then you could move A onto C by just moving it onto B first, then following B's path to C, so it's transitive.

Note that all of these different geometries have different rules about, essentially, which types of figures are congruent to each other. Fun and games! (Did anyone actually finish this post?)

Tuesday, February 20, 2007

"From Scratch"

Today for lunch, I am eating a Stouffer's frozen dinner - Tuna Noodle Casserole, to be exact. I normally try not to buy frozen meals that do not contain a vegetable, but I suppose the mushrooms and pieces of celery shown on the box momentarily lured me. Also they were on sale.

The back of the box advertises a "Tasty Fact", to wit:

At Stouffer's, we feel that making pasta from scratch is worth the extra effort.

I think this might be one of the funnier things I have ever seen on a frozen food box, and if you eat a lot of frozen food, you know it is a pretty rich genre.

What exactly does it mean for a giant corporate food conglomerate to make pasta "from scratch"? Is there a Stouffer's factory somewhere filled with Italian grandmas rolling out noodles based on a timeless tradition? Or do they just mean that they (Stouffer's, or a wholly owned Stouffer's subsidiary) actually manufacture the pasta used in their frozen foods? And how would this be different, exactly, from buying pasta manufactured by another giant corporate food conglomerate?

Next they'll be telling me the tuna was "fresh caught."

Sally's New Blog

If you get tired of checking this blog and having it be empty all the time, or if you just like Sally (!) and want to know what she's up to, please go check out her fabulous new blog, Empirical Question.

A Little Math

One of my courses this semester is Foundations of Geometry, which sounds like it would be easy, but so far has been pretty interesting, and has forced me to be more algebraically clever than usual. (Algebra, in a geometry class? Say it isn't so!)

When you have geometry in high school, it's usually Euclidean geometry, in two senses. The most important way in which it's Euclidean (in my view) is that it uses axioms and proofs to develop geometric ideas. Euclid totally invented this approach to math. Some people (like me) love this and other people (like Mosch) think it's a big waste of time. The secondary sense in which it's Euclidean is that it uses the specific axioms of Euclid. If you change one of Euclid's axioms (the parallel postulate), you can get some different interesting results.

My class is currently proceeding down two lines of work - some straight-up Euclidean stuff, usually presented as puzzles at the beginning of every class period, which we solve and then do some proofs about, and then "analytic" geometry.

Analytic geometry is where you say, "Why is Geometry the only part of math where we're still doing this weird Euclid-type stuff? Let's do everything with algebra and calculus instead!" And so it goes. Our textbook (a slender volume called "Modern Geometries: Non-Euclidean, Projective, and Discrete," by Michael Henle) uses this approach.

In analytic geometry, at least as presented in this course, you represent 2D shapes as coordinates in the complex plane. (This is basically like the regular cartesian plane where you have x, y coordinates, except that in this case the y axis represents the imaginary part of a complex number, so every point in the complex plane is actually just one number of the form x + iy.) Then you use regular math to prove stuff about them.

For instance, one thing you do a lot of in geometry is prove that things are congruent. "Congruent" basically means they are the same size and shape. Euclid's version of congruence is that two shapes are congruent if you can pick one up and lay it on the other and everything lines up. This makes sense, right? If you have two triangles on two pieces of paper, you can literally pick up one sheet, put it over the other, rotate it and move it around, and see if the triangles are the same or different.

In analytic geometry, you prove two things are congruent by proving that there is a one-to-one function (of an allowable type, like a rotation) that takes the set of points contained in one shape and transforms them to the set of points contained in the other shape. This is basically the same thing as what Euclid did, except that it's all algebra instead of being a physical maneuver.

These functions that change one set of points to another set of points are called "transformations" and the ones that Euclid would allow are basically rotation (where you turn something around), reflection (turning the piece of paper upside down, if you had the shapes on paper), and translation, which just means moving things up or down, side to side, or diagonally. If you think about how you'd line up shapes on two pieces of paper, those are the basic moves - you rotate the paper, flip it over, move it around, or some combination of those things. If you can change one shape into another by those types of maneuvers, then the two shapes are congruent.

So...that's about as far into analytic geometry as my class has gotten at this point. I could say more about it, but it would go into weirder math, so I'll refrain :-)