CSE401: Winter 2014: Today's Eclectic Excitement

Robert R. Henry

  1. 06Jan2014 Q: What happened, many times, 15,000 years ago in central Washington that defines the topography we see there today?
    A: Glacial lake Missoula impounded 4000 cubic kilometers of water behind and ice dam. The ice dam broke, and over 24 hours the water drained out, and rushed out across central WA, scouring and chanelling its way into the Columbia Gorge. This happened more than 50 times.
  2. 08Jan2014 Q: Where is the world's fastest eroding mountain?
    A: Mt. Rainier. It is made from soft volcanic rock, and receives a massive amount of snow each year as the storms blow off the Pacific. Snow turns to ice, turns to glacier, and carves the rock away. The current Mt. Rainier is in its 3rd or 4th implementation.
  3. 09Jan2014 Q: What is the Cascadia Subduction Zone?
    A: There's a relatively small crustal plate which is diving down underneath the main North American contenintal plate. It dives down and melts, and reappears as Cascade volcanoes. When the plate dives down it does so in jerks, resulting in earthquakes that drop the land level by 2-3 meters. The mean time between these major earthquakes is 200 years. The last such major earthquake in WA was roughly in 1804.
  4. 12Jan2014 Q: Which famous language developer/compiler writer did Robert poison 25 years ago when he came to UWCSE?
    A: Niklaus Wirth, inventor of Algol-W, Pascal, Modula, Modula2 and Oberon. I took him (and others from UWCSE) to a restaurant, and most of us got food poisoning. Prof. Dr. Wirth was sick for 48 hours after our meal, mostly because he was too polite to do anything about it.
  5. 15Jan2014 Q: What is the 2nd author of the original Unix "Lex" paper doing now?
    A: Eric Schmidt, now the CEO of Google. See what study of regular expressions will get you?
  6. 17Jan2014 Q: On unix/linux, why is a file holding captured process state on abort called a “core” file? A: Memory used to be made of "cores", where each core was a very small torus made of magenetic material that could hold one bit, encoded in the direction of the magnetic fields. 3 wires went through each core: 2 address lines (row and column), and a sense line. The combined current through 2 address lines is enough to switch the direction of the magnetic field; a switch is sensed by the sense line.
  7. 22Jan2014 Q: The Snohomish river is 50km north of here. It is formed when the Skykomish and the Snoqualamie rivers merge. Why does the combined river have a new name? A: The Skykomish rier and the Snoqualamie rivers are both the same size. The naming rules (US Board of Geographic Place Names) for this case dictate that a new name be used. This is also called the "Military Meeting Rule", wherein if two groups are meeting, and the heads of both groups are the same rank, then a new person needs to be brought in that is of higher rank to officate at the meeting.
  8. 24Jan2014 Q: Why are type declarations in the C programming language as bizarre as they are? A: It supposedly makes them much easier to parse with a recursive descent parser, which was the parser used in the first C compiler. (I heard this directly from Dennis Ritchie, one of the co-inventors of Unix and C.) This is an example of a language designed to make it easy to compile, although perhaps not so easy for humans!
  9. 27Jan2014: Q: First on the Field?! (Thanks to WA State 4H, King County 4H, WSU Extension) A: "Dubs", the UW husky mascot. Many thanks to Anne Lise Nilsen, an acquaintance of mine through our family's 4H connections. (4H is a youth development organization.)

  10. 29Jan2014: Q: What does the following C program print? Does it always print the same thing?
        int x;
        int y = x ^ x;
        printf(“y=%d\n”, y);
    A: Note that x is used uninitialized. But also note that x xored with itself is always 0. So y will always be 0. I'm sure that most compilers that do flow analysis would mark this as a "use before a define", and only a handful would recognize this idiom. You see this idiom all the time in assembly code.
  11. 31Jan2014: 3 of Alan Perlis' epigrams from. It is good to read through these at least once a year.
  12. 3Feb2014: Q: Which UW alumni used to steal blocks of metallic sodium from Chemistry stores, and throw them into Drumhiller Fountain (aka Frosh Pond), just outside our classroom? A: My father. Born and raised into a Scottish sheep raising family in Yakima, went to UW for his Junior and Senior year, then got a PhD at UW in chemistry in 1942. Went on to invent the chemicals used in the green/yellow light sticks. Held about 60 patents, most of them classified. He worked in the same laboratory for 40 years; talk about job security and stability!
  13. 5Feb2014: The projector was not talking to my laptop, so there was nothing to display. Alas.
  14. 7Feb2014: Midterm. Some compiler jokes I found when Googling Turned up this.
    1. You can't modify a constant, float upstream, win an argument with the IRS, or satisfy this compiler
    2. Volatile and register are not miscible.
    3. Symbol table full - fatal heap error; please go buy a RAM upgrade from your local Apple dealer
    Also, check out this sign, like the one posted on the way out of the town I grew up in:

  15. 10Feb2014: TERA/Cray MTA/XMT lecture. Be amazed at the architecture and the mechanicals. Take aways: We implemented a machine with an enormous flat shared memory, with no caches, using a latency tolerant processor design that could switch between threads once per clock tick.
  16. 10Feb2014: Q: What does the following code compute?
        int pop(uint32 x)
         x = ((x >> 0) & 0x55555555) + ((x >>  1) & 0x55555555);
         x = ((x >> 0) & 0x33333333) + ((x >>  2) & 0x33333333);
         x = ((x >> 0) & 0x0f0f0f0f) + ((x >>  4) & 0x0f0f0f0f);
         x = ((x >> 0) & 0x00ff00ff) + ((x >>  8) & 0x00ff00ff);
         x = ((x >> 0) & 0x0000ffff) + ((x >> 16) & 0x0000ffff);
         return x;
    You should look at this code and look for patterns. Be suspicious of anything involving doubling or halving, as we see both in the shift counts, as well as in the run lengths of the adjacent 1-bits in the masks. This smells strongly of a tree algorithm, doing a reduction of some kind, wherein all data items in one domain (bits) are reduced into 1 or more values in another domain. The cleverness is thus: the first shift and mask makes 2 words, one word with all the even original bits in even bit numbers, and the other word with all the odd original bits shifted into the even bit numbers. By adding, we add single bits in 1-bit wide bit fields. There's no chance for overflow, since we've cleared out the upper bit in the sum's 2-bit wide bit fields. The result of the add is 16 2-bit wide bit fields with the sum of the number of 1 bits in the original even and odd bit positions. The reduction continues, taking lg(32)==5 steps, resulting in the word containing a single 32-bit wide word that is the sum of all the 1 bits. This is a population count, also called a side-ways add. Some computers have this instruction in hardware.
  17. 12Feb2014: Q: My friend joined the 300degree club on one fine clear day in July. What did he do to get this? A: He wintered over at the South Pole research station. On extremely cold days, when it is below -100degrees Farenheit outside, the residents would heat up the sauna as hot as it could go, which is just barely over 200 degrees. They would strip, but on boots, run outside around a symbolic South Pole, experiencing a temperature change of 300 degrees.
  18. 14Feb2014: Q: On the x86_64, are the following two instruction sequences equivalent?
        incl %rax     ; increment %rax
        addl $1, %rax ; add 1 to %rax
    A: Of course not! Why would I ask the question? The two instructions have differend side effects on the condition registers on the boundary condition when the value in %rax overflows. This was one of the things Intel wanted to fix moving to the 8086, but Microsoft complained about changes to the architecture, even if it meant fixing bugs.
  19. 17Feb2014: President's Day Holiday.
  20. 19Feb2014: Various sayings and quotations from Alan Perlis.
    1. [various] Experience comes from learning from success, wisdom comes from learning from failures.
    2. [various] Testing only exposes the presence of bugs, not their absence.
    3. [Perlis] A Lisp programmer knows the value of everything, but the cost of nothing.
    4. [Perlis] In computing, invariants are ephemeral.
  21. 21Feb2014: d vector(B) / d T Q: the ball goes slowly through the pipe. Why? A: The ball is an extremely powerful rare-earty magnet, among the strongest non-superconducting magnets there are. A moving magnet makes a moving magnetic field, which in turn makes an electric current. An electric current makes a magnetic field. The electric current flows in such as direction that its magnetic field is reverse sign from the one originating all of this. The end result is that the ball experiences a strong dragging force, preventing it from moving quickly through the hole in the pipe. This is an application of Lenz's law Of course the trick in showing this is to introduce enough bafflegab, confusion and redirection to make it appear as "magic".
  22. 24Feb2014: Q: Where in the US is this? A: This picture (of Robert) is on top of Mt. Whitney, CA, at 14503 feet, the highest peak in the lower 48 states. Mt. Whitney is in Sequoia National Park, and is next to Owens Valley, the deepest valley in the world. Owens Valley is the head end of the aqueduct that takes (stolen) water 200 miles to Los Angeles. Two valleys to the east is Death Valley, the lowest place in North America, at -212feet. I grew up 60 miles south of here. This picture was taken 6 weeks into my hike from Mexico to Canada on the Pacific Crest Trail in 2012.

  23. 26Feb2014: More pearls from Perlis:
    1. In computing, the mean time to failure keeps getting shorter.
    2. You can't communicate complexity, only an awareness of it.
    3. Adapting old programs to fit new machines usually means adapting new machines to behave like old ones.
    More information on gcov, gprof and New Relic:
    1. See the gcov man page for the Gnu statement coverage tool..
    2. See the gprof man page for Gnu[sic] Graph Profiler.
    3. See the New Relic Home Page.
  24. 28Feb2014: Canis lupus familiaris catulus. We boarded a litter of 6 Labrador Retriever puppies for weeks 7 and 8 of their life, and helped place them into their homes in CA, WA and CO. My wife and her family have been breeding Labradors since 1960.
  25. 03Mar2014: Quotes from Dikjstra:
    1. It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
    2. Simplicity is prerequisite for reliability
    3. It is not the task of the University to offer what society asks for, but to give what society needs.
  26. 05Mar2014: An extra goto in some security critical code in MacosX compromised the entire secure sockets layer, rending that layer hardly secure at all. The procedural failures leading up to this are staggering, including not relying on the compiler, not relying on statement coverage, not doing code reviews (apparently), and more. You can read a summary about the macosx SSL "goto fail" bug here in the "ACM Forum on Risks to the Public in Computer and Related Systems" newsgroup, aka comp.risks: comp.risks 27.76 and the follow up here: comp.risks 27.77.

    I encourage you to read this newsgroup for your entire professional career, as a way to maintain some humility. The newsgroup comes out about once every 10 days, Also read the classical polemic/diatribe from that old crank, Dijkstra: goto considered harmful.

  27. 07Mar2014: Personal Advice you didn’t ask for:
    1. Be passionate about something
    2. Do interesting stuff outside of work and computer science
    3. Know when to "buy" and when to "bulid".
    4. Eat food, not much, mostly plants (Michael Pollan)
    5. Pay yourself first: student loans, 401(k)
    6. 401(k) matching monies from your employer is free money! (Just make sure it accrues to you incrementally, not on the last day of the year.)
  28. 10Mar2014: Malus domestica, ala George Miller. George taught my undergraduate compiler class and had me hooked into this line of study with his statement "the method of recursive descent". Apples have their grain going parallel to the axis. By inverting the apple and eating along the grain, you get large flakes; the ratio of surface area to volume is constant, and there's very little wasted fruit. These were organic "Lady Alice" cultivars. Enjoy, and contemplate the giant social engineering projects in the 1930s that lead to the giant dams on the Columbia, which saw to the eradication of the giant spawns of giant salmon, and the giant apple industry WA now has.
  29. 12Mar2014:
    1. This snippet of Ada (a programming language derived from Pascal) code I showed was from the flight control software on the first Ariane 5 rocket launch. The code failed to check for overflow or saturation conditions when converting a double precision number to a small integer, and at run time, eg during ascent liftoff, an exception was thrown, and the rocket eventually deposited its payload into geosynchronous orbit at the bottom of the ocean. See this web page .
    2. In January 2038 it will be 2**31 seconds since the start of the Unix epoch in 1970. 32 bit signed integers keeping track of the number of seconds will start seeing large negative seconds, eg time well before 1970. See this web page
  30. 14Mar2014: Q: Which of these companis is not headquartered in the Puget Sound area? (Microsoft; Amazon; Boeing; REI; Starbucks; Nordstrom’s; Wells Fargo; Cray; MSNBC; Costco; Alaska Airlines) A: Wells Fargo is based in San Francisco. Boeing pulled up stakes and decamped to Chicago about 7 years ago, moving away from their design and manufacturing home base.
  31. Contact me at rrh.henry@gmail.com or rrh@newrelic.com.

Please visit here for basic course information and links to the webs for earlier quarters.

Privacy policy and terms of use