When Bram Cohen became famous for bittorrent, I immediately started following his web presence. You see, back around 1994 or 1995, I joined the UB Juggling Club (yeah, I know I’m a dork, but juggling is fun) and Bram soon joined as well. He was obviously brilliant, as he quickly picked up on all the juggling terminology and would have these interesting conversations with me about these intricate juggling patterns. It blew my mind.
Yesterday, Bram wrote that he wants a process list for web browser activity:
“Could somebody please implement metrics on how much CPU each tab/window is using…”
-Bram Cohen
[2008-05-13 12:09 May.Tue]
I responded with news about Mozilla’s effort on that front, as evidenced by the Firefox 3 addon PluginWatcher. Its a good start.
I’ve often heard people refer to surfing as if it was the greatest activity in the world. I won’t object to that, nor could I as I’ve never gone surfing. Of the dozens of times this idea has come up, I’ve never heard anyone describe why surfing is so wonderful. Until now:
“For me personally, words cannot describe the euphoria that surfing provides as a human. Words cannot describe the absolutely magical and romantic feeling of riding a wave, going up and down on the surface of the water and feeling, just an unlimited power under your feet and to be in harmony with the ocean; perhaps riding along and seeing a dolphin in the face of the wave next to you, or a beautiful rainbow as the spray of the wind is offshore pluming over the back of the wave. It’s just the most beautiful, romantic, organic thing I think a human can do”.
That was Jonathan Paskowitz, speaking to Terry Gross during an interview on the Fresh Air podcast for 2008-05-08. There’s more here.
Sometimes I find it very useful to toggle the cursorline and cursorcolumn settings in the Vim text editor. If you’re unfamiliar with these settings, I’ll briefly explain. When you set cursorline, as you move the cursor from line to line, Vim will highlight whichever line you are on. Similarly, cursorcolumn will keep the column highlighted. I find this one particularly useful when trying to keep code (or text) lined up. To make it simple to switch toggle settings, I created some mappings in my .vimrc:
map <silent> <Leader>cl :set cursorline! <CR>
imap <silent> <Leader>cl <Esc>:set cursorline! <CR>a
map <silent> <Leader>cc :set cursorcolumn! <CR>
imap <silent> <Leader>cc <Esc>:set cursorcolumn! <CR>a
map <silent> <Leader>ct :set cursorcolumn! cursorline! <CR>
imap <silent> <Leader>ct <Esc>:set cursorcolumn! cursorline! <CR>a
map <silent> <Leader>co :set cursorcolumn cursorline <CR>
imap <silent> <Leader>co <Esc>:set cursorcolumn cursorline <CR>a
map <silent> <Leader>cn :set nocursorcolumn nocursorline <CR>
imap <silent> <Leader>cn <Esc>:set nocursorcolumn nocursorline <CR>a
Now if I want to turn on the cursorcolumn, I can just press \cc and when I want to turn it back off, just hit \cc again.
FYI, some details explained:
- map - makes the key mapping work in normal mode, while “imap” makes it work in insert mode.
- <silent> - tells vim not to echo to the statusline what its doing during the execution of the mapping.
- <Leader> - tells vim to use my personal mapleader key to activate key mappings. I use the default key, which is the backslash (”\”), so when I want to activate one of these mappings, I press backslash, then ‘c’, then one of ‘l’, ‘c’, ‘t’, ‘o’, or ‘n’.
- ! - an exclamation point at the end of a setting variable tells Vim to toggle the value. In otherwords, if it’s currently off, switch it on; if it’s currently on, switch it off.
Fun with Vim
2008-04-25
I use the Vim text editor all the time. In an effort to try to post more here, I think I’ll put up snippets of my Vim usage now and then.
So I was simply trying to layout a line of text in my progress notebook. Its a text file I keep all my work in and edit with Vim. I do this for many reasons, but most of all because searching is so easy, and its simple to style (with syntax highlighting) and to program.
I had a line of text to separate sections of the notebook:
<<<<<<<<<<<<<<<<<<<<<<[ 2008-04-25 Apr.Fri 11:24 ]>>>
Okay, once you’ve stopped admiring^H^H^H^H^H^H^H^H laughing at my superior documentation formatting skills, you can read more. I just wanted to move the date portion around to see which way I liked it best. I used these some mappings to make it so that the left and right arrow keys would move the bracketed text left and right, leaving at least one of the leading and trailing characters. There’s a bunch of junk in there to maintain the search history and search highlighting option, so I moved that part to two commands:
:command! A :let _save_hls=&hls |:let &hls=0
:command! B :call histdel(”/”,-1) |:let @/=histget(”/”,-1) |:let &hls=_save_hls
:map <silent> <left> :A<CR>:s/\v^(.)(\1+)(\[.*)(.)$/\2\3\4\4/e<CR>:B<CR>
:map <silent> <right> :A<CR>:s/\v^(.)(.*\])(.)(\3+)$/\1\1\2\4/e<CR>:B<CR>
An even better approach would be to search for the pattern you want to move around, and have the mapping use that.
” ” setup leading and trailing characters “ let @a=’<’ let @b=’>’ ” ” here’s what I want to move. @/ is the search pattern register “ let @/=’\[ \d\{4}-\d\{2}-\d\{2} \S\+ \S\+ \]‘ ” ” here’s the search pattern for moving it “ let @s= ‘^\(’ . @a .’\=\)\(\1*\)\(’ . @/ .’\)\(’. @b .’\=\)\(\4*\)$’ ” ” now the mappings for left and right arrow keys: “ map <silent> <left> :exe ‘:s/’. @s .’/’. ‘\2\3\4\5′. @b .’/'<CR> map <silent> <right> :exe ‘:s/’. @s .’/’. @a .’\1\2\3\5′.’/'<CR>
That was fun!
Beautiful mathematical transformations
2008-04-23
Check out this video that shows beautiful mathematical transformations:
This is the work of Douglas N. Arnold.
Yesterday I was reading my dilbert.com feed from Google Reader and found the images weren’t being rendered any more, so I visited dilbert.com to see what was going on. What an abomination! Flash scripts all over the place. And its not obvious how to see prev/next daily strips.
Fortunately I found a greasemonkey fix today.
Grab the Dilbert.com No Flash Greasemonkey userscript written by Manuel Seeger over at userscripts.org.
The userscript strips the flash from around the daily comic. What a godsend. BTW, it doesn’t work so well on the Sunday comic since its more than the standard 3 panel size. I posted a comment for the script in hopes of getting that fixed. At any rate, if you visit the dilbert site and can’t stand the flash, try the script.
Also, I recommend the new Dilbert daily comic strip feed for anyone who may be wondering what is wrong with the old feed.
8:00 Travis woke me up. He climbed in bed between Lisa and me. Since he wasn’t going back to sleep, I got up with him. We ate Wegman’s Peanut Butter Crunch cereal. He fed Bailey. I made coffee. Then we tried playing the PS2 game College Hoops 2k8, but we had a great deal of trouble trying to figure it out. So then he played Tony Hawk’s Proving Ground, and I helped accomplish a couple minor goals.
Jersey Beat
2007-07-20
Jersey Beat on Insurbordination Fest 2007
I’m so disappointed that I wasn’t aware of this punk rock festival! Ben Weasel was there doing songs off his new album “These Ones Are Bitter” as well as old stuff from Screeching Weasel, The Riverdales and some covers. Wimpy of The Queers did some of their old stuff. Mr. T Experience performed. Three of my favorite punk bands. I’ll have to watch out for Insubordination Fest next year.
Fix fading sound in Apple’s earbuds
2007-02-25

There is a recent post on macosxhints.com about how to Fix fading sound in Apple’s in-ear headphones. It recommends disassembling the earbuds and then blowing through the mesh to clean off the earwax. A comment to that post, by user ucfgoofy suggests that a simpler solution is to use clear adhesive tape. I tried this approach and didn’t get very good results with the clear tape. So I tried a piece of duct tape, and that worked great. After the cleaning process, I tested the earbuds and was shocked by the difference in sound volume.
On Praise of Children
2007-02-20
The February 19th, 2007 issue of New York Magazine has an article by Po Bronson, entitled “How Not to Talk to Your Kids.”As a father of two, I was compelled to read it.
The article sources psychologist Carol Dweck and her teams at Columbia and Stanford. The gist of it is that praising children with generalized statements like “You’re so smart” or “That was great!” leads them to believe that they are only receiving praise because they need extra encouragement. If they are constantly being told how intelligent they are and how wonderfully they perform, they begin to expect that everything they do should work out as well. Then when they fail at something, they simply give up. Praise needs to be specific.
“Emphasizing effort gives a child a variable that they can control,” she explains. “They come to see themselves as in control of their success. Emphasizing natural intelligence takes it out of the child’s control, and it provides no good recipe for responding to a failure.”
As I read along, I was getting worried that I was screwing up my children. But then I came to this:
“Sincerity of praise is also crucial. Just as we can sniff out the true meaning of a backhanded compliment or a disingenuous apology, children, too, scrutinize praise for hidden agendas. Only young children - under the age of 7 - take praise at face value: Older children are just as suspicious of it as adults.”
If I’m reading that correctly, my 4 and 6 year old boys haven’t been damaged by excessive generalized praise yet. Though I will have to start scaling it down and be more specific with the 6-year old, Kevin.
For those interested in more of Carol Dweck’s work, check out her page at Stanford and these interview clips and transcripts.