So, it happened again? I woke up this morning with a more eloquent solution to one of the homework problems. Yesterday, I had written this long solution that did what it was supposed to do, but just seemed to wordy and long to me. Essentially, I was bothered by the idea of having to type out several lines of code just to accommodate a variation, it seemed like there had to be another way to have a list – and there is!
When I got home from work I finished reading this (poorly written) primer on string syntax. I didn’t understand a lot of it the first time I read it and wanted to skip it. Instead, I looked up some of the topics in my books and online and then it made more sense when I re-read it.
My equation: good programmer does not equal good writer.
Lastly, I wrote the python program for the assignment. I noticed that one line of code was really long and didn’t wrap around the screen in Sublime but instead kept going. I thought this would be a simple fix, but again it seemed like there were a lot of opinions that contradicted each other. Any number of people were quoting the rules with no agreement. It seemed to me the choices were using a backslash or parenthesis, with the caveat to be very careful when using a backslash not to accidentally have a space. I chose the backslash because it just looked better to me. Plus, parenthesis always seem to connote that something is going on to me, and I was concerned that my code not look like it had anything else going on.
I was proud of my final program. It is very simple, but I also read today something akin to a Python manifesto and one of the maxims was something like “simple is best.”
Dogs seem to instinctively understand mornings and simplicity…