20080924

newsflash: e&m receives several beatings in its old age


By beatings, of course, I mean hits.  And by hits, of course, I mean pageloads.
And by E&M, I mean my mindmap posts I made quite a while ago.  Remember those? This one was of a Dr. Mills lecture (and is the only reason I got a 5 on E&M), and this one was on a lecture by Mr. Newton.

So a while ago, I installed this hit counter widget on my page.  Don't go looking for it outside of the source html; it's just some embedded code.  But it lets me go to statcounter.com and see how many hits I get everyday from where in the world. It's pretty neat, actually!  I've had hits from all over the world:


So yeah!  That's pretty cool.  And the thing is, all these foreign people are coming off of google searches on E&M topics.  In fact, as of this posting, I'm the 5th result if you google "lectures about current resistance".  Try it and tell me if it still works!

Anyway, so I suppose if I want more hits, I should write more on E&M.  But I don't really feel like it, you know?

More to come.  Hold tight.  Comment.  And if you'd like to help me expand my userbase, you should link, blog about, digg, or otherwise propogate links to my blog.  It'll be fun!

Oh, and as of now, I've decided to end all comments of mine with a series of lucky numbers (see the comments on the immediately previous blog entry to this one to know why).  So if you see that convention somewhere, just know that it was my idea.


20080922

the truth about not-charleston

I had two significant online conversations last night (significant meaning I cared and they were longer than 10 lines): one with Araba, and one with Jackson.  Both were on the same subject.


I told Araba that "Mrs. Dobson is haunting me".  If you weren't in AP French or AP Fizz, you wouldn't understand. She would come in the room with a visitor and point to everyone around the room: "Arielle is going to Brown, Miguel is going to Stanford, Sally's going to Princeton, Araba's off to Harvard, Matthew's..., Sherwin's going to Yale..."


It was like that every fucking time.  She could not deal with the fact that I was going to Clemson.  I don't know why; I wasn't in the top ten or anything.  Perhaps it was because of the people I was always contrasted with by taking advanced classes.  Whatever it was, she could not deal with the fact that I was just going to Clemson.


Anyway.  I dunno.  I figured that for an undergraduate program, it didn't really matter where I went, right?  Multivariable calculus is pretty universal, and so is physics.  For undergrad courses, I would get the same education at any reasonably accredited institution.


And I'm probably still right.  But what I didn't think about was the people who I would be surrounded with, shaping my education in ways outside the classroom.  As I note in the excerpt below from my and Jackson's chat (which is released under the Creative Commons 2.0 License), I miss being surrounded by people who have this insatiable urge for progress.  I miss people who write poetry for the sake of writing poetry, who prove odd theorems for the hell of it, people who are researching a topic on wikipedia before you can finish the prompting sentence, and people who can't put down their cameras until they've stuffed their memory cards to the brink with photos to sift through.  I miss people who strive for self-betterment, and who are passionate about their passions.  Perhaps I simply miss people who have passion, in general.  As Jackson notes, it is "the undeniable truth that mediocrity vastly outnumbers drive and unique ability."


Maybe it isn't better in other places, and to be honest, it isn't that bad here.  Seriously, don't get me wrong; I really do love Clemson.  It's just that key cultural aspect that I sorely, sorely miss.
Maybe it isn't, but maybe it is.


Hmm.  Please comment.


=== Conversation Excerpt ===

me: We actually have a pretty low smoking rate, actually.
marijuana, that is.
about 15% I think.
although our drinking rates are absurd.
15% regular smokers, that is.
jackson.holder: I mean, I know. The WW kids might run around in a fog, but all you high achievers are gonna experience fatal liver failure at 28.
me: High Achievers?
Man, Jackson. Let me tell you.
I love it here.
But I am, occasionally,
Slapping myself pretty hard for not reaching higher.
I dunno. I dunno what to think about it anymore.
jackson.holder: hate to say you should have applied to MIT. Fortunately I don't have to, because I already did like 40 times.
me: Hate to say I wouldn't have made it into MIT. But it does stand to reason that I could have made it into Duke, or Davidson, or Yale, or something.
Maybe Emory, I dunno.
Maybe even Brown.
I guess I'll never know.
jackson.holder: not necessarily true.  
If you feel strongly about it you can always apply.
me: I don't feel strongly about it.  
It just lingers in the back of my mind, and pokes me occasionally.
jackson.holder: well then yes I suppose it is pretty late.
yeah it'll do that.
I know what you mean exactly.
me: I think the reason it's bothering me isn't the school so much as the people.
I mean.... I guess I was incredibly lucky with my friends.
People from all sides of my life in Charleston were esoteric poets and adventurous intellects.
Almost everyone had some sort of fervor in a particular field or subject, and loved what they did.
My magnet friends and my SOA friends.
jackson.holder: mmmyes.
me: And it seems like most people here are just sorta mreh.
jackson.holder: and now you are faced with the undeniable truth that mediocrity vastly outnumbers drive and unique ability.  
that very few people get the education you did, or got to experience the culture you experienced
me: Yeah.
jackson.holder: and that without the drive that a place like charleston and a community like ours provides, many people understand life to be a simple trial and reward system. A little work, a little alcohol.
  
pretty depressing.
me: Depressing indeed. I guess I just need to make sure it doesn't happen to me.
And the people I care about, if possible.
You know, you worded that all very well.
Do you mind if I reproduce it?
jackson.holder: go for it.
me: Under Creative Commons or something?
jackson.holder: just fucking jack it, call it yours, I don't care.
me: lol.
jackson.holder: I've had plenty of time to think about it.
me: Thanks, Jackson.
jackson.holder: it's realizations like this that changed me, matthew.

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