Are you the publisher? Claim or contact us about this channel

Embed this content in your HTML


Report adult content:

click to rate:

Account: (login)

More Channels

Channel Catalog

older | 1 | (Page 2) | 3 | 4 | 5 | newer

    0 0

    What's population ethics?

    A while back I read through this excellent introduction to population ethics:

    Popluation Ethics is about how to make ethical decisions that affect a whole population.

    For example, if we introduce contraception to a starving country and this raises millions out of poverty by preventing the conception of millions of children, is that good or bad?

    As the above link points out, we don't have a good answer to that question.  I've been trying to answer it for several months now, and haven't gotten very far, even after cornering half a dozen philosophy grads.

    One standard approach to population ethics, adding up all the utility (or happiness) of all the people in the population, suggests that the population would be better without contraception -- even though they're still miserable, there are more of them, so their combined small utility outweighs the greater happiness of the much smaller population they'd have with contraception.  In fact, by this rule, a billion absolutely miserable people would be considered better off than a million happy, healthy people.

    The opposite standard approach, of using average happiness instead of sum total happiness, favors contraception, since we divide total happiness by the number of people.  So the smaller nation full of happy people is considered better off.  But this too fails -- this rule would hold that a single, utterly ecstatic person would be better than a million happy people.

    Population as a single organism?

    But I think I've finally come across a useful approach: model the population as a single organism.  This opens the door to a lot of metaphorical reasoning using the tools we use for ethical questions about a single person.  (Of course, as always, we still have to check whether the conclusion still makes sense for the population, but at least it gives us a place to start reasoning).

    Instead, what if we consider the population as a single organism?  We don't consider a 500 pound person healthier than a person of ideal weight, nor do we amputate a leg just because you have a weak knee (thus raising the average health of your remaining limbs).  

    So far, that's pretty promising -- it looks like we can avoid the huge+miserable and the tiny+ecstatic problems the standard two approaches have.  So how should we answer the contraception question?

    Well, how do we normally evaluate the health and value of an organism?

    • Life expectancy
    • Degree of impairment or illness
    • Interaction with its environment
    These seem relevant to our contraception question:
    • Life expectancy: Does the smaller, wealthier country with contraception have a better chance of surviving in the long term than the larger poor country?  Probably, if they don't go overboard and stop having kids entirely.
    • Impairment/illness: This seems like the best approximation to poverty and hunger.  It's better to be small and healthy than huge and sick.
    • Environment: It's easy to miss this with the standard approaches, which tend to focus on the happiness of the individual.  But we immediately see the problem of a big elephant in a small cage, or a lion in with the lambs.
    My favorite aspect of this approach is that it favors moderation: populations that have good prospects of long, healthy life.  Too big creates environmental and health problems, while too small makes you more likely to get eaten or stepped on.


    I like this idea, but we should probably also consider the drawbacks.  The biggest ones I can think of are that the approach could tend toward fascism, and that it could be used to excuse genocide.  

    Fascism is a risk because we don't normally worry about the rights of individual cells in our bodies; the whole is what's important, not the parts.  This is a real risk, and we saw it go badly for the countries that have tried it.  In a more general sense, though, most countries espouse the notion of eminent domain and other principles that allow the state to override the desires of an individual.  And we kill or sequester individuals who pose a threat to the well being of others.  So perhaps fascism is the same risk to a population that blind hedonism is to an individual -- in some sense the organism is seeking its own good, but damage to the pieces that make up the whole is deadly in the long run.

    The risk of justifying genocide is related: the idea that if your right hand offends you, cut it off for the good of the whole.  Here again I think the problem lies in theory vs. practice.  Proponents of genocide in history always claim that the targeted population is hopelessly corrupt and dangerous, which has always been untrue.  But the more abstract principle, that certain people or groups are too deadly to be left alone (whether these are invading armies or serial killers running free), seems generally accepted.


    I never thought I'd be the kind of guy to say "What we really need here is a philosopher!"  But it's really true; real, practical problems like how to handle foreign aid and what kinds of charity to support are rooted in population ethics.  I'm not sure how well my approach will hold up in the long run, but I like that it's something that doesn't immediately lead to absurdities.

    What do you think?

    0 0
  • 01/06/13--13:53: Making graphene
  • This article piqued my interest, since it suggests that making graphene can be made cheaply and easily:

    That article includes links to the March 2012 paper by the folks at UCLA: "Laser Scribing of High-Performance and Flexible Graphene-Based Electrochemical Capacitors" as well as the methods paper that gives details on how they prepared it.

    Turns out Rice university did it in 2011:

    Their paper, "Direct laser writing of micro-supercapacitors on hydrated graphite oxide films", is behind a paywall, but here's their supplemental paper with some useful stuff:

    Where to get the graphite oxide?

    Somebody set this site up: but the materials are expensive.

    Pretty much everybody seems to use some variant of the Hummers process to make it from graphite flakes.

    These guys claim an improved and safer process:

    This tantalizing snippet claims you can make it just from glucose:

    "Graphite oxide has also been prepared by using a "bottom-up" synthesis method (Tang-Lau method) in which the sole source is glucose, the process is safer, more facile, and more environmentally friendly compared to traditionally “top-down” method, in which strong oxidizers must be involved. Another important advantage of Tang-Lau method is thickness controllable ranging from monolayer to multilayers by simply adjusting growth parameters."

    But the article is behind a paywall and so I haven't been able to read it:

    This guy demonstrates some variant of Hummers method and talks about where to get the ingredients:

    0 0
  • 03/07/13--19:12: Light bulb aisle
  • Big box stores are different in Phoenix.  Here is a typical bike helmet:

    But most fascinating was their light bulb aisle, which extended across the entire length of the western wall of the store.  It had many types of bulbs I hadn't before encountered.  Most memorably:

    Madness White (60W)

    A dark bulb (dimmable), for over-lit rooms

    A long-tube fluorescent replacement bulb consisting of a single LED element that runs the length of the bulb.  Requires twice the wattage of the bulb it replaces, and requires welding goggles while in use.

    This bulb claims to illuminate only that which is false

    The new "DC to daylight" bulbs, which are actually a misnomer, since they go well beyond daylight.  Primarily marketed to snobby photographers, the gamma/cosmic emissions increase lifetime cancer risk by 1%.

    A line of bulbs with greater than 100% efficiency, but these require special wiring to collect the excess energy.  Otherwise they can overheat on sunny days.

    Instagram-branded "Sepia" bulbs which guarantee washed out yellow illumination that fades at the edges of the room.

    For climate skeptics, a bulb which emits CO2 and runs on kerosene.  (Available as a track light or for standard edison socket)

    A complete line of bulbs for Tetrachromats had a demo display, but they all looked the same to me

    0 0
  • 03/16/13--20:39: Shop Essentials
  • A friend of mine is building a treehouse for his kids, and it got me thinking about how I'd outfit an empty garage for that kind of work.

    These are the basic ingredients I had in my shop around the time I started to find that I could build big wood projects start to finish without a trip to the hardware store.  It's a real milestone that feels great.

    In each category, I've listed the most important items first.  I have a home depot nearby, so I've linked to the brands and items I prefer.  Lowe's has comparable stuff in general.


    • at least 20 8 foot 2x4s (Kiln Dried, not green), should be about $2/each.  Try to pick straight-ish ones, but no 2x4 is ever going to be perfectly straight or flat.  (Pretty much every other piece of dimensional lumber in the store is going to be green (look it up) except maybe some of the redwood, which is why the KD 8' studs are my go-to building block.
    • at least 5 sheets 3/4" cheap birch cabinet plywood or outdoor/marine-rated plywood (get it somewhere like Macbeath rather than a big box store:  Should cost about $30/sheet)
    • at least 5 sheets 1/4" melamine-backed MDF (should be about $30/sheet).  Watch out, the melamine edges are very sharp.  Knock down edges quickly with sandpaper
    • A 6-foot or so piece of ~1/8" thick 1" angle iron can be handy; it's super strong.  Hard to work with.


    • 5lb box of 1 1/4" screws.  Use with plywood
    • 5lb box of 2 1/2" screws.  Use with 2x4s
    • 1lb box each of 1 5/8", 2", 3", 4", 5" screws

    Get an organizer box like this and fill it with 1/4"x20 zinc-coated hardware.  This will cover all your bolt+nut needs.  Get boxes of ~100 each of these (50 or 25 for the longer bolts):

    • 2 boxes nuts
    • 2 boxes washers
    • 1 box of wing nuts
    • 1 box each hex bolts (aka hex cap screws) 1 3/4", 2", 2.5", 3", 3.5", 4", 5"
    A drywall anchor assortment can also be handy for indoor handyman stuff.  Studfinders mostly suck.
    A few feet of threaded rod (1/4-20, maybe something thicker (but then get nuts too)) is also handy.

    Finishes and adhesives:
    • 1 gallon white water based latex paint
    • 1 gallon water based polyurethane, semi-gloss
    • 1.5", 3" brushes, 12" roller, pan
    • Cheap spray paint.  One can each: clear, white, black, grey primer.  
    • Titebond glue.  I mostly use original titebond, but there's Titebond II if you need waterproof.  Get one each of the 16 ounce tubes.
    • Twin tube 5-minute epoxy.  Also get a twin tube of regular epoxy.  JB Weld is handy too.  CA glue (aka krazy glue) also has its uses.  A small container of gorilla glue might also be useful, but watch out, it expands times.  Research and experiment to get a feel for what kind of glue to use when.

    • 8 12" 1-handed bar clamps.  They're stinking expensive, but very useful.  
    • 2-4 each of 18" and longer clamps.
    Hand tools
    • 25' tape measure
    • Get a big cheap screwdriver set.  Also good to get a handful of ordinary #2 phillips screwdrivers.
    • To go with your machine screws, get a set of open-ended wrenches and a socket set.  Don't have to go crazy; cheap stuff is okay here.
    • A reasonable set of drill bits.  You don't have to go crazy on this.  A big cheap Ryobi assortment is probably fine.  Forstner bits are handy once you have a drill press.  Be sure to get a countersink or two.
    • 3 cheap box cutters
    • Automatic punch. I *love* mine.  Keeps your drill bits from wandering when you go to drill.
    • Tri-square - most come with a scriber pin, more accurate than a pencil for marking your cut
    • Big square
    • Speed square
    • T-bevel
    • 48" straight edge
    • 48" level
    • Basic framing hammer.  5 pound sledge is also handy.
    • Basic cheapish set of pliers, pipe and adjustable wrenches.
    • Couple of basic metal files.
    • A cheap set of chisels can be somewhat handy.

    Watch the number of sheets you get per package, price goes down quickly with quantity.
    This claims to be 80 sheets, although it's also 80 grit.  Photo says 8 sheets, but description says 80-sheet package is available online.  If it is 80 sheets, that's a pretty great deal.  Get one package each of full size sheets of 80, 120, 220 grit.
    Repeat for whatever sander(s) you get.

    • I'm partial to these face shields.  They say they're not a replacement for safety glasses, but I prefer them.
    • I'm partial to these corded earplugs since they're easy to take out and tuck into my shirt collar when I'm not wearing them.  I tend to reuse them, so a box should last you a long time.
    Basic Power Tools:

    Avoid cheap brands like the plague they are.  Husky, Task Force, Black & Decker, Skil, Buffalo, Chicago all suck, as does everything at harbor freight.  Don't waste your money.

    Dewalt tends to be quite good.  Ridgid is okay.  Ryobi is OK but on the cheap side.  Porter Cable, Fein, Milwaukee and Makita and Panasonic, Bosch are good. 

    Buy corded tools unless you're setting up a high volume shop where you'll be using tools every day.  Otherwise your batteries will be either discharged or outright dead by their fifth use a year from now.
    • 12gal Ridgid shop-vac.  Amazingly useful.  Fill up air mattresses, suck the water out of your clogged dish washer.  I love my shop vac.
    • 2 each 50', 25', 12' extension cords.  Triple-headed are handy but not mandatory.
    • Corded drill with keyless chuck. I have this one and it's okay, this one might be nicer.
    • Small impact driver.  This one is a conundrum: I absolutely love them, but they're only available as cordless and the batteries are extortion.  They're super small and light and can drive your 2 1/2" screws through a pair of 2x4s with no pilot hole, counter sink it, and then shear the head off if the wood doesn't budge.  Get these (not the double-headed ones), preferably the plastic box rather than this 5-pack, since they do wear out.
    • Circular saw (be careful!).  A modern, pricy alternative is a "track saw".  I haven't used them, but they look like a really nice solution for clean long cuts on plywood.
    • Sawhorses and adjustable height rollers.  I'm not very knowledgeable with these, but you need good workpiece support when you go to cut things like sheets of plywood
    • Drill press.  This floor standing model is the one I have and it's utterly ubiquitous; almost everybody makes them just like this.  Desktop variants look a lot cheaper and might be fine; the floor standing nature itself isn't important to me.  
    • Random orbit sander (safe, but minimize dust) and velcro sanding disks (see above for grits)
    • 1/4 sheet vibration sander (safe, but minimize dust) and pre-cut papers (see above for grits)
    • Jigsaw or sawzall.  I haven't used these much, but contractors use them a ton.  The sawzalls are more about getting into corners to cut out plumbing or cut off nails, whereas jigsaws are about cutting curves into plywood.  Not very accurate.
    Optional but handy:
    • Angle grinder (be careful!) and 3 each thick disks, cutoff wheels and sanding wheels.  This is mainly about grinding through metal; cut angle iron, cut off protruding screws (leaves an ugly scar), cut through locks.
    • Air compressor & nailers.  A pancake compressor is fine for nailers and inflating things.  Air staplers and 16/18 gauge brad nailers can be very handy.  Somewhat scary; be careful.  Big contractor framing nailers are more scary.  If you want to work on cars, you'll want a compressor with a bigger tank to run a big impact wrench.
    • Compound miter saw, preferably 12" with slide.  Powered (not battery) Laser is nice too.  These are how contractors chop up a whole pile of 2x4s in seconds.  Make sure you have good outfeed support (side wings to support long workpieces on both sides of the saw).
    • Handheld belt sander.  I never used these much, but my dad loves his.
    • Router.  Be careful, they're dangerous.  This is getting into finer woodworking; mostly people go crazy at first and roundover or chamfer everything.  Linked is a small handheld one which is very wieldy.  You can get a bigger one and get or make a router table (bigger the table, the better), which can be quite useful for certain things.  (My porter cable is super quiet, which I love). 
    • Jointer & planer.  If you start getting into fine woodworking, these are what you use to clean up rough cut hardwood.  (Otherwise you pay a big premium for S4S "surfaced 4 sides" hardwood).  You can also clean up 2x4s, but 2x4s are mostly a lost cause for fine woodworking.  This jointer is meh, this planer is great.
    • Further afield are things like bridgeport vertical knee mills, which are amazing tools that everybody should learn how to use.  But they're mainly for precise metal machining.
    • CNC routers are also amazingly useful tools, but they're huge and expensive.
    Expensive tools:

    Don't cheap out on these.  Cheap versions suck and are scary, and you can get along without these tools until you're ready to take the plunge on a good one.
    • Bench sander.  Bench sanders are amazingly useful.  I've never found one I'm totally happy with, but don't get anything they have at home depot.  Disk sanders are generally useful, spindle sanders are useful for curved pieces.  I use the 6x48" belt sander the most (first link).
    • Bandsaw.  These are arguably safer than table saws (although the sawstop has what no bandsaw does).  They have a complimentary set of abilities to a table saw: they can cut curves and resaw really thick pieces, but the neck depth is a limitation.  Get 3tpi 1/4" wide (or 3/8") blades.  Don't get higher tpi or wider blades unless you're cutting a lot of super thin stock or doing a lot of "resawing".  There are good arguments for whether to buy a table saw or bandsaw first.
    • Table saw. Table saws are arguably the most dangerous tool in the shop.  They're powerful and useful and can be quite accurate.  They're the best tool for ripping (long cuts along the long axis of the workpiece, parallel to an opposite edge), but for cross cuts they're usually limited by how much table is between the front of the blade and the near edge of the table -- beyond that, the miter gauge is hanging off the table.  Cheap table saws are scary.  If you're going to get one, get a sawstop if at all possible, preferably the cabinet saw rather than the contractor version.  Table saws are used a lot in fine woodworking (boxes and small cabinets), less in framing/contracting.

    0 0
  • 05/01/13--01:18: Wavy shelf

  • Next the Son, the Stunning-Cantab:

    He suggested curves of beauty,
    Curves pervading all his figure,
    Which the eye might follow onward,
    Till they centered in the breast-pin,
    Centered in the golden breast pin.
    He had learned it all from Ruskin 
    (Author of "The Stones of Venice,"
    "Seven Lamps of Architecture,"
    "Modern Painters," and some others);
    And perhaps he had not fully 
    Understood his author's meaning;
    But, whatever was the reason,
    All was fruitless, as the picture 
    Ended in an utter failure.

    -from Hiawatha's Photographing, by Lewis Carroll

    0 0

    Tried to install Sketchup 2013 on Ubuntu Lucid, and it kept complaining about needing to install the Windows Imaging Component.

    Downloaded it: 53c18652ac2f8a51303deb48a1b7abbdb1db427f

    But it claimed a newer version was already installed. From here I gleaned that I needed to move system32/windowscodecs.dll out of the way first:

    Then I was able to install WIC and then Sketchup.

    0 0
  • 07/07/13--23:47: Flour smells like soap
  • Recently a batch of bread I made had an aftertaste like soap.  Then the next day my wife made pizza dough from the same flour and yeast, and it had the same effect.

    Searching online, I read about lactic bacteria contaminating bread starters, particularly if they're too wet.  But today when I went to make another batch of bread, I noticed that the flour had the same smell.

    So it looks the flour somehow got contaminated, although I don't see anything else about it online.

    0 0

    If you're lighting a water heater and the pilot lights fine, but when the burner engages, you only get a brief puff of gas, check the gas shutoff valve for the house.  Sometimes they leak, so that gas builds up in the lines.  The leak is enough to keep the pilot lit, and the built up pressure lets the burner run for a second or two, but that's all.  Sometimes the shutoff valve will stick a bit as well, so that it's still closed even though it moved somewhat.

    (If that's the case for you, you should probably also replace your shutoff valve!)

    0 0
  • 10/02/13--13:36: Sagulator
  • This is a really handy tool to figure out how much deflection to plan for when building wood structures:

    Plywood seems to do about as well as solid wood, and MDF is about 3x worse than plywood for deflection.

    0 0
 inputStream = [open file and get input stream] reader = new;

        MyProto.Builder myProtoBuilder = myProto.newBuilder();
        TextFormat.merge(reader, myProtoBuilder);

    0 0

    I picked up a 3-axis beefy NEMA-23 stepper kit from ebay that sell for around $240.  It comes with a Longs Motor DM542A stepper controller, which seems to be more or less identical to a lot of other brands.

    The kit came with a board that takes commands from a PC parallel port (driven by eg., linuxcnc), and apparently the timing is such that USB-parallel adapters don't work well; you need a hardware parallel port.

    I wasn't particularly excited to track down a machine old enough to have a parallel port and lug it around with my project, so I looked into whether the GPIO pins on my Raspberry Pi would be suitable to drive the DIR (direction) and PUL (pulse / step) pins directly.  I found some general discussion, but not much that was concrete.

    I think I originally picked up NOOBS to put on the SD card, but it's been a while and I don't remember exactly.  But it came up with a menu and I picked the recommended option of Raspbian wheezy, which it downloaded and installed.  Installation was a breeze, and the machine has been working great for me.  (I'm writing this post on it, even, although it's pretty laggy if I try to open multiple tabs in the browser).

    Most of the skepticism I saw about using the GPIO pins centered around the need for an RTOS to ensure that the process toggling the pulse line can do so at the required intervals without getting held up for extra milliseconds.  When I ran "uname -a", I noticed "PREEMPT", which means that it already has the kernel patches for hard timing.  Awesome!

    Voltages were another concern: the stepper driver wants 5v logic inputs, but the raspi runs at 3.3v.  Fortunately, this doesn't seem to be a problem either; the driver board seems perfectly happy with 3.3v input.

    At first I though my driver wasn't working right when I wired it up -- I got no power light.  But it turns out the ENBL line needs to be pulled down rather than up for the board to work.

    I also found that the board doesn't seem to have the - side of each input tied together, so I had to wire up the ENBL-, DIR- and PUL- inputs all to ground.

    I looked over the pinout for P1 on the raspi to figure out which GPIO lines to use, and didn't find any major reasons to use any particular ones; seems like almost all of them have alternate uses that I mostly don't think I'll need.  So I used pins 1, 3, 5, 7 and 9, corresponding to +3.3v, GPIO-0, GPIO-1, GPIO-4 and GND on my rev. 1 board.

    My first stab at controlling the stepper used the python example code.  Note that this code uses board pin numbers rather than the GPIO numbering:


    import RPi.GPIO as GPIO
    import time

    # use P1 header pin numbering convention

    # Set up the GPIO channels - one input and one output
    GPIO.setup(3, GPIO.OUT)
    GPIO.setup(5, GPIO.OUT)
    GPIO.setup(7, GPIO.OUT)

    GPIO.output(3, GPIO.HIGH)

    while True:
      GPIO.output(5, GPIO.HIGH)
      GPIO.output(5, GPIO.LOW)

    This worked just fine, although as expected, it'd glitch every few seconds, audible as a stuttering sound in the stepper.  Glitching got worse when I loaded down the system by doing things like loading web pages.

    Next I tried the C example code to see if it'd do better.  It might have been somewhat better, but still had noticeable glitching.  

    I found excellent wiki page with example code for using the RTOS patches, and mashed it up with the GPIO example code, and it works great!

    So it looks like the principle is sound.  The remaining task is to get it integrated with linuxcnc, at which point we'll have a $35 CNC controller with HDMI output that can drive step/direction pins on stepper controllers directly, without having to use parallel ports and adapter boards.

    // Compile with:
    // gcc -o rt_gpio rt_gpio.c -lrt

    #include <stdlib.h>
    #include <stdio.h>
    #include <time.h>
    #include <sched.h>
    #include <sys/mman.h>

    #include <string.h>

    // defines for using the realtime kernel
    #define MY_PRIORITY (49) /* we use 49 as the PRREMPT_RT use 50
                                as the priority of kernel tasklets
                                and interrupt handler by default */

    #define MAX_SAFE_STACK (8*1024) /* The maximum stack size which is
                                       guaranteed safe to access without
                                       faulting */

    #define NSEC_PER_SEC    (1000000000) /* The number of nsecs per sec. */

    // defines for talking to the gpio pins

    // Access from ARM Running Linux

    #define BCM2708_PERI_BASE        0x20000000
    #define GPIO_BASE                (BCM2708_PERI_BASE + 0x200000) /* GPIO controll
    er */

    #include <stdio.h>
    #include <stdlib.h>
    #include <fcntl.h>
    #include <sys/mman.h>
    #include <unistd.h>

    #define PAGE_SIZE (4*1024)
    #define BLOCK_SIZE (4*1024)

    int  mem_fd;
    void *gpio_map;

    // I/O access
    volatile unsigned *gpio;

    // GPIO setup macros. Always use INP_GPIO(x) before using OUT_GPIO(x) or SET_GPIO_ALT(x,y)
    #define INP_GPIO(g) *(gpio+((g)/10)) &= ~(7<<(((g)%10)*3))
    #define OUT_GPIO(g) *(gpio+((g)/10)) |=  (1<<(((g)%10)*3))

    #define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3))

    #define GPIO_SET *(gpio+7)  // sets   bits which are 1 ignores bits which are 0
    #define GPIO_CLR *(gpio+10) // clears bits which are 1 ignores bits which are 0

    void setup_io();

    void stack_prefault(void) {

            unsigned char dummy[MAX_SAFE_STACK];

            memset(dummy, 0, MAX_SAFE_STACK);

    int main(int argc, char* argv[])
            struct timespec t;
            struct sched_param param;
            int interval = 1000000; // ns

            /* Declare ourself as a real time task */

            param.sched_priority = MY_PRIORITY;
            if(sched_setscheduler(0, SCHED_FIFO, &amp;param) == -1) {
                    perror("sched_setscheduler failed");

            /* Lock memory */

            if(mlockall(MCL_CURRENT|MCL_FUTURE) == -1) {
                    perror("mlockall failed");

            /* Pre-fault our stack */


            clock_gettime(CLOCK_MONOTONIC ,&amp;t);
            /* start after one second */

      int g,rep;

      // Set up gpi pointer for direct register access

      * You are about to change the GPIO settings of your computer.          *
      * Mess this up and it will stop working!                               *
      * It might be a good idea to 'sync' before running this program        *
      * so at least you still have your code changes written to the SD-card! *

    #define DIR (0)
    #define STEP (1)

      INP_GPIO(DIR); // must use INP_GPIO before we can use OUT_GPIO

      GPIO_SET = 1 << DIR;

      int state = 0;
            while(1) {
                    /* wait until next shot */
                    clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &amp;t, NULL);

                    /* do the stuff */
        if (state) {
          GPIO_SET = 1 << STEP;
        } else {
          GPIO_CLR = 1 << STEP;
        state = !state;

                    /* calculate next shot */
                    t.tv_nsec += interval;

                    while (t.tv_nsec >= NSEC_PER_SEC) {
                           t.tv_nsec -= NSEC_PER_SEC;

    // Set up a memory regions to access GPIO
    void setup_io()
       /* open /dev/mem */
       if ((mem_fd = open("/dev/mem", O_RDWR|O_SYNC) ) < 0) {
          printf("can't open /dev/mem \n");

       /* mmap GPIO */
       gpio_map = mmap(
          NULL,             //Any adddress in our space will do
          BLOCK_SIZE,       //Map length
          PROT_READ|PROT_WRITE,// Enable reading &amp; writting to mapped memory
          MAP_SHARED,       //Shared with other processes
          mem_fd,           //File to map
          GPIO_BASE         //Offset to GPIO peripheral

       close(mem_fd); //No need to keep mem_fd open after mmap

       if (gpio_map == MAP_FAILED) {
          printf("mmap error %d\n", (int)gpio_map);//errno also set!

       // Always use volatile pointer!
       gpio = (volatile unsigned *)gpio_map;

    } // setup_io

    0 0

    Well this took me several hours to figure out: chrome will only let you have one download in progress from the same URL at the same time.  The second attempt will just hang until the first one is done.

    I tried changing the Content-Disposition filename= value at the server side (so that each download gets a different filename), but that doesn't help.  But if I ask for http://localhost/foo and http://localhost/bar, it works.  (I can also get two downloads at the same time if I do one of them in an incognito window).

    Firefox doesn't seem to have this limitation.

    0 0

    This talk is worth re-reading every few years.  I've copied the text in case the original site goes down.

    Richard Hamming

    ``You and Your Research''

    Transcription of the 
    Bell Communications Research Colloquium Seminar 
    7 March 1986

    J. F. Kaiser 
    Bell Communications Research 
    445 South Street 
    Morristown, NJ 07962-1910

    At a seminar in the Bell Communications Research Colloquia Series, Dr. Richard W. Hamming, a Professor at the Naval Postgraduate School in Monterey, California and a retired Bell Labs scientist, gave a very interesting and stimulating talk, `You and Your Research' to an overflow audience of some 200 Bellcore staff members and visitors at the Morris Research and Engineering Center on March 7, 1986. This talk centered on Hamming's observations and research on the question ``Why do so few scientists make significant contributions and so many are forgotten in the long run?'' From his more than forty years of experience, thirty of which were at Bell Laboratories, he has made a number of direct observations, asked very pointed questions of scientists about what, how, and why they did things, studied the lives of great scientists and great contributions, and has done introspection and studied theories of creativity. The talk is about what he has learned in terms of the properties of the individual scientists, their abilities, traits, working habits, attitudes, and philosophy.

    In order to make the information in the talk more widely available, the tape recording that was made of that talk was carefully transcribed. This transcription includes the discussions which followed in the question and answer period. As with any talk, the transcribed version suffers from translation as all the inflections of voice and the gestures of the speaker are lost; one must listen to the tape recording to recapture that part of the presentation. While the recording of Richard Hamming's talk was completely intelligible, that of some of the questioner's remarks were not. Where the tape recording was not intelligible I have added in parentheses my impression of the questioner's remarks. Where there was a question and I could identify the questioner, I have checked with each to ensure the accuracy of my interpretation of their remarks.


    As a speaker in the Bell Communications Research Colloquium Series, Dr. Richard W. Hamming of the Naval Postgraduate School in Monterey, California, was introduced by Alan G. Chynoweth, Vice President, Applied Research, Bell Communications Research.

    Alan G. Chynoweth: Greetings colleagues, and also to many of our former colleagues from Bell Labs who, I understand, are here to be with us today on what I regard as a particularly felicitous occasion. It gives me very great pleasure indeed to introduce to you my old friend and colleague from many many years back, Richard Hamming, or Dick Hamming as he has always been know to all of us.

    Dick is one of the all time greats in the mathematics and computer science arenas, as I'm sure the audience here does not need reminding. He received his early education at the Universities of Chicago and Nebraska, and got his Ph.D. at Illinois; he then joined the Los Alamos project during the war. Afterwards, in 1946, he joined Bell Labs. And that is, of course, where I met Dick - when I joined Bell Labs in their physics research organization. In those days, we were in the habit of lunching together as a physics group, and for some reason this strange fellow from mathematics was always pleased to join us. We were always happy to have him with us because he brought so many unorthodox ideas and views. Those lunches were stimulating, I can assure you.

    While our professional paths have not been very close over the years, nevertheless I've always recognized Dick in the halls of Bell Labs and have always had tremendous admiration for what he was doing. I think the record speaks for itself. It is too long to go through all the details, but let me point out, for example, that he has written seven books and of those seven books which tell of various areas of mathematics and computers and coding and information theory, three are already well into their second edition. That is testimony indeed to the prolific output and the stature of Dick Hamming.

    I think I last met him - it must have been about ten years ago - at a rather curious little conference in Dublin, Ireland where we were both speakers. As always, he was tremendously entertaining. Just one more example of the provocative thoughts that he comes up with: I remember him saying, ``There are wavelengths that people cannot see, there are sounds that people cannot hear, and maybe computers have thoughts that people cannot think.'' Well, with Dick Hamming around, we don't need a computer. I think that we are in for an extremely entertaining talk.

    THE TALK: ``You and Your Research'' by Dr. Richard W. Hamming

    It's a pleasure to be here. I doubt if I can live up to the Introduction. The title of my talk is, ``You and Your Research.'' It is not about managing research, it is about how you individually do your research. I could give a talk on the other subject - but it's not, it's about you. I'm not talking about ordinary run-of-the-mill research; I'm talking about great research. And for the sake of describing great research I'll occasionally say Nobel-Prize type of work. It doesn't have to gain the Nobel Prize, but I mean those kinds of things which we perceive are significant things. Relativity, if you want, Shannon's information theory, any number of outstanding theories - that's the kind of thing I'm talking about.

    Now, how did I come to do this study? At Los Alamos I was brought in to run the computing machines which other people had got going, so those scientists and physicists could get back to business. I saw I was a stooge. I saw that although physically I was the same, they were different. And to put the thing bluntly, I was envious. I wanted to know why they were so different from me. I saw Feynman up close. I saw Fermi and Teller. I saw Oppenheimer. I saw Hans Bethe: he was my boss. I saw quite a few very capable people. I became very interested in the difference between those who do and those who might have done.

    When I came to Bell Labs, I came into a very productive department. Bode was the department head at the time; Shannon was there, and there were other people. I continued examining the questions, ``Why?'' and ``What is the difference?'' I continued subsequently by reading biographies, autobiographies, asking people questions such as: ``How did you come to do this?'' I tried to find out what are the differences. And that's what this talk is about.

    Now, why is this talk important? I think it is important because, as far as I know, each of you has one life to live. Even if you believe in reincarnation it doesn't do you any good from one life to the next! Why shouldn't you do significant things in this one life, however you define significant? I'm not going to define it - you know what I mean. I will talk mainly about science because that is what I have studied. But so far as I know, and I've been told by others, much of what I say applies to many fields. Outstanding work is characterized very much the same way in most fields, but I will confine myself to science.

    In order to get at you individually, I must talk in the first person. I have to get you to drop modesty and say to yourself, ``Yes, I would like to do first-class work.'' Our society frowns on people who set out to do really good work. You're not supposed to; luck is supposed to descend on you and you do great things by chance. Well, that's a kind of dumb thing to say. I say, why shouldn't you set out to do something significant. You don't have to tell other people, but shouldn't you say to yourself, ``Yes, I would like to do something significant.''

    In order to get to the second stage, I have to drop modesty and talk in the first person about what I've seen, what I've done, and what I've heard. I'm going to talk about people, some of whom you know, and I trust that when we leave, you won't quote me as saying some of the things I said.

    Let me start not logically, but psychologically. I find that the major objection is that people think great science is done by luck. It's all a matter of luck. Well, consider Einstein. Note how many different things he did that were good. Was it all luck? Wasn't it a little too repetitive? Consider Shannon. He didn't do just information theory. Several years before, he did some other good things and some which are still locked up in the security of cryptography. He did many good things.

    You see again and again, that it is more than one thing from a good person. Once in a while a person does only one thing in his whole life, and we'll talk about that later, but a lot of times there is repetition. I claim that luck will not cover everything. And I will cite Pasteur who said, ``Luck favors the prepared mind.'' And I think that says it the way I believe it. There is indeed an element of luck, and no, there isn't. The prepared mind sooner or later finds something important and does it. So yes, it is luck. The particular thing you do is luck, but that you do something is not.

    For example, when I came to Bell Labs, I shared an office for a while with Shannon. At the same time he was doing information theory, I was doing coding theory. It is suspicious that the two of us did it at the same place and at the same time - it was in the atmosphere. And you can say, ``Yes, it was luck.'' On the other hand you can say, ``But why of all the people in Bell Labs then were those the two who did it?'' Yes, it is partly luck, and partly it is the prepared mind; but `partly' is the other thing I'm going to talk about. So, although I'll come back several more times to luck, I want to dispose of this matter of luck as being the sole criterion whether you do great work or not. I claim you have some, but not total, control over it. And I will quote, finally, Newton on the matter. Newton said, ``If others would think as hard as I did, then they would get similar results.''

    One of the characteristics you see, and many people have it including great scientists, is that usually when they were young they had independent thoughts and had the courage to pursue them. For example, Einstein, somewhere around 12 or 14, asked himself the question, ``What would a light wave look like if I went with the velocity of light to look at it?'' Now he knew that electromagnetic theory says you cannot have a stationary local maximum. But if he moved along with the velocity of light, he would see a local maximum. He could see a contradiction at the age of 12, 14, or somewhere around there, that everything was not right and that the velocity of light had something peculiar. Is it luck that he finally created special relativity? Early on, he had laid down some of the pieces by thinking of the fragments. Now that's the necessary but not sufficient condition. All of these items I will talk about are both luck and not luck.

    How about having lots of `brains?' It sounds good. Most of you in this room probably have more than enough brains to do first-class work. But great work is something else than mere brains. Brains are measured in various ways. In mathematics, theoretical physics, astrophysics, typically brains correlates to a great extent with the ability to manipulate symbols. And so the typical IQ test is apt to score them fairly high. On the other hand, in other fields it is something different. For example, Bill Pfann, the fellow who did zone melting, came into my office one day. He had this idea dimly in his mind about what he wanted and he had some equations. It was pretty clear to me that this man didn't know much mathematics and he wasn't really articulate. His problem seemed interesting so I took it home and did a little work. I finally showed him how to run computers so he could compute his own answers. I gave him the power to compute. He went ahead, with negligible recognition from his own department, but ultimately he has collected all the prizes in the field. Once he got well started, his shyness, his awkwardness, his inarticulateness, fell away and he became much more productive in many other ways. Certainly he became much more articulate.

    And I can cite another person in the same way. I trust he isn't in the audience, i.e. a fellow named Clogston. I met him when I was working on a problem with John Pierce's group and I didn't think he had much. I asked my friends who had been with him at school, ``Was he like that in graduate school?'' ``Yes,'' they replied. Well I would have fired the fellow, but J. R. Pierce was smart and kept him on. Clogston finally did the Clogston cable. After that there was a steady stream of good ideas. One success brought him confidence and courage.

    One of the characteristics of successful scientists is having courage. Once you get your courage up and believe that you can do important problems, then you can. If you think you can't, almost surely you are not going to. Courage is one of the things that Shannon had supremely. You have only to think of his major theorem. He wants to create a method of coding, but he doesn't know what to do so he makes a random code. Then he is stuck. And then he asks the impossible question, ``What would the average random code do?'' He then proves that the average code is arbitrarily good, and that therefore there must be at least one good code. Who but a man of infinite courage could have dared to think those thoughts? That is the characteristic of great scientists; they have courage. They will go forward under incredible circumstances; they think and continue to think.

    Age is another factor which the physicists particularly worry about. They always are saying that you have got to do it when you are young or you will never do it. Einstein did things very early, and all the quantum mechanic fellows were disgustingly young when they did their best work. Most mathematicians, theoretical physicists, and astrophysicists do what we consider their best work when they are young. It is not that they don't do good work in their old age but what we value most is often what they did early. On the other hand, in music, politics and literature, often what we consider their best work was done late. I don't know how whatever field you are in fits this scale, but age has some effect.

    But let me say why age seems to have the effect it does. In the first place if you do some good work you will find yourself on all kinds of committees and unable to do any more work. You may find yourself as I saw Brattain when he got a Nobel Prize. The day the prize was announced we all assembled in Arnold Auditorium; all three winners got up and made speeches. The third one, Brattain, practically with tears in his eyes, said, ``I know about this Nobel-Prize effect and I am not going to let it affect me; I am going to remain good old Walter Brattain.'' Well I said to myself, ``That is nice.'' But in a few weeks I saw it was affecting him. Now he could only work on great problems.

    When you are famous it is hard to work on small problems. This is what did Shannon in. After information theory, what do you do for an encore? The great scientists often make this error. They fail to continue to plant the little acorns from which the mighty oak trees grow. They try to get the big thing right off. And that isn't the way things go. So that is another reason why you find that when you get early recognition it seems to sterilize you. In fact I will give you my favorite quotation of many years. The Institute for Advanced Study in Princeton, in my opinion, has ruined more good scientists than any institution has created, judged by what they did before they came and judged by what they did after. Not that they weren't good afterwards, but they were superb before they got there and were only good afterwards.

    This brings up the subject, out of order perhaps, of working conditions. What most people think are the best working conditions, are not. Very clearly they are not because people are often most productive when working conditions are bad. One of the better times of the Cambridge Physical Laboratories was when they had practically shacks - they did some of the best physics ever.

    I give you a story from my own private life. Early on it became evident to me that Bell Laboratories was not going to give me the conventional acre of programming people to program computing machines in absolute binary. It was clear they weren't going to. But that was the way everybody did it. I could go to the West Coast and get a job with the airplane companies without any trouble, but the exciting people were at Bell Labs and the fellows out there in the airplane companies were not. I thought for a long while about, ``Did I want to go or not?'' and I wondered how I could get the best of two possible worlds. I finally said to myself, ``Hamming, you think the machines can do practically everything. Why can't you make them write programs?'' What appeared at first to me as a defect forced me into automatic programming very early. What appears to be a fault, often, by a change of viewpoint, turns out to be one of the greatest assets you can have. But you are not likely to think that when you first look the thing and say, ``Gee, I'm never going to get enough programmers, so how can I ever do any great programming?''

    And there are many other stories of the same kind; Grace Hopper has similar ones. I think that if you look carefully you will see that often the great scientists, by turning the problem around a bit, changed a defect to an asset. For example, many scientists when they found they couldn't do a problem finally began to study why not. They then turned it around the other way and said, ``But of course, this is what it is'' and got an important result. So ideal working conditions are very strange. The ones you want aren't always the best ones for you.

    Now for the matter of drive. You observe that most great scientists have tremendous drive. I worked for ten years with John Tukey at Bell Labs. He had tremendous drive. One day about three or four years after I joined, I discovered that John Tukey was slightly younger than I was. John was a genius and I clearly was not. Well I went storming into Bode's office and said, ``How can anybody my age know as much as John Tukey does?'' He leaned back in his chair, put his hands behind his head, grinned slightly, and said, ``You would be surprised Hamming, how much you would know if you worked as hard as he did that many years.'' I simply slunk out of the office!

    What Bode was saying was this: ``Knowledge and productivity are like compound interest.'' Given two people of approximately the same ability and one person who works ten percent more than the other, the latter will more than twice outproduce the former. The more you know, the more you learn; the more you learn, the more you can do; the more you can do, the more the opportunity - it is very much like compound interest. I don't want to give you a rate, but it is a very high rate. Given two people with exactly the same ability, the one person who manages day in and day out to get in one more hour of thinking will be tremendously more productive over a lifetime. I took Bode's remark to heart; I spent a good deal more of my time for some years trying to work a bit harder and I found, in fact, I could get more work done. I don't like to say it in front of my wife, but I did sort of neglect her sometimes; I needed to study. You have to neglect things if you intend to get what you want done. There's no question about this.

    On this matter of drive Edison says, ``Genius is 99% perspiration and 1% inspiration.'' He may have been exaggerating, but the idea is that solid work, steadily applied, gets you surprisingly far. The steady application of effort with a little bit more work, intelligently applied is what does it. That's the trouble; drive, misapplied, doesn't get you anywhere. I've often wondered why so many of my good friends at Bell Labs who worked as hard or harder than I did, didn't have so much to show for it. The misapplication of effort is a very serious matter. Just hard work is not enough - it must be applied sensibly.

    There's another trait on the side which I want to talk about; that trait is ambiguity. It took me a while to discover its importance. Most people like to believe something is or is not true. Great scientists tolerate ambiguity very well. They believe the theory enough to go ahead; they doubt it enough to notice the errors and faults so they can step forward and create the new replacement theory. If you believe too much you'll never notice the flaws; if you doubt too much you won't get started. It requires a lovely balance. But most great scientists are well aware of why their theories are true and they are also well aware of some slight misfits which don't quite fit and they don't forget it. Darwin writes in his autobiography that he found it necessary to write down every piece of evidence which appeared to contradict his beliefs because otherwise they would disappear from his mind. When you find apparent flaws you've got to be sensitive and keep track of those things, and keep an eye out for how they can be explained or how the theory can be changed to fit them. Those are often the great contributions. Great contributions are rarely done by adding another decimal place. It comes down to an emotional commitment. Most great scientists are completely committed to their problem. Those who don't become committed seldom produce outstanding, first-class work.

    Now again, emotional commitment is not enough. It is a necessary condition apparently. And I think I can tell you the reason why. Everybody who has studied creativity is driven finally to saying, ``creativity comes out of your subconscious.'' Somehow, suddenly, there it is. It just appears. Well, we know very little about the subconscious; but one thing you are pretty well aware of is that your dreams also come out of your subconscious. And you're aware your dreams are, to a fair extent, a reworking of the experiences of the day. If you are deeply immersed and committed to a topic, day after day after day, your subconscious has nothing to do but work on your problem. And so you wake up one morning, or on some afternoon, and there's the answer. For those who don't get committed to their current problem, the subconscious goofs off on other things and doesn't produce the big result. So the way to manage yourself is that when you have a real important problem you don't let anything else get the center of your attention - you keep your thoughts on the problem. Keep your subconscious starved so it has to work on your problem, so you can sleep peacefully and get the answer in the morning, free.

    Now Alan Chynoweth mentioned that I used to eat at the physics table. I had been eating with the mathematicians and I found out that I already knew a fair amount of mathematics; in fact, I wasn't learning much. The physics table was, as he said, an exciting place, but I think he exaggerated on how much I contributed. It was very interesting to listen to Shockley, Brattain, Bardeen, J. B. Johnson, Ken McKay and other people, and I was learning a lot. But unfortunately a Nobel Prize came, and a promotion came, and what was left was the dregs. Nobody wanted what was left. Well, there was no use eating with them!

    Over on the other side of the dining hall was a chemistry table. I had worked with one of the fellows, Dave McCall; furthermore he was courting our secretary at the time. I went over and said, ``Do you mind if I join you?'' They can't say no, so I started eating with them for a while. And I started asking, ``What are the important problems of your field?'' And after a week or so, ``What important problems are you working on?'' And after some more time I came in one day and said, ``If what you are doing is not important, and if you don't think it is going to lead to something important, why are you at Bell Labs working on it?'' I wasn't welcomed after that; I had to find somebody else to eat with! That was in the spring.

    In the fall, Dave McCall stopped me in the hall and said, ``Hamming, that remark of yours got underneath my skin. I thought about it all summer, i.e. what were the important problems in my field. I haven't changed my research,'' he says, ``but I think it was well worthwhile.'' And I said, ``Thank you Dave,'' and went on. I noticed a couple of months later he was made the head of the department. I noticed the other day he was a Member of the National Academy of Engineering. I noticed he has succeeded. I have never heard the names of any of the other fellows at that table mentioned in science and scientific circles. They were unable to ask themselves, ``What are the important problems in my field?''

    If you do not work on an important problem, it's unlikely you'll do important work. It's perfectly obvious. Great scientists have thought through, in a careful way, a number of important problems in their field, and they keep an eye on wondering how to attack them. Let me warn you, `important problem' must be phrased carefully. The three outstanding problems in physics, in a certain sense, were never worked on while I was at Bell Labs. By important I mean guaranteed a Nobel Prize and any sum of money you want to mention. We didn't work on (1) time travel, (2) teleportation, and (3) antigravity. They are not important problems because we do not have an attack. It's not the consequence that makes a problem important, it is that you have a reasonable attack. That is what makes a problem important. When I say that most scientists don't work on important problems, I mean it in that sense. The average scientist, so far as I can make out, spends almost all his time working on problems which he believes will not be important and he also doesn't believe that they will lead to important problems.

    I spoke earlier about planting acorns so that oaks will grow. You can't always know exactly where to be, but you can keep active in places where something might happen. And even if you believe that great science is a matter of luck, you can stand on a mountain top where lightning strikes; you don't have to hide in the valley where you're safe. But the average scientist does routine safe work almost all the time and so he (or she) doesn't produce much. It's that simple. If you want to do great work, you clearly must work on important problems, and you should have an idea.

    Along those lines at some urging from John Tukey and others, I finally adopted what I called ``Great Thoughts Time.'' When I went to lunch Friday noon, I would only discuss great thoughts after that. By great thoughts I mean ones like: ``What will be the role of computers in all of AT&T?'', ``How will computers change science?'' For example, I came up with the observation at that time that nine out of ten experiments were done in the lab and one in ten on the computer. I made a remark to the vice presidents one time, that it would be reversed, i.e. nine out of ten experiments would be done on the computer and one in ten in the lab. They knew I was a crazy mathematician and had no sense of reality. I knew they were wrong and they've been proved wrong while I have been proved right. They built laboratories when they didn't need them. I saw that computers were transforming science because I spent a lot of time asking ``What will be the impact of computers on science and how can I change it?'' I asked myself, ``How is it going to change Bell Labs?'' I remarked one time, in the same address, that more than one-half of the people at Bell Labs will be interacting closely with computing machines before I leave. Well, you all have terminals now. I thought hard about where was my field going, where were the opportunities, and what were the important things to do. Let me go there so there is a chance I can do important things.

    Most great scientists know many important problems. They have something between 10 and 20 important problems for which they are looking for an attack. And when they see a new idea come up, one hears them say ``Well that bears on this problem.'' They drop all the other things and get after it. Now I can tell you a horror story that was told to me but I can't vouch for the truth of it. I was sitting in an airport talking to a friend of mine from Los Alamos about how it was lucky that the fission experiment occurred over in Europe when it did because that got us working on the atomic bomb here in the US. He said ``No; at Berkeley we had gathered a bunch of data; we didn't get around to reducing it because we were building some more equipment, but if we had reduced that data we would have found fission.'' They had it in their hands and they didn't pursue it. They came in second!

    The great scientists, when an opportunity opens up, get after it and they pursue it. They drop all other things. They get rid of other things and they get after an idea because they had already thought the thing through. Their minds are prepared; they see the opportunity and they go after it. Now of course lots of times it doesn't work out, but you don't have to hit many of them to do some great science. It's kind of easy. One of the chief tricks is to live a long time!

    Another trait, it took me a while to notice. I noticed the following facts about people who work with the door open or the door closed. I notice that if you have the door to your office closed, you get more work done today and tomorrow, and you are more productive than most. But 10 years later somehow you don't know quite know what problems are worth working on; all the hard work you do is sort of tangential in importance. He who works with the door open gets all kinds of interruptions, but he also occasionally gets clues as to what the world is and what might be important. Now I cannot prove the cause and effect sequence because you might say, ``The closed door is symbolic of a closed mind.'' I don't know. But I can say there is a pretty good correlation between those who work with the doors open and those who ultimately do important things, although people who work with doors closed often work harder. Somehow they seem to work on slightly the wrong thing - not much, but enough that they miss fame.

    I want to talk on another topic. It is based on the song which I think many of you know, ``It ain't what you do, it's the way that you do it.'' I'll start with an example of my own. I was conned into doing on a digital computer, in the absolute binary days, a problem which the best analog computers couldn't do. And I was getting an answer. When I thought carefully and said to myself, ``You know, Hamming, you're going to have to file a report on this military job; after you spend a lot of money you're going to have to account for it and every analog installation is going to want the report to see if they can't find flaws in it.'' I was doing the required integration by a rather crummy method, to say the least, but I was getting the answer. And I realized that in truth the problem was not just to get the answer; it was to demonstrate for the first time, and beyond question, that I could beat the analog computer on its own ground with a digital machine. I reworked the method of solution, created a theory which was nice and elegant, and changed the way we computed the answer; the results were no different. The published report had an elegant method which was later known for years as ``Hamming's Method of Integrating Differential Equations.'' It is somewhat obsolete now, but for a while it was a very good method. By changing the problem slightly, I did important work rather than trivial work.

    In the same way, when using the machine up in the attic in the early days, I was solving one problem after another after another; a fair number were successful and there were a few failures. I went home one Friday after finishing a problem, and curiously enough I wasn't happy; I was depressed. I could see life being a long sequence of one problem after another after another. After quite a while of thinking I decided, ``No, I should be in the mass production of a variable product. I should be concerned with all of next year's problems, not just the one in front of my face.'' By changing the question I still got the same kind of results or better, but I changed things and did important work. I attacked the major problem - How do I conquer machines and do all of next year's problems when I don't know what they are going to be? How do I prepare for it? How do I do this one so I'll be on top of it? How do I obey Newton's rule? He said, ``If I have seen further than others, it is because I've stood on the shoulders of giants.'' These days we stand on each other's feet!

    You should do your job in such a fashion that others can build on top of it, so they will indeed say, ``Yes, I've stood on so and so's shoulders and I saw further.'' The essence of science is cumulative. By changing a problem slightly you can often do great work rather than merely good work. Instead of attacking isolated problems, I made the resolution that I would never again solve an isolated problem except as characteristic of a class.

    Now if you are much of a mathematician you know that the effort to generalize often means that the solution is simple. Often by stopping and saying, ``This is the problem he wants but this is characteristic of so and so. Yes, I can attack the whole class with a far superior method than the particular one because I was earlier embedded in needless detail.'' The business of abstraction frequently makes things simple. Furthermore, I filed away the methods and prepared for the future problems.

    To end this part, I'll remind you, ``It is a poor workman who blames his tools - the good man gets on with the job, given what he's got, and gets the best answer he can.'' And I suggest that by altering the problem, by looking at the thing differently, you can make a great deal of difference in your final productivity because you can either do it in such a fashion that people can indeed build on what you've done, or you can do it in such a fashion that the next person has to essentially duplicate again what you've done. It isn't just a matter of the job, it's the way you write the report, the way you write the paper, the whole attitude. It's just as easy to do a broad, general job as one very special case. And it's much more satisfying and rewarding!

    I have now come down to a topic which is very distasteful; it is not sufficient to do a job, you have to sell it. `Selling' to a scientist is an awkward thing to do. It's very ugly; you shouldn't have to do it. The world is supposed to be waiting, and when you do something great, they should rush out and welcome it. But the fact is everyone is busy with their own work. You must present it so well that they will set aside what they are doing, look at what you've done, read it, and come back and say, ``Yes, that was good.'' I suggest that when you open a journal, as you turn the pages, you ask why you read some articles and not others. You had better write your report so when it is published in the Physical Review, or wherever else you want it, as the readers are turning the pages they won't just turn your pages but they will stop and read yours. If they don't stop and read it, you won't get credit.

    There are three things you have to do in selling. You have to learn to write clearly and well so that people will read it, you must learn to give reasonably formal talks, and you also must learn to give informal talks. We had a lot of so-called `back room scientists.' In a conference, they would keep quiet. Three weeks later after a decision was made they filed a report saying why you should do so and so. Well, it was too late. They would not stand up right in the middle of a hot conference, in the middle of activity, and say, ``We should do this for these reasons.'' You need to master that form of communication as well as prepared speeches.

    When I first started, I got practically physically ill while giving a speech, and I was very, very nervous. I realized I either had to learn to give speeches smoothly or I would essentially partially cripple my whole career. The first time IBM asked me to give a speech in New York one evening, I decided I was going to give a really good speech, a speech that was wanted, not a technical one but a broad one, and at the end if they liked it, I'd quietly say, ``Any time you want one I'll come in and give you one.'' As a result, I got a great deal of practice giving speeches to a limited audience and I got over being afraid. Furthermore, I could also then study what methods were effective and what were ineffective.

    While going to meetings I had already been studying why some papers are remembered and most are not. The technical person wants to give a highly limited technical talk. Most of the time the audience wants a broad general talk and wants much more survey and background than the speaker is willing to give. As a result, many talks are ineffective. The speaker names a topic and suddenly plunges into the details he's solved. Few people in the audience may follow. You should paint a general picture to say why it's important, and then slowly give a sketch of what was done. Then a larger number of people will say, ``Yes, Joe has done that,'' or ``Mary has done that; I really see where it is; yes, Mary really gave a good talk; I understand what Mary has done.'' The tendency is to give a highly restricted, safe talk; this is usually ineffective. Furthermore, many talks are filled with far too much information. So I say this idea of selling is obvious.

    Let me summarize. You've got to work on important problems. I deny that it is all luck, but I admit there is a fair element of luck. I subscribe to Pasteur's ``Luck favors the prepared mind.'' I favor heavily what I did. Friday afternoons for years - great thoughts only - means that I committed 10% of my time trying to understand the bigger problems in the field, i.e. what was and what was not important. I found in the early days I had believed `this' and yet had spent all week marching in `that' direction. It was kind of foolish. If I really believe the action is over there, why do I march in this direction? I either had to change my goal or change what I did. So I changed something I did and I marched in the direction I thought was important. It's that easy.

    Now you might tell me you haven't got control over what you have to work on. Well, when you first begin, you may not. But once you're moderately successful, there are more people asking for results than you can deliver and you have some power of choice, but not completely. I'll tell you a story about that, and it bears on the subject of educating your boss. I had a boss named Schelkunoff; he was, and still is, a very good friend of mine. Some military person came to me and demanded some answers by Friday. Well, I had already dedicated my computing resources to reducing data on the fly for a group of scientists; I was knee deep in short, small, important problems. This military person wanted me to solve his problem by the end of the day on Friday. I said, ``No, I'll give it to you Monday. I can work on it over the weekend. I'm not going to do it now.'' He goes down to my boss, Schelkunoff, and Schelkunoff says, ``You must run this for him; he's got to have it by Friday.'' I tell him, ``Why do I?''; he says, ``You have to.'' I said, ``Fine, Sergei, but you're sitting in your office Friday afternoon catching the late bus home to watch as this fellow walks out that door.'' I gave the military person the answers late Friday afternoon. I then went to Schelkunoff's office and sat down; as the man goes out I say, ``You see Schelkunoff, this fellow has nothing under his arm; but I gave him the answers.'' On Monday morning Schelkunoff called him up and said, ``Did you come in to work over the weekend?'' I could hear, as it were, a pause as the fellow ran through his mind of what was going to happen; but he knew he would have had to sign in, and he'd better not say he had when he hadn't, so he said he hadn't. Ever after that Schelkunoff said, ``You set your deadlines; you can change them.''

    One lesson was sufficient to educate my boss as to why I didn't want to do big jobs that displaced exploratory research and why I was justified in not doing crash jobs which absorb all the research computing facilities. I wanted instead to use the facilities to compute a large number of small problems. Again, in the early days, I was limited in computing capacity and it was clear, in my area, that a ``mathematician had no use for machines.'' But I needed more machine capacity. Every time I had to tell some scientist in some other area, ``No I can't; I haven't the machine capacity,'' he complained. I said ``Go tell your Vice President that Hamming needs more computing capacity.'' After a while I could see what was happening up there at the top; many people said to my Vice President, ``Your man needs more computing capacity.'' I got it!

    I also did a second thing. When I loaned what little programming power we had to help in the early days of computing, I said, ``We are not getting the recognition for our programmers that they deserve. When you publish a paper you will thank that programmer or you aren't getting any more help from me. That programmer is going to be thanked by name; she's worked hard.'' I waited a couple of years. I then went through a year of BSTJ articles and counted what fraction thanked some programmer. I took it into the boss and said, ``That's the central role computing is playing in Bell Labs; if the BSTJ is important, that's how important computing is.'' He had to give in. You can educate your bosses. It's a hard job. In this talk I'm only viewing from the bottom up; I'm not viewing from the top down. But I am telling you how you can get what you want in spite of top management. You have to sell your ideas there also.

    Well I now come down to the topic, ``Is the effort to be a great scientist worth it?'' To answer this, you must ask people. When you get beyond their modesty, most people will say, ``Yes, doing really first-class work, and knowing it, is as good as wine, women and song put together,'' or if it's a woman she says, ``It is as good as wine, men and song put together.'' And if you look at the bosses, they tend to come back or ask for reports, trying to participate in those moments of discovery. They're always in the way. So evidently those who have done it, want to do it again. But it is a limited survey. I have never dared to go out and ask those who didn't do great work how they felt about the matter. It's a biased sample, but I still think it is worth the struggle. I think it is very definitely worth the struggle to try and do first-class work because the truth is, the value is in the struggle more than it is in the result. The struggle to make something of yourself seems to be worthwhile in itself. The success and fame are sort of dividends, in my opinion.

    I've told you how to do it. It is so easy, so why do so many people, with all their talents, fail? For example, my opinion, to this day, is that there are in the mathematics department at Bell Labs quite a few people far more able and far better endowed than I, but they didn't produce as much. Some of them did produce more than I did; Shannon produced more than I did, and some others produced a lot, but I was highly productive against a lot of other fellows who were better equipped. Why is it so? What happened to them? Why do so many of the people who have great promise, fail?

    Well, one of the reasons is drive and commitment. The people who do great work with less ability but who are committed to it, get more done that those who have great skill and dabble in it, who work during the day and go home and do other things and come back and work the next day. They don't have the deep commitment that is apparently necessary for really first-class work. They turn out lots of good work, but we were talking, remember, about first-class work. There is a difference. Good people, very talented people, almost always turn out good work. We're talking about the outstanding work, the type of work that gets the Nobel Prize and gets recognition.

    The second thing is, I think, the problem of personality defects. Now I'll cite a fellow whom I met out in Irvine. He had been the head of a computing center and he was temporarily on assignment as a special assistant to the president of the university. It was obvious he had a job with a great future. He took me into his office one time and showed me his method of getting letters done and how he took care of his correspondence. He pointed out how inefficient the secretary was. He kept all his letters stacked around there; he knew where everything was. And he would, on his word processor, get the letter out. He was bragging how marvelous it was and how he could get so much more work done without the secretary's interference. Well, behind his back, I talked to the secretary. The secretary said, ``Of course I can't help him; I don't get his mail. He won't give me the stuff to log in; I don't know where he puts it on the floor. Of course I can't help him.'' So I went to him and said, ``Look, if you adopt the present method and do what you can do single-handedly, you can go just that far and no farther than you can do single-handedly. If you will learn to work with the system, you can go as far as the system will support you.'' And, he never went any further. He had his personality defect of wanting total control and was not willing to recognize that you need the support of the system.

    You find this happening again and again; good scientists will fight the system rather than learn to work with the system and take advantage of all the system has to offer. It has a lot, if you learn how to use it. It takes patience, but you can learn how to use the system pretty well, and you can learn how to get around it. After all, if you want a decision `No', you just go to your boss and get a `No' easy. If you want to do something, don't ask, do it. Present him with an accomplished fact. Don't give him a chance to tell you `No'. But if you want a `No', it's easy to get a `No'.

    Another personality defect is ego assertion and I'll speak in this case of my own experience. I came from Los Alamos and in the early days I was using a machine in New York at 590 Madison Avenue where we merely rented time. I was still dressing in western clothes, big slash pockets, a bolo and all those things. I vaguely noticed that I was not getting as good service as other people. So I set out to measure. You came in and you waited for your turn; I felt I was not getting a fair deal. I said to myself, ``Why? No Vice President at IBM said, `Give Hamming a bad time'. It is the secretaries at the bottom who are doing this. When a slot appears, they'll rush to find someone to slip in, but they go out and find somebody else. Now, why? I haven't mistreated them.'' Answer, I wasn't dressing the way they felt somebody in that situation should. It came down to just that - I wasn't dressing properly. I had to make the decision - was I going to assert my ego and dress the way I wanted to and have it steadily drain my effort from my professional life, or was I going to appear to conform better? I decided I would make an effort to appear to conform properly. The moment I did, I got much better service. And now, as an old colorful character, I get better service than other people.

    You should dress according to the expectations of the audience spoken to. If I am going to give an address at the MIT computer center, I dress with a bolo and an old corduroy jacket or something else. I know enough not to let my clothes, my appearance, my manners get in the way of what I care about. An enormous number of scientists feel they must assert their ego and do their thing their way. They have got to be able to do this, that, or the other thing, and they pay a steady price.

    John Tukey almost always dressed very casually. He would go into an important office and it would take a long time before the other fellow realized that this is a first-class man and he had better listen. For a long time John has had to overcome this kind of hostility. It's wasted effort! I didn't say you should conform; I said ``The appearance of conforming gets you a long way.'' If you chose to assert your ego in any number of ways, ``I am going to do it my way,'' you pay a small steady price throughout the whole of your professional career. And this, over a whole lifetime, adds up to an enormous amount of needless trouble.

    By taking the trouble to tell jokes to the secretaries and being a little friendly, I got superb secretarial help. For instance, one time for some idiot reason all the reproducing services at Murray Hill were tied up. Don't ask me how, but they were. I wanted something done. My secretary called up somebody at Holmdel, hopped the company car, made the hour-long trip down and got it reproduced, and then came back. It was a payoff for the times I had made an effort to cheer her up, tell her jokes and be friendly; it was that little extra work that later paid off for me. By realizing you have to use the system and studying how to get the system to do your work, you learn how to adapt the system to your desires. Or you can fight it steadily, as a small undeclared war, for the whole of your life.

    And I think John Tukey paid a terrible price needlessly. He was a genius anyhow, but I think it would have been far better, and far simpler, had he been willing to conform a little bit instead of ego asserting. He is going to dress the way he wants all of the time. It applies not only to dress but to a thousand other things; people will continue to fight the system. Not that you shouldn't occasionally!

    When they moved the library from the middle of Murray Hill to the far end, a friend of mine put in a request for a bicycle. Well, the organization was not dumb. They waited awhile and sent back a map of the grounds saying, ``Will you please indicate on this map what paths you are going to take so we can get an insurance policy covering you.'' A few more weeks went by. They then asked, ``Where are you going to store the bicycle and how will it be locked so we can do so and so.'' He finally realized that of course he was going to be red-taped to death so he gave in. He rose to be the President of Bell Laboratories.

    Barney Oliver was a good man. He wrote a letter one time to the IEEE. At that time the official shelf space at Bell Labs was so much and the height of the IEEE Proceedings at that time was larger; and since you couldn't change the size of the official shelf space he wrote this letter to the IEEE Publication person saying, ``Since so many IEEE members were at Bell Labs and since the official space was so high the journal size should be changed.'' He sent it for his boss's signature. Back came a carbon with his signature, but he still doesn't know whether the original was sent or not. I am not saying you shouldn't make gestures of reform. I am saying that my study of able people is that they don't get themselves committed to that kind of warfare. They play it a little bit and drop it and get on with their work.

    Many a second-rate fellow gets caught up in some little twitting of the system, and carries it through to warfare. He expends his energy in a foolish project. Now you are going to tell me that somebody has to change the system. I agree; somebody's has to. Which do you want to be? The person who changes the system or the person who does first-class science? Which person is it that you want to be? Be clear, when you fight the system and struggle with it, what you are doing, how far to go out of amusement, and how much to waste your effort fighting the system. My advice is to let somebody else do it and you get on with becoming a first-class scientist. Very few of you have the ability to both reform the system and become a first-class scientist.

    On the other hand, we can't always give in. There are times when a certain amount of rebellion is sensible. I have observed almost all scientists enjoy a certain amount of twitting the system for the sheer love of it. What it comes down to basically is that you cannot be original in one area without having originality in others. Originality is being different. You can't be an original scientist without having some other original characteristics. But many a scientist has let his quirks in other places make him pay a far higher price than is necessary for the ego satisfaction he or she gets. I'm not against all ego assertion; I'm against some.

    Another fault is anger. Often a scientist becomes angry, and this is no way to handle things. Amusement, yes, anger, no. Anger is misdirected. You should follow and cooperate rather than struggle against the system all the time.

    Another thing you should look for is the positive side of things instead of the negative. I have already given you several examples, and there are many, many more; how, given the situation, by changing the way I looked at it, I converted what was apparently a defect to an asset. I'll give you another example. I am an egotistical person; there is no doubt about it. I knew that most people who took a sabbatical to write a book, didn't finish it on time. So before I left, I told all my friends that when I come back, that book was going to be done! Yes, I would have it done - I'd have been ashamed to come back without it! I used my ego to make myself behave the way I wanted to. I bragged about something so I'd have to perform. I found out many times, like a cornered rat in a real trap, I was surprisingly capable. I have found that it paid to say, ``Oh yes, I'll get the answer for you Tuesday,'' not having any idea how to do it. By Sunday night I was really hard thinking on how I was going to deliver by Tuesday. I often put my pride on the line and sometimes I failed, but as I said, like a cornered rat I'm surprised how often I did a good job. I think you need to learn to use yourself. I think you need to know how to convert a situation from one view to another which would increase the chance of success.

    Now self-delusion in humans is very, very common. There are enumerable ways of you changing a thing and kidding yourself and making it look some other way. When you ask, ``Why didn't you do such and such,'' the person has a thousand alibis. If you look at the history of science, usually these days there are 10 people right there ready, and we pay off for the person who is there first. The other nine fellows say, ``Well, I had the idea but I didn't do it and so on and so on.'' There are so many alibis. Why weren't you first? Why didn't you do it right? Don't try an alibi. Don't try and kid yourself. You can tell other people all the alibis you want. I don't mind. But to yourself try to be honest.

    If you really want to be a first-class scientist you need to know yourself, your weaknesses, your strengths, and your bad faults, like my egotism. How can you convert a fault to an asset? How can you convert a situation where you haven't got enough manpower to move into a direction when that's exactly what you need to do? I say again that I have seen, as I studied the history, the successful scientist changed the viewpoint and what was a defect became an asset.

    In summary, I claim that some of the reasons why so many people who have greatness within their grasp don't succeed are: they don't work on important problems, they don't become emotionally involved, they don't try and change what is difficult to some other situation which is easily done but is still important, and they keep giving themselves alibis why they don't. They keep saying that it is a matter of luck. I've told you how easy it is; furthermore I've told you how to reform. Therefore, go forth and become great scientists!

    (End of the formal part of the talk.)


    A. G. Chynoweth: Well that was 50 minutes of concentrated wisdom and observations accumulated over a fantastic career; I lost track of all the observations that were striking home. Some of them are very very timely. One was the plea for more computer capacity; I was hearing nothing but that this morning from several people, over and over again. So that was right on the mark today even though here we are 20 - 30 years after when you were making similar remarks, Dick. I can think of all sorts of lessons that all of us can draw from your talk. And for one, as I walk around the halls in the future I hope I won't see as many closed doors in Bellcore. That was one observation I thought was very intriguing.

    Thank you very, very much indeed Dick; that was a wonderful recollection. I'll now open it up for questions. I'm sure there are many people who would like to take up on some of the points that Dick was making.

    Hamming: First let me respond to Alan Chynoweth about computing. I had computing in research and for 10 years I kept telling my management, ``Get that !&@#% machine out of research. We are being forced to run problems all the time. We can't do research because were too busy operating and running the computing machines.'' Finally the message got through. They were going to move computing out of research to someplace else. I was persona non grata to say the least and I was surprised that people didn't kick my shins because everybody was having their toy taken away from them. I went in to Ed David's office and said, ``Look Ed, you've got to give your researchers a machine. If you give them a great big machine, we'll be back in the same trouble we were before, so busy keeping it going we can't think. Give them the smallest machine you can because they are very able people. They will learn how to do things on a small machine instead of mass computing.'' As far as I'm concerned, that's how UNIX arose. We gave them a moderately small machine and they decided to make it do great things. They had to come up with a system to do it on. It is called UNIX!

    A. G. Chynoweth: I just have to pick up on that one. In our present environment, Dick, while we wrestle with some of the red tape attributed to, or required by, the regulators, there is one quote that one exasperated AVP came up with and I've used it over and over again. He growled that, ``UNIX was never a deliverable!''

    Question: What about personal stress? Does that seem to make a difference?

    Hamming: Yes, it does. If you don't get emotionally involved, it doesn't. I had incipient ulcers most of the years that I was at Bell Labs. I have since gone off to the Naval Postgraduate School and laid back somewhat, and now my health is much better. But if you want to be a great scientist you're going to have to put up with stress. You can lead a nice life; you can be a nice guy or you can be a great scientist. But nice guys end last, is what Leo Durocher said. If you want to lead a nice happy life with a lot of recreation and everything else, you'll lead a nice life.

    Question: The remarks about having courage, no one could argue with; but those of us who have gray hairs or who are well established don't have to worry too much. But what I sense among the young people these days is a real concern over the risk taking in a highly competitive environment. Do you have any words of wisdom on this?

    Hamming: I'll quote Ed David more. Ed David was concerned about the general loss of nerve in our society. It does seem to me that we've gone through various periods. Coming out of the war, coming out of Los Alamos where we built the bomb, coming out of building the radars and so on, there came into the mathematics department, and the research area, a group of people with a lot of guts. They've just seen things done; they've just won a war which was fantastic. We had reasons for having courage and therefore we did a great deal. I can't arrange that situation to do it again. I cannot blame the present generation for not having it, but I agree with what you say; I just cannot attach blame to it. It doesn't seem to me they have the desire for greatness; they lack the courage to do it. But we had, because we were in a favorable circumstance to have it; we just came through a tremendously successful war. In the war we were looking very, very bad for a long while; it was a very desperate struggle as you well know. And our success, I think, gave us courage and self confidence; that's why you see, beginning in the late forties through the fifties, a tremendous productivity at the labs which was stimulated from the earlier times. Because many of us were earlier forced to learn other things - we were forced to learn the things we didn't want to learn, we were forced to have an open door - and then we could exploit those things we learned. It is true, and I can't do anything about it; I cannot blame the present generation either. It's just a fact.

    Question: Is there something management could or should do?

    Hamming: Management can do very little. If you want to talk about managing research, that's a totally different talk. I'd take another hour doing that. This talk is about how the individual gets very successful research done in spite of anything the management does or in spite of any other opposition. And how do you do it? Just as I observe people doing it. It's just that simple and that hard!

    Question: Is brainstorming a daily process?

    Hamming: Once that was a very popular thing, but it seems not to have paid off. For myself I find it desirable to talk to other people; but a session of brainstorming is seldom worthwhile. I do go in to strictly talk to somebody and say, ``Look, I think there has to be something here. Here's what I think I see ...'' and then begin talking back and forth. But you want to pick capable people. To use another analogy, you know the idea called the `critical mass.' If you have enough stuff you have critical mass. There is also the idea I used to call `sound absorbers'. When you get too many sound absorbers, you give out an idea and they merely say, ``Yes, yes, yes.'' What you want to do is get that critical mass in action; ``Yes, that reminds me of so and so,'' or, ``Have you thought about that or this?'' When you talk to other people, you want to get rid of those sound absorbers who are nice people but merely say, ``Oh yes,'' and to find those who will stimulate you right back.

    For example, you couldn't talk to John Pierce without being stimulated very quickly. There were a group of other people I used to talk with. For example there was Ed Gilbert; I used to go down to his office regularly and ask him questions and listen and come back stimulated. I picked my people carefully with whom I did or whom I didn't brainstorm because the sound absorbers are a curse. They are just nice guys; they fill the whole space and they contribute nothing except they absorb ideas and the new ideas just die away instead of echoing on. Yes, I find it necessary to talk to people. I think people with closed doors fail to do this so they fail to get their ideas sharpened, such as ``Did you ever notice something over here?'' I never knew anything about it - I can go over and look. Somebody points the way. On my visit here, I have already found several books that I must read when I get home. I talk to people and ask questions when I think they can answer me and give me clues that I do not know about. I go out and look!

    Question: What kind of tradeoffs did you make in allocating your time for reading and writing and actually doing research?

    Hamming: I believed, in my early days, that you should spend at least as much time in the polish and presentation as you did in the original research. Now at least 50% of the time must go for the presentation. It's a big, big number.

    Question: How much effort should go into library work?

    Hamming: It depends upon the field. I will say this about it. There was a fellow at Bell Labs, a very, very, smart guy. He was always in the library; he read everything. If you wanted references, you went to him and he gave you all kinds of references. But in the middle of forming these theories, I formed a proposition: there would be no effect named after him in the long run. He is now retired from Bell Labs and is an Adjunct Professor. He was very valuable; I'm not questioning that. He wrote some very good Physical Review articles; but there's no effect named after him because he read too much. If you read all the time what other people have done you will think the way they thought. If you want to think new thoughts that are different, then do what a lot of creative people do - get the problem reasonably clear and then refuse to look at any answers until you've thought the problem through carefully how you would do it, how you could slightly change the problem to be the correct one. So yes, you need to keep up. You need to keep up more to find out what the problems are than to read to find the solutions. The reading is necessary to know what is going on and what is possible. But reading to get the solutions does not seem to be the way to do great research. So I'll give you two answers. You read; but it is not the amount, it is the way you read that counts.

    Question: How do you get your name attached to things?

    Hamming: By doing great work. I'll tell you the hamming window one. I had given Tukey a hard time, quite a few times, and I got a phone call from him from Princeton to me at Murray Hill. I knew that he was writing up power spectra and he asked me if I would mind if he called a certain window a ``Hamming window.'' And I said to him, ``Come on, John; you know perfectly well I did only a small part of the work but you also did a lot.'' He said, ``Yes, Hamming, but you contributed a lot of small things; you're entitled to some credit.'' So he called it the hamming window. Now, let me go on. I had twitted John frequently about true greatness. I said true greatness is when your name is like ampere, watt, and fourier - when it's spelled with a lower case letter. That's how the hamming window came about.

    Question: Dick, would you care to comment on the relative effectiveness between giving talks, writing papers, and writing books?

    Hamming: In the short-haul, papers are very important if you want to stimulate someone tomorrow. If you want to get recognition long-haul, it seems to me writing books is more contribution because most of us need orientation. In this day of practically infinite knowledge, we need orientation to find our way. Let me tell you what infinite knowledge is. Since from the time of Newton to now, we have come close to doubling knowledge every 17 years, more or less. And we cope with that, essentially, by specialization. In the next 340 years at that rate, there will be 20 doublings, i.e. a million, and there will be a million fields of specialty for every one field now. It isn't going to happen. The present growth of knowledge will choke itself off until we get different tools. I believe that books which try to digest, coordinate, get rid of the duplication, get rid of the less fruitful methods and present the underlying ideas clearly of what we know now, will be the things the future generations will value. Public talks are necessary; private talks are necessary; written papers are necessary. But I am inclined to believe that, in the long-haul, books which leave out what's not essential are more important than books which tell you everything because you don't want to know everything. I don't want to know that much about penguins is the usual reply. You just want to know the essence.

    Question: You mentioned the problem of the Nobel Prize and the subsequent notoriety of what was done to some of the careers. Isn't that kind of a much more broad problem of fame? What can one do?

    Hamming: Some things you could do are the following. Somewhere around every seven years make a significant, if not complete, shift in your field. Thus, I shifted from numerical analysis, to hardware, to software, and so on, periodically, because you tend to use up your ideas. When you go to a new field, you have to start over as a baby. You are no longer the big mukity muk and you can start back there and you can start planting those acorns which will become the giant oaks. Shannon, I believe, ruined himself. In fact when he left Bell Labs, I said, ``That's the end of Shannon's scientific career.'' I received a lot of flak from my friends who said that Shannon was just as smart as ever. I said, ``Yes, he'll be just as smart, but that's the end of his scientific career,'' and I truly believe it was.

    You have to change. You get tired after a while; you use up your originality in one field. You need to get something nearby. I'm not saying that you shift from music to theoretical physics to English literature; I mean within your field you should shift areas so that you don't go stale. You couldn't get away with forcing a change every seven years, but if you could, I would require a condition for doing research, being that you will change your field of research every seven years with a reasonable definition of what it means, or at the end of 10 years, management has the right to compel you to change. I would insist on a change because I'm serious. What happens to the old fellows is that they get a technique going; they keep on using it. They were marching in that direction which was right then, but the world changes. There's the new direction; but the old fellows are still marching in their former direction.

    You need to get into a new field to get new viewpoints, and before you use up all the old ones. You can do something about this, but it takes effort and energy. It takes courage to say, ``Yes, I will give up my great reputation.'' For example, when error correcting codes were well launched, having these theories, I said, ``Hamming, you are going to quit reading papers in the field; you are going to ignore it completely; you are going to try and do something else other than coast on that.'' I deliberately refused to go on in that field. I wouldn't even read papers to try to force myself to have a chance to do something else. I managed myself, which is what I'm preaching in this whole talk. Knowing many of my own faults, I manage myself. I have a lot of faults, so I've got a lot of problems, i.e. a lot of possibilities of management.

    Question: Would you compare research and management?

    Hamming: If you want to be a great researcher, you won't make it being president of the company. If you want to be president of the company, that's another thing. I'm not against being president of the company. I just don't want to be. I think Ian Ross does a good job as President of Bell Labs. I'm not against it; but you have to be clear on what you want. Furthermore, when you're young, you may have picked wanting to be a great scientist, but as you live longer, you may change your mind. For instance, I went to my boss, Bode, one day and said, ``Why did you ever become department head? Why didn't you just be a good scientist?'' He said, ``Hamming, I had a vision of what mathematics should be in Bell Laboratories. And I saw if that vision was going to be realized, I had to make it happen; I had to be department head.'' When your vision of what you want to do is what you can do single-handedly, then you should pursue it. The day your vision, what you think needs to be done, is bigger than what you can do single-handedly, then you have to move toward management. And the bigger the vision is, the farther in management you have to go. If you have a vision of what the whole laboratory should be, or the whole Bell System, you have to get there to make it happen. You can't make it happen from the bottom very easily. It depends upon what goals and what desires you have. And as they change in life, you have to be prepared to change. I chose to avoid management because I preferred to do what I could do single-handedly. But that's the choice that I made, and it is biased. Each person is entitled to their choice. Keep an open mind. But when you do choose a path, for heaven's sake be aware of what you have done and the choice you have made. Don't try to do both sides.

    Question: How important is one's own expectation or how important is it to be in a group or surrounded by people who expect great work from you?

    Hamming: At Bell Labs everyone expected good work from me - it was a big help. Everybody expects you to do a good job, so you do, if you've got pride. I think it's very valuable to have first-class people around. I sought out the best people. The moment that physics table lost the best people, I left. The moment I saw that the same was true of the chemistry table, I left. I tried to go with people who had great ability so I could learn from them and who would expect great results out of me. By deliberately managing myself, I think I did much better than laissez faire.

    Question: You, at the outset of your talk, minimized or played down luck; but you seemed also to gloss over the circumstances that got you to Los Alamos, that got you to Chicago, that got you to Bell Laboratories.

    Hamming: There was some luck. On the other hand I don't know the alternate branches. Until you can say that the other branches would not have been equally or more successful, I can't say. Is it luck the particular thing you do? For example, when I met Feynman at Los Alamos, I knew he was going to get a Nobel Prize. I didn't know what for. But I knew darn well he was going to do great work. No matter what directions came up in the future, this man would do great work. And sure enough, he did do great work. It isn't that you only do a little great work at this circumstance and that was luck, there are many opportunities sooner or later. There are a whole pail full of opportunities, of which, if you're in this situation, you seize one and you're great over there instead of over here. There is an element of luck, yes and no. Luck favors a prepared mind; luck favors a prepared person. It is not guaranteed; I don't guarantee success as being absolutely certain. I'd say luck changes the odds, but there is some definite control on the part of the individual.

    Go forth, then, and do great work!

    (End of the General Research Colloquium Talk.)


    Richard W. Hamming was born February 11, 1915, in Chicago, Illinois. His formal education was marked by the following degrees (all in mathematics): B.S. 1937, University of Chicago; M.A. 1939, University of Nebraska; and Ph.D. 1942, University of Illinois. His early experience was obtained at Los Alamos 1945-1946, i.e. at the close of World War II, where he managed the computers used in building the first atomic bomb. From there he went directly to Bell Laboratories where he spent thirty years in various aspects of computing, numerical analysis, and management of computing, i.e. 1946-1976. On July 23, 1976 he `moved his office' to the Naval Postgraduate School in Monterey, California where he taught, supervised research, and wrote books.

    While at Bell Laboratories, he took time to teach in Universities, sometimes locally and sometimes on a full sabbatical leave; these activities included visiting professorships at New York University, Princeton University (Statistics), City College of New York, Stanford University, 1960-61, Stevens Institute of Technology (Mathematics), and the University of California, Irvine, 1970-71.

    Richard Hamming has received a number of awards which include: Fellow, IEEE, 1968; the ACM Turing Prize, 1968; the IEEE Emanuel R. Piore Award, 1979; Member, National Academy of Engineering, 1980; and the Harold Pender Award, U. Penn., 1981. In 1987 a major IEEE award was named after him, namely the Richard W. Hamming Medal, ``For exceptional contributions to information sciences and systems''; fittingly, he was also the first recipient of this award, 1988. In 1996 in Munich he received the prestigious $130,000 Eduard Rhein Award for Achievement in Technology for his work on error correcting codes. He was both a Founder and Past President of ACM, and a Vice Pres. of the AAAS Mathematics Section.

    He is probably best known for his pioneering work on error-correcting codes, his work on integrating differential equations, and the spectral window which bears his name. His extensive writing has included a number of important, pioneering, and highly regarded books. These are:

    Numerical Methods for Scientists and Engineers, McGraw-Hill, 1962; Second edition 1973; Reprinted by Dover 1985; Translated into Russian.
    Calculus and the Computer Revolution, Houghton-Mifflin, 1968.
    Introduction to Applied Numerical Analysis, McGraw-Hill, 1971.
    Computers and Society, McGraw-Hill, 1972.
    Digital Filters, Prentice-Hall, 1977; Second edition 1983; Third edition 1989; translated into several European languages.
    Coding and Information Theory, Prentice-Hall, 1980; Second edition 1986.
    Methods of Mathematics Applied to Calculus, Probability and Statistics, Prentice-Hall, 1985.
    The Art of Probability for Scientists and Engineers, Addison-Wesley, 1991.
    The Art of Doing Science and Engineering: Learning to Learn, Gordon and Breach, 1997.
    He continued a very active life as Adjunct Professor, teaching and writing in the Mathematics and Computer Science Departments at the Naval Postgraduate School, Monterey, California for another twenty-one years before he retired to become Professor Emeritus in 1997. He was still teaching a course in the fall of 1997. He passed away unexpectedly on January 7, 1998.


    I would like to acknowledge the professional efforts of Donna Paradise of the Word Processing Center who did the initial transcription of the talk from the tape recording. She made my job of editing much easier. The errors of sentence parsing and punctuation are mine and mine alone. Finally I would like to express my sincere appreciation to Richard Hamming and Alan Chynoweth for all of their help in bringing this transcription to its present readable state.

    J. F. Kaiser

    0 0
  • 02/23/14--19:37: Optimal Psychology
  • Here's an idea out of left field. I get the sense that most psych research is looking for economy at scale (easy things that make a small difference in entire populations) or narrow results (eg., exercise improves depression). But has anyone looked at creating the absolute optimal conditions for psychological health?

    Obviously there'd be objectivity and IRB challenges. But from my perspective as an engineer, we need our Formula One racetracks and Large Hadron Colliders -- the places where we throw millions of dollars at getting everything as perfect as possible for just a handful of samples.

    What if the fate of the world depended on the rehabilitation of one random person's neuroses? Given their cooperation and unlimited resources, how would we create the best imaginable conditions to overcome their bipolar or narcissism or addiction?

    Or, what if we held a psychological olympics every four years? What would the events be? How would you train someone to win each event -- to be the world's champion at that aspect of psychological health? And how would we train someone to win the Overall Health medal -- the Mr./Mrs. Universe award for best specimen of optimal health?

    0 0
  • 04/06/14--22:34: On Hydrogen Bombs
  • From "Turing's Cathedral", regarding the H-bomb:

    According to Oppenheimer, at a briefing given by Edward Teller and the RAND Corporation, Secretary of the Air Force Thomas K. Finletter "got to his feet and said 'give us this weapon and we will rule the world.'"

    0 0

    Lots of people know Oppenheimer's quote about being present at the Trinity test, the first man-made nuclear explosion: 

    "We knew the world would not be the same. Few people laughed, few people cried, most people were silent. I remembered the line from the Hindu scripture, the Bhagavad-Gita. Vishnu is trying to persuade the Prince that he should do his duty and to impress him takes on his multi-armed form and says, "Now I am become Death, the destroyer of worlds." I suppose we all thought that, one way or another."
    I've often wondered if he had originally been thinking of an earlier part of Chapter XI:

    If a thousand suns were to rise
    and stand in the noon sky, blazing,
    such brilliance would be like the fierce 
    brilliance of that mighty Self.

    Arjuna saw the whole universe
    enfolded, with its countless billions
    of life-forms, gathered together
    in the body of the God of gods.


    I see you everywhere, with billions
    of arms, eyes, bellies, faces,
    without end, middle or beginning,
    your body the whole universe, Lord.

    Crowned, bearing mace and discus,
    you dazzle my vision, blazing
    in the measureless, massive, sun-flame
    splendor of your radiant form.

    You are the deathless, the utmost
    goal of all knowledge, the world's base,
    the guardian of the eternal
    law, the primordial Person.

    I see you beginningless, endless,
    infinite in power, with a billion
    arms, the sun and moon
    your eyeballs, the flames of your mouth

    lighting the whole universe with splendor.
    You alone fill all space

    But the chapter gets much darker almost immediately:

    As you touch the sky, many-hued,
    gape-mouthed, your huge eyes blazing,
    my innards tremble, my breath
    stops, my bones turn to jelly.

    Seeing your billion-fanged mouths
    blaze like the fires of doomsday,
    I faint, I stagger, I despair.
    Have mercy on me, Lord Vishnu!

    All Dhritarashtra's men
    and all these multitudes of kings--
    Bhishma, Drona, Karna,
    with all our warriors behind them--

    are rushing headlong into
    your hideous, gaping, knife-fanged
    jaws; I see them with skulls crushed,
    their raw flesh stuck to your teeth.

    As the rivers in many torrents
    rush toward the ocean, all
    these warriors are pouring down 
    into your blazing mouths.

    As moths rush into a flame 
    and are burned in an instant, all
    beings plunge down your gullet
    and instantly are consumed.

    You gulp down all worlds, everywhere
    swallowing them in your flames,
    and your rays, Lord Vishnu, fill all
    the universe with dreadful brilliance.

    Who are you, in this terrifying form?
    Have mercy, Lord; grant me even
    a glimmer of understanding
    to prop up my staggering mind.


    I am death, shatterer of worlds,
    annihilating all things.
    With or without you, these warriors
    in their facing armies will die.

    (Stephen Mitchell translation)

    Hard to imagine a verse more fitting the dawn of the atomic age.

    0 0

    On my Linux Ubuntu 12.04 machine, the nvidia-settings app has been crashing, preventing me from changing screen resolution or refresh rate (I like to switch to 24fps for watching movies so that slow pans don't look all jerky).  I'm using a G210 video card, and getting errors like this when I run nvidia-settings from the command line:

    The program 'nvidia-settings' received an X Window System error.
    This probably reflects a bug in the program.
    The error was 'BadValue (integer parameter out of range for operation)'.
    xrandr to the rescue!  Turns out it's not just for screen rotation and reflection; it can also do resolution and refresh rate:

    $ xrandr --output HDMI-0 --mode 1920x1080 --rate 24.0

    (Try running it without arguments to see what resolutions and refresh rates are possible)

    0 0

    Intuitively it seems like the regex /(.)+/ should return an array of all the characters in a string.  It's a match group with a quantifier allowing it to repeat, after all.  But in fact it only returns the last group.

    My best guess is that it's done this way so that the rule always works that says you can always count left parens to figure out which position the matching value will be returned in.

    To get around this, remove the quantifier and use /g.  For example, 'asdf' =~ /(.)/g returns ('a', 's', 'd', 'f') as expected.

    The downside is that I can't use fancier expressions as I would have hoped.  What I originally wanted was an expression like this: 'a12345' =~ /^([a-z])(\d)+$/ to return ('a', '1', '2', '3', '4', '5').  I don't see an obvious way to have multiple matches like that with /g, since with /g it has to match the entire regex multiple times.

    The best I can come up with for that scenario is to split into multiple regexes and handle the input in chunks:

    $_ = 'a12345';
    $letter = $1;
    @numbers = /(\d)/g;

    Is there a better solution I'm missing?

    0 0

    It's amazing how long fopen() has managed to be around while still having confusing behavior.

    The big culprit in my mind is the "a+" mode, which really ought to do the thing I want, which is to open the file read/write, creating it if it doesn't exist, and sure, go ahead and put the file pointer at the end, whatever.  But it has a bizarre behavior of always appending, as if it were fseek()ing to the end just before every write.

    "w+" mode would still work fine for that purpose, but it insists on wiping out the file right when it's opened.

    And even "r+" mode would work fine, except that it won't create the file if it doesn't exist.

    So none of the three available read/write modes do what I figure must be the most common thing, which is to open the file read/write, creating it if it doesn't exist, and not wiping out all the contents.

    I'm not even mad at the original authors for omitting that case.  I'm just amazed that nobody has added a mode for that, and that many docs don't go out of their way to mention the funky "a+" behavior.

    So, here in 2014, we still have to do things like:

    FILE *f = fopen("foo", "r+");
    if (f == NULL) {
      f = fopen("foo", "w+");
      if (f == NULL) {
        return FAIL;

    0 0

    I tried to get my raspi online by plugging it into my Nexus 4 via USB, then enabling USB tethering under Android's wireless settings dialog.  The 'usb0' interface appeared briefly with ifconfig, but dmesg revealed that the phone was connecting and disconnecting itself about once a second: lots of "usb disconnect" messages and stuff about unregister rndis_host.

    My best guess is that it's something to do with broken USB OTG support, since the "charging" notification on the lock screen kept flickering on and off.  Super lame.

    Switching over to a Nexus 7 tablet, USB tethering worked just as expected; plug it in, make sure USB tethering is enabled on the android side, then "sudo dhclient usb0" on the raspi side.

older | 1 | (Page 2) | 3 | 4 | 5 | newer