Friday, September 25, 2015

Thoughts on the book "(Forget a Mentor) Find a Sponsor" by Sylvia Ann Hewlett

A colleague of mine handed me this book.  In a nutshell, this book makes clear the expectations and advantages of a sponsor-protege relationship, and I thought it was a worthwhile read.  The book provides concrete actions that one can take to find and maintain sponsors.  The thesis is that no one achieves greatness without a sponsor.  In this post, I relate some of the themes in this book to Computer Science with a focus on suggestions for graduate students.  

In Computer Science, we like to think of the field as a meritocracy.  (A student actually used this exact term when talking with me a couple of weeks ago).  A mis-perception of many of us in this field is that we can just quietly do good work and someone will notice and hand us the job, the promotion, etc.  This approach somewhat works when you are focused on taking courses and you just need to do good work to get the ‘A’ (although I would argue you probably need to go to office hours and study with other students to really LEARN while taking a course).  However, other activities such as obtaining an undergraduate research assistantship, applying for an obtaining a scholarship, getting the summer internship or full-time job you really want, submitting and publishing a paper, submitting and being awarded a grant, and earning tenure ALL require more than just putting your nose to the grindstone.  

All of the above mentioned activities will probably result in some failure (hopefully not the tenure one, but rough yearly reviews before tenure do happen).  Sponsors can help you at these points.  A sponsor is someone who connects you to opportunities and provides you “cover” when you need to takes some risks.  He or she will sometimes stick their neck out for you, and as such will also provide you honest feedback about your strengths and weaknesses.  A research advisor does all these things: they find research collaborators and internships and eventually will help you find a full-time job, they fund you off grants but you will still have time to try some risky ideas, they convince other faculty you are making progress, and they give you a lot of feedback.

Your job is to make your sponsors look good while reaping the career benefits they provide.  The sponsor-protege relationship is reciprocal.  If your sponsor is your advisor that means recognizing that since you are doing 20+ hours of research on one project each week, you probably have an order of magnitude more time to think about that particular project than your advisor does.  You need to become the expert for the project.  You need to draft the paper, develop the experimental methodology, provide and analyze preliminary results, and then use your meeting time productively brainstorm ideas and to ensure you are on track.  One piece of critical advice I got from my advisors was to "Act like an X to become an X.”  When you are an undergraduate, act like a graduate student; when you are a graduate student, act like a postdoc and/or faculty member.

Another suggestion in this book that really resonated with me was the idea to "Lead with a Yes".  This one boils down to the idea that your sponsor does not want to hear all the reasons that you might not be able to take advantage of an opportunity that they have provided for you.  Say "yes" first.  Later you can qualify the "yes" if there are logistics involved.  The other side of this coin is that you only need to feel obligated to say "yes" to your 3ish sponsors.  Others may ask for your time, and you should only give it if it is going to help your career and/or help your sponsor look good.  I am still working on this one in terms of identifying who it is important to say "yes" to and making sure that "yes" is the first thing I say.

After reading this book I will more consciously plan and work to garner the trust and support from sponsors.  In any career, you never arrive or are done, but you come to oases along the way. Sponsorship, hard work, and luck helped me obtain my current position.  I appreciate immensely the people that have helped mentor, supported, and/or sponsored me to get to where I am today (professor at University of Arizona); the list includes Ann Rogers, Kathryn McKinley, Rick Ord, Jeanne Ferrante, Larry Carter, Adele Howe, Dave Lowenthal, Todd Proebsting, Arnie Rosenburg, Paul Hovland, Steve Blackburn, Bill Griswold, David Bianco, my parents, my spouse, and my siblings.  Thank you all!

Wednesday, September 23, 2015

Getting Started with islplot

Tomofumi Yuki sent me email about islplot in January 2014.  It is a seriously cool visualization tool for iteration spaces, tiles, data dependences, etc. developed by Tobias Grosser.  Here are some notes on how to get started with this tool.  The below instructions work on a Mac with OS X 10.10.5 with Anaconda for Python 3 installed.  It might help someone with a linux machine as well.

First check that you have a recent version of python, ipython, and jupyter installed.  I used the free Anaconda package to obtain all of these items.  Install Anaconda for Python 3 and then do the following:
  $ conda update conda
  $ conda update ipython ipython-notebook ipython-qtconsole
  $ conda install jupyter

For more information about ipython-notebook becoming jupyter see the iPython website.


Before you can use islplot, you are going to need islpy, which is a python wrapper for the Integer Set Library (ISL).
  $ pip install islpy

Then download islplot (git clone https://github.com/tobig/islplot) and in the islplot directory type the following:
  $ python setup.py install

Now the fun begins!  Run the jupyter notebook.  It will show up in your web browser.
  $ jupyter notebook

Then select New-->Python 3 notebook.  Copy the islplot 2D examples and 3D examples.   For me the 2D examples render better if run in ipython instead of jupyter and replace
  %pylab inline
with
  %pylab OS X

Have fun and let me know if you find a way to generate pdfs from the generated pictures.

Monday, September 7, 2015

Getting Started with ISCC/Barvinok/ISL

Barvinok (http://barvinok.gforge.inria.fr) is a calculator interface to the integer set library (ISL, http://isl.gforge.inria.fr), which manipulates affine sets and relations.  We can represent loop computations with these sets and represent loop transformations with the relations and then generate code for the transformed loop, so this is cool stuff!  The barvinok calculator also provides ways to count, provide a closed-form expression, the number of points in a parameterized set.

Building and installing barvinok-0.38 this September 2015 was a bit of a chore, so I am summarizing what needs to be done in this blog post.  These instructions worked on ubuntu 12.04.5 and Mac OS X 10.10.5.

Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-88-generic-pae i686), where don’t have root
  • download, build, and install gmp, gmp-6.0.0a.tar.bz2 from https://gmplib.org/#DOWNLOAD
    • mv gmp-6.0.0a.tar.bz2 ~/packages/  (I recommend putting all downloaded software into a packages/ subdirectory.)
    • cd ~/packages/; bunzip2 gmp-6.0.0a.tar.bz2; cd gmp-6.0.0/
    • ./configure —prefix=/home/mstrout/software
    • make; make check; make install
  • download, build, and install ntl, ntl-9.3.0.tar.gz from http://www.shoup.net/ntl/download.html
    • cd ~/packages; gunzip ntl-9.3.0.tar.gz; tar xvf ntl-9.3.0.tar
    • cd ntl-9.3.0/src/
    • ./configure DEF_PREFIX=/home/mstrout/software NTL_GMP_LIP=on CXXFLAGS='-DNTL_STD_CXX'
    • make; make check; make install
  • download, build, and install barvinok, barvinok-0.38.tar.gz from (http://barvinok.gforge.inria.fr)
    • PATCH IT!  Here is the tricky bit.  NTL has made some changes and barvinok needs some patches to handle those changes.  The mailing list https://groups.google.com/forum/#!searchin/isl-development/value2zz/isl-development/_b9WifCKYrU/ISPd6qmPshoJ provides patches, but since I did not have aclocal on either machine I was doing this on, I had to modify the patch somewhat.  Essentially, I did not make the configure.ac and m4/* changes.
      • Create the July2015.patch file that is listed at the end of this post.
      • In barvinok-0.38/ type  patch -p1 --ignore-whitespace < July2015.patch
      • Proceed to your regularly scheduled program ...
    • ./configure --prefix=/home/mstrout/software --with-gmp-prefix=/home/mstrout/software --with-ntl-prefix=/home/mstrout/software
    • make; make check; make install

Mac OS X 10.10.5, where I am an administrator
  • download, build, and install gmp, gmp-6.0.0a.tar.bz2 from https://gmplib.org/#DOWNLOAD
    • mv gmp-6.0.0a.tar.bz2 ~/packages/  (I recommend putting all downloaded software into a packages/ subdirectory.)
    • cd ~/packages/; bunzip2 gmp-6.0.0a.tar.bz2; cd gmp-6.0.0/
    • ./configure
    • make; make check; sudo make install
  • download, build, and install ntl, ntl-9.3.0.tar.gz from http://www.shoup.net/ntl/download.html
    • cd ~/packages; gunzip ntl-9.3.0.tar.gz; tar xvf ntl-9.3.0.tar
    • cd ntl-9.3.0/src/
    • ./configure NTL_GMP_LIP=on CXXFLAGS='-DNTL_STD_CXX'
    • make; make check; sudo make install
  • download, build, and install barvinok, barvinok-0.38.tar.gz from (http://barvinok.gforge.inria.fr)
    • PATCH IT!  Here is the tricky bit.  NTL has made some changes and barvinok needs some patches to handle those changes.  The mailing list https://groups.google.com/forum/#!searchin/isl-development/value2zz/isl-development/_b9WifCKYrU/ISPd6qmPshoJ provides patches, but since I did not have aclocal on either machine I was doing this on, I had to modify the patch somewhat.  Essentially, I did not make the configure.ac and m4/* changes.
      • Create the July2015.patch file that is listed at the end of this post.
      • In barvinok-0.38/ type, patch -p1 --ignore-whitespace < July2015.patch
      • Proceed to your regularly scheduled program ...
    • ./configure --with-gmp-prefix=/usr/local --with-ntl-prefix=/usr/local
    • make; make check; sudo make install

Give it a go!
  • Create the iscc-getting-started.iscc file whose contents are listed at the end of this post.
  • /path/to/iscc < iscc-getting-started.iscc

iscc-getting-started.iscc file
# Using http://compsys-tools.ens-lyon.fr/iscc/index.php
# interactively and using
#   isl-0.11
#   barvinok-0.36
# that I installed on CSU CS machines.
#
# MMS 5/15/15

# Jacobi1D stencil computation
#   for (t=1; t<=T; t++) {
#     for (i=1; i<=N; i++) {
#  S:   A[t][i] = (A[t-1][i-1] + A[t-1][i] + A[t-1][i]);
#     }
#   }
I := [T,N] -> { S[t,i] : 1<=t<=T and 1<=i<=N };

Schedule := [T,N] -> { S[t,i] -> [t,i] };

print "Schedule";
print Schedule;

print "codegen (Schedule * I)";
codegen (Schedule * I);

skewSched := [T,N] -> { S[t,i] -> [t,i+t] };
print "codegen (skewSched * I)";
codegen (skewSched * I);


July2015.patch file
diff --git a/README b/README
index 47257cc..c0678c7 100644
--- a/README
+++ b/README
@@ -24,6 +24,9 @@ Additionally, the following packages can optionally be used
 NTL needs to have been compiled with GMP support.
 That is, you have to specify
     NTL_GMP_LIP=on
+NTL also needs to have been compiled in ISO mode.
+For versions older than 5.4, this means you need an additional
+    NTL_STD_CXX=on

 Suppose you want to install everything in /opt,
 Then you configure/compile NTL using
diff --git a/barvinok.cc b/barvinok.cc
index 4231ca0..95265d6 100644
--- a/barvinok.cc
+++ b/barvinok.cc
@@ -31,9 +31,7 @@
 #include "param_util.h"
 #include "summate.h"

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif
 using std::cerr;
 using std::cout;
 using std::endl;
diff --git a/barvinok/NTL_QQ.h b/barvinok/NTL_QQ.h
index 0619c82..56ab1cf 100644
--- a/barvinok/NTL_QQ.h
+++ b/barvinok/NTL_QQ.h
@@ -3,9 +3,7 @@

 #include <barvinok/NTL.h>

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 struct QQ {
     ZZ        n;
diff --git a/barvinok/genfun.h b/barvinok/genfun.h
index be7ab95..fdd1c0c 100644
--- a/barvinok/genfun.h
+++ b/barvinok/genfun.h
@@ -9,9 +9,7 @@
 #include <barvinok/NTL_QQ.h>
 #include <barvinok/options.h>

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 struct short_rat {
     struct __short_rat_n {
diff --git a/conversion.h b/conversion.h
index 87d1836..5d09fa5 100644
--- a/conversion.h
+++ b/conversion.h
@@ -2,9 +2,7 @@
 #include <NTL/mat_ZZ.h>
 #include <barvinok/polylib.h>

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 void value2zz(Value v, ZZ& z);
 void zz2value(const ZZ& z, Value& v);
diff --git a/decomposer.cc b/decomposer.cc
index 6b9344a..05f5b0a 100644
--- a/decomposer.cc
+++ b/decomposer.cc
@@ -10,9 +10,7 @@
 #include "param_util.h"
 #include "reduce_domain.h"

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif
 using std::vector;
 using std::cerr;
 using std::endl;
diff --git a/decomposer.h b/decomposer.h
index 88d7e4a..b853afc 100644
--- a/decomposer.h
+++ b/decomposer.h
@@ -6,9 +6,7 @@
 #include <barvinok/polylib.h>
 #include <barvinok/options.h>

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 struct signed_cone {
     signed_cone(const mat_ZZ& rays, int sign, unsigned long det) :
diff --git a/dpoly.h b/dpoly.h
index b849ba7..e58bb85 100644
--- a/dpoly.h
+++ b/dpoly.h
@@ -8,9 +8,7 @@
 #include <barvinok/polylib.h>
 #include "conversion.h"

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 class dpoly {
 public:
diff --git a/genfun_constructor.h b/genfun_constructor.h
index ca8eb19..18f7c25 100644
--- a/genfun_constructor.h
+++ b/genfun_constructor.h
@@ -6,9 +6,7 @@
 #include "reducer.h"
 #include "bfcounter.h"

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 /* base for generating function counting */
 struct gf_base {
diff --git a/lattice_point.h b/lattice_point.h
index 6f0dff5..3909223 100644
--- a/lattice_point.h
+++ b/lattice_point.h
@@ -21,9 +21,7 @@ Matrix *relative_coordinates(Param_Vertices *V, Matrix *basis);
 #include <NTL/vec_ZZ.h>
 #include <NTL/mat_ZZ.h>

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 struct barvinok_options;

diff --git a/lexmin.cc b/lexmin.cc
index 529b97d..8334518 100644
--- a/lexmin.cc
+++ b/lexmin.cc
@@ -29,9 +29,7 @@

 #undef CS   /* for Solaris 10 */

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 using std::vector;
 using std::map;
diff --git a/mat_util.h b/mat_util.h
index 31a4ddf..dd864b0 100644
--- a/mat_util.h
+++ b/mat_util.h
@@ -1,9 +1,7 @@
 #include <NTL/vec_ZZ.h>
 #include <NTL/mat_ZZ.h>

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 int lex_cmp(const vec_ZZ& a, const vec_ZZ& b);
 void lex_order_rows(mat_ZZ& mat);
diff --git a/reducer.h b/reducer.h
index 30e2ef1..0ddf19d 100644
--- a/reducer.h
+++ b/reducer.h
@@ -8,9 +8,7 @@
 #include "decomposer.h"
 #include "dpoly.h"

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 struct gen_fun;

diff --git a/vertex_cone.h b/vertex_cone.h
index 387cb30..7fb7e4a 100644
--- a/vertex_cone.h
+++ b/vertex_cone.h
@@ -2,9 +2,7 @@
 #include <barvinok/evalue.h>
 #include "power.h"

-#ifdef NTL_STD_CXX
 using namespace NTL;
-#endif

 /* Represents the vertex and the rays of a vertex cone */
 struct vertex_cone {

diff --git a/conversion.cc b/conversion.cc
index 7d43959..7804816 100644
--- a/conversion.cc
+++ b/conversion.cc
@@ -7,16 +7,23 @@
 #define SIZE(p) (((long *) (p))[1])
 #define DATA(p) ((mp_limb_t *) (((long *) (p)) + 2))

+/* Access the internal representation of a ZZ.
+ * In newer versions of NTL (since 8.0.0), the internal representation
+ * is wrapped inside a WrappedPtr, but it has an addess-of operator
+ * that returns the address of the actual internal representation.
+ */
+#define REP(z)        (*&(z).rep)
+
 void value2zz(Value v, ZZ& z)
 {
     int sa = v[0]._mp_size;
     int abs_sa = sa < 0 ? -sa : sa;

     _ntl_gsetlength(&z.rep, abs_sa);
-    mp_limb_t * adata = DATA(z.rep);
+    mp_limb_t * adata = DATA(REP(z));
     for (int i = 0; i < abs_sa; ++i)
         adata[i] = v[0]._mp_d[i];
-    SIZE(z.rep) = sa;
+    SIZE(REP(z)) = sa;
 }

 void zz2value(const ZZ& z, Value& v)
@@ -26,10 +33,10 @@ void zz2value(const ZZ& z, Value& v)
         return;
     }

-    int sa = SIZE(z.rep);
+    int sa = SIZE(REP(z));
     int abs_sa = sa < 0 ? -sa : sa;

-    mp_limb_t * adata = DATA(z.rep);
+    mp_limb_t * adata = DATA(REP(z));
     _mpz_realloc(v, abs_sa);
     for (int i = 0; i < abs_sa; ++i)
         v[0]._mp_d[i] = adata[i];


Sunday, August 23, 2015

NSF Workshop on Parallel and Distributed Computing Education

This week I participated in an NSF Workshop on Broadening Parallel and Distributed Computing Undergraduate Education organized by the Center for Parallel and Distributed Computing Curriculum Development and Educational Resources (CDER).  Check out the EduHPC workshop at Supercomputing if you are interested in participating in this topic.

The Problem: This workshop was focused on the lack of parallel and distributed computing (PDC) coverage in required Computer Science (CS) courses even though all of the machines, including cell phones, have multiple threads of execution available and many of the applications we use every day are distributed (Facebook, Minecraft, GoogleDocs, etc).  CS students form the core of people who will be maintaining and programming parallel and distributed systems, and the majority of them are not taking parallel and distributed electives.

Opportunities: I see two main opportunities: (1) introducing parallel and distributed exemplars into the first two years of a CS degree could help motivate and retain a more diverse population and (2) there may be some research funding opportunities.

Motivating all CS concepts with interesting problems at the entry levels is crucial to retaining students who lack computing experience and therefore may not have internalized a motivation of their own (CS and PDC are cool!  We need to communicate that effectively).  In my opinion, doing the motivation piece well is what will have the largest positive impact on diversity.

In terms of the research funding opportunities, Randy Bryant, a CMU professor and who has for the last year been at the  White House Office of Science and Technology Policy, presented the issues that the recent HPC Executive Order.  Success for the National Strategic Computing Initiative (NSCI) includes “streamlin[ing] HPC application development” and “make[ing] HPC readily usable and accessible”.    Another push is to work toward a convergence in numerically intensive computations (think HPC for large simulations) and data intensive computations (think analyzing connectivity in the internet).  Funding agencies will be considering these goals when strategizing about research programs.

A specific problem: To introduce parallel and distributed computing (PDC) concepts into the first two years of CS, a crucial pre-requisite is to convince instructors teaching CS1, CS2, data structures, and algorithms that such an introduction is feasible.  CS intro level courses are exploding all over the country, and instructors are not going to be keen on being expected to do even more work.  So we need to develop the conceptual tie-in to the existing material, motivating examples and associated modules that provide paths through the suggested PDC concepts, and exercises with programming tools to enable students to experiment with the concepts.

One common theme was the idea of having projects in the second year where students would probably want to use some parallel processing to deal with large datasets otherwise doing the assigned work just took too long.  Violet Syrotiuk at Arizona State University has used an ice sheet thickness dataset in her data structures course and had the students explore various interesting questions.  The students ran into big data problems such as it taking 20+ minutes to read in the dataset from disk.  In general, many attendees suggested that using the analysis of large data sets to motivate the need for parallel and distributed computing was a good idea.  In essence, what are computations that we cannot just do on our phones or laptops.  Some other examples that caught my fancy where distributed cellular automata on cell phones (CELLular automata), physical hashing (put up letters on board and have students go put themselves into buckets based on first letter in name), flash mob detection from tweets, music creation with the whole class contributing, and describing conceptually how Apple’s Siri and Amazon’s Echo work.

An idea that we explored some was in an algorithms course one could focus on parallel sort, parallel matrix operations, and parallel graph algorithms.  The instructor could discuss the complexity of various parallel algorithms, show simple parallelization, and then illustrate that incorrect granularity is an issue.  A senior level PDC course could then be referenced as the place where solving the granularity and load balancing problems will be covered.

The organizers of the workshop, Chip Weems et al., did a fantastic job putting together a diverse group of faculty and scientists.  This workshop was well worth spending my first two days as a University of Arizona faculty member in DC versus Tucson.  Notice in the picture below with Randy Bryant that I am wearing my UA shirt for the first time!

Check out some of these neat resources that can illustrate general CS and/or parallel and distributed concepts or just motivate people to appreciate the power of computational thinking:




Friday, July 31, 2015

Setting Up a Mac for Computer Science Research

There are various posts on how to setup a Mac.  Doing an internet search “research setting up a mac” or "computer science mac setup or others will help you find a lot.  This post is most relevant first and foremost to my graduate students.  Next anyone who is using Yosemite and/or does computer science research and programming.

When initially setting up your machine, you will want some kind of internet access.

NEXT, before you do anything else, make sure to select App Store under the top left apple menu and click on Updates.  Install all updates.  This may take awhile, but I only did it part of the way, did other stuff, and then came back and got wedged (as in the app store could not connect at all).  I ended up having to reset the nvram (https://josephscott.org/archives/2013/12/mac-os-x-app-store-not-loading-try-resetting-nvram/) to fix things.

Download and install Xcode (https://developer.apple.com/osx/).

To write weekly research reports and papers, you will need latex.  Download the MacTex (http://tug.org/mactex/) distribution and install it.  It comes with TeXShop (http://pages.uoregon.edu/koch/texshop/), which is a serviceable latex editor.  It also comes with LaTeXiT (http://www.chachatelier.fr/latexit/), which is really handy!  You can create pdfs of latex equations and maintain libraries of latex equations.  The pdf images created by LaTeXiT are much smaller than what the equation editor does in powerpoint.  I copy these equations into powerpoint.

In our research group, I insist on students maintaining a bibtex database of the papers they have read, the pdfs of the papers, and notes about each paper.  I was in the same lab at UCSD as Michael O. McCracken (http://michael-mccracken.net) started writing BibDesk (http://bibdesk.sourceforge.net).  I asked for the minimal bibtex entry feature, which Mike provided.  I am so grateful that Michael, Christiaan M. Hofman, and Adam R. Maxwell continue to maintain BibDesk.  It is great!  There are other bibtex management tools out there.  As long as you have one, that is sufficient.

If you are a University of Arizona student, faculty, or staff, then go to http://softwarelicense.arizona.edu/faculty-and-staff to obtain some software licenses.  The Microsoft Office Suite is a necessity.  In our group we use powerpoint to share presentations and excel to show preliminary results.

For Python, I use Canopy (https://www.enthought.com/products/canopy/).  You can get a free academic license.  With one install it gives my iPython, NumPy, and a bunch of other useful goodies.  It doesn’t provide Python 3+ though.  For that check out Anaconda (https://store.continuum.io/cshop/anaconda/).  See http://www.quora.com/How-does-Enthought-Canopy-compare-to-Anaconda for a comparison.

Here is a list of other useful applications:

I am still trying to decide between Homebrew, MacPorts, and Fink.  Comments and suggestions are welcome.

Thursday, June 11, 2015

Thoughts about “The Talent Code” by Daniel Coyle and how it relates to Computer Science

“The Talent Code” supports its underlying thesis that myelin wrapped around frequently fired circuits of neurons is what leads to amazing skill in humans.  The key ingredients are ignition (getting someone excited about something), passion (maintaining that excitement), and deep practice (focus on finding mistakes and correcting them).  The book is more interesting than those two sentences make it sound.  It was interesting enough for me to think of how we could apply some of the concepts to Computer Science.

This book reinforced three key sayings that resonate with me,
(1) Race to the problem,
(2) No one is perfect,
and  (3) Why should we care?

In research, if things are going smoothly then you are not challenging yourself, your advisor, your advisees, or your collaborators.  The easy work is tempting to continue because it is comfortable.  The only way to make progress is to “race to the problem”.  I cannot recall who told this to me, but it was probably one of my advisors (Jeanne Ferrante and Larry Carter).  In research, we want to “race to the problem” because solving problems is how we make progress.  Once you solve one problem, you find a whole host of interesting new problems to solve.  (Theoretically after writing up the solution to the last one of course!)

In “The Talent Code”, Daniel Coyle illustrates “deep practice” with many ad hoc examples, but many of them involve training strategies where it is possible to make and correct mistakes quickly.  One concrete example was that of a flight simulator, where fortunately you can make mistakes without ACTUALLY killing yourself.  I also really liked the Bronte sisters example where they wrote little stories to each other for entertainment and apparently those stories weren’t that great.  In Computer Science, I think weekly reports, class papers, thesis proposals, workshop papers, and technical reports should provide a similar “simulator” for sharing ideas, making mistakes, and garnering feedback.

Making mistakes is the first step.  Admitting that you are not perfect and that you have made a mistake is even more important.  If we are perfect, then there is no room to grow, change, improve, or learn new stuff!  Tenure was put into place so that faculty could explore new areas of research, make new mistakes, and through those mistakes learn and share even more about their field.  Easier said than done.  It is difficult to admit when you have made a mistake.  And if someone tells a faculty member to admit they made a mistake?  Forget it!  The number one rule about faculty appears to be that we HATE being told what to do.

So we have covered “deep practice” in … well … depth.  What about ignition and passion?  Why should we care?  One example in the book was the KIPP (Knowledge is Power Program).  In this program, kids were told from day one that they were going to go to college, they just had to work hard to get there. These were underperforming kids from disadvantaged socio-economic environments.  The teachers also spent a lot of time on explicit and clear expectation setting drills: your binder must be held like this, you must stand in line like this, you will sit on the floor until you exhibit all expected behavior and earn a desk, the whole school would literally stop to address a single instance of misbehavior such as eye rolling, teasing, etc.  This combination of explicit behavior expectations, which of course led to many error correcting opportunities, and constant exposure to the concept of college (trips to colleges, naming classrooms after colleges, talking about colleges, discussing typical expectations of professors in college, etc) provided the students with deep practice and the ignition to maintain the passion for the deep practice.  The ignition that appeared most effective was having the students visit nearby and far away colleges to see what they were like.  Also talking with existing college students who were like them.  Hey, I can do that!

So how do we apply all of this to Computer Science?  I think that movements like code.org, hpcmatters, the beauty and joy of computing, along with many others are all working on creating sparks in the minds of people to ignite passion about Computer Science.  As faculty we can participate and lead outreach efforts to help with this as well (see The Chemistry Between High School Students and Computer Science at http://arxiv.org/abs/1406.2222 as an example). Whether it is a parent, teacher, relative, friend, or content on the internet that sparks the interest in someone about Computer Science, it is the responsibility of faculty in CS programs to foster that passion into a long-term life career.  How do we do it?  “The Talent Code” suggests master coaching.

“The Talent Code” discusses master coaching and provides examples of such coaching.  In master coaching, there is a focus on what each individual needs, providing clear and speedy feedback, and not spending much time on praise or admonishment.  The goal should be on fostering the passion and continual improvement of the skills needed to excel.  The idea of providing explicit and speedy feedback also played a prominent role in a research report released by the AAUW (American Association of University Women) in 2010 “Why So Few? Women in Science, Technology, Engineering and Mathematics” (http://www.aauw.org/research/why-so-few/) that suggested faculty "create clear criteria for success and transparency” to improve CS courses for all, but especially for those from underrepresented groups.  

For fostering passion, we can find opportunities for students to be creative in their projects.  Just this past Spring (2015), I found that most of my compiler students really enjoyed video taping demos on their MeggyJr devices that exhibited features they had just implemented in their compilers.  It also helped build community when we took 5 minutes out of class after every assignment to share the cool things groups had come up with.  For providing clear guidelines, we can insist on agile-like development strategies (revision control, working with partners, test-driven development, etc) whether we are teaching project and/or theory courses.  Just as important, we can really listen to student feedback and actually modify our teaching methods and courses thus modeling the willingness to continuously improvement that we expect from students.

As to my own passion for continual improvement, I am hoping that blogging will provide a “simulator” for expressing technical concepts and ideas with feedback from comments pointing to mistakes and flaws that can be honed in later posts and papers.  Constructive and civil feedback is a gift.  I would like to thank all the students, advisors, colleagues, anonymous reviewers, online commenters, and loved ones who have provided such feedback in the past and for feedback in the years to come!

Friday, June 5, 2015

Magic Incantation for "configure: error: Can't find gmp library."

I was trying to install cloog-0.18.3 on my Mac, which I had just upgraded to Yosemite (10.10.3).  I started the process by installing gmp-6.0.0.  Then during the configure process, I kept getting the following error:

configure: error: Can't find gmp library.

Using the config.log, I extracted the C program and the compile command that configure was using to determine it couldn’t link with the gmp library.  Here is a stripped down version of the command:

gcc -o conftest -O3 -I/usr/include -L/usr/lib conftest.c -lgmp -v

Sure enough, even though static and dynamic libraries for gmp (libgmp.a and libgmp.dylib) were in /usr/lib/, the conftest was not compiling.  Baffled I did some brain storming with my resident expert. His google-fu is strong, and he found the following at GitHub (https://github.com/Homebrew/homebrew/issues/35203).

The magic incantation that fixed the problem was the following:

xcode-select --install

My guess is that my autoconf tools were out-of-date or something.  It works, I am moving on.  I would be happy to hear from others what the real reason probably was.