HTML5 Up and Running View Comments
I preordered Mark Pilgrim's HTML5, Up and Running from Amazon back in March. It's available for free as Dive into HTML5. I've been a fan of Mark's writing for a while, so buying the book was a way to thank him "with a buck". Interestingly, the online book and paper book are not identical. For starters, the titles are different. In addition, the beautiful fonts and cutesy images of the online version are gone. The paper book is your run-of-the-mill O'Reilly book. I'm not sure if it'll make much of a difference in my enjoyment, but we'll see.
As I said, I preordered the book in March, so I had no idea when it would be finished and delivered. It showed up on my doorstep this morning, on my birthday! We're on our way to NYC tomorrow for our first trip back there since we moved to North Carolina in 2007, so I know have some light pleasure reading. Perfect Timing!
I've only read the first chapter so far, but I think I'm going to love
it. I've done a lot of web programming in my life, but only maintain
my own sites now. I'm reading this book like a programmer might read a
book on astronomy... purely for the love of it. The first chapter goes
into the details of how the IMG tag was invented. Marc Andreessen
mentioned it on a mailing list back in 1993, and after some back and
forth, shipped it in Mosaic, an early browser. Because it shipped and
because it was popular, it got included in the HTML standards.
I still remember when Mosaic came out. I got my first email address in 1992 (vkurup@macc.wisc.edu) and somehow was on a mailing list announcing the impending release of Mosaic. I remember the text of the email basically saying that "This will change the world." Once I saw it, I thought it was cool, but way over-hyped. Who is going to want to wait for pictures to download over a 14.4K modem? Ridiculous. This is why you should not take my advice about new trends.
Anyway, the point of the IMG example is to show that HTML standards
have never been "pure", but have always been influenced by the
implementers and the users of the web. The way it should be. HTML5 is
an acknowledgment of that fact.
Primary Care Doctors View Comments
I used to be a primary care physician, but switched to being a hospitalist in 2007. I loved parts about being a PCP, namely the relationship that I developed with the patient over many years. I miss that. I think PCPs offer huge value in providing low cost, quality care, especially if they can stay engaged throughout the hospitalization process. Atul Gawande recently wrote a powerful article on the Hospice system. It's worth reading to being to understand the complex issues involved in end-of-life care, not to mention for the emotional storytelling that is his strength. But, to me, the unsung hero in that story was Chuck Morris, the primary care physician, who came in at the proper moment and provided perspective to the patient that he knew so well, allowing them to make the sane, yet horribly difficult decision to pursue a palliative path. Reading that made me miss primary care medicine a little. I perform much more actual "medical" work as a hospitalist than I ever did as a PCP. But, when I think of the concept of a doctor, in my head, I'm thinking of a primary care doc.
Maps are functions, too View Comments
Braindump time. Here's what I've read about clojure in the past few days. I don't understand what this means yet, but maybe someday I will:
Clojure provides easy access to the Java frameworks, with optional type hints and type inference, to ensure that calls to Java can avoid reflection.
There are multiple languages that target the JVM (besides Java, of course). It seems that there are 2 classes of languages. Ported languages such as JRuby and Jython aim to be identical to their base languages (Ruby & Python). Native languages such as Clojure and Groovy are meant to target the JVM natively without satisfying any desire to be identical to another language. Native languages have the advantage that they only have 1 set of libraries to use, so you don't get stuck between two languages.
I installed clojure 1.0 from the ubuntu repositories, but promptly uninstalled it once I found leiningen. Leiningen is a build tool for clojure. You can easily create a new project and specify its dependencies and leiningen will download those dependencies, including a full version of clojure for each project. You can have 1 project using leiningen 1.0 and another using version 1.2 sitting right next to it. That seems smart!
I installed clojure-mode on emacs.
Right now, I'm working my way through the labrepl project. It's an interactive tutorial and REPL (read-eval-print-loop) where you can run the examples in the tutotial.
It's always important to know how to find help:
(doc blah) gives documentation about blah.
(find-doc "blah") searches for documentation.
(javadoc blah) opens Java docs in your browser
(show java.util.Date) shows method signatures
Here's something cool: Maps are associative arrays. Here's a simple one:
(def me {:first-name "Vinod", :last-name "Kurup"})
To get the data, you use the get function, like you would in other languages:
(get me :first-name) -> "Vinod"
But, maps and keywords are functions as well, so you can do:
(me :first-name) -> "Vinod"
(:last-name me) -> "Kurup"
Ubuntu Bluetooth Workaround View Comments
I use bluetooth to transfer podcasts from my laptop to my Palm Centro. A
Palm Centro is like an iPhone or a Droid, except less smart-like and
more phone-like. This worked beautifully but broke when I upgraded to
Ubuntu 10.04 (Lucid
Lynx). There are 2 bugs involved. First, the bluetooth daemon
(/usr/sbin/bluetoothd) never gets started. Second, there's no easy way to
start the file transfer daemon automatically (/usr/bin/dund). This used
to work automatically, but now it doesn't. I've tried to fiddle with udev
rules, but have been unsuccessful. I've reported the 2 bugs, but haven't
had any response
yet. (bluetoothd bug)
(dund bug)
My workaround is a shell script which starts those those daemons if they are not running:
#!/bin/bash
BLUETOOTH='bluetoothd'
DUN='dund'
# first start bluetoothd
if ps ax | grep -v grep | grep $BLUETOOTH > /dev/null
then
echo "$BLUETOOTH is running."
else
echo -n "Starting $BLUETOOTH..."
/usr/bin/sudo /usr/sbin/bluetoothd -u &> /dev/null
echo "done."
fi
# then start dund
if ps ax | grep -v grep | grep $DUN > /dev/null
then
echo "$DUN is running."
else
echo -n "Starting $DUN..."
/usr/bin/sudo /usr/bin/dund --listen --persist --msdun call centro
echo "done."
fi
And here's my script which transfers the files to my phone. It uses pilot-link, which I had to compile from source due to a bug in the way that the Ubuntu version addresses large SD cards. This should be fixed in the next version of Ubuntu.
#!/bin/bash
output=$(pilot-xfer -p net:any -D /Kingston/AUDIO -i *.mp3 2>&1)
errors=$(echo $output | grep -c "ERROR:")
if [ $errors -gt 0 ] ; then
echo "failure (count: $errors)"
echo $output
else
echo -n "success, removing files from laptop..."
/bin/rm -I $HOME/*.mp3
echo "done."
fi
If you're wondering why I use a slow protocol like bluetooth to transfer large files to an SD card, rather than just ejecting the SD card and inserting it into the laptop, well... you haven't tried to access the SD card on a Palm Centro. #paininthe*&^@!
Hospitalist Notes 1 View Comments
My last night shift was a little less busy than most, so I forced myself to pick something about each patient I admitted and look it up. I tend to do this anyway, but I never keep notes or write about it. Here's what I wrote about that night:
Answer: No. The full report on Micromedex was a little conflicting, because it stated that there may be some withdrawal symptoms from Buspar, but this quote in the same profile suggests otherwise:
Data suggest that buspirone does not cause physical dependence and as such, no withdrawal effects have been noted (Rickels et al, 1988a; Tyrer et al, 1985; Cole et al, 1982).
I always forget the cutoffs for the stages of COPD. There are 2 different guidleines - GOLD and ATS/ARS, but fortunately they are almost identical:
Patients need to have an FEV1/FVC ratio < 0.70. Staging is then based on the FEV1.
Reference: Annals
We always put diabetic patients on an ADA diet and I choose the calorie level by gestalt. I figured there must be some formula to calculate the calorie level based on the patient's weight. Looking it up, I found a different answer altogether. The ADA no longer recommends an ADA diet in the hospital. Instead, they recommend a consistent-carbohydrate diet. In long-term care facilities (i.e. nursing homes), they go a step further and recommend a 'Regular' diet with consistency in the amount and timing of carbohydrate. They specifically state that there is no evidence to support the classic 'No concentrated sweets' diet. These guidelines are from 2007, but they obviously have not been widely disseminated yet.
It is recommended that the term “ADA diet” no longer be used, since the ADA no longer endorses a single nutrition prescription or percentages of macronutrients.
Reference: Diabetes Care
Association of anemia with diastolic dysfunction among patients with coronary artery disease in the Heart and Soul Study View Comments