Skip to main content

Code Review

I have been programming in support of my work (research and teaching) for over four decades now. I started in APL, then move very briefly to C and then for a while in C++. A lot of the C++ concepts have stayed with me in terms of programming style, but I then moved to interpreted languages for a number of reasons, first to Perl and now to Python for decades.

Python allows me to at least try to write elegant code and appeals to me aesthetically, although as time goes by I do tend to focus more and more on C++ concepts of interface design, hiding implementations, test-driven development and programming by contract. (Java came along later to these things and I never warmed to Java.)

Now that my retirement is in sight (I'm about 80% of the way through my career) I've been trying to articulate my programming style. I want programs to be correct but also demonstrably correct; clarity and programming by contract are more and more at the forefront of my mind.

For the last few years an on-and-off-again-and-on project has been to develop a framework for reviewing projects that are complete, revising them to expose any logic flaws, and to make them work clearly and not just work. Toward that end I've been working on some automatic diagnostic reporting that I've not currently seen in commercial tools, very idiosyncratic stuff. I've given a talk or two over the years about identifying with group theory classes that should be extracted from an implementation, etc.

It's engrossing, then I tire of it, then I start thinking about it again intensely with a new perspective.

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...

Accountability

Mathematics as a discipline teaches accountability. Every claim, whether it be a computation result or a statement (theorem) about how things work is accountable. We teach this accountability developmentally, with lower expectations at the beginning, and sometimes folk who study mathematics casually don't understand this. In my multivariable calculus classes, which I teach most frequently, I usually phrase my expectations as "give me a reason to believe your answer", citing my time working at an investment bank where my recommendations had financial repercussions and my supervisor never took my word for anything. In higher-level mathematics classes such as Abstract Algebra or Analysis I can be more explicit: these are the things we all agree to assume, these are the proof techniques which we understand; can you make an argument that convinces the community who have accepted those axioms and rules of inference that what you claim is true? We work hard to remove the ego fro...

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...