20080917

reviewing: "π - Faith in Chaos"

So two weekends ago when I visited Charleston, by 4th grade teacher and long friend Mrs. Fisher sent me an off-to-college card with a Best Buy gift card inside.  So Saturday night, Anastasia and I went on a shopping spree, and I bought - among other things - a Darren Aronofsky Collection with two movies: Requiem for a Dream (the movie which prompted me to buy this collection) and π.  I had seen Requiem for a Dream before; it's a little disturbing, but it's a great movie.  I'm sure that if we showed it in middle school, teenage drug use would decline.



But I had never seen π before, and the low price of the collection prompted me to buy the set.  Last night, I watched it with Karen and Sammy.  It was... okay.  I loved the concept; a mathematician obsessed with finding order in chaos, and convinced that the entire universe and everything in it can be perfectly described with mathematics.  Thus, he tackles one of the most chaotic systems in history: the stock market.



Already slight off his knocker, his attempts at ordering the stock market - and, later on, using similar patterns to find the true name of God - are unsuccessful, although he does come very close (there are hints that he actually does understand the patterns, but, even if this were so, he is unable to apply them to any real problems).  Between his existing mental problems, the pressure of sorting through the disorder, and the consistent attacks by organizations - both religious and corporate - leeching off of his talents for their own good eventually do him in.



So it was a pretty good movie... until I heard something wrong.  As soon as I heard it, the rest of the movie lost its reality and truth that normally makes movies really hit hard with me.  The issue was when he referred to the golden ratio (which, for the curious, is exactly equal to (1+sqrt(5))/2) as theta.  I've actually done lots of reading on the golden ratio and on sacred geometry in general, and I have never, ever seen it expressed as theta.  Traditionally, it is represented by the greek letter phi.



Instantly, I knew something was up.



He also used the Fibonacci sequence in the movie, and claimed that 233/144 approaches phi (which he again expressed as theta).  While it's true that the limit as t∞ of F(t)/F(t+1) does approach the golden ratio, 233/144 doesn't approach anything.  It's just 1.6180555555..., which is a static number very close to, but certainly not equal to, phi.  And it doesn't approach anything; it just is.



Anyway, I'm sure there were plenty more math errors.  One thing that particularly bothered me was that this brilliant number theorist who nearly predicts the future of the stock market was, at one point, pondering A=πr^2 and C=πd on the train, as if they held mythical truth.  As a matter of fact, wtf is this movie even called π?  It had nothing to do with circles!  He did find some golden spirals, but then the movie should be called Φ, not π.  I dunno.  The title confused me by the end.  Those basic area and circumference equations were the only real reference to π, except of its basic nature as an irrational number.



Anyway, if you watch it, let me know what you think!  Despite my mathematical distress, it was, overall, a pretty okay movie worth watching once or twice just so you can say you did.  And, in a brilliant stroke of coolness, it's in black and white!

20080915

can i switch to linux?

Yes, you can!

I'm a pretty big advocate of open source software (OSS) and Linux, so I figure I'll start adding it to my list of bloggable topics.

I stumbled upon this article today in the Coffee Room at LinuxForums.org.  I think it's a particularly great pro-Linux article because the writer isn't (as I understand it) a particularly tech-savvy guy.  He's certainly not my grand mother, and he knows his way around a computer, but what I'm saying is that he probably can't write something in C.

And the best part is, that okay!  Linux works great for him, and not only is his work more streamlined, error-free, productive, and free, but he also likes the mentality that comes with using nearly all OSS, developed by software hackers around the world.  He likes that they're driven by the urge to want to create a great computer system instead of by market forces.

So anyway, if you're still using Windows, give the article a quick browsing over.  You never know; installing Linux may be the next best thing to happen to your computer.

20080914

$ man punching

How do you throw a proper punch?  What's all this internal energy stuff they talk about in martial arts?  Here's the first half or so of an article I'm writing to explain.

  Directing Energy in Your Martial Arts
  ----       Matthew Daniels       ---- 
|=======================================|

If there is one thing that seems to frighten and temporarily alienate newcomers to the martial arts, it seems to be noise.  The kiai we often see in the Japanese arts is a prime example.  Often, a new student will feel out of place when asked to kiai, and may sometimes refuse to kiai for weeks into their training.  Even among those who do not refuse, it is not uncommon for the more arrogant students to snicker behind their instructor's back at the idea of a kiai.

But for the advanced student, the kiai is no longer only a noise; in fact, one might eventually feel that the kiai is not a noise at all, but happens to produce some involuntary sound as a consequence of an energetic explosion which drives the power behind their motions.

When a student begins to realize that a kiai is, indeed, not a noise at all, he has probably started to understand the importance of energy management in his chosen art.

I - and my instructors, before me - will sometimes ask students where their punch begins and ends.  To a white belt, this may seem a nonsensical question; the fist, of course, travels from the ribs to the desired target (the opponent's solar plexus, for instance).

Obviously, this is not the answer that an instructor is looking for.  The punch should start not from the ribs, but from the ground.  For some students, this will initially seem confusing, but it is certainly true.  The energy that drives your fist should start from the heel.

As a punch is executed, the heel should push against the ground.  Imagine that the path of your body between the heel and the knuckles is a large canoe resting against a riverbank (the ground).  From a standstill, can you simply begin to paddle and expect the canoe to move?

Well... actually, you can.  And sometimes, there's nothing wrong with this.  This is called punching from the shoulder.  But would it not be faster and more powerful to push off of from a sturdy riverbank, getting your momentum going before you begin to paddle?  This is called punching from the heel.

A convenient way to practice energy concepts like this one is to visualize the energy transferring through your body in real time, as you're punching.  The Chinese traditionally believe in the concept of chi, an energy-like substance which permeates the body and the world, providing a sort of life-force.  Fully appreciating the concepts of chi and the Chinese philosophies behind the different energies at work in the cosmos and inside the human body is far, far beyond the scope of this article.  For now, to illustrate my ideas about energy in your martial art, we will make the gross assumption that chi is a homogeneous, energetic fluid that can be directed and harnessed by the body.

So, in the previous example, can we draw energy like this from the ground?  Yes, we can; and you should, if you wish to generate a respectable amount of power in your attack.  If you visualize the energy transfers at work in your body, it can help you attain this energy channeling and put your whole body in sync with your attack.

Let's run a basic trace of this energy as it travels from the Earth and out of your fist.  For our purposes, the Earth is not moving; it provides an eternal riverbank to shove off of, and is a limitless source of energy.  Therefore, when appropriate, we should always try to use it to our advantage.  To do this effectively, we must root ourselves into the ground; this is one application of your stance training.  Try to imagine your feet reaching down into the ground, locking themselves in place by becoming part of the Earth.  These roots will help ou soak up the energy that will drive your fist.

As you shove off from the heel (without losing your root), the energy will being to travel up the legs.  As it reaches the waist, two things should happen simultaneously.  The energy should being to torque the waist and hips.  It turn, the waist and hips will accelerate the energy up the body and into the spine.

As the energy travels up the spine, a similar reaction will take place.  The energy will excite the spine, causing a wave through it and up the back.  Your chi should ride this wave up your body (along the fire path), and it will be thrown out of the spine and into the arm.  

20080903

perlmwdtut(0)


A tutorial for those new to Perl but not to Programming: Part 0

Introduction
When you don't have much to blog about, you start trying to think about things you already know.  Well... I know Perl, and I have some friends who would like to learn it, or at least be comfortable with it.  I'll present this tutorial in progressively more advanced parts, showingcasing a little at a time the high and low points of Perl and how to use it.

What is Perl?
Perl is lots of things to lots of people, but to me - and many other people - it's a swiss army knife language (if you will).  When you pull a bunch of random data out of an excel spreadsheet and you need to do some stuff with it real quick (like, maybe, remove invalid email addresses and then send a mass message), you don't compile a huge C application and you don't need to power up your Java VM.  You just write a few lines of Perl.

Perl has had other purposes, too.  Sometimes referred to as the glue that holds the web together, Perl has been used extensively throughout the years in CGI scripting, although it is my believe (but not quotable experience) that it is falling out of use with the evolution of the internet into a far mor
e interactive and m
ultimedia-oriented experience... although I also know that there is still plenty, plenty, plenty of Perl out there.

Perl is also great for just hacking things together and making things work.  If you had a round peg, a square hole, and a pocketknife, Perl would be that pocketknife.  Observe this comic from xkcd.com (released under Creative Commons; kudos to Randall Munroe for his amazing webcomic):

(Click for larger view.)

Anyway, that's about what Perl is.

Jumping Right Into It
No tutorial would be complete without...

#!/usr/bin/perl
use warnings;
use strict;
print "Hello, world!";

There's our familiar Hello, world! program.  The first three lines are unnecessary, generally.  You could write the program as simply print "Hello, world!";, execute perl and it would work just fine.  But if you're curious, here's what those first lines are all about.

Line 1: #!/usr/bin/perl

This line is often called a shebang, and is common to many Unix scripts.  In fact, if you go find a bash script on your computer, chances are that the first line is something like #!/bin/sh.  That's because when you run chmod +x script.pl to turn your script into an executable file, it looks as that first line to determine what needs to be called to run it.

Of course, if you're running Windows, none of this will make any sense.  If, for some reason, you are in a Windows system, this first line won't help you out much.  Just run your scripts using the perl syntax and everything will be okay.  Depending on your Perl interpreter (I know that ActivePerl works this way), you could also just double-click on your script in Explorer and it should run.  Be wary that if you're script isn't actually doing anything functional - for example, if it's just the Hello, World! script above - then you probably won't see anything happen besides a terminal appear for a few milliseconds and disappear again, because the terminal's process will die along with the Perl script.

But be warned that if you're running Windows, you probably won't be able to use a lot of the things in this tutorial.  Go use Visual Basic or something.

Anyway...

Line 2/3: use warnings; use strict;
The use of the warnings module alerts us when we do silly things.  It won't stop our program from running, but it might let me know if, say, I declared a variable I never used.  Sounds stupid?  Not really.  Perl is extremely nice to its user and tries to do exactly as it is told... which can be a problem.  Say I have the variable $rest = 5; and then later on I mistype it: for ($x=0; $x<$breast; $x++)....  Normally, an interpreter/compiler would catch this Freudian slip (perhaps you had some inappropriate browser windows open while coding), but Perl will do its best to do exactly as you say, so it'll instantiate $breast for you with the default value of 0.  This will not function correctly.  Using warnings will probably give you a little wake up call if you knew this variable was supposed to be in use.  This is only an example, though; the warnings module is extensive and highly useful for debugging.  The use strict flag makes you declare all variables with a some sort of scope modifier, which we'll talk about later, but it is important to note that, unlike many languages, a variable declared in any scope will, by default, become global.  This often causes trouble if not handled with care.

If you can't figure out line 4, you probably shouldn't be reading a tutorial for people who already have some programming experience.  In fact, you should probably understand line 4 whether you have programming experience or not.

Variables
Watch this:

$variable = 5;
$variable = "Hello, Janet!";
$variable = \$referenced_var
$variable = \&referenced_subroutie
$variable = -234.3
$variable = 0x0000003f;
$variable = "Some other data type!";
print $variable; # prints out "Some other data type!"... and yes, this is a valid program.
# By the way, this is a comment!

Perl has a what's called a dynamic typing system.  Several other languages have this as well (Ruby and Python, to name two) but it isn't typical of what you see in C, C++, or Java.  Whereas in those languages you must declare a variable's data type (either beforehand or on-the-fly), Perl variables can hold any type of data, any time... the only restriction is on memory (which, these days, is considerable).

Note: Perl 6 (which will be similar but also considerably different from Perl 5 and earlier) will have an exciting new hybrid typing system which allows you to assign a value if you want to.  For example, you could write the traditional, perlish: $variable = 5;, but you can also write the sometimes useful and more C-ish: int $variable = 5;, which will treat $variable just like C would.

More to come later!

20080902

aesthetic astronomy

My old notes were hard to read?  Well, I made them into a nice PDF with Lyx.  Here's the result.  Point your browser to:people.clemson.edu/~mdaniel/AstrNotes.pdf.

I'm working on a way to embed the pdf right here. Open to suggestions.

-Matthew

20080829

conversions... not just for chemistry anymore.

So, I think we're all pretty savvy on comprehending the word, but just in case, you should go to en.wikipedia.org/wiki/Conversion.  It has a lot of different meanings.

One of the most inconvenient conversion types, in my opinion, is religious conversion.  Frankly, I'm not a big religious person anyway, but it still angers me when I see people trying to convert me or others.  I feel like it conveys several negative things: firstly, the converter can't respect the other person's beliefs, secondly, the converter is trying to bring someone into their sect through persuasion instead of divine calling, and, finally, if the person does convert, it shows a lack of faith in the first place which will probably be carried over to the new religion.

Is it possible that frequent conversion dilutes religion?  I think it's quite possible.  I'm not saying that all people who convert are weak-faithed, and I'm not saying that all converters have malicious intent, but I think that it's a poor practice in theory and in actuality.

I have a friend who recently got really upset about a man who tried to convert him.  I'm okay with that, but I was not okay with his generalization that Christians are either avid converters or are supporters of fanatics who practice converting others.  This was my response:

If you don't want to insult all christians, you probably shouldn't start your note off with:

"Dear Christians, This is going to piss you off as much as you anger me."

Not really a friendly note. And as for your comparison of other religions trying to convert you... it's hardly an argument. According to Wikipedia, the largest religious but non-Christian sect in the US is Judaism at... 1.7% of US residents. Compare this to 78.5% of people who are Christian... so there are a little more than 46 times as many Christians as Jews. The numbers for other religions are ridiculously small. So does it surprise you that of this isolate incident where you met a religious radical, he was Christian? This doesn't mean that Christianity is more radical or more conversion-hungry than other religions (although I don't want to imply that the others are), but it does mean that if you were to meet a radical conversionist, or any person for that matter, chances are that they're Christian.

Perhaps your anger stems from your own religious indecisiveness, eh?

So yeah.  That's about how I feel.  From a neutral standpoint, I think it is pretty easy to understand that for even the most fervent and convinced believer in any given faith, another faith will have a supporter so equally confident in his god(s) that believing any one person is a worthless exercise in naivety; faith should be an solo exploration of your own mind and soul. 

Anyway, comments and discussion are appreciated.

20080828

Science and Technology in Society

Science and Technology in Society, or STS 101, is a philosophical course in the effects of past, present, and future technologies in culture and humanity and how to deal with them.  These are my first three classes of notes, appearing in ascending chronological order.

STS Notes
August 22, 2008
===============

Read the eReserves articles.

ORIGINS AND THEMES OF STS
-------------------------------------------------------
http://people.clemson.edu/~oberdat/Additional_Lectures/Origins_and_Themes_of_STS.html
=======================================================

Pop culture in 1960s:
- Civil Rights Movement
- Anti-war Movement
- Environmental Movement
Three Influential Books
- Silent Spring: Opens with a spring day which is silent; birdless.  Explores the dangers of DDT effects on eggs.
- The Limits to Growth: Created concern about resource usage and the limits of our non-renewable resources.
- Unsafe at Any Speed: About safety hazards in American automobiles; primarily about the Chevy Corvair.  Had indep. rear suspension, and rollovers were huge.  Created a concern about automobile safety.

Another Book
- The Structure of Scientific Revolutions: Most influential intellectual book of the 20th Century.  Postulated that social influences affected the evidence that scientists find.  
Because scientists must work in social groups to achieve significant results, and because these groups are incompetition, science is strongly influenced by social dimensions.

THEMES OF STS

STS explores the causal relationships between scientific advances, technoloical developments, and society.

There are advantages to being in groups (mutual security) and groups in society fight for these advantages.

The printing press took us from a pre-literal society to a literal one.

Martin Luther required people to read their own bibles to have a connection with god.  This forced people to become literate and influenced society at large.

The Royal Society created the first set of guidelines for what made an experimenter scientifically legitimate.  There had to be no money at stake, he had to have training, and had to be a gentleman, for example.  They also created a protocol for reporting experiments - such that it can be reproduced. (The Requirement of Replicability).

A SECOND THEME

Sometimes, the purpose of technology is for one group to control another.  With McCormick's reaper, it sucked, but it forced workers to accept lower pay rather than be replaced for no pay.




STS AND THE HUMANITIES
======================
   Mon Aug 25, 2008
======================

--- Humanity ---
A viewpoint from the humanities is a viewpoint which assumes that "Man is the measure of all things."  This can be seen in Sacred Geometry; granted, the assumption that man is the measure of all things must be countered with the possibility that all things follow the same universal measurement of man.

What makes us human?  Other organisms use crude technology.  What is unique about human is the value judgements we make about our actions and works.  Our idea of ourselves is one of the features that couples with value judgements.  The deconstruction of the geocentric theory is an example of a major shift in self-realization.

--- Progress ---
The Enlightenment was not just a change in healthy habits and scholarship; it introduced a major shift in freedoms and perception of man's relationship with culture and society.  Along with the industrial revolution, it also brought about a change in the cultural requirements for ownership of (unnecessary) goods.

The creation of weapons through technology created a school of thought which refuses to accept further progress for the safety of humanity.  Today, this school of thought still exists alongside the philosophy that progress can continue with control and safety.



STS - THE NATURE OF TECHNOLOGY
==============================

We don't have enough experience to have a long term view.

Before 1968: Japan's products were considered "cheap junk", much like Chinese products are today.  They started exporting these products as an economic recovery after WWII.

1968: The Honda Accord.  It changed the foreign view of Japanese exports because of its high quality compared to other automobiles.

------------------------------------
Chatper 1 - The Nature of Technology
------------------------------------

Technology is not simply "applied science".  There isn't a simply way to define technology, but all technologies share certain characteristics.  

The development of technology in the mid second millenium underwent a tranformation from random gadgets to a way to achieve salvation or englightenment.

Technology is a system of knowledge manifested in physical objects or organizational forms for the attainment of specific goals.

> "Knowledge" must be true in this definition... c'est a dire, "the earth is flat" was never "knowledge".
> "Knowledge" must be scientifically justified through a replicable observation.  This is the only way to justify a knowledge.  This includes word-of-mouth, personal experience, common sense, dreams, et cetera... they are not justification.

STS begins with common sense beliefs (widely accepted truisms based on personal experience but never subjected to careful scrutiny).  These are often universal generalizations (of the form All X are Y).