Saturday, September 13, 2008
Terrible accident - Well told story
I recently heard a guy on This American Life, an NPR weekend weekly, telling the story of how, when he was in High School and was a young driver, a girl from his school rode her bike right in front of his car and died from accident. He went through some crazy shit, in the short time following the accident, before he left for college. But the story went beyond that, well into his adulthood. It was, somehow, a good story to listen to.
Tuesday, August 26, 2008
Balance Board Roomba hack floors us - Nintendo Wii Fanboy
This gives a whole new meaning to COUNTER-intelligence!
Balance Board Roomba hack floors us - Nintendo Wii Fanboy
Balance Board Roomba hack floors us - Nintendo Wii Fanboy
Friday, August 22, 2008
Wireless recharging one step closer to reality - CNN.com
Yeah, but how will that effect this metal plate in my head?
Wireless recharging one step closer to reality - CNN.com: "Wireless recharging one step closer to reality"
Wireless recharging one step closer to reality - CNN.com: "Wireless recharging one step closer to reality"
Monday, August 18, 2008
My first Moleskine(s)
I just bought my first Moleskines. I got three pocket sized, graph cahiers. Ruled paper is annoying for me and my left-hand slop, but I figured the grid would be something to try that might help me write on paper similarly to how I write in code--nice, tabbed and nested short lines. If this goes well, I'll be looking for a larger form for larger ideas. For now, the small form will help me get a start on how I'm going to begin organizing my life of thoughts. I spend a lot of time in my mind but time spent actually expressing myself is at an all time low. I hope that getting some things down in paper will both inspire me to share more and help me actually realize more of my ideas. These ideas, sometimes are just "things I should do or want to do, and other times they are creative ideas.
I was inspired to regroup on paper (in a Moleskine) by this blog entry by a guy who is really into graphs and the like:
» http://carloscaminha.blogspot.com ’skine.art. - Moleskine Art
I was inspired to regroup on paper (in a Moleskine) by this blog entry by a guy who is really into graphs and the like:
The importance of a good quality notebook
Next, I went looking for more info on the brand and found this awesome water color on a site dedicated to exhibiting the art of moleskine users:» http://carloscaminha.blogspot.com ’skine.art. - Moleskine Art
Sunday, August 17, 2008
Watched Pot: The New Yorker
Clarence Thomas: If you got 'em, smoke 'em! Who knew?
This is from a New Yorker from back in 2005. I found it while looking for a way to share the awesome story in there a couple of weeks ago about the Medical Marijuana industry and sub-culture in California. All I could find was some audio commentary by the author.
The following is from the older story:
We really ought to get off our butts and get the Hinchey-Rohrabacher amendment passed. It "would deny the Department of Justice funds to surveil, arrest, or prosecute patients in states that have medical-marijuana laws."
This is from a New Yorker from back in 2005. I found it while looking for a way to share the awesome story in there a couple of weeks ago about the Medical Marijuana industry and sub-culture in California. All I could find was some audio commentary by the author.
The following is from the older story:
Watched Pot: The New Yorker: "“In the early days of the Republic, it would have been unthinkable that Congress could prohibit the local cultivation, possession, and consumption of marijuana”) could have been written by Justice Cheech or Justice Chong. Thomas’s private views on marijuana are unknown, but if he had his way, as expressed in this particular opinion, any federal interference with homegrown, home-smoked pot, whether for medical or recreational purposes, would be ruled out as an unconstitutional usurpation of the states’ powers “to protect the health, safety, and welfare of their citizens.”"
We really ought to get off our butts and get the Hinchey-Rohrabacher amendment passed. It "would deny the Department of Justice funds to surveil, arrest, or prosecute patients in states that have medical-marijuana laws."
Wednesday, August 13, 2008
A 'Frankenrobot' with a biological brain - Yahoo! News
I'm not sure I understand all of this, but what I THINK I understand is MIND BLOWING--pun intended!
A 'Frankenrobot' with a biological brain - Yahoo! News: "From the very start, the neurons get busy. 'Within about 24 hours, they start sending out feelers to each other and making connections,' said Warwick.
'Within a week we get some spontaneous firings and brain-like activity' similar to what happens in a normal rat -- or human -- brain, he added."
A 'Frankenrobot' with a biological brain - Yahoo! News: "From the very start, the neurons get busy. 'Within about 24 hours, they start sending out feelers to each other and making connections,' said Warwick.
'Within a week we get some spontaneous firings and brain-like activity' similar to what happens in a normal rat -- or human -- brain, he added."
E-Bike Battery Condition
So, I just spent a pretty penny on a kit so I could turn my old Huffy 3 speed into an electric bike. The kit includes a cargo rack to mount over the rear wheel, a rechargeable battery pack, a carrying case for that, a battery charger, a power converter, a controller, all the cables and a replacement for my bike's front wheel with an electric motor in the hub and a high performance rim.
Everything seemed to assemble fairly easily. I spend about a half-hour the night I got it checking out the parts and assembling the rear rack and putting that on the bike. The next day, I spent about 45 minutes mounting everything else on the bike.
I got to ride it around the block a few times and it was GLORIOUS. Later, when I was showing it to the neighbors though, the front wheel jumped off of the forks. Luckily, no one was hurt.
It turns out that the motor puts out way too much torque for this old huffy with its stamped fork ends. I'm guessing it's a combination of the torque and the weight of the motor all right there on the fork end.
So now, I'm without a bike, I don't have the cash right now to get another bike and I have all this expensive equipment sitting around laughing at me.
Anyway, I'm still hopeful. Most people agree that I should not replace the forks on the bike with forged ones and then use the bike for this. They all think it's too dangerous. So, eventually, I've got to save more money and buy another bike.
In the meantime, I did have some trouble with the battery. Here are some pictures:


See the little connectors sticking out one end for the red and black wires? These are NOT permanently connected to the battery. They are only held on by TAPE! This is not the intention of the seller. He has asked me to send it back to him so he can repair it.
The other problem is how the red and black wires attach to these connectors. The connectors just have these little tubes on the wiring end that I guess you stick the wire in and clamp the tube down on the wire. What I found when testing it all out was that the wires came loose very easily at this connection and each time I hit a bump, I lost power for a second.
Sigh--I hope to reduce my carbon footprint by a full commute before winter. We'll see.
Everything seemed to assemble fairly easily. I spend about a half-hour the night I got it checking out the parts and assembling the rear rack and putting that on the bike. The next day, I spent about 45 minutes mounting everything else on the bike.
I got to ride it around the block a few times and it was GLORIOUS. Later, when I was showing it to the neighbors though, the front wheel jumped off of the forks. Luckily, no one was hurt.
It turns out that the motor puts out way too much torque for this old huffy with its stamped fork ends. I'm guessing it's a combination of the torque and the weight of the motor all right there on the fork end.
So now, I'm without a bike, I don't have the cash right now to get another bike and I have all this expensive equipment sitting around laughing at me.
Anyway, I'm still hopeful. Most people agree that I should not replace the forks on the bike with forged ones and then use the bike for this. They all think it's too dangerous. So, eventually, I've got to save more money and buy another bike.
In the meantime, I did have some trouble with the battery. Here are some pictures:


See the little connectors sticking out one end for the red and black wires? These are NOT permanently connected to the battery. They are only held on by TAPE! This is not the intention of the seller. He has asked me to send it back to him so he can repair it.
The other problem is how the red and black wires attach to these connectors. The connectors just have these little tubes on the wiring end that I guess you stick the wire in and clamp the tube down on the wire. What I found when testing it all out was that the wires came loose very easily at this connection and each time I hit a bump, I lost power for a second.
Sigh--I hope to reduce my carbon footprint by a full commute before winter. We'll see.
Tuesday, August 12, 2008
Number One Reason to see Elegy
. . .lengthy scenes of the two actors just talking to each other, mixed with lavish but respectful attention to [Penelope] Cruz's body, especially her bare chest, which is treated as one of the wonders of creation. [Emphasis added!!!]David Denby, The New Yorker, Aug. 11 & 18, 2008
Number two, by a nipple, it's based on a novel by Philip Roth.
I have to admit, Penelope looks a lot better in the promos for Vicky Cristina Barcelona than in elegy, both movies look very good!
Friday, August 08, 2008
Followup: comparing each item in two lists for "likeness" in either direction
Here's what I ended up with:
Friday, July 25, 2008
comparing each item in two lists for "likeness" in either direction
Ok, this project keeps getting more and more complex. . .
I'm having trouble coming up with a way to do the following in javascript:
I have two lists of varchar strings, list A and list B. Each list is of variable, relatively unlimited length. The same for the strings contained in the lists, but the strings ARE limited to the characters allowed in URLs--they are not huge pages of multi-paragraph text or anything like that.
I want to compare every string in list A to every string in list B.
My comparison, if I were to write in in SQL, would be like the following when looking for a "match."
((string1 LIKE '%string2%') OR (string2 LIKE '%string1%'))
As soon as I have a "match" I can stop checking--one match is enough because a match is BAD. No matches is good. (ooh! that hurts my grammar bone!)
I'd really like to do this in Javascript so that the UI is as streamlined as possible and I also think that my server side logic will be simplified by it. I suppose if I HAD to do it on the server side, I could pull it off using Ajax.
I'm having trouble coming up with a way to do the following in javascript:
I have two lists of varchar strings, list A and list B. Each list is of variable, relatively unlimited length. The same for the strings contained in the lists, but the strings ARE limited to the characters allowed in URLs--they are not huge pages of multi-paragraph text or anything like that.
I want to compare every string in list A to every string in list B.
My comparison, if I were to write in in SQL, would be like the following when looking for a "match."
((string1 LIKE '%string2%') OR (string2 LIKE '%string1%'))
As soon as I have a "match" I can stop checking--one match is enough because a match is BAD. No matches is good. (ooh! that hurts my grammar bone!)
I'd really like to do this in Javascript so that the UI is as streamlined as possible and I also think that my server side logic will be simplified by it. I suppose if I HAD to do it on the server side, I could pull it off using Ajax.
Thursday, July 24, 2008
Javascript: problem giving focus in onBlur event handler
So, yesterday I was writing a javascript that would allow me to avoid using Ajax. I have a tool where you create a new item and give that item a name. I don't want you to name that item the same as other items of the same type and I don't want to warn you about that AFTER you've already submitted the rest of the related data.
When the page loads, I use Coldfusion to build a javascript array of the item names already in use in your account. This is how I avoid Ajax here.
When you navigate away from the text field where you should enter the item name, I call my function using the onBlur event handler for the text field. My function basically loops over the array of item names already in use in your account. If the array item matches the value in the field, I alert you to this and give focus() and select() to the field I'm alerting you about.
I didn't use the form's onSubmit event handler intentionally. By using onBlur of the field, I can be very persistent about making you create an item name that is not already in use.
So, here is where the trouble started. While testing, every time I typed a name that was already in use, I got the alert, but the focus() didn't seem to work in Firefox. I did some searching online and found others having similar problems in Firefox. Someone suggested this fix/workaround:
I used it. It worked. This found solution saved me from some obsessive thinking through the night.
NOW, today I created a function for another page that brings focus() to a required field using the form's onSubmit event handler. In my function, I just used the plain old objRequiredField.focus() after my alert and the focus() worked perfectly in Firefox. VERY confusing.
Here's my theory--onBlur doesn't finish "blurring" or removing focus from the object until AFTER the event handler is finished doing anything you've added to it. So, yesterday's problematic onBlur function was running just fine, but it would give focus() based on my script orders and then, when my function was done, the event handler would finish its default behavior--it would drop focus on the original object and bring focus to the clicked object. setTimeout() allows the blur/focus event go ahead while my function waits. Then, after that minuscule delay, my focus() works as I intend.
Shwew--I'm glad I didn't figure that out in my sleep last night!!
When the page loads, I use Coldfusion to build a javascript array of the item names already in use in your account. This is how I avoid Ajax here.
When you navigate away from the text field where you should enter the item name, I call my function using the onBlur event handler for the text field. My function basically loops over the array of item names already in use in your account. If the array item matches the value in the field, I alert you to this and give focus() and select() to the field I'm alerting you about.
I didn't use the form's onSubmit event handler intentionally. By using onBlur of the field, I can be very persistent about making you create an item name that is not already in use.
So, here is where the trouble started. While testing, every time I typed a name that was already in use, I got the alert, but the focus() didn't seem to work in Firefox. I did some searching online and found others having similar problems in Firefox. Someone suggested this fix/workaround:
setTimeout(function() {fieldObj.focus();}, 0)
I used it. It worked. This found solution saved me from some obsessive thinking through the night.
NOW, today I created a function for another page that brings focus() to a required field using the form's onSubmit event handler. In my function, I just used the plain old objRequiredField.focus() after my alert and the focus() worked perfectly in Firefox. VERY confusing.
Here's my theory--onBlur doesn't finish "blurring" or removing focus from the object until AFTER the event handler is finished doing anything you've added to it. So, yesterday's problematic onBlur function was running just fine, but it would give focus() based on my script orders and then, when my function was done, the event handler would finish its default behavior--it would drop focus on the original object and bring focus to the clicked object. setTimeout() allows the blur/focus event go ahead while my function waits. Then, after that minuscule delay, my focus() works as I intend.
Shwew--I'm glad I didn't figure that out in my sleep last night!!
Monday, June 23, 2008
Former Bush Press Secretary Testifies Before Congress - washingtonpost.com
I've got a question for Scott McClellan: Hey asshole, where were you when your country needed you?
Former Bush Press Secretary Testifies Before Congress - washingtonpost.com
Former Bush Press Secretary Testifies Before Congress - washingtonpost.com
Friday, June 13, 2008
Tuesday, June 10, 2008
The 'Obama Before Obama' (first black elected official in US)- washingtonpost.com
Fascinating:
The 'Obama Before Obama' - washingtonpost.com: "Langston's father was Ralph Quarles, a slaveowner; his mother, Lucy Langston, was an ex-slave and bondswoman. Both parents died when he was 4, and an Ohio friend of Quarles's ended up caring for him. He was the fifth black man to graduate from Oberlin College, was elected to several local offices in Ohio, was active in the black freedom movement with Frederick Douglass, served as educational inspector for the Freedmen's Bureau and was the U.S. minister to Haiti. In 1888, he ran for Congress in Virginia's 4th Congressional District as an independent. Denied a victory, he contested the election results and finally won his seat, but it was so late in the term that he served but three months. He was unseated in the next election."
The 'Obama Before Obama' - washingtonpost.com: "Langston's father was Ralph Quarles, a slaveowner; his mother, Lucy Langston, was an ex-slave and bondswoman. Both parents died when he was 4, and an Ohio friend of Quarles's ended up caring for him. He was the fifth black man to graduate from Oberlin College, was elected to several local offices in Ohio, was active in the black freedom movement with Frederick Douglass, served as educational inspector for the Freedmen's Bureau and was the U.S. minister to Haiti. In 1888, he ran for Congress in Virginia's 4th Congressional District as an independent. Denied a victory, he contested the election results and finally won his seat, but it was so late in the term that he served but three months. He was unseated in the next election."
Wednesday, May 21, 2008
How We're Wrecking Our Feet With Every Step We Take -- New York Magazine
I'm extremely flat footed, so I'm still reading this article to see if I can figure out what it has to say for people like me.
How We're Wrecking Our Feet With Every Step We Take -- New York Magazine
How We're Wrecking Our Feet With Every Step We Take -- New York Magazine
Tuesday, May 20, 2008
To be a Cuban in exile is to ache, to yearn - 05/17/2008 - MiamiHerald.com
On Cuban's and those of Cuban descent--in the first person:
To be a Cuban in exile is to ache, to yearn - 05/17/2008 - MiamiHerald.com: "In private, we are awed by Cuban culture: the glory of its literature, visual arts, dance, music. And though most Cuban Americans fervently believe regime change on the island is long overdue, more than one secretly chuckled each time Fidel pulled Uncle Sam's beard. He was, after all, the shameless leading man on the world's stage of Cuban exceptionalism."
To be a Cuban in exile is to ache, to yearn - 05/17/2008 - MiamiHerald.com: "In private, we are awed by Cuban culture: the glory of its literature, visual arts, dance, music. And though most Cuban Americans fervently believe regime change on the island is long overdue, more than one secretly chuckled each time Fidel pulled Uncle Sam's beard. He was, after all, the shameless leading man on the world's stage of Cuban exceptionalism."
Friday, May 09, 2008
Platypus Genome Found Fittingly Strange - washingtonpost.com
Platypus Genome Found Fittingly Strange - washingtonpost.com: "There are genes for egg laying -- evidence of its reptilian roots. Genes for making milk, which the platypus does in mammalian style despite not having nipples. Genes for making snake venom, which the animal stores in its legs. And there are five times as many sex-determining chromosomes as scientists know what to do with."
Wednesday, May 07, 2008
15 Philadelphia Officers Removed After Taped Beating
I like the viewer "discretion" part. I guess they want to make sure you don't let your kids riot over such things!
MyFox Philadelphia | 15 Philadelphia Officers Removed After Taped Beating: "Fox Exclusive Video: Chase Ends Violently (Viewer Discretion Advised)
Slideshow:"
MyFox Philadelphia | 15 Philadelphia Officers Removed After Taped Beating: "Fox Exclusive Video: Chase Ends Violently (Viewer Discretion Advised)
Slideshow:"
Thursday, March 27, 2008
Technology Review: Weather Engineering in China
Technology Review: Weather Engineering in China: "peasant farmers. . .on call to blast away at clouds with 7,113 anti-aircraft guns and 4,991 rocket launchers."
Thursday, February 28, 2008
Record-High Ratio of Americans in Prison - washingtonpost.com
"One in nine black men age 20 to 34 is behind bars. For black women age 35 to 39, the figure is one in 100, compared with one in 355 white women in the same age group."
Yeah, there's no such thing as racism in US society anymore. How could there be--all the blacks are in prison!!
Record-High Ratio of Americans in Prison - washingtonpost.com
Yeah, there's no such thing as racism in US society anymore. How could there be--all the blacks are in prison!!
Record-High Ratio of Americans in Prison - washingtonpost.com
Friday, February 08, 2008
AJAX: Accidental (appearance of) cross site scripting caused great confusion.
So, I've working on an AJAX application and the thing works great for 99.9% of my users. Occasionally, a user reports that they click "save" and nothing happens. The "save" in this case is a link that will use AJAX to send the data entered to my server and then the part of the page the user is changing updates after the server successfully updates the DB.
Now, usually, when someone tells me that "nothing happens" I get a little condescending. It's rarely the case that "nothing" happens. Rather, something does happen that, if the user would describe accurately, I might be able to use to analyze and resolve the problem.
In this case, however, I witnessed the problem myself when a recent user shared his screen with me. Sure enough, nothing was happening. I immediately started debugging using FireBug in FireFox. The problem was the same for this user, regardless of which browser and, so far, regardless of which computer he used.
My debugging revealed a greater mystery. Javascript stopped processing every time right where I use the open() method of XMLHTTPRequest (XMLHTTPRequest.open() or, as many libraries do it, xhr.open()). This is even inside of a try/catch section and basically, NOTHING happens.
So, after a few days of dazed confusion, I remembered something that happened when I was still developing my application. If my AJAX call called a domain that was not the same as the domain the web page sits on, NOTHING would happen. No error, no warning, no AJAX call, no nothing. So, I got to thinking about how it might be possible that, for some users on my application, the AJAX call is going out to the wrong domain or something like that.
Finally, a colleague suggested trying, on my own computer, hitting the AJAX thingy while surfing at our domain without the WWW in the address. I tried it. I went to http://mydomain.com and clicked "save" and NOTHING happened. I changed the address in my address bar to http://www.mydomain.com and that fixed it.
Just thought I'd share and save others the trouble.
UPDATE: I use JSMX for my Ajax stuff. It turns out that this problem wouldn't have been so silent if I had noticed and changed the error handler thrown by the open() method. The original developer set up one case as completely silent--interpreting it as an incompatible browser. Without the try/catch, Firefox says "Uncaught exception: Permission denied to call method XMLHttpRequest.open()" when the cross-site scripting is attempted.
Now, usually, when someone tells me that "nothing happens" I get a little condescending. It's rarely the case that "nothing" happens. Rather, something does happen that, if the user would describe accurately, I might be able to use to analyze and resolve the problem.
In this case, however, I witnessed the problem myself when a recent user shared his screen with me. Sure enough, nothing was happening. I immediately started debugging using FireBug in FireFox. The problem was the same for this user, regardless of which browser and, so far, regardless of which computer he used.
My debugging revealed a greater mystery. Javascript stopped processing every time right where I use the open() method of XMLHTTPRequest (XMLHTTPRequest.open() or, as many libraries do it, xhr.open()). This is even inside of a try/catch section and basically, NOTHING happens.
So, after a few days of dazed confusion, I remembered something that happened when I was still developing my application. If my AJAX call called a domain that was not the same as the domain the web page sits on, NOTHING would happen. No error, no warning, no AJAX call, no nothing. So, I got to thinking about how it might be possible that, for some users on my application, the AJAX call is going out to the wrong domain or something like that.
Finally, a colleague suggested trying, on my own computer, hitting the AJAX thingy while surfing at our domain without the WWW in the address. I tried it. I went to http://mydomain.com and clicked "save" and NOTHING happened. I changed the address in my address bar to http://www.mydomain.com and that fixed it.
Just thought I'd share and save others the trouble.
UPDATE: I use JSMX for my Ajax stuff. It turns out that this problem wouldn't have been so silent if I had noticed and changed the error handler thrown by the open() method. The original developer set up one case as completely silent--interpreting it as an incompatible browser. Without the try/catch, Firefox says "Uncaught exception: Permission denied to call method XMLHttpRequest.open()" when the cross-site scripting is attempted.
Subscribe to:
Posts (Atom)