Category Archives: why

A New Year and A Familiar Subject

Published by:

New Year’s Day. The start of a new year… And for those of us in higher-education, the start of a new term. Like most people who teach, the first few weeks of January involve the frantic rush of getting ready to teach the Spring courses. If you’re lucky, they are courses that you have the material all configured and ready to dump back onto your employer’s learning management system. But it’s not that way for me right now as I find myself getting ready to teach Software Engineering again after some time away from the subject. So, the gap between Christmas and the start of classes is filled with reviewing the course texts, editing slide decks, and updating syllabi.

The past few days have been reading days. And I found an interesting article in the Janurary 2014 edition of the Communications of the ACM discussing estimation in agile processes <link>. Software developers who become vocal agile proponents tend to look askance at estimation; thinking that estimation of a software project has some connection to complete definition of the requirements for a project. What is missed in this case is that you have introduced a disconnect between business and development aspects of a project.

Agile planning focuses on workflow: how to decide what to do over the next few increments of time and how to generate the most value in that time. In the CACM article, the author points out that is very different from the business requirement for estimation: generate the information required to determine what resources are required for a project. This is key, as most software projects are capitalized projects and some sort of connection between budgetary cycles and development plans are required.

This is an important point that is missed in instruction in agile development. Textbook discussions of agile planning focus on the workflow aspects and tend not to emphasize the connection to budgetary cycles and estimation. It’s an important point to remember when introducing novice practitioners to use of these techniques.


We’re back

Published by:

So, I’m back in the blogging business…

For about 10 years, my web site and blog were hosted by a small web hosting provider based in Germany. They always came across as being a bit dodgy but kept their servers running, provided me the base service I needed, and generally stayed out of the way.

Well, finally the excrement hit the oscillating device and we had a bit of a tiff over billing; they charged my card the annual renewal, turned off my access, and tried to screw me out of the refund. Sadly, it ended up with the overseas outfit locking down my old domain and refusing to provide me the transfer code.

At this point, I’ve now switched over to the one of the large web-hosting providers and moved over enough of my content to get back on my feet. I’m still restoring content from my old blog and well be adding stuff over time. In the meantime, enjoy!


Talk to me about being effective, not being efficient

Published by:

In the course of finishing up the dissertation, I’ve been reminded about that old argument between being effective vs. being efficient. Like just about every graduate student, I was getting the “work harder, work faster” speech from my committee chair. A large part of those diatribes involved discussions about being more efficient in my work and dealing with adjusting the focus knob.

Here’s how the words are defined by

Effective (adj.): Adequate to accomplish a purpose; producing the intended or expected result.

Efficient (adj.): Performing or functioning in the best possible manner with the least waste of time and effort.

Getting my head clear about the difference between these two things has been one of major roadblocks towards finishing my dissertation. I’ve become quite efficient about doing the things I’ve needed to do to get through the last semester but most of what I’ve been doing hasn’t been very effective  in moving me towards finishing.

So, how to break the pattern? It varies from person to person but I started with a  two step plan. First, keep track of what you do during the day. This is something some people do without thinking… I’m not one of those people and a I think I’m a member of the majority in that regard. The result is that I find myself becoming very interrupt-driven. I quickly noticed just how scatter-shot my time had become.

Second, do some “post-mortem” (and “after-death” is the right term here given how my advisor wants to shoot me) and look at how you spend your time after a few days of tracking your work. Then, prune and watch what you do.


The C++11 standard and C++ as a teaching language

Published by:

The C++ Standards Committee recently published the 2011 update to the language standard with a large body of new features. Looking over some of the changes got me thinking again about my experiences as a software developer using the language and as an instructor teaching others how to use C++. And I’m not certain that the changes in the standard bodes well for the use of C++ as a teaching language.

A Historical Perspective

Like many who were first introduced to computers in the late 1970s and early 1980s, I learned how to hack using BASIC and assembly language, how to program using Pascal, and finally understood computer science when I grokked LISP and Smalltalk in my first run at graduate school. My introduction to C was in the late 1980s while learning to become a UNIX system administrator while working on my Master degree and C++ in my first real job writing point-of-sale software. So,like most people in my generation I’m not a native C++ speaker; most of the time I’m really thinking in C.

So, why comment now?

Part of my Ph.D. experience has involved working as a part-time instructor in our undergraduate program. Our department is very old-school in many ways; one of which is that we use C++ as our primary teaching language. And we teach C++ exactly as I learned the language 20 years ago in that we first teach imperative programming using the language as more fancy version of C and then we teach the object-oriented features. In other words, for the student’s first three or four semester we teach them that “C++ is just a better C compiler” and then dump object orientation on them when they have to also struggle with all of the theory of data structures. This brings us back to some of the features in the new language standard and how people who are taught to program in C++ in this traditional manner will never think to use them.

So what are some of these features?

Danny Kalev is a tech blogger and consultant who served on the C++ standard committee who recently posted a blog (here) that highlighted what he considered to be important new features of the standard. Let’s take a look at a few of those features from a teaching standpoint.

Null pointers

One of the big problems with not only C++ but also C is the way one dealt with concept of null pointers. From day 1 in both languages, the concept has been that machine addresses were represented by an integral subtype with value of 0 indicating an invalid null address. This lead to many issues in programs with people being caviler about treating the integer value of zero as being the same as indicating a NULL pointer. You have to be diligent in teaching people the difference between the two concepts and how to avoid the problems that are introduced by this convention.

So the convention developed that you would define a preprocessor value called “NULL” that you set to zero to indicate you were working with a null pointer value. Eventually this macro was incorporated in the set of headers mandated by the standard. Consider an example from Kalev’s post:

void f(int); //#1
void f(char *);//#2
f(0); //which f is called?

In both cases, very dangerous as the compiler can’t figure out which version of the overloaded function to call. Now think how to explain this concept to a neophyte programmer just learning about concepts of machine addresses, pointers, and overloaded functions.

So, the language standard introduces the concept of “nullptr”. For example, the nastiness from Kalev’s example becomes:

void f(int); //#1
void f(char *);//#2
f(nullptr) //unambiguous, calls #2

A glorious and wonderful thing for the language and a feature that will help teaching. But a good illustration of the problems that exist in teaching C++ to new programmers.

Delegating constructors

Object orientation is one of most difficult aspects of instructing people in programing C++. The idiosyncrasies of constructors and destructors are bad enough as currently defined but the new standard is adding more complexity to the issue. For instance, the C++11 standard permits the use of delegation in constructors. Again, we consider an example from Kalev’s post:

class M //C++11 delegating constructors
 int x, y;
 char *p;
 M(int v) : x(v), y(0),  p(new char [MAX])  {} //#1 target
 M(): M(0) {cout&lt&lt"delegating ctor"}


At last, we can now safely call other constructors, an excellent idea from an object-theroetical standpoint. However, the entire chain of teaching constructors becomes far more difficult with this feature.

Lambda expressions

The new standard adds the concept of lambda expressions to the language. A lambda expression lets you define functions locally at the place of the call to the function. In C++, this helps reduce some of the security risks that function objects incur in the language. Consider the following example from Kalev’s post:

int main()
   char s[]="Hello World!";
   int Uppercase = 0; //modified by the lambda
   for_each(s, s+sizeof(s), [&Uppercase] (char c) {
    if (isupper(c))
 cout&lt&lt"Uppercase&lt&lt" uppercase letters in: "&lt&lts&lt<endl;

In this case, we see an example of a lambda expression in the for_each construct where the Uppercase lambda expression defines a C++ expression for switching text to uppercase. Note the general form of the lambda expression

[capture](parameters)-&gtreturn-type   {body}

We see two pedagogical problems from this example: (1) the for_each construct is one that isn’t taught very well when you are inspired by the “C++ as better C” viewpoint of teaching, and (2) more critical, the entire concept of lambda expressions is one that you would not be able to teach until you have developed rather strong fundamental conceptual understanding of language design principles. Thus, not something easily taught to beginning programmers. In most undergraduate computer science programs, it’s a concept not taught until your third or fourth year in the program.

OK, how do we tie all of these thoughts together?

For me, the new standard makes the use of C++ as a teaching language even more problematic. Many of the concepts being added to the language to make it safer and cleaner make it more it more difficult and dangerous to use as a teaching language. Furthermore, it becomes even more problematic if your program is traditional and uses the “C++ as better C compiler” approach to teaching students just starting in their study of computer science.

Closing thought: C++ not a good teaching language

If we begin from the premise of C++ as being less than suited as a teaching language and becoming even more so with the introduction of the revised standard, what then should we use as a teaching language for new programmers? In my recent travels in search of a teaching position, it’s been my observation that many programs have switched to Java and C# as alternatives. These languages suffer from many of the same issues of C++. I’m beginning more and more to believe much as the teaching staff does as CMU and we should be teaching using languages such as Python.



Danny Kalev: The Biggest Changes in C++11 (and Why You Should Care)

Robert Harper: Teaching FP to Freshmen

Enhanced by Zemanta

A rave on the scholarship of learning

Published by:

We believe the time has come to move beyond the tired old “teaching versus research” debate and give the familiar and honorable term “scholarship” a broader, more capacious meaning, one that brings legitimacy to the full scope of academic work. Surely, scholarship means engaging in original research. But the work of the scholar also means stepping back from one’s investigation, looking for connections, building bridges between theory and practice, and communicating one’s knowledge effectively to students.
—E. L. Boyer, 1990

A classmate from graduate school was recently hired to teach at a small teaching-oriented institution in the Midwest. Like many newly-minted Ph.Ds, he is now finding that he’s being asked to think more about the metaphysics of teaching rather than worrying about how to teach people how to program. This person asked my opinions on the following “meta-questions” about teaching:

  1. How would you define excellence in teaching?
  2. How would you define the scholarship of teaching?
  3. How do these concepts tie together?

They’re all very open-ended and difficult to answer. Note that the following responses are slanted towards my opinions on the subject and may differ from accepted norms. Standard disclaimers apply; your mileage may vary…

These terms are rather well defined amongst professional educators (by which I mean people who get the “Ed.D” degree from a Department of Education who are experts in the theory of teaching). Look at some of the information that you can find on the website for the “Carnegie Foundation for the Advancement of Teaching” (yes, the same Andrew Carnegie who founded what is now US Steel Corp. and was one of the principal benefactors of Carnegie-Mellon University, go lookup his bio on Wikipedia).

The Carnegie Foundation defines “scholarship in teaching” in three parts:

  1. Scholarship of discovery: research and performance that adds to a knowledge base and the intellectual climate of an institution
  2. Scholarship of integration: drawing together and interpreting diverse kinds of knowledge
  3. Scholarship of application: applying knowledge to practical problems

Working from those definitions, you can define excellence in teaching by measuring, preferably in a quantifiable manner, how well an individual working within a program or a program in an educational institution addresses each of these areas. This is the equivalent of business planning in industry; you must define a set of objectives that you put in place to address these concerns and a set of goals that you must achieve to meet those objectives. Then a set of quantifiable measures are put in place that define whether or not you achieved the goals you have set for yourself.

In a perfect world, an institution’s policies, practices, and infrastructure are aligned with these goals. An institution has to evaluate anything it does against the measures it has put in place for itself and adjust, enhance, eliminate, and/or introduce polices, practices, and structures as required.

These are interesting questions that deserve further thought and ruminations. Look for more posts from me on this subject in the near future.