Unit-testing: best practices

I have unit-tested my code for many years.

While building a GIS-system, we really cared about our product quality. Our users’ needs demanded the app to work properly. I had all critical and/or complex parts of code 100% test-covered, with multiple paths and corner cases. It was such a pleasure to find a bug, fix it, write a couple of tests for this surprise scenario, and be sure it won’t break again. Ah, good times.

Continue reading “Unit-testing: best practices”

Little Geo Stories: Square Miles

How I sensed a bug while not seeing any, and what came of it.

Dear reader,

Today I found a place on our website where we display the size of a recreational area in square kilometers.

199 km²

I cannot fully explain what happened next, but I had a hunch something must be wrong with this feature.

Narrator: there was.

Continue reading “Little Geo Stories: Square Miles”

Modularization and dependency management: three steps to better code

If you ask me, what’s a single most important thing in writing good code, I’d reply: “Modularization and Dependency Management”.

Well, actually, that’s two things. Sorry about that! But they are two sides of the same coin, and you can’t have one without the other, if you want to your code to be nice and clean.

Continue reading “Modularization and dependency management: three steps to better code”

Prioritization for Perfectionists, or: How I Learned to Stop Worrying and Love the Non-Perfection

Are you a perfectionist? That kind of a person that can never say “I’m done”, “it’s ready” or “let’s ship it”? The one who can’t release the new feature unless it’s polished and perfect?

Continue reading “Prioritization for Perfectionists, or: How I Learned to Stop Worrying and Love the Non-Perfection”

Design your code for readability

So, how do you usually code?

You have a task: add this thing to that place. First thing you do – you find where “that place” is and how to get “this thing”. To do it, you read the code.
Reading happens every time you need to do something, doesn’t it? If something doesn’t work, or you need to optimize it, or add one more tiny thing, you search for the place in the code and read it again. And again.