Holy Poop!

June 28th, 2008

Math Education: An Inconvenient Truth

June 20th, 2008

I’ve been sitting on this post for a solid two months. I left it out of my baffle-clearing the other day because these thoughts are something I want to keep in text rather than being lost to the ether of ideas.

I am not a teacher, nor a parent of children attempting to learn math in a public school. I did, however, learn math in a public school. In addition (obvious pun), I am a geek who loves numbers and enjoys not needing a calculator for tipping, knowing how much something costs with sales tax, doing my own taxes, etc.

I also annually celebrate π day as well as Almost-Pi day (22/7), which is just about a month away.

I happened upon a youtube video the other day (embedded below) and found its topic irksome [the video itself is great]. The idea that math pedagogy this country is trending toward what’s “easier” and “fun” for “all students” will never create the next generation of engineers, accountants, computer scientists and other nerdy and non-nerdy professions who use even basic math skills on a daily basis. We need kids to struggle a little to find an answer, not learn shortcuts. The result is certainly important, but being able to readily produce results to other similar problems quickly and understand why you got the consequential result is essential.

Being able to quickly do 2- and 3-digit mathematics is a skill that my current generation arguably lost with the plenitude of calculators being produced. (Curse you Texas Instruments!) Some will disagree, but I think math should actually be a challenge that extends beyond simple addition and subtraction. By the end of 5th grade EVERY student should be able to do long division without hesitation or n-digit multiplication on paper of n+3 lines without fear of “OMG the numbers are so big, I’ll never be able to do it!”. True, both of these things still rely on simple operations adding/subtracting to a final value, but you have to know why that’s so, and know that your method will work reliably every time to attack problems with larger and larger numbers without trepidation.

I also don’t think it should be a tough thing to expect a 5th grader to do long division with decimal points, but this is coming from the guy who previously used prime number theory to determine why his php rand() function call was returning the number 24 somewhere around a quarter of the time it was run. Details.

Anyway, I was appalled. The adage of “I’m going to be an X, why would I ever need to know math” is a fallacious argument at best, and at worst, a total cop-out for the lazy. How about grocery shopping? Living securely on a budget? Buying a house and not getting screwed on your mortgage? Planning for retirement? Investing? Do you not need math for those things? [I suppose you can pay someone to advise you, but then how would you know when they are ripping you off?]

Even if you reach for a calculator, you still need to understand what you’re calculating! Do you plan to carry a calculator with you everywhere?

From the video, one of the methods is TERC’s reasoning method, which seems to suggest that if kids feel their way through a math problem, they’ll get smarter. The concept is based on talking out the simpler pieces of a difficult problem which you’ve seen before and using those simpler problems to build a solution to a harder one. That sounds familiar, but it isn’t based on a repetitive set of steps, rather it’s based on the pre-existing experiences and knowledge of the student, which will vary from student to student. “Well, I know that 10 x 20 is 200, so 13 x 19 (247) must be about 200.” (Well, kinda, but what about 13456 x 19344.32? Is that as reason-able? What if you thought, for some reason, that 10 x 20 was 100? What happens to the reliability of your solution then?)

Reasoning is actually a really great technique for troubleshooting, attacking a complicated design issue, breaking out of prison with only a paperclip, duct tape and a screwdriver, etc. It is not, however, a smart way to teach arithmetic. You need to understand the fundamentals before you can use them to attack harder problems like, say, designing the next generation of fuel-efficient vehicles, or figuring out how to put a colony on Mars, or Warp Drive. With teaching methods like this, who is going to figure out Warp Drive?!?!

I know that’s not really important as the answer is, as we all know, Zephram Cochrane, and he was probably home-schooled anyway.

Even worse, however, is their attitude about algorithmic techniques (e.g. traditional step-wise multiplication and long division):

The mathematical payoff is not worth the cost, particularly because quotients can be found quickly and accurately with a calculator.

With. A. Calculator.

*throws a chair*

Seriously? A math book that advocates that students should start relying on a calculator in grade school? Are you kidding me??

*throws a second, larger chair*

Way to tell kids their way too d–mn stupid to learn how to divide! They even have entire chapters dedicated to calculator use rather than entire chapters dedicated to, say, learning about how to do the problem yourself. Catering to the lowest common denominator (a concept which you probably won’t learn about from that textbook) is the best way to get smart people to stop trying, to disengage the interested few for the sake of the dumbest one.

The narrator’s notes on the major problems of today’s high school graduates’ math skills from her personal experience of going back to college are telling:

  1. An inability to work alone to solve problems without checking in with other people. (Apparently TERC’s method suggests you discuss your thought process with others… what if they ALL think 10 x 20 = 100 ???)
  2. A lack of fluency in the symbolic language of math or an ability to think logically.
  3. Lack of mastery and confidence with basic math skills (trig, algebra and arithmetic)
  4. Complete dependence on a calculator

All of these are frightening, but to me, someone who considers himself to be a somewhat critical thinker, the scariest is “an ability to think logically”. How on earth are we supposed to expect a person to make a difficult decision on their own without a simple understanding of logic? Not even “if a and b then c”, but just the basic concept of causality which is utterly crucial to critical thought.

Why should these people vote??? (Ok… that’s a different post entirely.)

Every high school math teacher I had would be appalled that dependence on a calculator is now a common ailment of college students. Almost never was I allowed to use, let alone bring, a calculator to math class in high school. The only exception to that was that we used TI-8x calculators for some graphing examples in pre-calculus and calculus for a month or so. (Those of us who learned TI’s version of BASIC to write neat procedural programs were also given some lenience, but that’s because we already understood the math needed to write said programs. Admittedly, we were writing games…)

The TERC method also fails to introduce the simple concept of an algorithm at an early age. There is no concept of “finite steps” in a method requiring you to break a problem down into simpler pieces that you have to reason. Algorithm-based arithmetic is simple, straight-forward, and it always works.

So here’s the crux of what’s bothering me: By teaching someone the basic fundamentals and then the easier/more creative techniques, a few things happen:

  1. A person appreciates the techniques
  2. A person might see other better/faster/more productive techniques (read: innovate)
  3. A person can master a subject and can teach others
  4. Goto 1

Every single sports coach will tell you the same thing - master the fundamentals and you can be good. If you asked an athlete to go out onto the field and reason their way through the game, what would happen? Imagine tennis. Not so bad. Now imagine football. Rugby.

And, for the sake of further argument - Any student who wants to be a professional athlete and says they don’t need to know math has never seen the contracts those athletes sign. I passed Differential Equations (admittedly by the skin of my teeth) and I don’t understand how a modern baseball player gets paid. Seriously, professional athletes should be forced to have math degrees.

Well, from a school that’s actually going to teach math, anyway. My kids certainly won’t go to a school that teaches them how to “feel their numbers”.

*puts both chairs back*

geek life, math

Set Up WebDAV for iCal Sharing on ubuntu 8.04

May 31st, 2008

Enabling WebDAV for iCal publishing/sharing is fairly straightforward:

0. Install apache2 (if it’s not already installed):

sudo apt-get install apache2

1. Create a WebDAV directory in your DocumentRoot with the proper permissions:

mkdir -p /var/www/webdav
chmod -R 777 /var/www/webdav

2. Edit Apache2’s dav_fs.conf file:

cd /etc/apache2/mods-available
sudo vi dav_fs.conf

DAVLockDB /var/lock/apache2/DAVLock

<Directory “/var/www/webdav”>
DAV On
DAVMinTimeout 600
DAVDepthInfinity On

AllowOverride AuthConfig
AuthName “DAV Restricted”
AuthType Basic
AuthUserFile /etc/apache2/.htaccess

Require valid-user
</Directory>

3. Create symlinks to the proper DAV module files:
(Some of these will already exist. Leave them alone.)

cd ../mods-enabled
sudo ln -s ../mods-available/dav.load
sudo ln -s ../mods-available/dav_fs.conf
sudo ln -s ../mods-available/dav_fs.load

4. Create the ‘AuthUserFile’ indicated in step 2:

sudo htpasswd -m -c /etc/httpd/.htaccess webcal

5. Restart apache:

sudo /etc/init.d/apache2 restart

6. Publish your iCal!

Your url for publishing should now look like http://mywebhost/webdav/iCal/. Enjoy!

Based on a guide for Fedora at millan.info.

*nix, geek life, productivity

Spread Firefox - Download Day 2008

May 29th, 2008

iTunes Playlist Export

May 23rd, 2008

One of my long-time gripes with iTunes is that the only ways to export its playlists are to text and xml which aren’t particularly useful by themselves. I’ve been doing more processor- and memory-intensive work on my laptop lately, and wish to augment said work with tunes whilst also not killing my machine. iTunes isn’t exactly a RAM-lightweight, so in situations like this I tend to fire up the ever-trusty install of WinAmp. Recently, however, I’ve been listening to the same massive playlist over and over again, and re-creating it in WinAmp would be a bit of a pain.

Lucky for me, someone else thought that automating this would be a good idea. Enter iTunes Export, which does exactly what it says it does, quickly and to several useful formats. As great single-purpose software does, it just plain works.

   

There are four screens, each of which are, as you can see, pretty straightforward. Screen 3 is where all of the fun options are. I didn’t need to re-copy all of my music to a new location, but I can see how that would be useful if you wanted to, say, burn a DVD of a large playlist for someone who doesn’t have iTunes. For me, the M3U export without copy was perfect, and I haven’t opened iTunes in days.

geek life, lifehacks, software notes

Clearing the Baffles (II)

May 20th, 2008

Three months ago, I “cleared the blogging baffles” and actually found it fairly cathartic. Based on that, I set up a task reminder to remind me to do just that every three months on the 20th.

Here are the posts sitting in my drafts folder that I’ll likely never get to finishing / cleaning / etc.:

  • Email Link at Right (tags: how-to )
  • 5 Geek Decisions I Wish I’d Made Differently (tags: uncategorized )

*delete*

blogging, productivity

Prime Time

May 19th, 2008

Every so often I go back through posts on my old blog, which is securely archived for my own random access. [There are some fairly good posts on it about technology that wouldn't make sense to re-post here, but are still a good reference for me.] I read one the other day that made me chuckle with geekish delight as I read:

1,000,003 is the smallest seven-digit prime number I could think of, which, being completely impossible to wholly divide from, should take care of the repetitive quotes.

Backstory: I used to have a random quote generator made up of stupid phrases I’d collected over time. Some were output from fortune, some from movies or tv shows, and others were stupid inside jokes. There were far too many Family Guy references, IIRC. It played well to the quasi-personal, friends-oriented content I was producing at the time. Each quote was an entry in a MySQL table with a primary key which I used for retrieval based on this code:

srand((double)microtime()*1000000);
$tq_query = mysql_query("select count(qid) from quotes")
   or die ('Invalid Query: ' . mysql_error());
$getQuote = sprintf("select quote from quotes where qid='%s';",
   addslashes(rand(1, mysql_result($tq_query,0)-1)));
$gq_result = mysql_query($getQuote)
   or die ('Invalid Query: ' . mysql_error());
echo mysql_result($gq_result,0);

Aside: As I copy and paste this now, I wonder why I didn’t just do something like “SELECT quote FROM quotes ORDER BY rand() LIMIT 1″, putting the responsibility for randomness on MySQL’s already set up random seed? I may have been over-prioritizing database robustness on a site that never got more than a few hundred hits per day.

My girlfriend at the time (now my wife) noticed that the quotes didn’t actually seem that random and, in fact, the same few kept repeating themselves over and over again. I had noticed the same thing, but never felt that motivated to investigate. [She was, I think, between classes and it bothered her… so who am I to argue?]

After reading a bunch of threads on the PHP website, I reasoned that the problem was that I was seeding the random stack with an even number. Due to silly rounding and a padding value, the number most commonly returned out of this function was 24, which is incredibly un-prime. [Even cooler to the numbers nerd inside of me, 24 is the largest number divisible by all numbers less than its square root.] So.. following good number theory, I changed the seed value to 1000003, which is prime, and in few other ways special.

In additional retrospect, saying “that I could think of” was quite silly… The list of smallest n-digit primes is readily available, so this shouldn’t require much thought at all. If memory serves, I don’t believe I looked this up, and really, how hard should it be for someone who finds math fun to know that 100001 and 100002 aren’t prime [11 and 2 are lowest divisors, respectively]?

math

Cygwin Prompt Here (for tcsh)

May 17th, 2008

In a post I can no longer find, Scott Hanselman blogged about a registry entry to add a “Command Prompt Here” item to Windows’ right-click context menu. This has, many times, saved me almost 30 seconds of opening cmd.exe and typing out a ridiculous CD statement. Since then, however, I’ve found myself using Cygwin a lot more than cmd as it gives me a lot more power in an environment with which I’m much more familiar. (Some things are kinda wonky [pathnames, for instance] but it’s more user-friendly to me, and I can’t quite get into PowerShell like some of my more Windows-oriented friends.)

Because of my Cygwin-love, I’ve found myself using the Command Prompt Here context-menu item, and then immediately entering tcsh and doing what needs to be done. I can’, then, double Ctrl-D my way out of the window since cmd has no clue what Ctrl-D is. It’s annoying, but it means I have to take the extra two seconds to type ‘exit’. So, throwing any concept of cost/benefit out the window [though, those four seconds probably add up to like... 30 minutes of lost productivity a year], I investigated how to do the same thing for Cygwin.

Somebody done figured this out already, so all that was left was for me to have it run tcsh instead of bash, and I was all set. This was painfully simple. Here’s the registry script I’m using:

REGEDIT4
[HKEY_CLASSES_ROOT\Directory\shell\TcshHere]
@=”&Cygwin Prompt Here”

[HKEY_CLASSES_ROOT\Directory\shell\TcshHere\command]
@=”c:\\cygwin\\bin\\bash.exe –login -c \”cd ‘%1′ ; exec /bin/tcsh\”"

[HKEY_CLASSES_ROOT\Drive\shell\TcshHere]
@=”&Cygwin Prompt Here”

[HKEY_CLASSES_ROOT\Drive\shell\TcshHere\command]
@=”c:\\cygwin\\bin\\bash.exe –login -c \”cd ‘%1′ ; exec /bin/tcsh\”"

*nix, apple, code, how-to, lifehacks, management, productivity, software notes, windows

The Dark Side

April 30th, 2008

Heh.

geek life

Command Line Upgrade to 8.04 Hardy Heron

April 25th, 2008

Ubuntu 8.04 is the second LTS release of the incredibly popular Linux distro. Inspired, I did a fresh install of my desktop at work and found the process smooth and about as simple as an XP install, (though admittedly about 10 minutes faster!), and am quite happy with the results.

Then, I thought it might be fun to see if my svn box in the basement would survive a command-line upgrade again (it worked for 7.04 to 7.10), so why not?

The process is fairly straightforward. As root (or via sudo):

  1. sed -e 's/\gutsy/hardy/g' -i /etc/apt/sources.list
  2. apt-get update
  3. apt-get dist-upgrade
  4. … wait …
  5. shutdown -r now

During my install this morning, and the corresponding install of several packages not included by default, I found that the default repository [us.archive.ubuntu.com] is really slow right now. Synaptic Package Manager has this nifty “find the best mirror” tool, and lo and behold, the best option for me is in Switzerland [mirror.switch.ch], so rather than just replace ‘gutsy’ with ‘hardy’, I updated my sources.list to match the fresh one at work.

Then I saw this:

947 upgraded, 194 newly installed, 67 to remove and 0 not upgraded.
Need to get 763MB of archives.
After unpacking 473MB of additional disk space will be used.
Do you want to continue [Y/n]?

Well, yeah, of course… but wow, that’s some update! Undaunted, I pressed on. Sure enough, it really was that simple. The upgrade on my Dual-PIII 667 (yeah, that’s right, PIII baby!) workstation took just over 4 hours to complete, according to my history, so not too shabby.

Grab ubuntu 8.04 directly from the ubuntu.com web site, or from one of many mirrors.

*nix