- Refreshed my memory of the Bison manual's section on generating a C++ scanner: http://www.gnu.org/software/bison/manual/html_mono/bison.html#C_002b_002b-Language-Interface
- Referenced Google Style C++ Guide: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Conditionals
Wednesday, August 06, 2008
Wednesday Development Log
Wednesday:
Sunday, August 03, 2008
Sunday Development Log
Sunday:
With all this talk about nonrecursive make, one might get the wrong impression that I'm doing this solely to learn about it. In fact, I'm finishing up a summer project for my CSC-251 compiler class, which is why GNU Flex/Bison come into play.
- Finished reading the white paper "Recursive Make Considered Harmful"
- Consulted the Flex manual: http://flex.sourceforge.net/manual/
- Compiled small Flex program in anticipation of testing new non-recursive make harness.
- Discovered O'Reilly's online book "Managing Projects with GNU Make Managing Projects with GNU Make, Third Edition" at http://oreilly.com/catalog/9780596006105/book/index.csp , part of their Open Book Project.
- It seems the nonrecursive harness uses implicit compiles for all the C files it encounters.
- Getting my head wrapped around the targets and dependencies of the nonrecursive make harness.
- Successfully modified the nonrecursive make harness so it compiles GNU Flex code into a binary.
With all this talk about nonrecursive make, one might get the wrong impression that I'm doing this solely to learn about it. In fact, I'm finishing up a summer project for my CSC-251 compiler class, which is why GNU Flex/Bison come into play.
Saturday, August 02, 2008
Saturday Development Log
Application development represents a game of inches.
- Configured PDF viewing
- Installed and configured Subversion client kdesvn
- Installed IDE kdevelop--profiling and memory leak tools look promising. Will stick with Kate for now.
- Configured Konsole colors, font
- Added directory test and source file test/full-test.n.
- Added Makefile stubs in trunk using white-paper "Recursive Make Considered Harmful" (http://www.xs4all.nl/~evbergen/nonrecursive-make.html) as a guide.
- Installed Adobe Flash: sudo apt-get install flashplugin-nonfree
- Installed Amarok: sudo apt-get install amarok
- Installed g++: sudo apt-get install g++
- Installed dlocate: sudo apt-get install dlocate (initialize before using each time with sudo update-dlocatedb)
- Installed libldap2-dev: sudo apt-get install libldap2-dev (and in doing so learned the value of finding which packages contain header files via http://packages.debian.org/)
Steam Locomotive
It's hard to say how much this has enriched my life. Thanks to Brian Lavender for sharing it on SacLUG. Screen captures courtesy KSnapshot (very intuitive).
Installation: sudo apt-get install sl
Images
The default ("sl"):

Note: The default, it travels across the screen from right to left, with animated smoke and wheels.
"-a An accident seems to happen. You’ll feel pity for people who cry for help.":

Note: the same as the original except it shows two engineers saying "HelpHelp!".
"-l shows little one.":

"-F It flies.":

Note: the same as the original "sl" but it moves from the lower-right to the upper-left.
Brilliant. From the man page:
Installation: sudo apt-get install sl
Images
The default ("sl"):

Note: The default, it travels across the screen from right to left, with animated smoke and wheels.
"-a An accident seems to happen. You’ll feel pity for people who cry for help.":

Note: the same as the original except it shows two engineers saying "HelpHelp!".
"-l shows little one.":

"-F It flies.":

Note: the same as the original "sl" but it moves from the lower-right to the upper-left.
Brilliant. From the man page:
NAME
sl - display animations aimed to correct users who accidentally enter sl instead of ls.
SYNOPSIS
sl [ -alFe ]
DESCRIPTION
sl Displays animations aimed to correct users who accidentally enter sl instead of ls. SL stands for Steam Locomotive.
OPTIONS
-a An accident seems to happen. You’ll feel pity for people who cry for help.
-l shows little one.
-F It flies.
-e Allow interrupt by Ctrl+C.
SEE ALSO
ls(1)
BUGS
It rarely shows contents of current directory.
AUTHOR
sl was written by Toyoda Masashi. This manual page was written by Brian Ristuccia and
Kenshi Mutofor the Debian GNU/Linux system but may be used by others under the same license as sl itself.
Deleted My Task Manager
Playing with KUbuntu and I accidentally deleted my task manager. All the icons on the widget bar's task manager went away, and all the other widgets flowed left.
I re-added the task manager widget but it appeared on the extreme right, and there doesn't seem to be an easy way to rearrange them. :(
The solution: remove everything, then re-add every widget in the correct order.
A stiff penalty for an easy mistake.
I re-added the task manager widget but it appeared on the extreme right, and there doesn't seem to be an easy way to rearrange them. :(
The solution: remove everything, then re-add every widget in the correct order.
A stiff penalty for an easy mistake.
Linux PDF Issues
Firefox failed to load a PDF I typed into the address bar.
After a bit of trial and error, I discovered the PDF Download add-on, which makes it all simpler when one clicks a link.
I first downloaded FoxIt PDF reader for Linux (binary) and told Firefox to use that to open PDFs. Unfortunately, it opens the ReaderLinux binary, not the PDF. And once I associated the file type with the binary, the Linux Firefox fails to provide an easy way to disassociate itself from that.
The solution: edit file ~/.mozilla/firefox/profile.default/mimeTypes.rdf, and delete the XML sections dealing with ReaderLinux. Restart Firefox. The next time you attempt to open a PDF, Firefox will prompt the user again for what to do.
The final solution? Associating Okular (/usr/lib/kde4/bin/okular) with PDF file types instead works great. And PDF Download add-on works great too.
After a bit of trial and error, I discovered the PDF Download add-on, which makes it all simpler when one clicks a link.
I first downloaded FoxIt PDF reader for Linux (binary) and told Firefox to use that to open PDFs. Unfortunately, it opens the ReaderLinux binary, not the PDF. And once I associated the file type with the binary, the Linux Firefox fails to provide an easy way to disassociate itself from that.
The solution: edit file ~/.mozilla/firefox/profile.default/mimeTypes.rdf, and delete the XML sections dealing with ReaderLinux. Restart Firefox. The next time you attempt to open a PDF, Firefox will prompt the user again for what to do.
The final solution? Associating Okular (/usr/lib/kde4/bin/okular) with PDF file types instead works great. And PDF Download add-on works great too.
Friday, August 01, 2008
Late Night Subversion
Recording for future use:
- Create a Subversion repository: ubuntu:~/src/csc-251$ svnadmin create ///home/user/.subversion-repository
- Import the initial file hierarchy: ubuntu:~/src/csc-251$ svn import newlc file:///home/user/.subversion-repository/newlc -m "Initial import"
- Create a branch: ubuntu:~/src/csc-251$ svn copy file:///home/user/.subversion-repository/newlc/trunk file:///home/user/.subversion-repository/newlc/branches/my-branch
- Checkout the project: ubuntu:~/src/csc-251$ mkdir newlc && cd newlc && svn checkout file:///home/user/.subversion-repository/newlc/trunk && cd trunk
- ubuntu:~$ svnadmin create ///home/user/.subversion-repository
- ubuntu:~$ svnadmin create .subversion-repository
Under The Bridge
Walking home music today: Under the Bridge by RHCP:
Sometimes I feelIt's a great urban walking song. On my way to work on Wednesday, I noticed a man taking shelter under a bridge at Watt and Longview, which triggered this song in my head. Video.
Like I dont have a partner
Sometimes I feel
Like my only friend
Is the city I live in
The city of angels
Lonely as I am
Together we cry
I drive on her streets
cause shes my companion
I walk through her hills
cause she knows who I am
She sees my good deeds
And she kisses me windy
I never worry
Now that is a lie
I dont ever want to feel
Like I did that day
Take me to the place I love
Take me all the way
Its hard to believe
That theres nobody out there
Its hard to believe
That Im all alone
At least I have her love
The city she loves me
Lonely as I am
Together we cry
I dont ever want to feel
Like I did that day
Take me to the place I love
Take me all the way
Under the bridge downtown
Is where I drew some blood
Under the bridge downtown
I could not get enough
Under the bridge downtown
Forgot about my love
Under the bridge downtown
I gave my life away
Thursday, July 31, 2008
Sleep Debt
I read an article on Wednesday stating a simple experiment:
Starting on a Sunday, do not drink alcohol or caffeine; do not smoke; go to sleep about the same time every night; and get an uninterrupted seven to eight hours of sleep for the next six nights. Then, on Saturday morning, sleep in. See how long your body will let you sleep. If you sleep longer than you did during the week -- then you have a sleep debt. So you should consider getting more sleep each night to replenish that sleep debt.It sounds easy enough so I've decided to try it out starting on Sunday.
Energy Breakthrough
"Electricity-by-wire from a central source could be a thing of the past."
A breakthrough: http://web.mit.edu/newsoffice/2008/oxygen-0731.html
A breakthrough: http://web.mit.edu/newsoffice/2008/oxygen-0731.html
Wubi, Part Two
My first attempt using Wubi crashed and burned. I attempted to use the automatic updater to update a boatload of packages and it froze. I rebooted this evening to continue with programming, but ack, nothing loaded.
Tuesday, July 29, 2008
Ninja Moustache
Brilliant:

Via Wired: http://www.wired.com/culture/culturereviews/multimedia/2008/07/gallery_comiccon_10things
If you don't get it, it's a ninja with a moustache. If you still don't get it, you probably won't find much interest in Shawnimals: http://www.shawnimals.com/

Via Wired: http://www.wired.com/culture/culturereviews/multimedia/2008/07/gallery_comiccon_10things
If you don't get it, it's a ninja with a moustache. If you still don't get it, you probably won't find much interest in Shawnimals: http://www.shawnimals.com/
Monday, July 28, 2008
Bike Links
KDVS 90.3 featured Jean Jackman of Davis, CA and she recommended Adventure Cycle (http://www.adv-cycling.org) as a great bicycle tour company. They offer guided tour maps, including one a TransAmerica route: http://www.adventurecycling.org/routes/transamerica.cfm.
She also recommended the Davis Bike Club (http://www.davisbikeclub.org/) as a resource.
She also recommended the Davis Bike Club (http://www.davisbikeclub.org/) as a resource.
Sacramento Badminton

Dawn and I both like badminton:
- CSUS badminton club: http://www.geocities.com/Colosseum/Bleachers/2418/
- Folsom badminton club: http://sports.groups.yahoo.com/group/folsom_badminton/
- UC-Davis badminton club: http://www.ucdbadminton.com/
Dr. Patricia Chen
Dr. Patricia Chen took over as Dawn's primary care physician today.
The conversation went like this:
If everything goes as planned (and it seems reasonable to expect that it might) we will only have these SSRI/SNRI medications around until roughly the end of September.
I've found the human cost in extricating oneself from Effexor alarming. Dr. Chen argued Effexor works in some situations--for example, post-menopausal women. She mentioned it represents one of the most difficult anti-depressants to discontinue.
Even worse--paroxetine (Paxil), which exhibits many of the same problems as Effexor but for which Dr. Chen doesn't have a tested discontinuation plan. Since paroxetine represents an SSRI, using it in combination with fluoxetine (another SSRI) proves problematic. Dawn used Paxil for one year many years ago, then her doctor switched her to Effexor. So that represents one lucky break.
In my opinion, doctors exhibit reckless behavior by putting patients on SSRI/SNRI class medications without extensive knowledge of discontinuation effects and how to successfully manage them. Dr. Chen learned the hard way--doctors like our previous primary care physician of two years still don't know even after watching a patient like Dawn endure three exceedingly painful attempts at discontinuation.
Even more alarming--Dawn's far from alone. Google returns 424,000 hits for "effexor withdrawal". A sharp contrast exists between horror stories on the Internet and the level of awareness in the four out of five doctors we interacted over the last three months.
The conversation went like this:
*Dawn explains the ear pain and how she thinks it's an Effexor discontinuation symptom*We discussed Dawn's previous treatments under her previous primary-care physician, which involved quite a few looks of shock and silent groaning from Dr. Chen. She explained several things:
Dr. Chen: I agree with you
*Dawn chokes up with relief*
- Effexor, especially after being taken for nine years, deposits itself into the tissues and takes quite some time to get used up. Though it has a short half-life, when very small amounts get into the tissues it takes some time (six to eight weeks) before it's used up.
- The ear pain represents a discontinuation symptom Dr. Chen witnessed with other patients. The solution involves going back on a low dose of Effexor to get rid of the ear pain, then gradually introduce the SSRI fluoxetine (Prozac, Ladose) for about a month. Once the body accepts the fluoxetine, gradually eliminate the Effexor, then stay on fluoxetine until the body uses up all the Effexor in the tissues. Then taper off the fluoxetine gradually enough so no problems occur (that is, no ear pain).
- Dr. Chen made the same mistakes as our previous primary care physician. The difference--she took the initiative to follow-up with a psychiatrist and pursued information on effective best-practice treatments for tapering off Effexor. Our previous primary-care physician seemed to have such a high workload that he failed to make (have?) time to do this legwork.
- Dawn began taking the lowest dose of Effexor (37.5 mg) today and already feels reduced pain in her ears.
- Dr. Chen said that Dawn suffers from eustachian tube dysfunction, but that dysfunction does not account for the severe pain in her ears. Typically, eustachian tube dysfunction manifests itself as reduced hearing levels, echoes of one's voice, sort of like being underwater. I didn't ask her about our uneducated norepinephrine theory.
- If Dawn doesn't respond, Dr. Chen's more than willing to refer us to an ear-nose-throat specialist.
- Dr. Chen failed to have an explanation for why Effexor produces this discontinuation syndrome symptom--we don't think many people do know why it does this.
- We weren't sure why having Effexor sticking around in the tissues might cause the ear pain--wouldn't having bits of it in the tissues be a good thing in the case of discontinuation? Obviously not, but we're not sure why. There's probably a simple explanation for this.
- Dawn will finish out the course of prednisone--it might have minor side-effects but nothing serious.
If everything goes as planned (and it seems reasonable to expect that it might) we will only have these SSRI/SNRI medications around until roughly the end of September.
I've found the human cost in extricating oneself from Effexor alarming. Dr. Chen argued Effexor works in some situations--for example, post-menopausal women. She mentioned it represents one of the most difficult anti-depressants to discontinue.
Even worse--paroxetine (Paxil), which exhibits many of the same problems as Effexor but for which Dr. Chen doesn't have a tested discontinuation plan. Since paroxetine represents an SSRI, using it in combination with fluoxetine (another SSRI) proves problematic. Dawn used Paxil for one year many years ago, then her doctor switched her to Effexor. So that represents one lucky break.
In my opinion, doctors exhibit reckless behavior by putting patients on SSRI/SNRI class medications without extensive knowledge of discontinuation effects and how to successfully manage them. Dr. Chen learned the hard way--doctors like our previous primary care physician of two years still don't know even after watching a patient like Dawn endure three exceedingly painful attempts at discontinuation.
Even more alarming--Dawn's far from alone. Google returns 424,000 hits for "effexor withdrawal". A sharp contrast exists between horror stories on the Internet and the level of awareness in the four out of five doctors we interacted over the last three months.
Sunday, July 27, 2008
Eustachian Tube Dysfunction

Dawn's suffering from eustachian tube dysfunction right now. It's an awfully painful condition where the middle ear fills up because the eustacian tube closes due to inflammation (see above image).
A healthy eustachian tube (named for Eustachius) opens to equalize pressure in the middle ear. That popping feeling when you gain or lose altitude? That's the eustachian tube opening to equalize pressure in your ear. See this EarDoc advertisement for an explanation of what happens: http://youtube.com/watch?v=XdqrGaUF5EQ (I love the duck).
Dawn tapered off of the anti-depressant Effexor on Wednesday, July 16th and began experiencing symptoms on Thursday, July 17th, with the pain gradually increasing in severity. Dawn experiences the ear pressure pain each time she tapers off Effexor, this being the third time. It's not listed as a common side-effect on the Effexor patient information leaflet. Since she's experiencing considerable, chronic pain, we visited her primary care physician on Friday, July 25. He assured her there's no danger of rupturing of the eardrum and noticed a bulge in her right eardrum (where most of the pain occurs).
Since we don't have a good track record with her primary care physician, we're switching doctors immediately to a highly-rated female doctor closer to home, Dr. Patricia Chen. On Saturday, July 26, we visited Med7 and got another opinion. He prescribed prednisone, a steroidal decongestant, and recommended seeing an ear-nose-throat specialist if it didn't work.
Well, it's not really working, two days in--though seven days remain, the bulk of the prednisone is taken in the first three days. So, we're guessing that we'll have to see an ENT specialist as soon as we can.
Our latest theory here takes into consideration the fact that Effexor acts as an SNRI (seratonin-norepinephrin reuptake inhibitor) boosting the levels of norepinephrin in the body.
Since pseudo-epinephrine aids in reducing swelling, we theorize that increased levels of norepinephrine (adrenaline, basically) possibly aided with reduction of swelling in Dawn's ears (caused by allergies, most likely, the Central Valley being the allergy capital of the world), thus keeping the eustachian tubes open and draining/equalizing the pressure in her middle ear. This theory has the support of some empirical evidence--each time Dawn goes back on Effexor (even temporarily) the pain diminishes immediately. Dawn's a bit skeptical, since she felt even worse pain when she tapered the first time--she thinks it might be a possible side-effect.
We guess that once the boosted levels of norepinephrin disappear (as Dawn ceases taking the SNRI), the swelling increases, shutting the eustachian tubes, filling the middle ear with fluid and causing the painful pressure on the eardrum.
Thoughts? I'm pretty ignorant in this area but have been reading as much as I can. We may be completely off-base. The doctors we've talked to have no clue about the correlation between Effexor discontinuation and the ear pain though, so perhaps our opinions make at least a bit of sense.
If worse comes to worse, an ENT can perform a myringotomy--but obviously we're hoping it doesn't have to go that far. There seem to be some devices on the market (like the EarDoc, http://eardoc.info, and the EarPopper) but they're expensive and we're skeptical without knowing more. On Monday we make an appointment (hopefully for as soon as possible) with Dr. Chen. We're hoping that we can get an immediate referral to see an ENT specialist ASAP.
Dilbert Ultimate House
The Dilbert Ultimate House: http://www.unitedmedia.com/comics/dilbert/duh/tour.html
I first read about this in 2005. Coming back to it this past week, I begin drooling again at the thought of doing it for real.
Scott Adams also built the ultimate cube with IDEO: http://www.ideo.com/portfolio/re.asp?x=50099
(also: http://www.ideo.com/dilbert/)
I first read about this in 2005. Coming back to it this past week, I begin drooling again at the thought of doing it for real.
Scott Adams also built the ultimate cube with IDEO: http://www.ideo.com/portfolio/re.asp?x=50099
(also: http://www.ideo.com/dilbert/)
Saturday, July 26, 2008
Friday, July 25, 2008
Agence France-Presse Photo Feed
I'd love to have FlickrFan for Windows, but for now it's Mac-only. So I'm using Google Screensaver, which accepts RSS feed enclosures as a source for images.
FlickrFan feeds I subscribe to:
http://static.flickrfan.org/afp/rss.xml
And the AP photo feed:
http://static.flickrfan.org/ap/rss.xml
FlickrFan feeds I subscribe to:
http://static.flickrfan.org/afp/rss.xml
And the AP photo feed:
http://static.flickrfan.org/ap/rss.xml
Sunday, July 20, 2008
GRE Test Prep Baseline Score
Without any training, I scored a 620 Verbal (88th percentile) and 600 Quantitative (53rd percentile) on the GRE practice test 1.
Verbal words to review:
I've met my goal on the verbal (600, 85th percentile), but meeting the goal on the quantitative (750, 85th percentile) will take effort.
Verbal words to review:
- Spate: a sudden, almost overwhelming, outpouring: a spate of angry words.
- Provident: having or showing foresight; providing carefully for the future.
- Credulity: willingness to believe or trust too readily, esp. without proper or adequate evidence; gullibility.
- Boon: something to be thankful for; blessing; benefit.
- Inexorable: unyielding; unalterable: inexorable truth; inexorable justice.
- Confounding: To cause to become confused or perplexed
- Appropriate: to set apart, authorize, or legislate for some specific purpose or use
- Profligate: utterly and shamelessly immoral or dissipated; thoroughly dissolute.
- Myopic: unable or unwilling to act prudently; shortsighted.
- Rueful: feeling, showing, or expressing sorrow or pity; mournful; doleful: the rueful look on her face.
- Antithetical: directly opposed or contrasted; opposite.
- Evanescent: vanishing; fading away; fleeting.
- Gaffe: a social blunder; faux pas.
- Decorum: dignified propriety of behavior, speech, dress, etc.
- Dissuasion: persuading not to do or believe something; talking someone out of a belief or an intended course of action [ant: persuasion]
- Opportune: appropriate, favorable, or suitable: an opportune phrase for the occasion.
- Convenience: anything that saves or simplifies work, adds to one's ease or comfort, etc., as an appliance, utensil, or the like.
- Whet: to sharpen (a knife, tool, etc.) by grinding or friction.
- Ratios and recognizing trick questions regarding graphs
- If the initial answer seems obvious, it probably warrants additional attention. For example, x^2 is larger than x^3 with the constraint that 5x fall between 0 and 3.
- Systems of equations
- Double-check answers close to other possible choices.
- Trig review
I've met my goal on the verbal (600, 85th percentile), but meeting the goal on the quantitative (750, 85th percentile) will take effort.
Subscribe to:
Posts (Atom)