Python learning

Python "magic" methods - part 2

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

Python learning

Python "magic" methods - part 1

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

Rust exercises practice learning beginners

The Rustlings exercises - part 1

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.

programming language learning

On learning a new programming language

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