2008/11/06

An Empty, Vague Notioin of Self-Esteem

For a generation that has no boundaries, no rules, no structure in their life, the military actually has a lot to offer. The military may be the only place in American Society today where they'll... understand what it's like to have self confidence and self control rather than this empty, vague notion of self-esteem. And then they start to become productive."

---Maj. Art Finch, staff psychologist for the 75th Ranger Regiment (The Mercury, Oct. 2008)

He actually has a good point, which is a sad reflection of the state of American Society.

2008/11/02

History repeats... ? A poem by Kurt Tucholsky

Sorry, this was apparently a hoax
A little poem from pre-WWII that predics the present situation... hopefully we don't get to the final stanza this time around...



















Wenn die Börsenkurse fallen,
regt sich Kummer fast bei allen,
aber manche blühen auf:
Ihr Rezept heißt Leerverkauf.
When stock markets fall,
All are moved to grief,
For some the hope remains, however--
Short selling: their relief
Keck verhökern diese Knaben
Dinge, die sie gar nicht haben,
treten selbst den Absturz los,
den sie brauchen - echt famos!
What they do not own,
These bold knaves take and sell,
To start the crash that they require,
Isn't this so swell!
Leichter noch bei solchen Taten
tun sie sich mit Derivaten:
Wenn Papier den Wert frisiert,
wird die Wirkung potenziert.
Easier still than that--
Derivatives, they juggle round,
For when the paper boosts its value,
Benefits compound.
Wenn in Folge Banken krachen,
haben Sparer nichts zu lachen,
und die Hypothek aufs Haus
heißt, Bewohner müssen raus.
If this leads to banks collapsing,
For savers it's no laughing matter.
For the mortage on their houses,
Residents must scatter.
Trifft's hingegen große Banken,
kommt die ganze Welt ins Wanken -
auch die Spekulantenbrut
zittert jetzt um Hab und Gut!
But if this hits the larger banks,
The whole world starts to quake-
In fear for their possessions,
The spawn of gamblers start to shake.
Soll man das System gefährden?
Da muß eingeschritten werden:
Der Gewinn, der bleibt privat,
die Verluste kauft der Staat.
Action must be taken,
We must protect the system's fate--
The profits will be kept in private,
The debts paid by the state.
Dazu braucht der Staat Kredite,
und das bringt erneut Profite,
hat man doch in jenem Land
die Regierung in der Hand.
For this we must have public bonds,
The profits will be so much!
For knaves in every land do have,
The governments in their own clutch.
Für die Zechen dieser Frechen
hat der Kleine Mann zu blechen
und - das ist das Feine ja -
nicht nur in Amerika!
For these rascals' debts,
The little guy must pay,
And -it gets better yet-
Not just in USA!
Und wenn Kurse wieder steigen,
fängt von vorne an der Reigen -
ist halt Umverteilung pur,
stets in eine Richtung nur.
And should the market rise again,
The dance begins anew.
This is simply redistribution,
The direction is just askew.
Aber sollten sich die Massen
das mal nimmer bieten lassen,
ist der Ausweg längst bedacht:
Dann wird bisschen Krieg gemacht.
But if the masses rise,
And will not take it any more,
The solution is quite simple:
We start a little war!


from "Die Weltbühne"(1930) Kurt Tucholsky
(translated by M. Lippert / K. Takagaki)

2008/07/29

Linearity in complex systems

... It turns out that the overwhelming importance of a trigonometric analysis in the treatment of linear phenomena does not persist when we come to consider non-linear phenomena...
N. Wiener, Cybernetics


Neuroscience is faced with the problem of going beyond the first-pass view of the brain, that which emphasizes the selective firing of single units and the spatial alignment of these units within the cortex. Imposing this view on the cortex can often become quite tortuous once one exits the realm of (lower) sensory areas.

Somehow, we must address both the unity of experience, and the fact that neural events are not necessarily repeatable-- in our brains, the same visual scene is never quite the same, it is always colored by ill-defined variables such as our mood, and our previous exposures. There is no a priori reason to assume that an "average" experience exists, but this is the simplifying assumption underlying cortical neurophysiology. On a mechanistic level, neural processes on the mesoscopic scale, which could underlie the unity of experience, are profoundly emergent, nonlinear, and ill-behaved.

But in trying to face these problems, we are limited to using methods developed for linear, time-invariant systems. All the common constructs of neurophysiology--sinusoidal oscillation, superlinear/sublinear summation, statistically significant deviations--these concepts are so ingrained in our mind, that I think it is important to clearly state their limitations. Namely, these concepts are not necessarily meaningful if the measures in question are not well behaved, LTI, repeatable, stochastically distributed around a "true" value, etc.

2008/05/10

Dreams from My Father

Barack Obama on returning to his ancestral homeland in Kenya...
For the first time in my life, I felt the comfort, the firmness of identity that a name might provide, how it culd carry an entire history in other people's memories, so that they might nod and say knowingly, "Oh, you are so and so's son."
     ---Dreams from my father: a story of race and inheritance (Ch. 15)

Having moved constantly while growing up, I sympathize with this profoundly.



Words of a British physician, raised in colonial Kenya, who felt compelled to return to the continent
Once you've lived here for a time, the life in England seems terribly cramped. The British have so much more, but seem to enjoy things less. I felt a foreigner there.
     ---ibid Ch. 16

Somehow, I seem to feel the same way a little, living in Germany and comparing it to the US. Not that Germans are materially poor, but...

2008/04/23

Why I use Mathematica and not Matlab

I have to admit that I am somewhat of a Mathematica partisan.

My first serious use of the computer was Mathematica (except for a very heated PC-Tetris phase--that was pretty serious). My father got me an introductory student license of v2.4 and the Gray/Glynn book, and all through high school, I enjoyed physics by making (what I thought were) cool simulations of whatever motion equations and statistical physics that we learned.

In college, I was a biochemist, without programming. In medical school, I switched to neurophysiology, and picked up Matlab in the process. But whenever I could, I used Mathematica. For my use, Mathematica v5 was just as fast as Matlab, and the graphing capabilities were somewhat superior. At that time, Matlab and Mathematica were mostly equal in functionality, but I preferred Mathematica.




That was then. Now that Mathematica is up to v6, I see no compelling reasons to use Matlab instead of Mathematica, at least in Neurophysiology (except maybe that you and your institution cannot afford a license). Right now, the Mathematica graphics capabilities far surpass anything that Matlab can dream of, and the data crunching is lightning fast (I admit that v2.4 was pretty sluggish sometimes--for me, this hasn't been a problem since v4).

Even if you are working with a large legacy Matlab library, you can phase out by gradually translating parts to Java code (which can be called easily from both Mathematica and Matlab). The improvement in code readability, debugging, productivity and maintenance should pay off in a relatively short time, even for a large switch.

It is true that some Matlab toolbox functions, such as DAQ functionality, are not available in Mathematica--but these toolboxes often have superior counterparts outside of Matlab anyway. (For example with DAQ, LabView is much easier. It just takes some extra glucose upstairs and a few weekends to figure out--but it is well worth the effort in saved time.) Most mathematics/engineering functions are also readily available as open source Java libraries.




Here are my top reasons why I use Mathematica and not Matlab:-

  1. Easy output of high quality graphics... This is definitely my biggest reason to choose Mathematica over Matlab. Mathematica graphics are all vector-based, and even on screen, the smooth rendering is not out of place on a sleek modern operating system. Matlab reeks of Win 3.1.


    What's more, Mathematica graphics are all well-defined vector objects, and therefore Mathematica graphics can be directly output at publication quality to .pdf or .ps, without any hassle. Last time I checked, Matlab graphics output was still struggling with pixels and dpi. This could be a very compelling reason for most physiologists to switch to Mathematica.

    Since Mathematica graphics are well-defined vector objects, it is trivial to combine two plots to come up with a third. All plots can, of course, be serialized by using Save["filename", plot], so that you can reload the same plots later and instantly make new combinations, at full resolution. This may seem trivial, but it's a real time-saver when you're playing around with various plots and trying to figure out how to present your data most effectively.


    There are also some extra benefits to Mathematica graphics. For instance, 3D plots in Mathematica can now be rotated interactively, in situ, by click-dragging. Movies can be exported to Flash movies, which can be easily pasted into powerpoint or a webpage. V6 now also supports alpha blends (Matlab can also do transparency in 3D graphics, but last time I checked, not in regular graphics). The following simple graph, for instance, should be a huge hassle (if not impossible) to make with Matlab.


  2. Mathematica syntax makes sense... Matlab syntax is notoriously incoherent, which is unsurprising given its origin as a DOS hack. Similar functions often take positional arguments in different order. Some functions take arguments as strings, whereas similar functions take the arguments as symbol names, without the ' '. There is even that arcane signature where you put an option name, as a string, and in the next argument, the option value. Naming is also incoherent--for example, to plot a matrix, you use plot(), a verb-name, but to play the data as a sound, you use sound(), a noun-name. I'm probably not the only one who spends way too much time in the Matlab help window, looking up how to call functions and the name of functions, compared to actual work in the main Matlab window... And, bad language design also leads to buggier code.

    In contrast, Mathematica functions which do similar things always take the same arguments, in the same order. Naming is logical, and coherent. So for instance, if you know how to use Plot[] to plot a sin wave, you also know how to use Play[] to hear it. And Mathematica function names are not abbreviated (except for a handful like Sin, Cos, Exp, Log), but spelled out fully. So to get a Chi-square distribution, you type ChiSquareDistribution[] instead of chi2distrib or XsqDistrib or chi2d or whatever. At first, this may seem like a pain because of the extra typing, but the longer function names are usually the less common ones, and this full-name convention actually saves a lot of time, because you need to use the help screen less--even in the more common functions, you don't have to worry at all whether the function you want is num2str or num2string or numtostring, you just type ToString[].

    I read recently that this linguistic coherence is because the creator of Mathematica, Stephen Wolfram, still reviews all new Mathematica syntax for each edition... maybe a guy as smart as this should be doing other things with his time, but if he is willing to put in the effort, I will definitely, gratefully, reap the benefits.

  3. Cross-platform compatibility, version-to-version compatibility... I didn't realize just how bad Matlab was for compatibility, until I had to run a pretty spiffy Matlab GUI (that I'd written on Win) on a Mac. Now that Matlab has a Java core, you would think that cross-platform compatibility would come for free...

    Also, everybody knows of Matlab toolboxes and data analysis packages that don't quite run correctly unless it's on version 7.0.2 (or whatever). One look at some of the internal Matlab functions which are implemented as .m files, and it will be immediately obvious why they have compatibility bugs--the Matlab syntax is definitely NOT designed for readability. What's even scarier is, how many other bugs (or pseudo-bugs) are there that you don't notice, that are screwing your results? And if they themselves can only write such unreadable code, how do they expect end users to use Matlab well?

  4. Cool new features... Check the Wolfram Demonstration site for many examples of how people have used the cool new features of Mathematica. Many of the new features are pretty useless for my day job (biomedical research), but hey, you never know.

    I've been using Mathematica for over a decade now, and the basic structure of the language is as solid as ever. That structural soundness probably allows cool new features to be incorporated without creating balls of spaghetti. I wouldn't be surprised at all if I'm still using essentially the same language for technical computing, another 10 years from now.

  5. Symbolic capacities... This one is not so important for physiologists, but it comes in handy occasionally, and it is the original strength of Mathematica. For a physiologist, it is nice that you can play around with formulae, simplify and symbolically solve differential equations, etc., without digging out your math books and reliving the trauma of high school.

2008/01/31

Eugenics and neurophysiology

...The early literature of eugenics is filled with speculations, and pedigrees laboriously compiled and fudged, about the gene for Wanderlust traced trhough the family lines of naval captains, or the gene for temperament that makes some of us placid and others domineering. We must not be misled by how silly such ideas seem today; they represented orthodox genetics for a brief time, and had a major social impact in America.
---The Mismeasure of Man, Stephen J. Gould (Ch. 5)


The oscillation correlating to consciousness, or to wakefulness, or whatever... far worse yet, the gene for consciousness, etc.

2008/01/26

Attitudes in Computer Use

Just as Google has caused people to have a persistent feeling that pretty much anything can be looked up in a few seconds, habitual Mathematica use causes people to have a persistent feeling that just about anything can be computed, probably before breakfast.

Both are of course only partly true, but what matters is the change in attitude: If you assume you'll be able to find any fact you might need, you soon start reflexively googling things, perhaps even before clearly understanding the question you're trying to answer. And if you assume you'll be able to quickly do any math you need done, you start relying on math more and perhaps doing computations that, upon further reflection, didn't really need to be done.

--Theodore Gray, Co-founder, Wolfram Research


I should step back and figure out why I'm spending so much time at the computer