As a way to keep myself in check, every now and again I take up a challenge to learn something new. A while back it was cooking. More recently it was improving my writing. Recently it's been learning modern programming.
I know how to program alright. I'm pretty good at C, comfortable with Objective-C, can write C++ in a jam. Java and Python look pretty straight forward to pick up. So after reading around for a bit, I found that the big new thing is Scala. Scala's big thing is that it is a fully-enabled functional programming language -- meaning that functions are "first-class citizens" -- i.e. you can pass functions in every way you can pass a variable. In functional programming languages the whole structure of coding changes so that you want to avoid thinking in terms of states, instead you should think in terms of operations. This is a big change, because if you're familiar with object oriented programming, you'll know that the whole idea is built around having states that you're keeping good track of.
Scala is also an object oriented language too, built on top of Java. Of course, I don't really know Java -- most importantly, all the standard libraries and classes. While this is considered a great feature of the language for most computer scientists, for me, it's a bit of a block trying to figure out what the Java-like object oriented syntax is doing at the same time as learning the truly bizarre looking functional programming.
I have to say that the functional aspects of the language are so bizarre and non-intuitive that I had to give up and go back to more back to more elementary concepts. I didn't know this beforehand, but there were two different types of paradigms for programming -- the Turing-style of state-ful programming that we're all familiar with and the Church-style which is what functional programming descends from. There's a whole mathematical branch of computer science called Lambda Calculus and Combinators that is required to really understand functional programming. And so I'm back at basics staring blankly at definitions and trying to decipher what they mean.
I definitely see progress and it's great because it's opening up whole new ways of thinking. But it gets me back to the start of feeling so comfortable with your knowledge because you're restricting yourself to a small playground. I feel like I'm 18 years old and in real analysis for the first time again and feel real stupid -- which is a good feeling to know that there are major intellectual challenges out there.
No comments:
Post a Comment