Let’s continue our exploration of Python’s magic methods in this second part of the series. This part will focus on numbers and containers, i.e., collections. You can read the first part here. Container-related methods Python provides the usual containers, e.g., lists, sets, and dictionaries. You can use the following methods when you want to implement your own. Common methods Containers have a size. Python defines two methods to implement to return the number of items in a con
Java was the first language I used professionally and is the scale by which I measure other languages I learned afterward. It’s an OOP statically-typed language. Hence, Python feels a bit weird because of its dynamic typing approach. For example, Object offers methods equals(), hashCode(), and toString(). Because all other classes inherit from Object, directly or indirectly, all objects have these methods by definition. Conversely, Python was not initially built on OOP principles and is
This is the 3rd post in the Start Rust focus series. To continue building my understanding of Rust, I searched for some simple Rust exercises. Hence, I dedicated my weekly personal work time to the Rustling exercises. There will be two posts dedicated to Rustlings. The reason for that is that it contains many (many!) exercises. Besides, I need to learn about the more advanced themes such as threading.
This is the 1st post in the Start Rust focus series. It all started with an informal chat with my friend Anthony. We were talking about languages, and I said that I preferred compiled ones. He then went on to mention Rust. We admitted that we were too afraid to learn it because of its perceived complexity. After the chat, I thought about it, and I wondered why I didn’t check by myself. I did. And I became interested.
When I started my career, books with titles such as 'Teach Yourself C in 21 Days', and 'Learn Java in 7 Days' were pretty popular. I was impressed that people could read such books. I never thought I could learn a new language in such a small amount of time myself. Time has passed. I’ve come to realize that I’m not alone in that case. Those books just happen to stretch the definition of learning a new programming language - and I’m being polite. In this post, I’d like to d