Friday, March 30, 2018

smells and stamps

On Monday night I saw Clint Edmonson speak at that Saint Louis .NET User Group on code smells. Consistent with a format that that Saint Louis .NET User Group seems to have adopted just this year, there was a lightning talk before the real show began and this time around an Alan Barasch gave us a PowerPoint presentation on his stamp collection. Before Alan got started, the powers that be asked the audience "Who likes the new format?" (paraphrasing not verbatim) with the lightning talk lead-in and I did NOT put my hand up, and then once Alan got started with his stamps I was kinda rolling my eyes and thinking "Fast Forward!" but the surprise of the night was that he ended up having the better of the two talks. A lot of the "great names" of computer science have been honored on stamps either in the U.S. or elsewhere and so there was a little bit of history on the "great names" of which I had not heard of quite a few. Charles Babbage was credited by Alan has having invented the first computer in the 19th century. Herman Hollerith did some punchcard (or is it punched card or punch card?) programming for the 1890 U.S. census. Jack St. Clair Kilby created the first integrated circuit (microchip). John von Neumann was a pioneer in quantum mechanics (mathematical descriptions of motions, the codification of an act of science) and I think Alan associated CRTs (cathode ray tube) with him though my own notes are a little fuzzy. Alan suggested Rear Admiral Grace Hopper was really the first coder and certainly I had heard of her before. The rumor or reality that the term "debugging" comes from her literally removing the corpses of insects that had flown into machines to get some big apparatus full of vacuum tubes to run better was my prior understanding of her place in history. Tom Watson of IBM and Alan Turing were also namedropped and I had heard of them. Jack Saint, Jon Von, Babs, and Holly were all new for me. The Clint Edmonson talk went through a list of common smells. Don't write your own gunk to empower a semaphore, a mutex, or a critical section. Going there smells of NIH (not invented here) syndrome in which a developer doesn't trust anything third party. Beware of marathon methods. The longer a method is the more likely it is to break with the DRY principal. And so on... Two new terms (new for me) that were namedropped along the way in the talk were CRC and PDL. CRC would be class/responsibility/collaborators and you would make CRC cards, literally index cards that you would scribble on with a sharpie or whatever, in the name of some in-house documentation in the name of preventing marathon methods. One card per one class would be the way the cards would take shape I suppose. For a class you would list, you guessed it, the class, the responsibility, and the collaborators. Clint mentioned CRC cards as if remember something he had not seen in years. PDL is program description language and this takes shape in writing comments on what a method should do before you fill in the method with what it should do. Again, this is to prevent marathon methods. I am NOT suggesting PDL is recommended.

No comments:

Post a Comment