Quantcast

Replacing URLs with links… halp?

I found this crazy regex for matching URLs in python. Even though some very smart people went through the trouble of concocting that regex, I can’t seem to use for all test cases… hmm.

I’m trying to turn bare urls into links for our Twitter sidebar widget, and it almost works, except for the last crazy case below (query string + anchor):

#!/usr/bin/python
 
import re
 
def convertLinks(str):
    #crazy regex from Shag, based on http://flanders.co.nz/2009/11/08/a-good-url-regular-expression-repost/
 
    prog = re.compile(r'(?#FQURL)(?:(?#Protocol)(?:(?:ht|f)tp(?:s?)\:\/\/)(?#Username:Password)(?:\w+:\w+@)?(?#Subdomains)(?:(?:[-\w]+\.)*(?#TopLevel Domains)(?:[a-z]+\.?))(?#Port)(?::[\d]{1,5})?\.?(?#Directories)(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/|)+|\?|#)?(?#Query)(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?#Anchor)(?:#(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)?|(?#BareURL)(?#Username:Password)(?:\w+:\w+@)?(?#Subdomains)(?:(?:[-\w]+\.)+(?#TopLevel Domains)(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?#Port)(?::[\d]{1,5})?\.?(?#Directories)(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/|)+|\?|#)?(?#Query)(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?#Anchor)(?:#(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)?)')
 
    return prog.sub(r'<a href="\g&lt;0&gt;">\g&lt;0&gt;</a>', str)
 
#single url
print convertLinks('http://tikirobot.net\n')
 
#string
print convertLinks('See http://tikirobot.net for more info.\n')
 
#string w/ anchor
print convertLinks('See http://tikirobot.net/#foo for more info.\n')
 
#two urls in a string
print convertLinks('See http://tikirobot.net or http://wikipedia.org for more info.\n')
 
#some test urls from flanders.co.nz
print convertLinks('This is a google search: http://www.google.com/search?q=good+url+regex&amp;rls=com.microsoft:*&amp;ie=UTF-8&amp;oe=UTF-8&amp;startIndex=&amp;startPage=1\n')
 
print convertLinks('ftp://joe:password@ftp.filetransferprotocal.com is a ftp url\n')
 
print convertLinks('There is a bare url google.ru somewhere in this sentence\n')
 
#test cases from shag
print convertLinks('query string: https://some-url.com/?query=&amp;name=joe&amp;filter=*.*\n')
 
print convertLinks('both a query string and an anchor with no host name separator slash: https://some-url.com?query=&amp;name=joe?filter=*.*#some_anchor\n')
 
print convertLinks('both a query string and an anchor: https://some-url.com/?query=&amp;name=joe&amp;filter=*.*#some_anchor\n')
 
print convertLinks('DNS name with a concluding period: http://some-url.com./\n')
 
print convertLinks('DNS name with a concluding period and query string: http://some-url.com./?foo=bar\n')
 
print convertLinks('single-component DNS name plus root: http://to./\n')
 
print convertLinks('single-component DNS name: http://to/\n')
 
print convertLinks('words with slashes: unread/unregistered\n')

Also note my double-grouping on the regex.. There must be a better way!
Update, figured out that the group zero backreference is \g<0> (\0 doesn’t work, so I was double-grouping so that I could use \1).

Little help, regex ninjas? Update 2: Shag to the rescue!

Updates 3, 4, and 5: Shag has provided us with a even moar better regex in the comments.. Yay Shag!!!!!

Twinkle SIP phone, Fedora 11, PulseAudio

Linux distributions have recently been shipping PulseAudio, a daemon meant to handle mixing, resampling, and control of audio streams. Maybe they will get it working right someday, but as of now, it is frustratingly not ready for mainstream usage. Many applications do not work with it, or work poorly with it, requiring stupid hacks and workarounds.

One such application is Twinkle, a SIP phone for Linux.  Previously on Fedora 9, Twinkle worked okay.  It connected to ALSA directly, so I just needed to set up ALSA to handle software mixing.

However,  in Fedora 11, PulseAudio has been designated as the One True Intermediary between ALSA and the rest of userspace.  In the case of Twinkle, this resulted in no audio emissions from the computer.   Calls could be placed, and would appear to proceed normally, but nothing emerged from the speaker.   Running ‘pavucontrol’ during a call showed that PulseAudio’s ALSA emulation plugin had been started, but the VU meter associated with the Twinkle application was completely dead.

After struggling with a bunch of useless workarounds (padsp, pasuspender, asound.conf, killall pulseaudio DIE DIE DIE, etc); several other softphones, none of which worked, for completely distinct reasons;  and exploring half-heartedly what it would take to hack PulseAudio support into Twinkle, suddenly I accidentally got it “working.”

If, during the first call placed after Twinkle is launched, you send a DTMF digit (e.g., pressing one of the number keys), audio will unwedge for that call, and all subsequent calls.

I hope this saves someone some time and frustration.  It’s embarrassing how much time it took to figure this out!

Is there some way to make the Terminal app more readable?

I’ve pinged a bunch of people about this but there doesn’t seem to be an easy solution. I’d love it if the Terminal app went from looking like this

terminal01

To something like this…

terminal02

Just a few font changes…it seem like a simple request, but alas, it’s not. Surely I can’t be the only one who wants this?

Raj finally has at it with my old PowerBook… Sniff…

How to run lighttpd under upstart

Upstart is Ubuntu’s init.d replacement. It greatly simplifies writing init.d scripts and has a great respawn feature similar to daemontool’s supervise or monit. And it comes with Ubuntu by default.

For some reason, almost no one uses upstart. Even Ubuntu’s services use traditional /etc/init.d scripts instead of upstart scripts. I think this might be due to upstart’s non-existent documentation. There is no man page for upstart, and multiple people I know who have read the online docs somehow missed the three important commands that control upstart jobs: /sbin/start, /sbin/stop, and /sbin/status!

Here is how it works: put an upstart script in /etc/event.d. Let’s call it /etc/event.d/foo. This script is now immediately available under upstart. Just type sudo start foo. That’s it.

I converted Ubuntu’s /etc/init.d/lighttpd script to a much shorter upstart script. The big advantage of this is upstart will restart lighttpd if it dies for some reason. This is what the upstart script looks like:

#this is an upstart script that  starts lighttpd
 
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
 
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
 
respawn
exec sudo -u www-data lighttpd -D -f /etc/lighttpd/lighttpd-infobase.conf

That’s it! Save this script as /etc/event.d/OL-lighttpd, and then type sudo start OL-lighttpd. You can kill off the lighttpd process and it will get restarted.

If you want to configure your lighttpd to write out a pid file, you can use pre-start and post-stop script to prepare and clean up the pid file:

#this is an upstart script that  starts lighttpd
 
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
 
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
 
 
pre-start script
    #make sure there is a place to write the pid file (optional):
    mkdir -p /var/run/lighttpd > /dev/null 2> /dev/null
    chown www-data:www-data /var/run/lighttpd
    chmod 0750 /var/run/lighttpd
end script
 
respawn
exec sudo -u www-data lighttpd -D -f /etc/lighttpd/lighttpd-infobase.conf
 
post-stop script
    #remove pid file (optional)
    #add server.pid-file = "/var/run/lighttpd/lighttpd.pid" to lighttpd.conf file to have it generate the pid file
    rm -f /var/run/lighttpd/lighttpd.pid
end script

If you want to stop lighttpd, just type sudo stop OL-lighttpd. You can also type sudo initctl list for a list of all jobs under upstart.

How to get your Mac to output 24p to a Samsung LN46a650

I hooked up my first-generation MacBook Pro to my Samsung LCD TV with a DVI->HDMI cable. The mac was able to output 1920×1080p at 60Hz to the TV. There was noticeable judder when trying to view 24fps content. I searched the net and no one seems to have gotten their mac to output 24p to their Samsung TV.

OK, here is how to get your mac to output 24p to your Samsung series 6 (or higher) TV:

  1. Connect your mac to your tv with a DVI->HDMI cable
  2. Install SwitchResX, which will let you customize display settings on your mac.
  3. Launch SwitchResX and create a custom resolution, using the settings below.
  4. Reboot your mac.
  5. Launch SwitchResX again and confirm that the new 1080p24 setting is available.
  6. Activate it and rejoice!

Here are the setting I used, which might still need a bit of tweeking. I’m still trying to get the vertical refresh to be exactly 23.976Hz. I cribbed from these settings that are known to work for a sony bravia. The judder seems gone, but I still see some occasional choppy playback, I think due to dropped frames during h.264 decode. I’ll investigate further.

macbook24psettings

I’m mostly happy with my new TV (in true redneck fashion, I traded my pickup truck for it). I originally got a Series 5, but It could only do 1080p60, and I really wanted 1080p24, so I had to upgrade to the Series 6. Unfortunately, the Series 6 arrived with a dead pixel. I don’t know what to do about that..

How To Replace The Gas Coils In A Clothes Dryer

IMG_5516Our Frigidaire gas dryer broke! It seemed to be working properly except it produced no heat. Replacing the gas coils for the solenoid valves fixed the problem. Here is a guide on how to replace the gas coils in your dryer:

Our Frigidaire dryer is model GLGQ332A, and is manufactured by Electrolux. The parts catalog shows where the solenoid valves are and which replacement coils to buy. Since the primary and secondary coils are sold together, I replaced them both without actually troubleshooting which part was bad. I needed parts 71 and 72 (part numbers 5303307291 and 5303307292). I got replacement kit 5303931775 (which contains both coils) from Reliable Parts in SF (on Howard and 12th) for $37. This same package is available for $10 online, but I paid extra so I could get the parts the same day.

OK. Let’s get started. First step is to UNPLUG YOUR DRYER.

Next, we are going to lift the top up. There are two clips in the front of the dryer holding the top on, and two hinges on the back. Use a putty knife to press the clips in so the top pops off. Here is how to detatch the clip on the left:

IMG_5520

This is what the clip looks like when popped off:
IMG_5522IMG_5523

Now lift the top up and look on the right side, near the timer. You should see a 9-pin molex connector, which you need to detatch. To make my life easier, I always use a sharpie to mark the connector direction. There is a zip tie holding the wires to the frame of the dryer. You are going to take the front of the dryer off, so you will have to cut this ziptie.

IMG_5537

Now we are going to take the front of the dryer off. There is a screw on each side of the dryer holding the front on, and there also a few clips. This picture shows both a screw and a clip on the left side:

IMG_5528

I think there were three clips on the left and two on the right. You can get them off by pushing up on them and pulling the front out. They are kind of a pain to get off. Since they are designed to snap under force, I think repair guys just yank the front off and then replace them with new ones.

Once all the screws and clips are out, you will be able to pull the front off. Pull the top part of the front towards you and the front will disengage from the tumbler. There are two clips on the bottom. Lift the front off of these clips:

IMG_5544

Set the front aside. You can take this opportunity to clean out any lint stuck in the lint chute, seen here in the lower left:

IMG_5542

This is what the inside of your dryer looks like:

IMG_5545

The gas valves are on the lower left:

IMG_5547

Unscrew and remove the metal cover holding the coils in place:

IMG_5549

Now lift the coils off of the solenoid shafts, unclip the connectors, and put the new ones in place:

IMG_5550

You are now ready put everything back together. Hopefully your dryer now has heat!

If you want to be more rigorous, here are some resistance measurements I made on the new coils. Supposedly you can tell which coil is bad if the resistance measurement is different, but my old, bad coils seemed to have similar resistance:

IMG_5556IMG_5557IMG_5558

Best Customer Service Ever

I usually get terrible customer service. Especially when I buy products from companies that I’ve worked at for 5+ years. Stupid Apple.

But lately we’ve had a couple really great customer service experiences. First, we broke our Wii playing too much Super Smash Brothers. Apparently, the GPU overheats(?) when you play too much, or when you play too much over wifi, or something. This caused our Wii to always show flickering black vertical lines. I called up Nintendo on a Sunday, explained the problem, and after 18.5 minutes on the phone, they said I would have to send it in for repair. They emailed me a FedEx ship label, which I printed out. I sent the Wii in on a Tuesday, and a fixed one arrived today, just three days later!

Even better was our experience with Philips. The charger to our awesome Sonicare toothbrush stopped working. Jess called up Philips, spent a couple minutes on the phone, and about a week later, an entire new toothbrush and charger arrived. YAY!

The Mushroom Theory of Management

I decided to check out The Soul of a New Machine after reading this account of working at Atari and writing the Donkey Kong cart for the 2600 (if you are an Atari or DK fan, read this).

Anyway, the wiki page for The Soul of a New Machine talks about the Mushroom Theory of Management:

Tom West practices the “Mushroom Theory of Management” – “keeping them in the dark and feeding them shit.” That is, isolating the design team from outside influences and instead using the fear of the unknown to motivate the team.

I’ve encountered this a lot over the years, most notably at Apple, where Mushroom Management was one of my manager’s only motivational techniques.


CC by-nc-sa licensed photo by 23bit_grrrl

See also: Mikee’s awesome mushroom pictures

The Feb 10 Protests – EPIC WIN

Sydney

sydney.jpg
Attribution cc photo by failquail orig set pool

Brisbane

Adelaide

Perth

London

londlong.jpg
By-NC photo by lawl orig

londnic0.jpg
by-nc-sa photo by nic0 orig set

lond.jpg
by-na-sa photo by gilberts orig set

Amsterdam

Manchester

Edinburgh

23.jpg
by-sa photos by strevo orig set
edin2.jpg
by-sa photos by strevo orig set moar

Dublin

Belfast

Brussels

Oslo

oslo.jpg
Attribution CC photo by say it with flowers orig

Boston

bost.jpg
by-nc-sa photo by steve orig

Houston

Austin

Minneapolis

Milwaukee

St. Louis

Portland

portland.jpg
By-SA photo by Hardlinejoe orig

San Francisco

LA:

la.jpg
By-nc-sa photo by Sean orig set

KC

San Diego

DC

Montreal

NYC

Santa Barbara

Detroit

Denver

a.jpg

Wheel of Responsibility

wheelofresponsibility.gif

I recently got this for some friends of mine who are about to become parents, but I pretty much think it could be useful to all sorts of people….like

  • roommates (whose turn is it to scrub the toilet? spin the wheel!)
  • siblings (whose turn is it to organize mom’s birthday party? spin the wheel!)
  • coworkers (who gets to have the nice desk by the window? spin the wheel!)

Of course there are much more mature and logical ways of going about everyday decision-making, but the one thing this solution has going for it is that you can’t really hold a grudge against or argue with chance…and it’s probably a whole lot faster. (in the absence of a wheel, a game of heads or tails also works quite well)

How To Configure Your Laptop for Wireless Backups Using Time Machine

The greatest thing about Leopard is that you can configure your Mac laptop to backup wirelessly and transparently using Time Machine. You can wander around the world editing files, and your laptop will automatically back them up when you come home and connect to your wireless router, without you having to do anything.

You will need a second Mac or Linux box to host the remote backup. This takes five to ten minutes to set up and configure.

First, configure your remote backup machine. These instructions assume that you are using a Mac for this.

  • Configure your remote backup machine with a static IP address
    • Your backup machine must be connected to the same wireless router that your laptop will connect to when you are home
    • My wireless router is set to assign IP addresses starting with 192.168.1.100, so I assigned my remote mac to use 192.168.1.23
    • To assign an IP address manually while still using DHCP to get other network settings from your wireless router, go to System Preferences -> Network -> Airport -> Advanced -> TCP/IP and choose “Using DHCP with manual address”
  • Configure AFP File Sharing under System Preferences -> Sharing
    • Select the “File Sharing” checkbox. You should see a message that says “Others can access your computer at afp://192.168.1.23″, or something similar.
    • Click the “+” button under “Shared Folders:”, and add the hard drive you want to store the backups to the list
    • Click the “+” button under “Users:”. Create a user called “backup”. Give this user Read & Write permissions to the backup hard drive

Now, configure your laptop
  • Mount the remote backup hard drive
    • In the Finder, choose “Connect to Server…” under the Go menu
    • Type afp://192.168.1.23 in for the server address
    • When asked, log in using user “backup” and type in the password. Be sure to click “Remember password in my Keychain”
  • Now, Configure Time Machine
    • Choose System Preferences -> Time Machine
    • Click “Choose Backup Disk”
    • Choose the remote backup disk that you mounted using AFP

That’s it! The first time Time Machine backs up, it will be really slow. Just let it run overnight. All the following hourly backups will be very fast.

If you use your laptop in the standard, Apple-approved manner, then you can configure Time Machine to only backup your Users directory, which will save space and time. Let me know if you need more help!

How to put a Miele Dishwasher into Service Mode

Our newly-purchased Miele dishwasher was DOA. We had to call the service department, who sent out someone to repair it the same day. When we called, they had us put the dishwasher into service mode, which will tell you which error (“technical fault”) is causing your dishwasher to fail.

These instructions are for a G2140* model Miele Dishwasher

  • turn off dishwasher
  • hold start
  • turn on dishwasher with start button still pressed
  • release start button
  • press start button 3 times, quickly, holding it in the last time, until the Start/Stop light flashes (no other lights should be flashing)
  • Start/Stop should flash for four seconds
  • press program button.
  • This should cause the rinse LED to flash in a series of long and short blinks. Count the long blinks. Those are the tens digit of the fault. The short blink are the ones digit. For example, ours flashed one long blink and four short blinks, which meant we had a F14 fault.
  • You’ll have to figure out what the faults mean. We only know that F14 means “Water intake fault with heater or circulation pump”, or something like that. Our circulation pump was clogged.
  • Now, to delete the fault, press and hold the start/stop button for five seconds.

Miele: Absolutely the best customer service I’ve ever had in my life.

We finally got a dishwasher! It took some time and work to get it installed, but fortunately we had a lot of help! A couple weeks ago Ken helped remove the old cabinet and Steve wired a new electric outlet. This weekend Paul helped do all the plumbing and install the new cabinet + dishwasher. But when we finally hooked everything up Sunday evening and tried to test it out, the dishwasher flashed a ‘technical fault’ error code. Blah!

Paul called Miele this morning at about 8:45. They did some tests over the phone and said they would have to send a technician out to look at it. After lunch, I got a call Miele saying that they could send someone by in and hour. At 2pm or so, a Miele technician named Glenn shows up, hooks up some debugging equipment, carefully pulls out the dishwasher, unclogs the circulation pump, puts it back together, and it works! Elapsed time from frustrated customer support call to happy customer: about 6 hours! Yay! I think I got lucky because someone had canceled their appointment so they fit me in right way, but still.. yay! So much better than dealing with AppleCare or Blue DoubleCross.

To top it off, Glenn explained a lot about how the Miele worked (I had no idea), and tweeked the software to increase the fill level and water temperature so we can run it on economy mode and still get super-clean dishes. This is like taking your computer to a Linux hacker who hooks you up with a custom distro to get more reliable network connections. Or like taking your car to a gearhead who reprograms the ECU to give you an extra 50HP. Our dishwasher now runs GlennOS. Awesome.

If you care, the clogged circulation pump (error code F14) was suspected to be caused by water drying in the the machine after testing at the factory in Germany. Apparently German water is very hard, and it hadn’t drained completely before shipping (it arrived at our house still full of water), so it left residue in the circ pump.

Here is Zara inspecting the dishwasher (the cabinet work is not done yet):
IMG_3750.JPG

Here is Paul, who did a weekend’s worth of install work, and the inside of the dishwasher:
IMG_3752.JPG

This dishwasher connects to the cold water supply, and heats the water depending on what the selected cycle requires. Connecting to the cold instead of hot water supply adds an extra 10-15 minutes to the roughly 2 hour normal cycle, but increases efficiency.

To add a second line to our cold water supply, we replaced the shut-off valve under the sink with a dual 1/2″ to 2 x 3/8″ shut-off valve made by BrassCraft:
IMG_3744.JPG

If you have 1/2″ unthreaded copper pipe coming into your house, and you need to attach a 1/2″ threaded fitting, you need one of these 5/8″ compression to 1/2″ pipe thread unions. The 5/8″ fits over the unthreaded 1/2″ copper with a compression fitting, and then you can just screw the shut-off valve onto the other side of the union. The fine folk at Cole Hardware helped us find this elusive adapter, shown here covered in teflon tape.
IMG_3739.JPG

We hope the dish robot likes its new home in our kitchen! Thanks to Ken, Steve, and Paul from helping get it installed, and thanks to Glenn for Miele for making it work!

Backup genny? We don’t need no backup genny!

It seems like half the net just got knocked out by six back-to-back power outages in downtown San Francisco. A bunch of great sites went down: archive.org, craigslist, LJ, yelp. Did Slide go down, too?

A bunch of our racks are still powered down…

This Morning’s Power Fisasco

This morning a utility pole on our street caught on fire, and then it cracked in two. The fire department came and hosed down the pole after first turning off the power. The top part of the pole was just left dangling from the power lines until PG&E showed up about eight hours later and lashed the two parts together.

IMG_0227.JPG

We have underground electric at our house, so we didn’t lose power when they cut power to the overhead lines. But when PG&E switched to underground power, they left these live power lines dangling in front of our window, which is a bit scary.

IMG_0230.JPG

TravelFilter launches

travel.metafilter.com has gone live. It’s still new, but soon I’m sure it will be filled with smart answers to questions about traveling to weird places!

LaunchPad: a usable bug tracker for open source… finally!

SourceForge is great for project hosting, but let’s face it.. their bug tracker is slow, clunky, and barely usable. Same for the SF.net support forums. Today I found LaunchPad. It’s a project by Canonical, the people behind Ubuntu.

LaunchPad has a bug tracker, support forums, project planning, and a translation wiki for your open source project, all free.

They also do code hosting, but they also let you link your LaunchPad project to your SourceForge project. Hooray open source collaboration! LaunchPad code hosting requires that you use Bazaar, but offers svn/cvs import.

Celebrate the Opening of the Thunderbird Light Rail !!

From a postcard addressed to RESIDENT:


The San Francisco Municipal Transportation Agency Board of Directorys & Nathaniel P. Ford, Sr., Executive Director/CEO invite you to join the Community Celebration:

Saturday, April 14, 2007
10:00am-4:00pm
(Official program begins at 11:00am)
K.C. Jones Park
5701 Third Street, San Francisco
Carroll Avenue Station
(Note: The Thunderbird will run every 20 minutes)

Special Guests:
Speaker Nancy Pelosi
U.S. House of Representatives
Mayor Gavin Newsom
City and County of San Francisco

Woohoo!! Nancy Pelosi … I’m going to check this out.

Link to Thunderbird on SFMTA
Link to Nancy Pelosi on Wikipedia

Ouch! Your poor wrists!

I keep giving the same advice to people who ask me about RSI, so I’m writing up some ideas here. Remember, I’m not a doctor, and this is not medical advice.

  • If you are in serious pain, stop typing. Really. Completely stop using a computer, at least for a while. See a medical professional and talk to your friends who are going through the same thing. Here are some things your doctor might recommend if you are diagnosed wtih tendonitis:
    • Ice packs to reduce swelling of your tendons. Bags of frozen peas work. Use a towel so they aren’t too cold. Do not exceed ten minutes. Do *not* type while your arms are cold. Use as needed.
    • Wrist guards, the kind that peliom recommends. Wear them while typing. Wear them while sleeping. Yes, really. It helps a lot.
    • Ibuprofen also reduces swelling. Use as prescribed.
    • Tendon stretches and exercises, several times a day.
    • Lots of breaks, early and often.
    • Squeezy stress ball.
    • Stop typing.
  • OK, so you decided to ignore my advice and keep using a computer. No one ever stops. At least set up your computer to be as ergonomic as possible, and reduce use.
    • STOP WEB BROWSING. Also stop non-work related emails. Most people I know keep hurting their wrists doing stupid shit like surfing the web several hours a day. If you must surf, do it on a blackberry, sidekick, or a tablet pc.
    • Stop using your laptop keyboard and trackbad. Don’t use a laptop at the coffee shop, on the couch, or in bed. Use an external keyboard and pointing device.
    • You need to work at a properly adjusted desk with a properly adjusted chair. You want someone who knows what they are doing to make some measurements so that your workstation fits your body. Actually, you want at least three people to make the same measurements, because at least one of them will give you bad advice.
    • You will most likely need a keyboard tray, but really this depends a lot on your body proportions. A fully adjustable one will cost at least $200. We’ve been using the $220 one from Anthro.
    • You will most likely have to raise your monitor up to be at eye level.
    • You will most likely have to rip the armrests off your chair. Armrests are horrible if you have RSI. Same goes for wristrests. Your arms and wrists should float.
    • Learn how to roll up on your sit bones, so your back and neck are held straight without effort. Learning how to sit correctly helps a lot. You shouldn’t be slouching, but you don’t need to use muscle to correct bad posture. You shouldn’t be leaning on the back of the chair while you type.
  • General keyboard advice:
    • Do *not* use a laptop keyboard. A laptop is not ergonomic. Here is a test: Try using an external keyboard on a well-adjusted keyboard tray. Did your wrists hurt less than when using the laptop? If so, your laptop keyboard is hurting you. Stop using it.
    • Ergonomic split keyboards are good.
    • Zero force multitouch keyboards like the TouchStream are great, but no longer on the market. They use gestures to reduce pinky-reaches and other kinds of hand stretching, which is a huge win. They cost a lot on eBay.
  • General pointing device advice:
    • Stop using your laptop touchpad. At the very least, carry a bluetooth mouse with you.
    • Move your mouse to the to other side. If most your RSI is in your right hand, and you mouse with your right hand, move the mouse to the left side.
    • Try replacing the mouse with a trackball or a vertical mouse.
    • Replace the mouse with a Wacom tablet. Holding a stylus or pen is much more ergonomic than a mouse.
    • Try keeping a Wacom tablet on one side and a mouse on the other. Lots of different input methods = good.
  • General handwriting recognition advice
    • It helps supplement typing.
    • It’s hard to write code using handwriting reconition, but not so hard to write emails.
    • Easy to get started: built into OS X and tablet PCs. Wacom 4×5 tables are $80 or less.
  • General voice recognition advice
    • Not for programmers
    • It moves RSI from your wrists to your throat.
    • It is hard to problem-solve and speak at the same time.
    • Give it a try if everything else fails.
  • Update: Advice on choosing a keyboard
    • Overuse of your pinky fingers can aggravate your RSI. Keyboards such as the Kinesis Contoured move modifier keys to your thumbs, which helps reduce pinky usage.
    • Gesture keyboards like the Touchstream are even better at reducing pinky reaches, but difficult to find and have a longer learning curve.
      • Backspace, Delete, Enter, Space relocated to thumb keys.
      • Modifier Key gestures for Shift, Command, Control, Option/Alt.
      • Editing and Navigation gestures reduce stretching your hand to hit modifier+letter combos.
      • Programmers’ keypad (simlar to numlock keypad) reduces pinky reaches for symbols.
    • At the very least, re-map your primary modifier key to be a thumb modifier, instead of a pinky modifier. The command key on a standard macintosh keyboard is a thumb modifier; the control key on a standard pc keyboard is a pinky modifier. Pinky reaches = bad for RSI.

OK, who has more advice?

who needs vicodin

300px-A_small_cup_of_coffee.JPGwhen a double espresso will do the trick. According to this study at the University of Georgia, caffeine cuts post-workout pain by nearly 50 percent. Also…

…a 2003 study led by UGA professor Patrick O’Connor found that caffeine reduces thigh pain during moderate-intensity cycling. O’Connor, who along with professors Kevin McCully and the late Gary Dudley co-authored the current study, explained that caffeine likely works by blocking the body’s receptors for adenosine, a chemical released in response to inflammation.

The recent study was only conducted on women so they’re not sure if it works on men just yet and apparently it doesn’t quite work on people who already consume lots of caffeine on a regular basis since they’ve likely developed decreased sensitivity to its effects. Still, I’m going to make sure I have a latte before hitting the slopes this winter! (although I’m still going to keep the vicodin in my pocket)

(via collision detection)

get human 500 database

getHuman.gif
Do you hate dialing customer support with some terrible pressing problem only to get strung along by endless automated voice prompts? Here’s a great database of numbers for 500 companies (give or take a few) with instructions on how to get directly to a live human when calling for support.

The gethuman project is a consumer movement to improve the quality of phone support in the US. This free website is run by volunteers and is powered by over one million consumers who demand high quality phone support from the companies that they use.

A tip that I’ve been given to get the best support from a cell phone carrier (but haven’t tried yet) is to call and request cancellation (rather than tech support). You’ll get sent to a “retention” specialist who is trained to do whatever he or she can to keep you as a customer, so your problem will get routed to the right person a lot faster.

The only logical thing to do with a wayward Mac

appleCrisp.gif

Make apple crisp of course. Tom Dickson demonstrates much better on his ipod below (though i think he’s blending up a smoothie).

I tried this recipe today and it was good, but the “crisp” was not as crispy as I would have liked. Anyone got tips on how to make the “crisp” part extra-crispy???

My AppleCare/MacBook Pro Experience

This is the last post I’m going to write about my MacBook Pro. I had a bad hard drive, and I still don’t have a working machine after several months. In fact, I don’t have a machine at all. It is at AppleCare, and has been there since 12/19. The repair status is ‘on hold’, and I have called 3 times and spend several house on the phone to get the hold removed. It is still ‘on hold’, despite many promises to the contrary.

applecare.jpg

My MBP Returns Home Again

DHL “released” my macbook pro box back to me today after I called and hassled them about it. Just another note in the Apple Support Saga: According to DHL, Apple’s Contract with DHL does now allow the customer (me) to sign for and pick up the laptop box from DHL dispatch if there is a missed delivery attempt. Apparently they feel this reduces theft somehow. Anyway, to avoid this annoyance, make sure Apple Support sends “The Box” to your workplace, or be prepared to stand outside your door all day waiting for the DHL guy.

So now I get to go through Apple Setup again and create my user account and go to System Preferences and change “key repeat rate” to “Fast” and change “delay until repeat” to “short” and pull out all the crap that’s in the dock and put terminal in the dock and I think you get the idea. I have to set up my mac again. Every time. I’ve done this around 40 times in 2006 alone.

Apple Setup has an option to transfer data from you old mac, but it’s pretty specific to transferring your home directory from a previous machine. There is no option to “restore you laptop to the way it was before the hard drive crapped out”.

And wouldn’t it be nice if it was simple as copying my home directory? But no, many applications install stuff into the “/Library” folder and so on, kernel extensions, registration keys. As I mentioned a couple weeks ago, the music that I purchased from the iTunes Music Store will no longer work on my macbook pro even though it is exactly the same machine with a new hard drive. Everywhere in the iTMS documentation it says you can “authorize up to 5 computers” … but really what is implemented is you can have up 5 different installations of Mac OS X authorized to play your songs at any given time. If you lose access to those installations for whatever reason you are screwed and/or have to deal with Apple Support to reset some counters. I am really curious how Apple Support handles this iTMS authorization issue but I haven’t had the energy to make the phone calls yet.

I was hoping the boot-disk-RAID-mirror would solve the problem of backup but in the end it didn’t work out due to complexity, poor documentation of Apple RAID Mirroring, and just plain not understanding what happens when there is a conflict between two mirrored disks. In one of my tests, the file with a conflict just ended up with some bogus data in it … I didn’t feel like it was worth my time to analyze what does and does not work with Apple RAID when the mirrored pairs are disconnected, modified differently, and then reconnected. There is no point to making a backup if you are unsure whether it’s even going to work.

This is a long way of saying I would love to hear about a way to back up your mac in a way that minimizes all these problems.

Older Posts »