Measure 66

It seems that every day there’s a new letter in the newspaper talking about how the “have nots” voted to gouge the “haves” in order to pay for state services.  So, is that actually true?

I took a look at the county by county results and compared that with the expected impact on the voters of each county.

M66_TaxCut

There is a very weak, basically insignificant correlation between the percentage of each county that voted for 66 and the percentage that will see a tax cut.  Not much to see here.

Looking at voting results versus the percent of each county’s population that is seeing their taxes go up was more interesting.

M66TaxIncrease

Here, the correlation is much stronger, but not in the direction the “No on 66” crowd would have you believe.

It could be that the poorer people in wealthier counties simply voted overwhelmingly to gouge their neighbors, which is certainly possible, in which case the “no on 66” crowd would have a point.  We won’t know for sure unless some detailed polling is done.

Reform Physics?

There was a movement back in the 90’s to stop teaching rigorous mathematics and replace it with group work, calculators, and guesswork, with the idea being that students would learn the material better if they discovered it on their own (with some guidance from the instructor).  It sounds like a good idea at first, but the result is students who can’t do even basic math.  They may have some “feeling” about division, but don’t you dare ask them to actually do it.  This approach drags down the people who would ordinarily be high achievers by covering less material less rigorously than a traditional course.  The emphasis on group work results in what is essentially an exercise in effective cheating.  Motivated students do the work while the rest of the group writes down answers, learning nothing in the process.  Motivated students who somehow manage to get paired with other motivated students wind up splitting up the workload, so they end up doing less and having a weaker grasp of the material.

Continue reading Reform Physics?

Quick and dirty numerical ODE solver

I gave my APS talk this morning and spent the rest of the day working on my thesis.  I was uploading the latest version tonight (almost done!) when I noticed some old python code I had written to numerically solve first order ODEs using Euler’s method.

Perhaps this is an indication that I should get to work on the ODE solver portion of the C# code I’ve been (not) working on.

More Matrices (and a site update)

I’ve added a function to determine the trace of a matrix, since even though it doesn’t come up that often, it does come up occasionally, and it only takes about thirty seconds to code.

		public static double trace(double[,] matrix)
		{
			int n = Convert.ToInt32(Math.Sqrt(matrix.Length));
			double trace = 0;
			for(int i = 0; i< n; i++)
				trace += matrix[i,i];
			return trace;
		}

You may be wondering about the square root part. C#’s Length function returns the total number of elements in a matrix.  Since we’re passing in a square matrix, taking the square root gives the number of rows/columns.  At some point I should add code to check that the matrix is indeed square and error out gracefully if it isn’t.

I’ve also upgraded the site to Wordpress 2.7 and changed the theme to something nice and simple.  The 2.7 migration shouldn’t result in any appearance or functionality changes, but the admin section is much nicer now.

C# Physics Library Update

I’ve continued working on the C# code and currently have the ability to do a couple types of approximations/interpolations and find matrix determinants quickly.

I think the next thing I’m going to work on is finding the matrix inverses (probably via the Faddeev-Leverrier method) so I can find eigenvalues and eigenvectors.

There are, of course, countless libraries and software packages that could do these types of calculations me, and in practice I would in all likelihood use them.  Nonetheless, I think it’s useful to understand how those libraries work and thus, perhaps, when it is appropriate to use them as opposed to writing my own specialized code.  And of course, doing this is just plain fun.

Computational Fun

In an effort to learn more C#, entertain myself, and prepare for a future sitting behind a computer doing simulations (assuming I get into graduate school), I started working on a C# library to help out with doing (discrete) numerical problems in physics.  The current plan is to have it do

  • Physical constants
  • Function approximation
  • Derivatives
  • Integrals
  • ODEs
  • PDEs
  • Matrices (eigenvalue problems)
  • Spectral analysis (fast fourier transforms, etc)

So far, I’ve mostly completed the physical constants bit, since that’s trivial and requires no real effort, and have started working on the approximation code, which is necessary to properly handle some of the latter things (e.g. determining slope at boundaries).

The basic idea is to make something that would cut down on the time required to write quick and dirty simulations.  It’s not intended to be the fastest or most elegant code, but simply something that works and gives correct answers.

Wordpress again

I’m switching back to Wordpress again, for good this time.  Maybe someday I’ll post something here.