Skip to main content

Test-Driven Development

I enjoy programming and I find that the projects that I program directly support my mathematical interests. I first programmed seriously to generate examples for conjectures that I proved in my dissertation.  It's been 35 years and I still turn to programming to surpass what I can do with paper and pencil.

For most of that time I have been influenced by a methodology known as Test-Driven Development. For ill-defined or non-obvious problems, it can be difficult to articulate what parts or all of a program should do. It becomes difficult to see a path forward, and you never really know if what you are doing is correct when correct itself is ill-defined.

My understanding of TDD is that for parts and wholes of programs, I start my articulating what I want to achieve and then write a clear-cut test that tells me if I succeeded. Then and only then do I try to write code that will accomplish that goal. Goal first, supporting work second.

Almost all of my programming has been with Object-Oriented Programming, where self-contained pieces of data are implemented together with the actions that are performed with the data, forming nice modular separation.  The languages that I use have been OOP languages all these year.

I think it has only been in the past few years that I have started focusing intently on a cleaner separation between the objects, really making a clear distinction between the interface of an object (its behavior in relation to other objects) and how that behavior is implemented.

One of the joys of my career has been identifying certain areas where I can know with certainty that I have gotten better; teaching, service, leadership from time to time, ombuds work. In programming I do believe that I write code better and better with each passing year. Health permitting, I will probably continue programming long after I stop teaching.

Comments

Popular posts from this blog

Betrayal

I caught a student cheating on a final exam this morning. I had a line of sight on them and watched for ten minutes as they took their cellphone out of their pocket, kept it below their table, typed into it, read it, put it away, then wrote on the exam, repeating this cycle over and over again.  I was a bit surprised as the exam was open notes but this student had not attended many of our classes, just stopping by for exams, and I conjecture that they had no notes to open. I confronted the student who admitted that they had done wrong in an inarticulate non-confessional way. By the afternoon they had signed off on the honor code violation report to avoid further investigation and possible sanctions beyond failing the exam.  Is anger the right emotion to feel now? I had a working relationship with the student, although they had not contributed much to it. They had deceived me in order to gain unwarranted advantage over their peers in the class and that is not right. I don't wan...

Momentum

In my youth my primary social justice commitment was through Amnesty International. As an affluent white male I enjoyed freedoms that I thought ideally everyone should share; in the 1980's we had had the vine of United States support for repressive regimes that were nominally anti-Communist bearing cruel fruit and I in my small part of the world wanted to do something about that.  It was a more active support Amnesty International sought back then; nowadays they just ask me for money. We members were encouraged to write to foreign government officials to urge them to take care of political prisoners that we named, the idea being that as long as they knew that they were seen the cruelty would diminish. One letter per prisoner, because they were all human beings, not just a faceless group. I have no independent way of verifying if the hundreds of letters I wrote eased any suffering; I know that they changed me. Selfishly I am grateful. At the time I made a point of reading journalism...

Holiday Break

I have been teaching for 37 years now, and I go through many of the same things at the end of the Fall semester each year. There is relief at the completion of a significant task (teaching each of my classes) but there is a good deal of physical and mental weariness and aches. I could sleep for several days straight if not for my sleep disorder. By and large my mind is not very sharp and as an introvert I try to be pleasant with loved ones but am not outgoing at all. With age the feeling of being drained deepens in more and more ways. Of course this is when we have, almost every year, taken a road trip to visit birth families in the Northeast, a full day of driving each way, often involving winter weather far worse than what we are accustomed to in NC. I love my birth family members as well but as with my created family I am weary and not very outgoing. The conversation is rarely about me and my day-to-day life but rather about younger family members and family friends that I do not kn...