I got a letter from Comcast telling me my cable modem was so old that they were going to drop support for it. Whaddaya talkin' about, I thought. It's only like 10 years old--the first rev of the Linksys BEFCMU10. I was getting 2-6 Mbps downloads according to speakeasy, so I figured what more could I need?
Just for shits and giggles, I went out and bought a Motorola Docsis 3.0 SB6120, since in my area Comcast has some crazy fast internet options. My old modem was only Docsis 1.0. After a fairly painless and short phone call to a special Comcast number (877 735 3499), I was up and running...at freakin 35Mbps!
I didn't change service plans. I just got a faster modem. And blamo, I got a 5-10 fold increase in throughput. I love Comcast. Even if their DNS shits the bed more often than one would like. Just plugin in Google's 8.8.8.8 DNS servers as your backup.
Comcast, I love you.
Tuesday, November 30, 2010
Wednesday, October 20, 2010
SQLDeveloper dies becuase it can't mkdir in /home on OSX 10.6
This was totally weird. SQLDeveloper crashed on OSX. I attempted to restart it and got a popup telling me "Error creating user home in directory /home/[some place]".
The [some place] was actually my unix NFS home directory. It's totally beyond me how OSX figured out my NFS home directory for my unix account (which is by the way the same account as my osx account).
I commented out some automounter thing according to this article: http://discussions.apple.com/messageview.jspa?messageID=5665487&stqc=true
Then I rebooted and SQLDeveloper worked again.
The [some place] was actually my unix NFS home directory. It's totally beyond me how OSX figured out my NFS home directory for my unix account (which is by the way the same account as my osx account).
I commented out some automounter thing according to this article: http://discussions.apple.com/messageview.jspa?messageID=5665487&stqc=true
Then I rebooted and SQLDeveloper worked again.
Sunday, August 22, 2010
iPod Touch 2.2.1 to 3.x
When the ipod touch 3.0 update came out, I didn't touch it. I had heard of too many applications going off the deep end. When the 4.0 firmware came out, I didn't touch it for the same reason.
But now most apps require the 3.0 firmware, so I went to make the upgrade. But I couldn't find the 3.0 or 3.1 (or 3 dot anything) searching on iTunes, even after upgrading to iTunes 9 (which, by the way, was really weird: upgrade to iTunes 9, and then have iTunes 9 tell you that in order to use the iTunes store within iTunes, you have to upgrade Safari 5...makes you feel like you're stuck in the Mac version of DLL Hell. Two reboots later, you're "current". Way to make me feel like I'm running Windows 95, guys.
Apparently when iOS 4 came out, it became the "best". But since first-gen ipod touches can't run iOS 4, version 2.2.1 became "best" according to iTunes. It's as if there's no version 3.0/3.1....but this post tells you how to get your first-gen IPT to run 3.1.
It all begs the question: how the fuck am I supposed to know what "generation" of an iPod touch I have? It doesn't say anywhere what the generation is.
But now most apps require the 3.0 firmware, so I went to make the upgrade. But I couldn't find the 3.0 or 3.1 (or 3 dot anything) searching on iTunes, even after upgrading to iTunes 9 (which, by the way, was really weird: upgrade to iTunes 9, and then have iTunes 9 tell you that in order to use the iTunes store within iTunes, you have to upgrade Safari 5...makes you feel like you're stuck in the Mac version of DLL Hell. Two reboots later, you're "current". Way to make me feel like I'm running Windows 95, guys.
Apparently when iOS 4 came out, it became the "best". But since first-gen ipod touches can't run iOS 4, version 2.2.1 became "best" according to iTunes. It's as if there's no version 3.0/3.1....but this post tells you how to get your first-gen IPT to run 3.1.
It all begs the question: how the fuck am I supposed to know what "generation" of an iPod touch I have? It doesn't say anywhere what the generation is.
Tuesday, July 27, 2010
OSX Key Remapping Hell
I'm in OSX keyboard remaping hell. For decades I used a PC. Then I switched to a Mac because I wanted huge memory and I didn't want 64-bit XP. I have a Kinesis keyboard, and because ctrl-c and ctrl-v are now hardwired into my brain (or into my fingers--this is muscle memory I'm talking about, not actual key labels), I wanted to get my mac to understand that copy is ctrl-c and paste is ctrl-v.
Simple enough using the "Keyboard Shortcuts". It worked for years.
Until one day my IT team updated my OS and all of a sudden ctrl-v in mail.app sends my cursor to the bottom of the email that I'm composing. When I hit ctrl-v *again*, it pastes. At the fucking bottom of the email. I poked around some forums and recalled from my days as a Unix programmer that ctrl-v is Emacs for "page down". Why the shit OSX's Mail.app decided to all of a sudden start speaking partial Emacs is totally bizarro. But that's what it did. Fuckers.
How to fix this? Open up /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict and yank these lines:
<key:>^C</key>
<string>insertNewline:</string>
<key:>~^C</key>
<string>insertNewlineIgnoringFieldEditor:</string>
<key:>^V</key>
<string>pageDownAndModifySelection:</string>
<key:>^v</key>
<string>pageDown:</string>
Oh yeah, and then as a final up yours from Apple, you have to reboot.
Simple enough using the "Keyboard Shortcuts". It worked for years.
Until one day my IT team updated my OS and all of a sudden ctrl-v in mail.app sends my cursor to the bottom of the email that I'm composing. When I hit ctrl-v *again*, it pastes. At the fucking bottom of the email. I poked around some forums and recalled from my days as a Unix programmer that ctrl-v is Emacs for "page down". Why the shit OSX's Mail.app decided to all of a sudden start speaking partial Emacs is totally bizarro. But that's what it did. Fuckers.
How to fix this? Open up /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict and yank these lines:
<key:>^C</key>
<string>insertNewline:</string>
<key:>~^C</key>
<string>insertNewlineIgnoringFieldEditor:</string>
<key:>^V</key>
<string>pageDownAndModifySelection:</string>
<key:>^v</key>
<string>pageDown:</string>
Oh yeah, and then as a final up yours from Apple, you have to reboot.
Sunday, May 16, 2010
Surgery for laryngomalacia and an omega shaped epiglottis
My infant son was diagnosed with laryngomalacia a few days after he was born. He had a wicked stridor, and we found it mildly entertaining that our son sounded like an 80 year old lifelong smoker. We were told after a year or two the condition would right itself. No need to worry. Everyone kept saying how incredibly rare it was for a baby to require any kind of intervention for laryngomalacia. No doubt it's rare. Alas, our baby was the rare case.
The first trip in the ambulance in the middle of the night to Boston's Children's Hospital was scary. My son just kinda, well, seemed to stop breathing. He was flailing all about, trying very hard to get a breath. When he did catch a breath, he was panicked. He'd cry a terrible cry and then settle down. This happened a few times and we called our pedi, who told us to call an ambulance. About 2 minutes later, we lit up the street like a Christmas tree with a firetruck, an ambulance, and an EMT SUV.
I had to stay at home with our 2.5 year old daughter, so my wife got to stay with our son at the ER. Putting a 9 week old through throat x-rays, chest x-rays, a scoping from the ORL, and the associated medical examinations traumatized my wife. If I were there I probably would have been traumatized.
My son stayed for observation in the neonatal intensive care unit (or as everyone calls it, the "NICK-U") for a few days, during which time nothing interesting happened. A few days later we saw a pediatric ORL (that's what ENTs like to be called--ENT seems too vulgar; stick with the Latin). My boy got scoped, which isn't as miedeval as it sounds. They gently thread a very small fiber optic wire up his nose and down his throat to take a look. It's not terribly comfortable, but it's actually not very invasive, and after a bit of fusiness during the 2 minute scoping, our son was undisturbed. The ORL said that he thought our son would benefit from a supraglottoplasty, where they basically zorch away some extra material in his larynx with a laser and make a few incisions in the hope of changing the shape of his epiglottis.
We thought this was a bit radical. After all, putting an 11 week old under general anesthesia scared the bejeezus out of us. So we scheduled the surgery for about 6 weeks out. Then my son had what the nurses called a "scary incident", which is a bit of an understatement: my son kinda sorta stopped breathing a few times for about 5-10 seconds each time. Both times he had a bit of a cold, but steaming him in the bathroom didn't improve the situation. Instead he seized up, flailing about while trying to breath. I had just taken an infant CPR course, so I gave him a few back blows, which opened up his airway and he started breathing again.
That won us another ticket into the ER and then straight to the NICU. It also presented an opportunity to do the surgery within days instead of weeks, forcing our hand. We chose the surgery. It was not an easy decision, but he has clearly benefited from the surgery. The airway of a baby is pretty dang small, and when it gets kind of cloggy from excess material, it gets a bit smaller. Then when the kid gets a cold, all that phlegm clogs things even more, shrinking the airway still further. So the margin for error gets really, really small. Under just the right circumstances, without absolutely constant vigilance, something really bad might happen. So the surgery hasn't fixed everything, but it has widened our margin for error.
We had great doctors, but doctors never seem to describe in enough detail exactly what recovery is going to look like. We'd been warned that after the surgery he'd be a little groggy, but this wasn't even close to reality. He went from a sweet 11 week old to a total basket case while the anesthesia wore off. He was acting like a 13 pound newborn--complete loss of muscle control. It was a scary night watching the anesthesia wear off. It took a good 48 hours before he was really back to his normal self. But even then he demanded constant affection, snuggling, and attention for about a week. Understandably, he needed reassurance that his family was still there and still loved him.
After we checked out of the hospital, our son started drooling a ton. Perfectly normal part of the healing process. Except that all that drool caused him to gag a lot. Gagging caused him to barf. A barfing baby is a baby who's not getting enough calories, so this was pretty alarming. He also sounded about 10 times *worse* after the surgery for a few days--also normal. It's a sort of take 2 steps backward to take 3 steps forward kind of thing. After about a week, he showed real improvement. His poops were really weird for a few days, which is typical when you starve a baby for 6 hours and then give him anesthesia.
Zantac tastes awful, and our son thought so too. He gagged on it a lot. Dribbling 8mL of Zantac into a screaming baby's mouth 0.5mL at a time sucks for everyone. But having acid reflux splatter all over cuts in one's throat sucks a lot more. So the Zantac was a huge help.
Our son's temperament worsened for a while and he freaked out whenever he was in any kind of medical situation, no matter how innocuous. But after a few weeks he promptly forgot and was all smiley for the pediatrician.
A few weeks after the surgery, our son had some scary retractions while giggling for the first time. He started wheezing and was clearly working a bit harder then normal to breath. This earned us trip #3 to the ER. This time, though, both my wife and I were able to go with our son, and this time we had to play the heavy and basically demand that they do nothing to our son other than to check his O2 level and have the ORL come down to scope him. Thankfully he was fine, but whenever he gets a cold he has to work a bit harder to breath.
The first trip in the ambulance in the middle of the night to Boston's Children's Hospital was scary. My son just kinda, well, seemed to stop breathing. He was flailing all about, trying very hard to get a breath. When he did catch a breath, he was panicked. He'd cry a terrible cry and then settle down. This happened a few times and we called our pedi, who told us to call an ambulance. About 2 minutes later, we lit up the street like a Christmas tree with a firetruck, an ambulance, and an EMT SUV.
I had to stay at home with our 2.5 year old daughter, so my wife got to stay with our son at the ER. Putting a 9 week old through throat x-rays, chest x-rays, a scoping from the ORL, and the associated medical examinations traumatized my wife. If I were there I probably would have been traumatized.
My son stayed for observation in the neonatal intensive care unit (or as everyone calls it, the "NICK-U") for a few days, during which time nothing interesting happened. A few days later we saw a pediatric ORL (that's what ENTs like to be called--ENT seems too vulgar; stick with the Latin). My boy got scoped, which isn't as miedeval as it sounds. They gently thread a very small fiber optic wire up his nose and down his throat to take a look. It's not terribly comfortable, but it's actually not very invasive, and after a bit of fusiness during the 2 minute scoping, our son was undisturbed. The ORL said that he thought our son would benefit from a supraglottoplasty, where they basically zorch away some extra material in his larynx with a laser and make a few incisions in the hope of changing the shape of his epiglottis.
We thought this was a bit radical. After all, putting an 11 week old under general anesthesia scared the bejeezus out of us. So we scheduled the surgery for about 6 weeks out. Then my son had what the nurses called a "scary incident", which is a bit of an understatement: my son kinda sorta stopped breathing a few times for about 5-10 seconds each time. Both times he had a bit of a cold, but steaming him in the bathroom didn't improve the situation. Instead he seized up, flailing about while trying to breath. I had just taken an infant CPR course, so I gave him a few back blows, which opened up his airway and he started breathing again.
That won us another ticket into the ER and then straight to the NICU. It also presented an opportunity to do the surgery within days instead of weeks, forcing our hand. We chose the surgery. It was not an easy decision, but he has clearly benefited from the surgery. The airway of a baby is pretty dang small, and when it gets kind of cloggy from excess material, it gets a bit smaller. Then when the kid gets a cold, all that phlegm clogs things even more, shrinking the airway still further. So the margin for error gets really, really small. Under just the right circumstances, without absolutely constant vigilance, something really bad might happen. So the surgery hasn't fixed everything, but it has widened our margin for error.
We had great doctors, but doctors never seem to describe in enough detail exactly what recovery is going to look like. We'd been warned that after the surgery he'd be a little groggy, but this wasn't even close to reality. He went from a sweet 11 week old to a total basket case while the anesthesia wore off. He was acting like a 13 pound newborn--complete loss of muscle control. It was a scary night watching the anesthesia wear off. It took a good 48 hours before he was really back to his normal self. But even then he demanded constant affection, snuggling, and attention for about a week. Understandably, he needed reassurance that his family was still there and still loved him.
After we checked out of the hospital, our son started drooling a ton. Perfectly normal part of the healing process. Except that all that drool caused him to gag a lot. Gagging caused him to barf. A barfing baby is a baby who's not getting enough calories, so this was pretty alarming. He also sounded about 10 times *worse* after the surgery for a few days--also normal. It's a sort of take 2 steps backward to take 3 steps forward kind of thing. After about a week, he showed real improvement. His poops were really weird for a few days, which is typical when you starve a baby for 6 hours and then give him anesthesia.
Zantac tastes awful, and our son thought so too. He gagged on it a lot. Dribbling 8mL of Zantac into a screaming baby's mouth 0.5mL at a time sucks for everyone. But having acid reflux splatter all over cuts in one's throat sucks a lot more. So the Zantac was a huge help.
Our son's temperament worsened for a while and he freaked out whenever he was in any kind of medical situation, no matter how innocuous. But after a few weeks he promptly forgot and was all smiley for the pediatrician.
A few weeks after the surgery, our son had some scary retractions while giggling for the first time. He started wheezing and was clearly working a bit harder then normal to breath. This earned us trip #3 to the ER. This time, though, both my wife and I were able to go with our son, and this time we had to play the heavy and basically demand that they do nothing to our son other than to check his O2 level and have the ORL come down to scope him. Thankfully he was fine, but whenever he gets a cold he has to work a bit harder to breath.
Thursday, April 1, 2010
Sweetpea3 iTunes Script
I love the Sweetpea3. We got it for my 2.5 year old daughter many months ago, and she's been enjoying it ever since. The one bummer is that it's basically a USB file system, so it lacks any integration with iTunes. Things get even worse if most of your music is in AAC format, since Sweetpea3 only plays MP3s. You have to figure out what kind of format your song is in on iTunes, then maybe change it to MP3, find it on disk, and then copy it to the Sweetpea3 player. What a pain in the ass.
So, being a programmer on paternity leave, I figured I'd learn Applescript and automate the whole process. I wrote a simple script that will copy the highlighted songs in iTunes--automagically converting them to MP3 on-the-fly if needed--to the desired playlist on the Sweetpea3. It wipes all MP3s on the chosen playlist before it copies the new ones. If you've changed the name of your Sweetpea3 to something other than "SWEETPEA3", you're SOL because this little script hardcodes this device name.
Give it a go if you're a Mac user and a Sweetpea3 owner. Drop me a line and let me know how you like it.
My two cents on Applescript is that it's the opposite of Perl: it's easy to read and bloody impossible to write. It's massively frustrating especially if you actually know anything about computers, like file paths, or heaven forbid Unix. So coming from a Java, SQL and Unix background, I found Applescript a real nightmare. But I was able to bang out the core of this script over the course of a half dozen baby naps.
Here's the source. Paste this into the Script Editor application and save it as an "Application Bundle" in your Library/Scripts folder. Then you can access it in the little scripts icon on the toolbar.
It's not terribly elegant, but it makes life easier. 'Nuff said.
So, being a programmer on paternity leave, I figured I'd learn Applescript and automate the whole process. I wrote a simple script that will copy the highlighted songs in iTunes--automagically converting them to MP3 on-the-fly if needed--to the desired playlist on the Sweetpea3. It wipes all MP3s on the chosen playlist before it copies the new ones. If you've changed the name of your Sweetpea3 to something other than "SWEETPEA3", you're SOL because this little script hardcodes this device name.
Give it a go if you're a Mac user and a Sweetpea3 owner. Drop me a line and let me know how you like it.
My two cents on Applescript is that it's the opposite of Perl: it's easy to read and bloody impossible to write. It's massively frustrating especially if you actually know anything about computers, like file paths, or heaven forbid Unix. So coming from a Java, SQL and Unix background, I found Applescript a real nightmare. But I was able to bang out the core of this script over the course of a half dozen baby naps.
Here's the source. Paste this into the Script Editor application and save it as an "Application Bundle" in your Library/Scripts folder. Then you can access it in the little scripts icon on the toolbar.
It's not terribly elegant, but it makes life easier. 'Nuff said.
on f_exists(the_path)
try
get the_path as alias
return true
on error
return false
end try
end f_exists
if not f_exists(":Volumes:SWEETPEA3") then
display dialog "Sweetpea MP3 player is not attached."
return
end if
tell application "iTunes"
copy selection to selectedTracks
if length of selectedTracks is 0 then
display dialog "No tracks have been selected in iTunes. Please select tracks (not just a playlist) explicitly."
return
end if
end tell
set playList to choose from list {"Playlist 1", "Playlist 2", "Playlist 3"} with prompt "Which Playlist?"
if playList is "" then return
if playList is equal to {"Playlist 1"} then
set destinationDir to "/Volumes/SWEETPEA3"
else if playList is equal to {"Playlist 2"} then
set destinationDir to "/Volumes/SWEETPEA3/play2"
else if playList is equal to {"Playlist 3"} then
set destinationDir to "/Volumes/SWEETPEA3/play3"
else
display dialog "No playlist selected."
return
end if
tell application "iTunes"
copy selection to selectedTracks
if length of selectedTracks is 0 then
display dialog "No tracks selected in iTunes. Please select tracks (not just a playlist)."
return
end if
tell application "Finder"
do shell script "rm -f " & quoted form of destinationDir & "/*.mp3"
end tell
set numTracks to count selectedTracks
if numTracks is 0 then
display dialog "No tunes selected. Please select the tracks you'd like to copy."
quit
end if
repeat with t in selectedTracks
set trackLocation to get location of t
set pathName to POSIX path of trackLocation
set trackFormat to get kind of t
if trackFormat is "AAC audio file" then
set current encoder to encoder "MP3 Encoder"
set copiedTrack to item 1 of (convert t)
set copiedTrackPath to POSIX path of (get location of copiedTrack)
tell application "Finder"
do shell script "mv " & quoted form of copiedTrackPath & " " & quoted form of destinationDir
end tell
delete copiedTrack
else
tell application "Finder"
do shell script "cp -p " & quoted form of pathName & " " & quoted form of destinationDir
end tell
end if
end repeat
end tell
display dialog "Exported " & numTracks & " songs to SweetPea " & playList & "."
Thursday, March 11, 2010
Trio Sequencing
Check out this article from NYTimes on trio sequencing. My prediction is that within a generation, sequencing your immediate family will be a routine luxury.
Wednesday, March 10, 2010
Grace Triflex: Not on my roof!
It's time to replace our roof. I've talked to three different roofing contractors after finding them on Angie's List. Two of them understand the issues that my 1930s New England bungalow, with its unvented roof, presents. The other one was trying to push a bunch of bad product onto my roof.
If I were building a new roof that was properly vented and I needed to dry it in for a month in Wisconsin in January, I'd probably want to use something like Grace Triflex 30 as an underlayment. It's water repellent, strong, doesn't tear, and won't degrade from UV light (for a while at least). But with a permeability of about 0.5, it also doesn't breathe worth a damn when compared to traditional roofing felt/tar paper. In new construction roofing with proper ventilation, this doesn't matter. In an 80 year old house with an unvented roof and an improved attic with knee walls and all kinds of loose, leaky construction, this is a Very Bad Thing To Do, especially when you slather Grace Ice and Water Shield all over other parts of the roof.
The problem is that unvented roofs need to breathe water vapor out the roof. Ice and water shield doesn't pass water vapor. Triflex sort of does, but not very well. My suspicion, after doing a bit of research, is that putting this stuff on an old roof with poor roof ventilation will greatly accelerate dry rot. It's a great product applied in the wrong situation, like using peanut butter when the situation calls for Astroglide.
Check out some research on this topic from RCI, Incorporated:
Overview of Underlayments
Overview of Underlayments Part 2
Roofing Upgrades Gone Wrong
Interestingly, when I made this claim to the roof salesman, he said "This stuff hasn't been around long enough to demonstrate that it causes dry rot." The guy was doing a hard sell. It was weird to have a roof salesman do a hard sell. It's a roof--not a car. Of all the contractors I've talked to over the years, this was the first one with a real hardnose sales pitch, which made me suspicious. But his comment made me even less likely to use the product. It hasn't been around long enough to prove itself. Roofing felt and tar paper, while imperfect, are well understood technologies whose upsides and downsides can be worked around. I'm sure Triflex is a great product for the right house. But I doubt it's the right thing for older, unvented roofs.
If I were building a new roof that was properly vented and I needed to dry it in for a month in Wisconsin in January, I'd probably want to use something like Grace Triflex 30 as an underlayment. It's water repellent, strong, doesn't tear, and won't degrade from UV light (for a while at least). But with a permeability of about 0.5, it also doesn't breathe worth a damn when compared to traditional roofing felt/tar paper. In new construction roofing with proper ventilation, this doesn't matter. In an 80 year old house with an unvented roof and an improved attic with knee walls and all kinds of loose, leaky construction, this is a Very Bad Thing To Do, especially when you slather Grace Ice and Water Shield all over other parts of the roof.
The problem is that unvented roofs need to breathe water vapor out the roof. Ice and water shield doesn't pass water vapor. Triflex sort of does, but not very well. My suspicion, after doing a bit of research, is that putting this stuff on an old roof with poor roof ventilation will greatly accelerate dry rot. It's a great product applied in the wrong situation, like using peanut butter when the situation calls for Astroglide.
Check out some research on this topic from RCI, Incorporated:
Overview of Underlayments
Overview of Underlayments Part 2
Roofing Upgrades Gone Wrong
Interestingly, when I made this claim to the roof salesman, he said "This stuff hasn't been around long enough to demonstrate that it causes dry rot." The guy was doing a hard sell. It was weird to have a roof salesman do a hard sell. It's a roof--not a car. Of all the contractors I've talked to over the years, this was the first one with a real hardnose sales pitch, which made me suspicious. But his comment made me even less likely to use the product. It hasn't been around long enough to prove itself. Roofing felt and tar paper, while imperfect, are well understood technologies whose upsides and downsides can be worked around. I'm sure Triflex is a great product for the right house. But I doubt it's the right thing for older, unvented roofs.
Sunday, February 21, 2010
Some Recent Coffee Experiences
After the birth of my 2nd child, my wife thankfully encouraged me to go grab a shot at Barismo in Arlington Center. Lord knows with a newborn you need all the uppers you can get. Barismo was totally mind-blowing. The best shot of espresso I have ever had. On the day that I was there they were serving Koke. I went back the day after and had a 50/50 Doppelganger. Both were excellent, fully of crema. The Doppelganger had a downright raspberry flavor to it that I've never experienced with espresso. The Doppelganger was the first shot of espresso I've ever had that required absolutely no sugar. I bought some of the Koke and when I had it at home with my Mazzer Mini and Pavoni, it was delightful as well. Barismo is an experience unto itself, and it doesn't hide the fact that if you want really amazing espresso, coffee, or tea, you have to wait for it. Each shot requires some patience, but it's totally worth it. If the line is out the door, come back some other time. But if you hit the place in the middle of a slow weekday, you're in for a treat.
My mother in law--a huge fan of coffee--arrived a few days later to help take care of our son and as a treat I took her to see George Howell's new-ish coffee operation in Ashland, MA. We didn't make an appointment and truth be told I wasn't sure if the place was going to be corporate HQ offices, a giant loading dock, or an actual cafe. We just sort of stumbled into the place, walked into the back room and met George and his lovely daughter. George was kind enough to take me, my mother in law, and my 2.5 year old daughter on a quick tour of the operation, showing us a bit of R&D, bean packaging, roasting, and tasting. It was awesome. And his daughter pulled me a shot that rivaled Barismo's. It's clear that George loves coffee and all of the details that go into a relatively high throughput (at least compared to Barismo) roasting operation. I was a kid when George first opened coffee connection and as a teenager I lamented the dropoff in quality when the Coffee Connection was dragged asunder by Charbucks. So I'm very excited to see George Howell back at it, delivering us from the evils of Starbucks' brand of super dark, burned, thin coffee. I usually buy George's beans from Whole Foods, but I notice that sometimes the beans aren't terribly fresh. Mail order from GHH is pretty speedy and the beans are always very fresh.
Update: Some great espresso beans from George Howell: Kaguimoini, Sorento, and Gingerbread. All are terrific. The Kaguimoini is very complex. The Sorento is more caramel-y and chocolaty.
My mother in law--a huge fan of coffee--arrived a few days later to help take care of our son and as a treat I took her to see George Howell's new-ish coffee operation in Ashland, MA. We didn't make an appointment and truth be told I wasn't sure if the place was going to be corporate HQ offices, a giant loading dock, or an actual cafe. We just sort of stumbled into the place, walked into the back room and met George and his lovely daughter. George was kind enough to take me, my mother in law, and my 2.5 year old daughter on a quick tour of the operation, showing us a bit of R&D, bean packaging, roasting, and tasting. It was awesome. And his daughter pulled me a shot that rivaled Barismo's. It's clear that George loves coffee and all of the details that go into a relatively high throughput (at least compared to Barismo) roasting operation. I was a kid when George first opened coffee connection and as a teenager I lamented the dropoff in quality when the Coffee Connection was dragged asunder by Charbucks. So I'm very excited to see George Howell back at it, delivering us from the evils of Starbucks' brand of super dark, burned, thin coffee. I usually buy George's beans from Whole Foods, but I notice that sometimes the beans aren't terribly fresh. Mail order from GHH is pretty speedy and the beans are always very fresh.
Update: Some great espresso beans from George Howell: Kaguimoini, Sorento, and Gingerbread. All are terrific. The Kaguimoini is very complex. The Sorento is more caramel-y and chocolaty.
Wednesday, February 3, 2010
Hibernate/JPA confuses "legacy" with "high throughput", "scalable", and "complex"
I like Hibernate/JPA for dead-simple inserts and update. I detest it for queries. I also detest how the Hibernate documentation totally misuses the term "legacy". When I hear the term "legacy", I think "old and dumb". But on planet Hibernate, "legacy" means "Any application which operates on a piddly amount of data and doesn't buy into our myopic, java-centric view of the cosmos in which a relational database is just a pain-in-the-ass file system whose performance and data integrity issues exist only to perpetuate the hiring of very expensive DBAs".
For example, Hibernate says it doesn't support trigger-driven sequence creation because that's a "legacy" kind of a thing. What if my database is accessed both by Scala, Ruby, Perl, and Java? I'd like to encode some core business rules directly in the database so I don't have to duplicate logic in different languages. I don't call that "legacy". I call it "reality".
Hibernate thinks that compound unique keys are indicative of a "legacy" database. There are perfectly good reasons--from a (gasp!) data modeling perspective--to use complex unique keys and dispense with primary keys. Having to introduce new artificial primary keys into all my tables to make life easier for the object layer is something I am now more or less required to do so as not to infuriate application developers. But there is a real cost to the data model: the data model is forced to violate DRY. The data model has to maintain two redundant definitions of uniqueness: one that is natural and one that is imposed by Hibernate. Hibernate claims that having a foreign key refer to a unique key of the associated table rather than the primary key is "complicated and confusing". This is bullshit.
Hibernate thinks that only "legacy" tables have lots of columns. In reality, it's often very useful to make really fat tables to accomodate what would otherwise be complex, possibly inefficient multi-table queries. I've made fat tables before and I'll make them again. It's not legacy, it's reality.
Hibernate thinks that everyone should have "fewer tables than classes", and then claims that storing some attributes in a secondary table (hello
My needs aren't legacy needs. These are the needs of reality.
For example, Hibernate says it doesn't support trigger-driven sequence creation because that's a "legacy" kind of a thing. What if my database is accessed both by Scala, Ruby, Perl, and Java? I'd like to encode some core business rules directly in the database so I don't have to duplicate logic in different languages. I don't call that "legacy". I call it "reality".
Hibernate thinks that compound unique keys are indicative of a "legacy" database. There are perfectly good reasons--from a (gasp!) data modeling perspective--to use complex unique keys and dispense with primary keys. Having to introduce new artificial primary keys into all my tables to make life easier for the object layer is something I am now more or less required to do so as not to infuriate application developers. But there is a real cost to the data model: the data model is forced to violate DRY. The data model has to maintain two redundant definitions of uniqueness: one that is natural and one that is imposed by Hibernate. Hibernate claims that having a foreign key refer to a unique key of the associated table rather than the primary key is "complicated and confusing". This is bullshit.
Hibernate thinks that only "legacy" tables have lots of columns. In reality, it's often very useful to make really fat tables to accomodate what would otherwise be complex, possibly inefficient multi-table queries. I've made fat tables before and I'll make them again. It's not legacy, it's reality.
Hibernate thinks that everyone should have "fewer tables than classes", and then claims that storing some attributes in a secondary table (hello
@Secondary
annotation) is really only for...you guessed it..."legacy" databases. Hold the phone. What if I have some bit of data that is part of an object but needs database-level security? For example, if I have a patient table and I want to expose access to social security numbers, perhaps I'd like to put the social security numbers in a separate table, or in a separate schema, and have the database manage the security of this table slightly differently? What if I have some huge freakin' columns that map to a particular subclass of an object, but I'd like to keep them stored separately for query performance? What if these columns are extremely rarely used? I don't want to risk pulling them all into memory (which I can control by FetchType.EAGER
). I want to manage the storage for these data differently. Maybe the data is so large that I need to partition the backing tables. Hibernate seems to be saying that these situations are for those stupid old "legacy" applications. Just let your object model define the data model! What could possibly go wrong? My needs aren't legacy needs. These are the needs of reality.
Tuesday, January 26, 2010
Installing artifact: [your file name here] (Input/output error), Result too large, and disk errors.
From time to time I was getting the "[INFO] Error installing artifact: [your file name here] (Input/output error)" error message from Maven. It started happening at seemingly random points during maven builds but it seemed to favor bonking on large zip/war files. Then I started seeing "Result too large" errors. At that point I made sure I had a clean backup on the sever, rebooted, and crossed my fingers.
My machine failed to boot. It just sat there with the black and white whirly thingy Mac startup screen.
I chalked the problem up to I/O gremlins from the planet Zorng, so I called my IT group, who dropped the Disk Utility and Disk Warrior bombs on my SSD. After they were done, I had to manually refresh my Spotlight index, which took a few hours, but then things were back to normal. One other thing I learned: don't let IDEA attempt to re-index files until *AFTER* you've let Spotlight update its own index.
My machine failed to boot. It just sat there with the black and white whirly thingy Mac startup screen.
I chalked the problem up to I/O gremlins from the planet Zorng, so I called my IT group, who dropped the Disk Utility and Disk Warrior bombs on my SSD. After they were done, I had to manually refresh my Spotlight index, which took a few hours, but then things were back to normal. One other thing I learned: don't let IDEA attempt to re-index files until *AFTER* you've let Spotlight update its own index.
Saturday, January 23, 2010
Ice dam prevention time!
The neighbors must think I'm a bit nuts for how often I rake snow off the roof. At least that's what I thought until I saw the guy across the street actually climb up on his roof in January with a shovel and start shoveling it off. I use a very long roof rake to clear snow and I stand on the ground. Getting up on an icy roof in January in New England strikes me as suicidal, but anyhoo...
When the weather is super cold, there's really no point in clearing the snow off the roof because it forms a nice, solid icy barrier. This is actually a handy type of insulation...but when things start to thaw, that's when the ice dam beast can appear. By that time, it's impossible to clear the snow off the roof because it has hardened to a solid icy mass. Even if you did chip away at it, you'd likely start hacking off roof shingles along with the roof, throwing out the baby with the bathwater as they say. So you gotta rake the snow off the roof when it's nice and fluffy. Otherwise, you're screwed come spring or that ever unpredictable February deluge of 3" of rain and 60 degrees (followed by another month of temperatures in the teens of course--welcome to New England).
So my advice is: roof rake early and often. Gently bash ice and snow out of the gutters whenever possible. You'll get no payoff (other than huge triceps) until it starts raining when you have a foot of snow on your roof. If you have a uniformly steep roof, you can probably safely ignore my advice. But if you have a very bungalow-y roof, with lots of changes in pitch and some relatively flat roofs, go get a roof rake.
We have a few feet of snow on the ground and the forecast calls for about 2" of heavy rain in the next few days. Here's when I get a bit bonkers, trying to clear yet more snow off the roof, running around outside, digging the downspouts out of the snow and trying to dig little snow trenches so that the roof water will drain away from the house.
It's great exercise. Kettlebells are a good workout for snow shoveling and roof raking. I'm hoping the effort pays off and we don't see any rain in the basement.
When the weather is super cold, there's really no point in clearing the snow off the roof because it forms a nice, solid icy barrier. This is actually a handy type of insulation...but when things start to thaw, that's when the ice dam beast can appear. By that time, it's impossible to clear the snow off the roof because it has hardened to a solid icy mass. Even if you did chip away at it, you'd likely start hacking off roof shingles along with the roof, throwing out the baby with the bathwater as they say. So you gotta rake the snow off the roof when it's nice and fluffy. Otherwise, you're screwed come spring or that ever unpredictable February deluge of 3" of rain and 60 degrees (followed by another month of temperatures in the teens of course--welcome to New England).
So my advice is: roof rake early and often. Gently bash ice and snow out of the gutters whenever possible. You'll get no payoff (other than huge triceps) until it starts raining when you have a foot of snow on your roof. If you have a uniformly steep roof, you can probably safely ignore my advice. But if you have a very bungalow-y roof, with lots of changes in pitch and some relatively flat roofs, go get a roof rake.
We have a few feet of snow on the ground and the forecast calls for about 2" of heavy rain in the next few days. Here's when I get a bit bonkers, trying to clear yet more snow off the roof, running around outside, digging the downspouts out of the snow and trying to dig little snow trenches so that the roof water will drain away from the house.
It's great exercise. Kettlebells are a good workout for snow shoveling and roof raking. I'm hoping the effort pays off and we don't see any rain in the basement.
Friday, January 22, 2010
Aphex-Twin induced insanity
Here's a way to make yourself go crazy: write code for 8 hours straight while listening to Aphex Twin. You could keep one song on repeat or shuffle. It don't matter. I love Aphex Twin, but I'm about to walk out the office in a fugue state.
Sunday, January 3, 2010
Uncorking old emails
While putting the Christmas ornaments under the eaves, I stumbled upon some CDs of 10+ year old college email. My attic gets wicked hot in the summer and cold as ice in the winter, so I popped the CDs into my laptop just to see if they were actually readable.
Amazingly, they were. Amazingly for a CS graduate, I moronically left my email in a number of formats:
1. Some binary that might be an encrypted WordPerfect file from 1995. Or it could be the format DOS uses when you copy things spanned across multiple floppies. I can't quite tell yet, but I think I'm going to have to write some code to figure it out.
2. Pegasus Mail, circa 1996
3. Eudora from 1997
4. Outlook in 1998--good luck parsing a .pst file
5. Scattered clean text files from Pine
So what's a fella to do? Install VMWare or Parallels, find an old Windows 95 key and some more backup CDs with ancient versions of the relevant software, and hope to God that I can extract all the proprietary formats into a simple text format so I can just "more" the files while I knock back some cold ones.
I worked very hard during college, but you wouldn't know it from my email trail. It appears I just sat around whining very, very verbosely about women. Even accounting for typing about 90 wpm, the sheer volume of email I produced and read makes me think I misspent my college life writing and reading email at a time when people thought you were a complete loser if you used ntalk or ytalk. Fast forward 10 years and now you're a loser if you don't use IM in one form or another. Huh? We were definitely ahead of our time.
A weird thing happened to me while reading what should have been safely defused emails from distance of 10 years: I got pretty stressed out. I had some unhealthy relationships (physically and email-wise) with this one girl in particular and after reading a few of our exchanges, I started sweating as if the conversation was happening right now. The only thing I had to anchor me in the here-and-now 10 years later was the fact that I was reading the email in a slightly different font on a Mac and not on a DOS terminal plugged into Pine. But I was reading it in Terminal.app, which tells you something about the staying power of the command line.
So to all you young'uns out there with your fancy communication tools: extract and save everything in ASCII. And wait 20 years before re-opening the emotional mine field that is your college email.
That last bit of advice might not apply to anyone except folks in college between, say, 1992 and 2001. First discovering email during college is sort of like first discovering your genitals at the age of 19. All of a sudden there's this incredible tool at your disposal, you have no idea what the rules surrounding it are, it's the source of pleasure, fun, regret, fun, pleasure, shame, regret, pleasure, and by the way, you're drunk and high often while you figure out how to use it, and no one else knows or has any experience with it, so you all stumble around equally ignorant, diddling anything that moves. Eventually people start catching the clap and figuring out what the boundaries of email are.
Hence the outrageous amount of oversharing in both my inbound and outbound college emails. Back in the mid nineties, there wasn't a trivial way to share things online. Heck, some email programs didn't even have a GUI, much less a "forward" feature or BCC. The boundaries around email were very similar to those around mail: mail was private, so email should be private. Because of this assumption, people tended to be much more revealing on email, at least in my experience. There's a lot of self-incriminating stuff in my college email. I doubt college kids these days make the same blunders because the assumption these days is that anything in a computer is inherently unsafe, and if you email a picture of your hoo-ha to someone, that shit is going to be all over the interwebs in no time.
Kids these days learn the same lessons I learned about email, IM, and texting/sexting, but instead of learning them while getting stoned at the age of 20, they figured them out while drinking apple juice in preschool. I think that qualifies as "progress".
Amazingly, they were. Amazingly for a CS graduate, I moronically left my email in a number of formats:
1. Some binary that might be an encrypted WordPerfect file from 1995. Or it could be the format DOS uses when you copy things spanned across multiple floppies. I can't quite tell yet, but I think I'm going to have to write some code to figure it out.
2. Pegasus Mail, circa 1996
3. Eudora from 1997
4. Outlook in 1998--good luck parsing a .pst file
5. Scattered clean text files from Pine
So what's a fella to do? Install VMWare or Parallels, find an old Windows 95 key and some more backup CDs with ancient versions of the relevant software, and hope to God that I can extract all the proprietary formats into a simple text format so I can just "more" the files while I knock back some cold ones.
I worked very hard during college, but you wouldn't know it from my email trail. It appears I just sat around whining very, very verbosely about women. Even accounting for typing about 90 wpm, the sheer volume of email I produced and read makes me think I misspent my college life writing and reading email at a time when people thought you were a complete loser if you used ntalk or ytalk. Fast forward 10 years and now you're a loser if you don't use IM in one form or another. Huh? We were definitely ahead of our time.
A weird thing happened to me while reading what should have been safely defused emails from distance of 10 years: I got pretty stressed out. I had some unhealthy relationships (physically and email-wise) with this one girl in particular and after reading a few of our exchanges, I started sweating as if the conversation was happening right now. The only thing I had to anchor me in the here-and-now 10 years later was the fact that I was reading the email in a slightly different font on a Mac and not on a DOS terminal plugged into Pine. But I was reading it in Terminal.app, which tells you something about the staying power of the command line.
So to all you young'uns out there with your fancy communication tools: extract and save everything in ASCII. And wait 20 years before re-opening the emotional mine field that is your college email.
That last bit of advice might not apply to anyone except folks in college between, say, 1992 and 2001. First discovering email during college is sort of like first discovering your genitals at the age of 19. All of a sudden there's this incredible tool at your disposal, you have no idea what the rules surrounding it are, it's the source of pleasure, fun, regret, fun, pleasure, shame, regret, pleasure, and by the way, you're drunk and high often while you figure out how to use it, and no one else knows or has any experience with it, so you all stumble around equally ignorant, diddling anything that moves. Eventually people start catching the clap and figuring out what the boundaries of email are.
Hence the outrageous amount of oversharing in both my inbound and outbound college emails. Back in the mid nineties, there wasn't a trivial way to share things online. Heck, some email programs didn't even have a GUI, much less a "forward" feature or BCC. The boundaries around email were very similar to those around mail: mail was private, so email should be private. Because of this assumption, people tended to be much more revealing on email, at least in my experience. There's a lot of self-incriminating stuff in my college email. I doubt college kids these days make the same blunders because the assumption these days is that anything in a computer is inherently unsafe, and if you email a picture of your hoo-ha to someone, that shit is going to be all over the interwebs in no time.
Kids these days learn the same lessons I learned about email, IM, and texting/sexting, but instead of learning them while getting stoned at the age of 20, they figured them out while drinking apple juice in preschool. I think that qualifies as "progress".
Subscribe to:
Posts (Atom)