Blog
Hello 👋 I'm Ken. I love writing and editing, as well as reading a variety of books not only from Technology but also from Social Sciences, Neuroscience, and History. These blog posts are mostly about Technology, Health & Well-being, and about our society.
In Ruby, there is a way to swap values of two different variables without using temporary variables. Let's say there are two variables that we'd like to swap. …
In Ruby, there is a [] (brackets) operator to access items in Array. https://ruby-doc.org/core-3.1.2/Array.html#method-i-5B-5D You can pass [start, length] to …
In Ruby, it is prefered to use << (shovel operator) over += (plus operator) to modify strings. The difference is that the shovel operator alter the original st…
In Rust, there are a couple of ways to initialize Vector. Vec::new() Vec::new() returns an empty vector. You can initialize a new empty vector and then pushing…
In Rust, tuples can be used to have different types of values as a container. Array does not allow you to have different types of elements instead. When Tuple …
In Rust, integers can be wrapped to avoid panicking during runtime. Checking operations Let's think the following example. The following source code panicks, b…