I’ve self-taught myself a lot of programming languages over the years. Yes, I kind of struggled with MS-BASIC back when I was in high school. Truth is, there wasn’t any readily accessible internet back in those days or tons of books on the subject that I could easily get. My “native language” was what I learned at Cal Poly: C++. Then, on the job, I taught myself Perl, Visual Basic, PHP, and JavaScript… because programming languages all use the same basic programming concepts. The true basics of Python were easy. But then there was a much more in-depth set of basics in Python that I had never been exposed to before:
- Iterables. They are more complex than just the basic for loop or while loop type arrays… there are a bunch of similar types of objects with their own methods and properties…
- Sets and Tuples. They felt like lists, but, they have their whole new type of handling. At first, I was confused, then later I had a deeper understanding that… you could get lost exploring a ton of sets and tuples features, usage, and…
- List Comprehension. Of course, I comprehend lists… at first, this made no sense: why would anybody write for loops in such a cryptic manner? Then while writing code blocks on Python on Hacker Rank, I kept running into performance issues. Its python: unlike C++ which is compiled, python is interpreted. So poor performance is just expected, right?! Nope: list comprehension is one of the Python performance hacks. That was an amazing light bulb moment.
- Exceptions. It was more than just the basic exception concepts that I was used to. There are many more handling options available to be used.
I really enjoyed learning all the exciting new features that Python brought to the table on Hacker Rank. My next goal will be putting together a Python Django project that I can share.