<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>A Programmer&apos;s Apology</title>
      <link>http://avitzur.hax.com/</link>
      <description></description>
      <language>en</language>
      <copyright>Copyright 2009</copyright>
      <lastBuildDate>Mon, 27 Apr 2009 18:12:35 -0800</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=3.2</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

            <item>
         <title>Obama on Math and Science Education</title>
         <description><![CDATA[<blockquote><p>Since we know that the progress and prosperity of future generations will depend on what we do now to educate the next generation, today I'm announcing a renewed commitment to education in mathematics and science. This is something I care deeply about....
</p><p>A half century ago, this nation made a commitment to lead the world in scientific and technological innovation; to invest in education, in research, in engineering; to set a goal of reaching space and engaging every citizen in that historic mission.  That was the high water mark of America's investment in research and development....</p><p>We will not just meet, but we will exceed the level achieved at the height of the space race, through policies that invest in basic and applied research, create new incentives for private innovation, promote breakthroughs in energy and medicine, and improve education in math and science.</p></blockquote>

Obama, speaking before the National Academy of Sciences today, inspires. Read or listen to the full speech here: <a href="http://www.sciencedebate2008.com/www/index.php?id=65">text</a>, <a href="http://nationalacademies.org/podcast/20090427.mp3">audio</a>.]]></description>
         <link>http://avitzur.hax.com/2009/04/obama_on_math_and_science_educ.html</link>
         <guid>http://avitzur.hax.com/2009/04/obama_on_math_and_science_educ.html</guid>
         <category>Teaching</category>
         <pubDate>Mon, 27 Apr 2009 18:12:35 -0800</pubDate>
      </item>
            <item>
         <title>Untitled</title>
         <description><![CDATA[<p><center><a href="http://www.PacificT.com/Examples/nguyen/"><img src="http://www.PacificT.com/Examples/nguyen/graph.png" WIDTH=50% HEIGHT=50%></a></center></p>
<p>(Click the image to see the equations.)</p>
<p>Submitted by Anh Nguyen.</p>]]></description>
         <link>http://avitzur.hax.com/2009/03/untitled.html</link>
         <guid>http://avitzur.hax.com/2009/03/untitled.html</guid>
         <category>Gallery</category>
         <pubDate>Wed, 18 Mar 2009 15:41:11 -0800</pubDate>
      </item>
            <item>
         <title>Uncertain Principles Challenge 2008</title>
         <description><![CDATA[<p>Help Chad Orzel raise money for <b>Science</b> teaching! <a href="http://www.donorschoose.org/donors/viewChallenge.html?id=19006">Go here now.</a></p>
<p>Why, you ask? <a href="http://whatever.scalzi.com/2008/10/15/oh-i-so-very-much-want-to-see-this/">John</a> <a href="http://whatever.scalzi.com/2008/10/17/chad-orzel-monkey-dance-update-1017/">Scalzi</a> says it best:<blockquote>Chad is, like, six feet, 28,000 inches. He’s a pretty big dude. And as everyone knows, large dudes are funny to watch dancing. But there’s more! He’s also a physicist and a fully tenured professor or such, and as well all know, the overlap between “tenured physics professors” and “adept dancers” is trivially small. Finally, Chad has a sort of gawky, innate dignity — he’s a friendly sort, but let’s just say I’ve never seen him prone to wanton acts of physical comedy. What I’m saying is, making Chad Orzel dance like a monkey would be the comedy highlight of 2008.</blockquote>]]></description>
         <link>http://avitzur.hax.com/2008/10/uncertain_principles_challenge.html</link>
         <guid>http://avitzur.hax.com/2008/10/uncertain_principles_challenge.html</guid>
         <category>physics</category>
         <pubDate>Tue, 21 Oct 2008 06:49:55 -0800</pubDate>
      </item>
            <item>
         <title>Art Project #11</title>
         <description><![CDATA[<p><center><a href="http://www.PacificT.com/Examples/CarFinal/"><img src="http://www.PacificT.com/Examples/CarFinal/graph.png" WIDTH=50% HEIGHT=50%></a></center></p>
<p>(Click the image to see the equations.)</p>]]></description>
         <link>http://avitzur.hax.com/2008/03/art_project_11_1.html</link>
         <guid>http://avitzur.hax.com/2008/03/art_project_11_1.html</guid>
         <category>Gallery</category>
         <pubDate>Fri, 07 Mar 2008 13:24:33 -0800</pubDate>
      </item>
            <item>
         <title>Virtual math spaces</title>
         <description><![CDATA[<a href="http://www.nada.kth.se/~gustavt/cybermath/"><img src="http://www.nada.kth.se/~gustavt/cybermath/dh4s.jpg"></a>
<p><a href="http://www.nada.kth.se/~gustavt/cybermath/">CyberMath</a> is a  shared virtual environment for exploring mathematics. I've long wanted to make Graphing Calculator into an authoring tool for such an interactive immersive space. The popularity and success of World of Warcraft hints at the possibilities in coming years.</p>

<p>Does anyone here use <a href="http://secondlife.com/">Second Life</a> or have any knowledge of <a href="http://www.croquetconsortium.org/index.php/Main_Page">Croquet</a>? The technology for building these spaces is maturing. I'm now wondering how to make it accessible to teachers and curriculum authors so that they can focus on the mathematical content and pedagogy while constructing mathematical landscapes.</p>

<p>I would welcome any advice.</p>]]></description>
         <link>http://avitzur.hax.com/2007/09/virtual_math_spaces.html</link>
         <guid>http://avitzur.hax.com/2007/09/virtual_math_spaces.html</guid>
         <category>programming</category>
         <pubDate>Wed, 12 Sep 2007 18:51:42 -0800</pubDate>
      </item>
            <item>
         <title>Lunar Eclipse</title>
         <description><![CDATA[Enjoy two rather different views of Monday night's total lunar eclipse. I watched from <a href="http://chabotspace.org/">Chabot</a> with a huge crowd, frenetic activity, many telescopes big and small, television news crews shining floodlights periodically on people in sleeping bags and people in line for the big telescope, the Castilleja High School astronomy class - the TV crews loved interviewing them. One Chabot astronomer in a pointy hat and cape told amusing and educational stories all night long. Quite a few shooting stars. One particularly large one just at the start of totality after the diamond in the diamond ring faded away was a big crowd pleaser. </p>
<p>
<a href="http://apod.nasa.gov/apod/image/0708/EclipsedMoonPugh.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://apod.nasa.gov/apod/image/0708/EclipsedMoonPugh.jpg" alt="" border="0"></a><a ..="" try="" {parent.deselectbloggerimagegracefully();}="" catch(e)="" {}="" href="http://apod.nasa.gov/apod/image/0703/tsemoon_Gartstein_720cropped.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://apod.nasa.gov/apod/image/0703/tsemoon_Gartstein_720cropped.jpg" alt="" border="0">
</a></p><p>Kudos to <a href="http://amandabauer.blogspot.com/2007/08/dark-lunar-eclipse.html">Astropixie</a> for pointing out the images!</p>]]></description>
         <link>http://avitzur.hax.com/2007/08/lunar_eclipse.html</link>
         <guid>http://avitzur.hax.com/2007/08/lunar_eclipse.html</guid>
         <category>programming</category>
         <pubDate>Thu, 30 Aug 2007 13:48:57 -0800</pubDate>
      </item>
            <item>
         <title>Cubes</title>
         <description><![CDATA[<p>Nico Bakker sent in this <a href="http://www.PacificT.com/Examples/Cubes/">document</a>  saying <i>Here is another example of the beauty of Graphing Calculator.</i></p> 

<p>Thank you, Nico!</p>

<p><center><a href="http://www.PacificT.com/Examples/Cubes/"><img src="http://www.PacificT.com/Examples/Cubes/graph.png" height="331" width="414"></a></center></p>
<p>Click the image to see the equations. </p></p><a href="http://www.pacifict.com/Examples/Cubes.mov"> Click here for the movie.</a></p>]]></description>
         <link>http://avitzur.hax.com/2007/08/cubes.html</link>
         <guid>http://avitzur.hax.com/2007/08/cubes.html</guid>
         <category>Gallery</category>
         <pubDate>Mon, 20 Aug 2007 11:48:48 -0800</pubDate>
      </item>
            <item>
         <title>&quot;Math is hard&quot;</title>
         <description><![CDATA[<p>Mattel got a lot of flack for its talking Barbie doll which said "Math is hard."  I wanted to reprogram the voice chips to say "Partial differential equations with  Neumann boundary conditions are hard." It's not that I completely disagreed with Mattel, I just thought Barbie should have been more specific.  Imagine the conversations: "Mommy, what's a Neumann boundary condition?" "Well you see dear, that's when you fix the value of the derivative on the boundary curve." But then, I've been working on nerd propaganda for decades.</p>
]]></description>
         <link>http://avitzur.hax.com/2007/07/math_is_hard.html</link>
         <guid>http://avitzur.hax.com/2007/07/math_is_hard.html</guid>
         <category>books</category>
         <pubDate>Wed, 25 Jul 2007 11:16:20 -0800</pubDate>
      </item>
            <item>
         <title>Cross-platform development</title>
         <description><![CDATA[<p>I clicked "Restart" after Apple Software Update applied what I thought were minor system patches, and my computer rebooted into Windows....</p>]]></description>
         <link>http://avitzur.hax.com/2007/07/crossplatform_development.html</link>
         <guid>http://avitzur.hax.com/2007/07/crossplatform_development.html</guid>
         <category>programming</category>
         <pubDate>Wed, 04 Jul 2007 10:50:58 -0800</pubDate>
      </item>
            <item>
         <title>Adventures in Optimization: OpenGL</title>
         <description><![CDATA[<blockquote><i>Over the past few years, the hardware-accelerated rendering pipeline has rapidly increased in complexity, bringing with it increasingly intricate and potentially confusing performance characteristics. Improving performance used to mean simply reducing the CPU cycles of the inner loops in your renderer; now it has become a cycle of determining bottlenecks and systematically attacking them. This loop of identification and optimization is fundamental to tuning a heterogeneous multiprocessor system; the driving idea is that a pipeline, by definition, is only as fast as its slowest stage. Thus, while premature and unfocused optimization in a single-processor system can lead to only minimal performance gains, in a multiprocessor system such optimization very often leads to zero gains.</i> - Cem Cebenoyan, NVIDIA, in <a href="http://download.nvidia.com/developer/GPU_Gems/Sample_Chapters/Graphics_Pipeline_Performance.pdf">GPU Gems</a></blockquote>]]></description>
         <link>http://avitzur.hax.com/2007/06/adventures_in_optimization_ope.html</link>
         <guid>http://avitzur.hax.com/2007/06/adventures_in_optimization_ope.html</guid>
         <category>programming</category>
         <pubDate>Tue, 19 Jun 2007 11:53:53 -0800</pubDate>
      </item>
            <item>
         <title>Adventures in Optimization: Threading</title>
         <description><![CDATA[<p>After identifying the superficial bugs slowing GC4, I set out to measure the degree of parallelism I was able to achieve with <a href="http://avitzur.hax.com/2006/10/embarrassingly_parallelizable.html">the new multi-threaded calculation code</a>. Are there any other calls like <a href="http://avitzur.hax.com/2007/05/getwrefcon.html">GetWRefCon</a> unintentially introducing dependencies stalling threads? Was GC able to keep multiple CPU cores fed wih independent work? In additional to the traditional questions of <i>Where is the software spending its time? What is it doing there?</i> I now have to ask those question separately of multiple threads of execution on multiple CPU cores and understand the answers in context, asking <i>When is one thread of execution stalled waiting for results from another?</i> With the right tool, the answer can be obvious. </p>
<p><center><img alt="ThreadView.png" src="http://avitzur.hax.com/images/ThreadView.png" width="378" height="147" /></center></p>]]></description>
         <link>http://avitzur.hax.com/2007/06/adventures_in_optimization_threading.html</link>
         <guid>http://avitzur.hax.com/2007/06/adventures_in_optimization_threading.html</guid>
         <category>programming</category>
         <pubDate>Sun, 10 Jun 2007 15:11:09 -0800</pubDate>
      </item>
            <item>
         <title>Adventures in Optimization: Benchmarking</title>
         <description><![CDATA[<p>My first job at Apple in 1992 was benchmarking the quality of a dozen different handwriting recognition software libraries from different companies. We like to pretend that everything from health to cars to wars can be measured by a single number but real systems are  multi-dimensional. <i>Benchmarks</i> are like <i>standards</i>: everyone likes to make their own. I approach software measurements with my old Stanford Physics lab training. I treat the software as tangible physical system, experiment to determine what I can measure reproducibly, look for mathematical relationships between variables, and attempt to construct a useful basis set of axes upon which to characterize their phase space. This did not make me any friend while benchmarking for Apple. Each company or internal group with a solution to sell had strong ideas about comparing systems to put their own solution in the best light.  Furthermore, handwriting recognition was and is still an unsolved research problem. Comparing different research projects is quite different from comparing products of a mature technology. Ultimately, none of the choices proved adequate.</p>
<p>For Graphing Calculator, I use performance measurements to make programming choices when comparing high-level algorithms, low-level implementation details, different compilers, and compilation options. Holding the Command key while pressing the slider Play button will initiate a stopwatch to time the slider. When I'm focusing on a particular routine, this is useful to compare small code changes from one build to the next. In the Graphing Calculator menu, the Graphing Calculator > Benchmark command runs through thirty-two tests timing calculation and drawing. These help me compare how GC behaves on different hardware and how its behavior changes across versions years apart. The report looks like this:</p>]]></description>
         <link>http://avitzur.hax.com/2007/06/adventures_in_optimization_benchmarking.html</link>
         <guid>http://avitzur.hax.com/2007/06/adventures_in_optimization_benchmarking.html</guid>
         <category>programming</category>
         <pubDate>Sun, 10 Jun 2007 14:16:23 -0800</pubDate>
      </item>
            <item>
         <title>Adventures in Optimization: Prelude</title>
         <description><![CDATA[<p><a href="http://avitzur.hax.com/2007/05/getwrefcon.html">Two weeks ago</a>, I ran the Intel-native GC4 on an 8-core machine. It revved all 8 processing cores yet ran no faster than on a four-year old single-core G4 laptop at one-third the clock speed. A few minutes with Shark identified the culprit: a single innocuous call to GetWRefcon. In the single-user, single-core, single-threaded Macintosh toolbox of 1984, that call would have taken a few instructions. Mac OS X must share system resources across multiple users, processor cores, applications, and threads of execution all making demands at once. GetWRefCon is labelled <i>Not Thread Safe</i>: it is not guaranteed to work at all from anywhere but the main  thread. Rather than crash or return a bogus result, it was causing all eight otherwise independent threads of execution to serialize on that one shared resource, passing the baton from one thread to the other, unable to execute in parallel. Fixing this was easy. Although the window structure is a shared resource protected by a lock, the RefCon itself that I actually needed contained read-only information all threads could read in parallel safely without locking. No need to go through GetWRefCon at all. The parallel threads should have been passed a pointer to the read-only document record directly.</p><p>

After fixing that, some tests ran twenty times faster. Other tests however, still ran at the same speed as on the older, slower, single-core laptop. I devoted the last two weeks to figuring out why. </p>

<p><center><img alt="Dock.png" src="http://avitzur.hax.com/images/Dock.png" width="473" height="75" /></center></p>]]></description>
         <link>http://avitzur.hax.com/2007/06/adventures_in_optimization_pre.html</link>
         <guid>http://avitzur.hax.com/2007/06/adventures_in_optimization_pre.html</guid>
         <category>programming</category>
         <pubDate>Sun, 10 Jun 2007 10:55:10 -0800</pubDate>
      </item>
            <item>
         <title>Spike!</title>
         <description><![CDATA[<p><img alt="Spike on top of stairs" src="http://avitzur.hax.com/images/AvoSpikeStairs.jpg" width="400" height="300" /></p><p>
Spike returns triumphant from the garden. After inhaling half an avocado, he held on greedily to the rest until he was ready for it.   His wet food contains a fair bit of avocado. He seemed quite pleased with himself to discover that food really does fall from trees. I wouldn't let him back in until he finished. Close-up below the fold....</p>]]></description>
         <link>http://avitzur.hax.com/2007/06/spike.html</link>
         <guid>http://avitzur.hax.com/2007/06/spike.html</guid>
         <category></category>
         <pubDate>Mon, 04 Jun 2007 21:54:22 -0800</pubDate>
      </item>
            <item>
         <title>glBufferSubData</title>
         <description><![CDATA[<center><a href="http://www.pacifict.com/glBufferSubDataArtifact/"><img src="http://www.pacifict.com/glBufferSubDataArtifact/graph.png" height="170" width="190"></a></center>
<p>Yesterday was spent debugging until two in the morning trying to diagnose a drawing artifact which occured only on Intel-native builds of GC4 when animating colors on a static 3D model defined using an implicit surface equation using OpenGL <a href="http://www.opengl.org/registry/specs/ARB/vertex_buffer_object.txt">vertex buffer objects</a>. The image above started out, correctly, as a solid red sphere. When animating the colors using the GC slider, the top of the sphere did not change, remaining red. The middle of the sphere animated correctly. The bottom of the sphere animated but rgb color values (a,b,c) would display shifted as (b,c,a).</p>]]></description>
         <link>http://avitzur.hax.com/2007/05/glbuffersubdata.html</link>
         <guid>http://avitzur.hax.com/2007/05/glbuffersubdata.html</guid>
         <category>programming</category>
         <pubDate>Thu, 31 May 2007 18:27:11 -0800</pubDate>
      </item>
      
   </channel>
</rss>

