Friday, December 14, 2012

Mathematics and Programming...

Is knowledge of mathematics necessary – or even useful – for a programmer?  That's a long-standing debate, with bazillions of threads on usenet groups and blogs.  Evan Miller has some interesting ramblings on the topic.

Speaking strictly for myself, there have been only a few occasions when I needed any mathematics more advanced than simple algebra to do the programming work that I've done.  However...some of the most interesting and fun things I've done did involve some more advanced math.  The ones that come right to mind include: network traffic analysis and management (probability, statistics, sampling theory), teletype FSK modems (Fourier transforms and information theory), bond valuation (Monte Carlo statistical modeling), classic optic design, software servos (control optimization), astronomical and geographic calculations (can you spell spherical trigonometry?), algorithmic trading (big data analysis, pattern matching), and cryptography (really big numbers, modulo math, and trap functions).  For all of these programming jobs, I really could not have done the job without having learned some new mathematics.  Because I had only a high school education, all of these areas of math were new to me when I first encountered the need.  And for whatever reason, in each case I thought the need to learn these was a lot of fun.  Still, the programming that I've done that required this math forms only a small fraction of the total body of programming work I've done. 

I don't know where that puts me in this debate :-)

First Measurement of c...

In physics, c is the speed of light.  That's a very fast speed indeed, roughly 310,000 km/s (or 186,000 miles/s).  How and when was it first measured?

This is a piece of science history I'm very familiar with, but you may not be.  It's very clever how it was done – in 1676!  Dutch astronomer Ole Rømer made the measurements and Dutch mathemetician and astronomer Christaan Huygens did the arithmetic.  They came up with a value of 218,000 km/s (or 131,000 miles/s) – not bad at all considering the state of scientific measurement almost 500 years ago!

Earthquake Captured!

Early this morning (2:36:02 Pacific time, 10:36:02 UTC) there was a fairly large earthquake (6.3 magnitude) off the coast of northern Mexico.  The epicenter was 305 km (about 183 miles) SW of our home.  At that distance, of course we never felt a thing.  But...the USGS requested data from the seismograph they installed in our home, and the graph at right shows what it “saw”.

This is the first seismogram I've ever actually tried to read.  I found several articles about reading them; this was the most useful.  If I'm understanding this correctly, I'm seeing the P-waves reaching us at about 10:36:46 UTC, or 44 seconds after the quake actually occurred.  That works out to a speed of 305/44, or 6.93 km/s – fast for a P-wave.  Then I'm seeing the S-waves reaching us at about 10:37:17 UTC, or 75 seconds after the quake actually occurred.  That works out to a speed of 4.07 km/s – again fast for an S-wave.  From what I've been reading, these seismograms are very challenging to extract good information from – both the amplitude and the timing of them are highly dependent on the geologic structures and material types between the earthquake and the seismometer.  I think I'll leave that to the experts :-)

But I do think it's kind of cool to be able to see the earthquake on an instrument in my house!


Entitlement Reform...

Via reader, colleague, and friend Doug S.  This is gonna give my mom some ideas.  She'll have one big problem, though: how to get her list down to just four...


Rain!

In the last 24 hours, we've had 1.2 inches of rain.  Winter is here!  The graph at right shows UTC time, which is currently 8 hours later than our local time.  Most of the rain happened between 8 am and 2 pm local time yesterday.

And the forecast is for more rain, through Sunday.  Woo hoo!

The narcissus are in bloom in our yard – they seem to think it's springtime...