Article List

Understand What You Want

Understand What You Want - cover image

August 28, 2019

When I was a kid, I liked a few things. I enjoyed reading and even read with a flashlight under the blanket. My other poison was Lego kits, which I didn’t have many, but enjoyed building things a lot. Then, I fell for computers. From playing games, through deleting Windows 3.11 and formatting the hard drive, to programming with Basic and on.

It seems that my mother made me love reading by slipping in books I would love. Most of the times I recall it worked, and I would spend hours with a book.

So after reading Harry Harrison’s Stainless Steel Rat about the genius intergalactic criminal James diGriz I became obsessed with being a hacker. I didn’t really know what it would mean to be a hacker for real, but this guy seemed to be smart, cunning, adventurous, and fun.

Women loved him. He got the money and tricked the most advanced security systems and even government institutions. He was strong and courageous, full of life.

Sounds quite fun, right?

Declarativity Comes at a Price

July 2, 2017

There is a widely held opinion, which I usually support, that declarative code is "better" than imperative. It is less error-prone, usually much more eloquent and neat, and hence more maintainable. It is a good principle to follow on a day-to-day basis when you use existing declarative tools or libraries, like JS standard Array methods, or lodash, or React.

However, when it comes to deciding to either write some declarative, and therefore more generalized code, or just leave an imperative solution, I suggest thinking at least twice.

Would you agree that declarative isn't necessarily better than imperative?

Array.splice Error Pattern

February 9, 2016

Imagine you’re writing an algorithm that performs looping over an array with any type of pointer (for or while loop, forEach, map, etc). Each iteration the pointer moves in any direction, but you never force it to come back in most cases. Why should you, after all?

This mode of manipulating data is so usual that you probably have never thought about how liable it is to causing hard-to-find bugs, which lead you towards tiresome debugging!

How you should and should not mutate an array within a loop