This is my third attempt to get myself to learn a programming language. The first time I tried it was through Harvard’s edX Computer Science Course, but as I was already enrolled in 5 other classes I couldn’t really get into it. The next time was an Introductory Programming course taught by the head of Geneseo’s Computing and Information technology department, but I had senior-itis and the course was geared towards Physics majors, so again it didn’t take. I hope the third time’s the charm, I really like Code Academy and it’s helpful that I can structure the lessons myself. While I worked my way through the lessons I really kept thinking about one feature of linguistics and how it relates to coding: recursion.
The term has popped up before as the key feature of language that enables the production of a discrete infinity of sentence possibilities. We cycle through our lexicon and combine words and syntax structure we know, but the recombinations are always unique. In programming it allows us to call back functions we’ve already used and apply them to new concepts. On the micro-level this allows us to create things like the ‘pyg latin generator’ in Code Academy’s python tutorial. We create the function that can translate a word into pig latin and then we can call it back to put any word we want in it. I can’t really comprehend the type of code big data companies must be writing, but I can imagine how instrumental recursion must be to them. Possible (and simplistic) example: every time you publish a Yelp review of a cafe, their code takes all of the other reviews given to that cafe and adds yours to the average, and the same type of process would happen for every review you post at any other cafe making it easy for them to assign aggregate scores to businesses. Ultimately, if we did not have recursion we would not be able to automate code, or at least our pattern matching would be far less efficient. However, despite all the praise I’ve heaped on recursion, I do have an issue with the term itself. We don’t only use it to bring back old code, we always add something new to it. Otherwise, there would be no reason to go back in the first place.
- Model Checking: Wing’s explanation of model checking as a system we can use across disciplines and professions was very interesting. When she explained it with the ATM metaphor I felt like I really understood it. Machines have two inputs, one being the hardware finite state (the physical ATM) and the software or temporal logic property (being able to get my money). Bugs in the system itself (money doesn’t come out) are the counter examples. However, I feel like her use of the ‘counter example’ doesn’t cover a wide enough range of externalities related to the system. Model checking, in my understanding of it, wouldn’t account for how the ATM has affected the way we carry (less) paper money or a robber stealing your money at an ATM. They aren’t flaws in the model, but they wouldn’t exist without it.
- This is more of a public statement: I f anyone has made it to the end of this post, I’m going to try and code for an hour every other day so I can finally learn a programming language. If you see me around ask me if I’ve been keeping up with Python and if I haven’t feel free to hit me.