Posts in 'code'

Why Mixing Spaces and Tabs IS a Big Deal

Reading Reddit comments about How terrible code gets written by perfectly sane people when I read this comment:

mixed spaces/tabs for indentation

Is this a joke? I've been programming professionally from 2008 and I've not yet found an actual case where this was an actual problem. The ...

O "Unit" de "Unit Tests"

Existem vários artigos sobre os "testes de unidade" e alguns até falando de "a unidade dos testes"; todos estes estão errados e é preciso parar de falar dessa forma.

Python 2 + 3 = Six

"Six" é uma pequena biblioteca Python que pode ajudar você a passar o seu código de Python 2 para Python 3.

Mocking A Mock

Mocks are an important part of testing, but learn how to properly mock stuff.

When I Used PEP8 To Fuck Up Code

We "inherited" some Python code recently. Although another team was working on it, we now should support it and keep it going. The previous team at least tried to use Pylint and follow PEP8. And I say "tried" because their pylintrc has a couple of exceptions [1] and their PEP8 ...

The Unit in "Unit Tests"

In the last month, I heard a lot about the "'unit' in 'unit test'", as in "the unit being tested". If you do that, stop.

The thing about "unit tests" is not that they are "tests for a system unit" but that "the test must be a unit" -- in other ...

Couchbase Example and REST

Let me start this by pointing that I'm a RESTnazi: I'm the kind of guy that will get into a fight with anyone that says things like "Ok, that's because this is just REST, not RESTful" because... well, because, there is no diference between REST and RESTful ...

The Day I Found My Old Code

Found a piece of code I wrote 2 years ago, following a lot of linters. I'm amazed how readable the code still is.