In software industry, there are things we've been doing for so long that we forget why we are doing them that way. They are so ingrained in our ways of working that it is difficult to think about other options. Or we can even see other options, but we're afraid they wouldn't work in our team, 'cuz they only fit that cool small company that uses Extreme Programming.
After moving from a feature branch approach to trunk based development (a.k.a. pushing directly to the main branch), I realised that using pull requests to review code is one of those things…
🇺🇸️ Este artigo foi originalmente escrito em inglês.
Conversando com outras pessoas desenvolvedoras de software — não importa se estás em um bar ou numa entrevista — é comum escutar b̶u̶z̶z̶words como boas práticas de engenharia, código limpo e reutilizável, software craftsmanship, etc. Todos nós queremos ser bons devs e escrever código que nos orgulhe.
🇧🇷 Estou orgulhosa deste código? Não. Tenho certeza que funciona? Não. Mas escrevi testes? Também não.
Uma dessas boas práticas de engenharia pode ser se estamos evitando duplicação desnecessária de código e, por sua vez, respeitando o princípio Don't Repeat Yourself (DRY). …
Applying engineering principles in code — just like everything we do — depends on a context. Good software engineers leave their personal preferences aside to make important decisions. We analyze the context and we refute absolute truths. We are critical enough to accept that there are things that will remain in articles and books we read because they don’t make sense to be applied in our day-to-day.
It’s the same logic for things that we normally see as bad practices and code smells: we shouldn’t judge them upfront.
“It’s easy to critique code in retrospect. That’s fine as long as…
🇧🇷 This article is also available in Portuguese.
When talking to other developers — no matter if you’re in a bar or in an interview — it’s common to hear b̶u̶z̶z̶words like good engineering practices, clean and reusable code, software craftsmanship, etc. We all want to be good developers and write code that makes us proud.
Those good practices can include whether we’re avoiding unnecessary code duplication and thus respecting the Don’t Repeat Yourself (DRY) principle. Or whether we’re writing idiomatic, meaningful, and readable code and thus respecting the Descriptive and Meaningful Phrases (DAMP) principle.
Product Engineer. Constantly delivering tested code. Using user’s shoes. Improving everyday.