## Monday, September 29, 2008

### My Brother Kenny on YouTube

A YouTube video of my brother Kenny and his family is now available. It is an interview segment with them for the MDA telethon held on Labor Day. My brother has ALS, which is also known as "Lou Gehrig's disease."

The MDA is one of many organizations fighting this disease, and yet the general public knows very little about it and researchers are having a hard time getting positive results from animal models to perform equally as well in human tests.

PLEASE help support my brother and ALS research in general by donating to my d'Feet ALS walk page.

## Friday, September 26, 2008

### Ben Folds and Regina Spektor together

Today's NPR Song of the Day: Ben Folds: Cynicism Meets Sweetness
• Song: "You Don't Know Me"
• Artist: Ben Folds (featuring Regina Spektor)
• CD: Way to Normal
• Genre: Pop-Rock
It's a good track. It's funny. It's witty. It's catchy. Oh, and its got some bitter realism mixed in there. Speaking of mixing, it's interesting combining Spektor and Folds. You can stream the track at the NPR page. The music video is embedded below...
The explicit lyrics go something like... (where Spektor's lyrics are in parentheses)
I wanna ask you —
Do you ever sit and wonder,
It's so strange
That we could be together for
So long, and never know, never care
What goes on in the other one's head?

Things I've felt but I've never said
You said things that I never said
So I'll say something that I should have said long ago:

(You don't know me)
You don't know me at all
(You don't know me)
You don't know me at all (at all)

You could have just propped me up on the table like a mannequin
Or a cardboard stand-up and paint me (paint me)
Any face that you wanted me
To be seen.
We're
Damned by the existential moment where
We saw the couple in the coma and
It was we were the cliché,
But we carried on anyway.

So, sure, I could just close my eyes.
Yeah, sure, trace and memorize,
But can you go back once you know

(You don't know me)
You don't know me at all
(You don't know me)
You don't know me at all (at all)

(You don't know me)
You don't know me at all
(You don't know me)
You don't know me

If I'm the person that you think I am (Ah ah ahh)
Clueless chump you seem to think I am (Ah ah ahhh)
So easily led astray,
An errant dog who occasionally escapes and needs a shorter leash, then
Why the fuck would you want me back?!

Maybe it's because

(You don't know me at all)

Ahhh ah
Ahhh ah

(You don't know me,
you don't know me.)

Ahhh ah
Ahhh ah

So, what I'm trying to say is
What (What?)
I'm trying to tell you
It's not gonna come out like I wanna say it cause I know you'll only change it.
(Say it.)

(You don't know me)
You don't know me at all
(You don't know me)
You don't know me at all (at all)

(You don't know me)
You don't know me at all
(You don't know me)
You don't know me at all (at all)

What?

(Mmmm, ohh oh
Ah ah ah ah ah
Aha ah ah ah
Ah-ah-ah-ah-ah
Oh-oh-oh-oh-oh
Aha ah
Ah ah
Ah-ah-ah-ah-ah-ah-ah-ah-ah
Oh-oh-oh-oh oh ohh)
What?

## Tuesday, September 23, 2008

### Fixing natbib: Adding tie between author and citation

Something that bugs me about natbib is that \citet puts a formal SPACE between the authors and the citation list, and so LaTeX like...
. . . as discussed by \citet{SK86}.
that shows up near the end of a typeset line can turn into
as discussed by Stephens and Krebs[1].
Not only does this put a number at the beginning of a line, which is a typography no-no when you aren't starting a numerical item in a list, but it separates the citation list from its neighbors. If natbib would just us a TIE (~ in TeX) instead, then the "Krebs" in the example above would never get separated from the "[1]."

The best solution is to fix natbib so that this character is configurable. That would really help when using superscript references because you could get rid of the character all together (right now superscripts get a space before them, and that looks a little silly (especially when superscripts show up on the next line!)). However, that could take a while to get fixed (CTAN isn't quite SourceForge)... So I put together the following fix, which should work OK for \citet, \citet*, \Citet, and \Citet* regardless of how many optional arguments (0, 1, or 2) are present.

(note: the \makeatletter and \makeatother commands are not needed if these lines are put into a .sty file or in a natbib.cfg file (in the same directory as your TeX document source).
% Unfortunately, natbib does not TIE textual % references to their citations. So authors % sometimes get separated from citations when % they come at the end of the line. The following % lines attempt to fix this problem.%% The lines below do the equivalent of . . .%%       \renewcommand\citet[1]%%           {\citeauthor{#1}~\citep{#1}}%% but they handle the star and capitalization and % optional argument cases too.%% (the \makeatletter and \makeatother are not needed if %  these lines are put into a .sty file or in a natbib.cfg%  file)\makeatletter%%%% These lines test for star and number of arguments %%% and call the workhorses below%% Test for star (mid-sentence and start-sentence forms)\def\citet{\@ifstar{\citetstar}{\citetnostar}}\def\Citet{\@ifstar{\Citetstar}{\Citetnostar}}%% No star found. Now test for argument count.\def\citetnostar%    {\@ifnextchar[{\squarecitet}{\simplecitet}}\def\squarecitet[#1]%    {\@ifnextchar[{\twocitet[#1]}{\onecitet[#1]}}\def\Citetnostar%    {\@ifnextchar[{\squareCitet}{\simpleCitet}}\def\squareCitet[#1]%    {\@ifnextchar[{\twoCitet[#1]}{\oneCitet[#1]}}%% Star found. Now test for argument count.\def\citetstar%    {\@ifnextchar[{\squarecitetstar}{\simplecitetstar}}\def\squarecitetstar[#1]%    {\@ifnextchar[{\twocitetstar[#1]}{\onecitetstar[#1]}}\def\Citetstar%    {\@ifnextchar[{\squareCitetstar}{\simpleCitetstar}}\def\squareCitetstar[#1]%    {\@ifnextchar[{\twoCitetstar[#1]}{\oneCitetstar[#1]}}%\makeatother%%%% The following actually do the \cite work%% The \citet cases (no arg, one arg, and two args)\def\simplecitet#1%    {\citeauthor{#1}~\citep{#1}}\def\onecitet[#1]#2%    {\citeauthor{#2}~\citep[#1]{#2}}\def\twocitet[#1][#2]#3%    {\citeauthor{#3}~\citep[#1][#2]{#3}}%% The \citet* cases (no arg, one arg, and two args)\def\simplecitetstar#1%    {\citeauthor*{#1}~\citep{#1}}\def\onecitetstar[#1]#2%    {\citeauthor*{#2}~\citep[#1]{#2}}\def\twocitetstar[#1][#2]#3%    {\citeauthor*{#3}~\citep[#1][#2]{#3}}%% The \Citet cases (no arg, one arg, and two args)\def\simpleCitet#1%    {\Citeauthor{#1}~\citep{#1}}\def\oneCitet[#1]#2%    {\Citeauthor{#2}~\citep[#1]{#2}}\def\twoCitet[#1][#2]#3%    {\Citeauthor{#3}~\citep[#1][#2]{#3}}%% The \Citet* cases (no arg, one arg, and two args)\def\simpleCitetstar#1%    {\Citeauthor*{#1}~\citep{#1}}\def\oneCitetstar[#1]#2%    {\Citeauthor*{#2}~\citep[#1]{#2}}\def\twoCitetstar[#1][#2]#3%    {\Citeauthor*{#3}~\citep[#1][#2]{#3}}
Even if this problem gets fixed within natbib, it still might serve as a good example of how to deal with TWO or more optional arguments in macros...

UPDATE: For author-year citations (i.e., "Harvard style citations"), you must replace the \citep with \citeyearpar. That is, replace the final section of the code above with this section:
%%% The following actually do the \cite work%% The \citet cases (no arg, one arg, and two args)\def\simplecitet#1%    {\citeauthor{#1}~\citeyearpar{#1}}\def\onecitet[#1]#2%    {\citeauthor{#2}~\citeyearpar[#1]{#2}}\def\twocitet[#1][#2]#3%    {\citeauthor{#3}~\citeyearpar[#1][#2]{#3}}%% The \citet* cases (no arg, one arg, and two args)\def\simplecitetstar#1%    {\citeauthor*{#1}~\citeyearpar{#1}}\def\onecitetstar[#1]#2%    {\citeauthor*{#2}~\citeyearpar[#1]{#2}}\def\twocitetstar[#1][#2]#3%    {\citeauthor*{#3}~\citeyearpar[#1][#2]{#3}}%% The \Citet cases (no arg, one arg, and two args)\def\simpleCitet#1%    {\Citeauthor{#1}~\citeyearpar{#1}}\def\oneCitet[#1]#2%    {\Citeauthor{#2}~\citeyearpar[#1]{#2}}\def\twoCitet[#1][#2]#3%    {\Citeauthor{#3}~\citeyearpar[#1][#2]{#3}}%% The \Citet* cases (no arg, one arg, and two args)\def\simpleCitetstar#1%    {\Citeauthor*{#1}~\citeyearpar{#1}}\def\oneCitetstar[#1]#2%    {\Citeauthor*{#2}~\citeyearpar[#1]{#2}}\def\twoCitetstar[#1][#2]#3%    {\Citeauthor*{#3}~\citeyearpar[#1][#2]{#3}}
Those lines seem to work for me.

## Friday, September 19, 2008

### Pretty analog docs

Lately, I've noticed more hits on my website for documents that I put together for some classes that I've taught. So I decided to collect all the substantial ones and list them in one place. I figured I'd do the same here...

### My attempt at a "public domain" license declaration

Many lawyers will tell you that it is impossible for an author to explicitly release a new work into the public domain, but many authors would like to do such a thing. Normally the advice is to acknowledge retaining the copyright and then explicitly grant permission for public use of the work for every possible use.

So here's my attempt (taken from something I had to put into the public domain today:
Copyright (c) YEARS by AUTHORSNo rights reserved. All rights granted.This work is licensed to the public domain. All personsare permitted to use, copy, modify, distribute, and publicly perform or display this work without restriction.To view a copy of this license, visithttp://creativecommons.org/licenses/publicdomain/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
I think much of that is redundant. You probably don't need that second half linking to CC's explanation of public domain. You probably don't need the "No rights reserved" and "All rights granted" crap either. Anyway, for the moment, I don't think they're doing any harm.

Yes, I realize I could just ask the civil law attorney in my family who handles this type of thing daily, but I'm afraid he'd just think I was being silly.

## Thursday, September 18, 2008

### "Six dollar footlong" just doesn't roll off the tongue the same way...

I was leaving The Mall at Tuttle Crossing the other day, and something at the food court caught my eye...
Don't see it? Let's zoom in a bit...
WTF? Is that a "6" over top of the five-fingered hand that usually is holding a "5"?

It seems like they forgot to put up the right hand that's flipping you the sixth finger...

## Tuesday, September 09, 2008

### "Hands in Pockets" with Cellos

Great version of an already pretty song: NPR Song of the Day: "Hands in Pockets" by Portland Cello Project with Laura Gibson (streamable via RealPlayer)

## Monday, September 08, 2008

### Blogger Labels: No more than 20, unless there are more than 20.

I think it's dumb that the "Labels for this post:" line at the bottom of this bottom of this editor only lets me enter in 20 labels, but if I go into the "Edit Posts" and check this post, I can add as many existing labels as I want one by one.

So I have posts that have more than 20 labels. When I EDIT them, I have to DELETE labels in order to SAVE, and then I have to re-add them using the "Edit Posts" manager.

It's also dumb that Blogger prompts me for label completion and then picks the first one in this list when I hit "," regardless of whether I actually entered the list. So when I type "tex," in the "Labels for this post", it changes it to "AUC TeX," because that label is higher in the list but appears to match. (yes, I can scroll down to "tex" and select it... but what if it DIDN'T EXIST? What if I wanted a new label? In that case I have to let it complete and then go back and modify what it entered WITHOUT hitting comma again and causing another auto-completion.

I wonder when web development started going so far down hill. I'm sure "certification" has something to do with it. You can promote people based on their "certification" and not on their merit... I guess. I suppose that's a subject for another post.

### Visit TiVo.com to manage your account!

UPDATE 2: After calling back, waiting on hold, being transferred, and waiting on hold, I was given a Tivo Case number and told that this case was escalated to an account specialist. I was told that rarely do account specialists actually call the customer. Rather than expecting a call back, I should check my account over and over again for the next three to five business days. If I don't notice a change after five days, I should call back with my Tivo Case number handy.

There was an automated survey after I was finished with the representative. As you can imagine, I dialed "not satisfied" to every question.
UPDATE: TiVo's hold just hung up on me!!!
I'm on hold with TiVo customer service right now. When TiVo answered my call, I was told multiple times to visit TiVo.com to get a quicker response to my question. On hold, I'm told over and over to visit TiVo.com to manage my account. These reminders to visit TiVo.com are making me REALLY angry... The reason I'm calling TiVo is because of these messages from TiVo.com's account management:
Sorry, you are not the billing contact for this DVR, so you cannot view billing history for this DVR.
We're sorry, you are not the billing contact for this TiVo Service Number, so you cannot change the credit card. If you feel you have received this message in error, please call TiVo Customer Support 1-877-367-8486.
I'm the only person on the account, which makes a snarky message like this even more frustrating.

The support people don't know what's going on. Everyone's confused, and I'm stuck on the phone... not doing work...

It's going to be a good day!

### How much is good coffee worth?

Today I decided to try getting McDonald's coffee on the way to work. The small black coffee that I purchased:
• was $1.00 (I thought it would be$0.99 or less)
• was burnt
• was just slightly above tepid
• had room for cream (even though I asked for no room).
• had a fancy plastic lid that forced the coffee up into my lip rather than my mouth, which would have hurt me if the coffee was actually hot
Additionally, I had to wait in a line of cars to get said coffee.

If I had gone to Starbucks or Brennan's or one of many other coffee places that the media refers to as selling "$4 coffee," I could have had the same drink, but • It would have been$1.25.
• It would have been fresh and tasty.
• It would have been hot.
• It would have been filled to the brim.
If the McD's coffee was $0.50, then I might have been able to overlook this... but for only$0.25 more, I think the "designer" coffee is much better.

You have to work HARD to buy \$4 coffee at a place like Starbucks. Usually your drink has to involve milk and froth and lots of other ingredients that make it stop being a "coffee." That's why those drinks are NOT called "coffees." A coffee can be served to you in a few seconds, while a more exotic drink takes time to prepare. That's why those other drinks cost more.

So good coffee is a quarter more than bad coffee. Now that I know the value of good coffee, I hope I won't make the mistake of buying bad coffee again.

## Saturday, September 06, 2008

### Walk because you CAN

QUICK SUMMARY: SUPPORT ME in my walk to d'Feet ALS!

Later this month, I'll be walking in my 3rd Walk to d'Feet ALS. My brother Kenny has ALS (Lou Gehrig's disease). It's a fatal disease that few people know much about, and researchers are having a hard time even slowing its progression. Stephen Hawking has a mild form of ALS that has progressed slowly enough for him to live a relatively long life. The disease has put him in a wheelchair and taken away nearly all control of all of his muscles, but it has left his mind sharp. The same thing has happened to my bother, who is shown in a wheelchair here earlier in the disease's progression:
Now he still is in a wheelchair (or frequently his recliner), but it usually has a computer attached whose mouse is controlled by his eye movements (a camera captures them). He has a joystick to move him around. It's not too much unlike Stephen Hawking.

My brother's form of the disease is not genetic, but there are genetic forms that they use in the laboratory. Scientists don't understand the cause of ALS, and so they have to use the genetic form in the laboratory and hope they can make discoveries that help everyone. So far successes that they've had with mice models in the laboratory don't map well onto humans. There's so much more work that needs to be done.

Senate Republican Tom Coburn of Oklhaoma has put blocks on bills that would support ALS research. He uses them as leverage. Just weeks ago, a Republican filibuster prevented passage of the ALS registry act. You see, there's not even a nationwide registry of who gets ALS. My brother also had a strange case of shingles when he was younger, and maybe that has something to do with him developing ALS later on in life. If doctors could look for correlations among people with ALS, they could figure these things out, but they'd need a nationwide ALS registry for that. For the moment, Republicans are preventing that. (oh, and stem cell research (embryonic and otherwise) benefits ALS research too)

I can't vote against Tom Coburn (I'm registered to vote in Ohio). I can try to get Republicans out of office. More importantly and more quickly, I can participate in this walk. I can donate to the ALS association. I can spread the word. AND SO CAN YOU.

So come and support my walk with a donation or come and walk yourself. I'll appreciate it, and so will Kenny, and so will Stephen Hawking and many others who were surprised to find one day that they have some link to this sad disease.

Above all, walk because you can. As my brother recently said on the MDA telethon when they talked to him, ALS does not discriminate.

## Friday, September 05, 2008

### Graduate School Reflection

When looking for a good graduate program, most people focus on the adviser. After all, with as individual-driven as graduate school is, having an adviser who checks in every once in a while and cares is a nice thing to have. However, I don't think most people think about the department. That's probably because there's no help there. It's probably the case that wherever you go, the department doesn't care about you or its classes. The department will do its best to screw you over. The department will put you through hell... but maybe that's their job. Maybe everyone gets a good hazing as a rite of passage on the way to joining academia.

I suppose it could be worse. One thing I didn't realize as an undergrad is how much the department really really doesn't care about them. Undergrads are a little bit like the coppertops of The Matrix; they plug in and go about their lives not ever realizing that they're just there to generate revenue. There's no social good. There's no professional obligation to educate young professionals. It's all about the money.

One day I sat in on a meeting of large donors to The College. A marketing person from The College or The University gave a PowerPoint presentation on improving the ranking of The College. One major topic of discussion was about which pictures to put on the front of brochures that are mailed out to other Colleges who contribute to the rankings ("Ah, yes, but what type of people both become engineers AND become deans of engineering colleges? Maybe engineers prefer charts, but deans prefer pictures of people walking on grass!" (no joke)). Another topic was how many graduate students to accept in order to maximize one variable in a large formula that contributes to ranking. Too few graduate students and you have too few research dollars being spent, but too many and the professor-to-student ratio is all upset. No talk of "excellence" or anything like that. All about marketing and presentation. Oh... why was I there? I had to sit and be pretty so the old donors had some young people to talk to during the dinner.

Welcome to a research I university.

## Thursday, September 04, 2008

### Squirrels 1, Chipmunks 0

I just saw a squirrel carrying around a dead chipmunk in its mouth.

I guess campus squirrels get hungry when school has been out for a while...

### Course web pages, LaTeX, and Mercurial — Oh, my!

I have been assigned to TA yet another different course for the Autumn 2008 quarter. That was a bummer for me because I have been taking instruction way too seriously, and it has been taking up way too much of my time. However, I've been pretty happy with the results. I've been getting flattering praise and very helpful feedback. More importantly for this post, I've been producing lots of revision-controlled content that can be used for reference or as examples.

The four course web pages that I've produced so far...
I've tried to generate lots of reference material all with LaTeX, and I've tried to put the sites together so that everything can be build via standard Makefiles. I've put all of the source code (minus the exams/quizzes) at my public Mercurial repository home:In my latest adventure, ECE 209, I'm going to give my students extra credit if they use TeX for any assignments they hand in. So I've put getting-started information at those web pages, and they can use the Mercurial repositories for more working examples.

I'm really a lot more proud of this work than I thought I'd be. I'm actually looking forward to the new ECE 209 class. It's the youngest group of college students I've taught since a long time ago, and I think it will be interesting. Yesterday I went through and got the lab in order. I put up instructive signs about how to use oscilloscope probes and pin-outs of commonly-used ICs. I numbered all of the tables. I added notes to the function generators telling them how to set them for high impedance output termination. Earlier I went through and repaired all of the phase-shifter circuits (out of 16 circuits, only about 4 were working, but the other 12 could be easily repaired with a little solder and/or a new op-amp IC) and added a little instructive page on how they work. Now all that's left is the actual experience that will make me even more jaded and realize that all of that work was for nothing. :)

Meanwhile though... Lots of free LaTeX examples and circuit references. Yay!

### iTerm AppleScript crashing fix

Lately, my officemate and I noticed that iTerm build 0.9.5.0902 crashes whenever AppleScript tries to talk to it. I was excited about some of the full screen fixes, but I couldn't do without my "Open iTerm Here" context menu item, and so I had to come up with a fix.

In my old scripts, I was doing things like this:
tell application "iTerm"      activate      set theTerm to make new terminal      tell theTerm          set theSession to make new session at the end of sessions          tell theSession to              exec command "/bin/bash -login"              write text "ls"          end tell     end tellend tell
It appears like it's the make new session that's causing the problem. So I changed the set theSession... and tell theSession... lines to use a launch instead. The result:
tell application "iTerm"      activate      set theTerm to make new terminal      tell theTerm         launch session "Default Session"         tell the last session              exec command "/bin/bash -login"              write text "ls"          end tell     end tellend tell
Not only does that not crash for me anymore, but it seems to be a bit faster (my imagination?).