Longs, Original


In March 2021, I left the company and the project that I worked for 9 years. This is my goodbye message.

If I’m going to be completely honest, I never liked to read this kind of goodbye messages, but now that it’s my turn to go, I feel compelled to write something. Now more than ever when we cannot see each other face to face, I want to leave a few words to you. People seem to think that when we are going through this kind of transition, suddenly we are filled with a burst of wisdom and thus are more willing to hear us out.

I’ve been a part of Critical Software since 2012 and had my share of high and low moments, but overall I know this has been an invaluable experience. As our last CEO used to say, this company is a real “school of engineering“, for those that are willing to learn. It’s not because we are so much smarter than everyone else, but because we are willing to empower ourselves to experiment, learn and improve on the job.

In these 9 years I’ve only worked on one project, Verticalla‘s VisionCenter. I can affirm proudly that I’m in part responsible for it’s success. Nevertheless, even though I enjoyed very much the work I’ve done, upon some reflection I’ve come to the realization that what stays most fondly in my memory are the relationships I’ve built over the years.

Those who know me, are aware that I’m not very good at building and keeping such relationships but I’m grateful that some of you took the time and patience to get to know me and become more than mere co-workers. I advise everyone get to know the people that you work with and befriend them, even though some of them (like myself) are not very friendly. It will bring benefits not only to your personal life (it’s nice to have friends) but also to your work! When we like the ones we work with, we are (1) more available to listen to them and (2) to be more sympathetic to their shortcomings. This raises the levels of trust, which in turn increases productivity, morale, team work and overall happiness.

Some of the friends I’ve made at Critical Software, are no longer working there – like Nuno Sousa, Ricardo Guerra and Pedro Costa, my mentors – but many still are. Thank you Tiago Carregã for the chess games (I know I suck), Luisa Barbosa for telling me to shut up, Catarina Azevedo for the good mood in the office, Agne Pustovoitaite for the Lithuanian lessons, Paulo Silva for the music, Matt Brake for being very approachable

Also, from Sauter side, I really enjoyed working with Patrice Hell and Hartmut Melchin, both being top quality professionals. I cannot name you all but, thanks to Benjamim Cardoso, Carla Machado, Telmo Inácio, Jorge Ribeiro, Hugo Sousa, Ricardo Lamarão, Luís Silva, Nuno Alves, João Carloto, Braselina Sousa and so many others that had a good influence on me.

If you’re brave enough to say goodbye, life will reward you with a new hello

Paulo Coelho

So thank you all and goodbye!

As we’re approaching Easter, and this is one of the most important times of the year for a christian like me, I want also to leave you with some thoughts about Jesus and his resurrection.

  • Christianity is a fact-based religion and the resurrection is the most important of those facts.
  • If Jesus did not rise from the dead, then Christianity is false and life ends on the grave
    • There is no heaven or hell
    • There is no punishment for evil
    • There is no reward for good
    • Jesus’ death is just another death
  • If Jesus did rise from the dead, then Christianity is true and life does not end on the grave
    • There is hope of heaven
    • Evil will be punished
    • Good will be rewarded
    • Jesus’ death unlocks the door to eternal life

When we have assurance of the fact of the resurrection:

  • However bad things get in this life, heaven is secure for us.
  • We have peace over the death of our loved ones, because they are not gone forever.
  • Christ’s resurrection is the basis of the trust we have of our own resurrection. He conquered death.

In short, being sure that the resurrection really occurred, is of great importance. Don’t take my word for it. Check for yourselves!

If you do the research and find out I’m wrong, you just lost a bit of time.

If you do the research and find out I’m right, you also lost a bit of time but gained eternity.

Some resources to get you started:

Original, Shorts


I’ve been thinking about the stuff I depend upon to keep this blog, and in particular about link rot.

Most of the stuff I post here is sharing something I saw elsewhere.

I depend on other sites I link to to keep the links alive. I could mitigate this by always linking via the Wayback Machine, but I would also be dependent on them…

I depend on YouTube for the videos I share. I could copy and host them myself, but that would increase a LOT the cost of keeping all the stuff. I depend on Spotify for the songs I share. I could copy the audio and host them myself, but that might be considered a copyright violation.

And even for stuff I own and have a backup for, I depend on Flickr to keep my photos, on SoundCloud to keep my music, on GitHub to keep my code. The list goes on and on…

Dependence and trust. This is what makes the web go round.

Speaking of trust…

Should I go live in a cabin in the woods?

Longs, Original

Purpose in life

I believe in God. I’m a christian. For me, ultimate purpose and meaning in life comes through a relationship with the creator of the universe.

This he [man] tries in vain to fill with everything around him, seeking in things that are not there the help he cannot find in those that are, though none can help, since this infinite abyss can be filled only with an infinite and immutable object; in other words by God himself

Blaise Pascal – Pensées 425

You have made us for yourself, O Lord, and our hearts are restless until they rest in You

St. Augustine – Confessions Book I

Now this is eternal life: that they know you, the only true God, and Jesus Christ, whom you have sent.

Jesus – John’s gospel

Why does God gives life meaning and purpose?

First, if there is a creator, then I’m not the mere accidental by-product of nature, a result of matter plus time plus chance. There is a reason for my existence. If God does not exist, then both man and the universe are inevitably doomed to a meaningless death.

Second, if God exists, then it makes a difference how I live now. I have a reason to live a good life. If life ends at the grave does it really make a difference in the ultimate sense if I’m a good or a bad person?
Life ended in the same way for Gandhi and Mussolini. What’s the point then of doing good?

For me a life without God would be utterly meaningless and devoid of purpose. But simply knowing that fact wouldn’t change much if I had no reasons to believe it was true. Well is it? Or is it just wishful thinking?

Is God just a fairy tale?

I can give three lines of argument making the case that God really exists and christianity really is true. I won’t develop any of them but I encourage you to look into it. I’ll provide a starting point.

  • The universe had a beginning. It didn’t came from nothing, so there must be a transcendental cause. See this two part video from the christian philosopher William Lane Craig that provides an accessible explanation of this argument
  • There exists objective morality, that is some things are wrong regardless of what anyone thinks. The cause of this fact must be outside mankind.
    John Lennox is a Mathematician but also participates in many debates and lectures about the christian faith. In this video, the topic is “Does Morality Need God?”. There is about 50m of lecture and 30m of Q/A. I have never seen or read anything from Lennox that I didn’t like
  • The best explanation for what happened to Jesus is that he really was raised from the dead. Gary Habermas is the world’s top scholar on the resurrection hypothesis. This interview gives a taste of what scholarship says about that.

I could provide many more arguments to make my case but even if they all are sound and plausible we could always dismiss them.
The only thing that cannot be easily dismissed is a direct experience of God.
If God exists then he is capable of making himself known to you.

God exists. He is interested in you. We can know that because he has entered into creation to seek and to save us.

Search for Him. We weren’t able to reach him, but he made himself know through the person of Jesus.

When you find him, you’ll find the ultimate purpose of your life too!

Original, Shorts

How to be good at anything

3 ways to improve at anything

  1. Copy other stuff
    Find good stuff, study it and copy it
  2. Critically review your work
    After finishing something, review it and find it’s flaws
  3. Get a mentor
    Find someone that’s better than you and learn from him

Chick Corea was on to something

Original, Shorts

São Nicolau

Como é de conhecimento geral, a ideia do Pai Natal é construída a partir de uma figura histórica, o São Nicolau. O que nem todos sabem é que há uma história sobre o São Nicolau e o primeiro concílio ecuménico.

Em 325 AD, houve um encontro com uma maioria representativa dos bispos do mundo cristão, para discutir chamada arianismo, que estava a crescer em popularidade. Esta ideia, assim chamada por causa do seu fundador Ário, dizia que Jesus não era Deus, mas sim um semi-deus. Um ser criado pelo Deus verdadeiro, o Deus-Pai.

A história apresentada no site do São Nicolau conta que durante a discussão, enquanto Ário defendia a sua posição, Nicolau não aguentou ouvir tanta heresia que se levantou e deu uma bofetada na cara do seu oponente

A história mais tarde foi alterada para um murro em vez da bofetada. É possivelmente inventada, mas divertida, e deu origem a uns memes engraçados…

Longs, Original


Ontem estive a pensar sobre Deus. Mais concretamente a pergunta na minha mente era:

“Quem ou o que é Deus?”

Quando digo “Deus” ao que é que me refiro? Será que Deus é um conceito inteligível? Quando um ateu e um crente discutem sobre a existência de Deus, sobre o que é que estão a falar?

Considero esta pergunta importante porque precisamos de definir os nossos termos quando argumentamos contra ou a favor de algo.
Um ateu pode dar argumentos contra Deus, mas se para ele Deus for um tipo de extraterrestre extremamente poderoso que iniciou a vida humana, não vai afectar em nada a minha fé. O Deus que eu creio não é desse tipo.

Então que Deus é esse que eu creio? Que atributos tem ele? Dormi com esta pergunta em mente.

Quando acordei hoje de manhã, fui ler a bíblia. Na leitura sequencial do novo testamento que ando a fazer, o texto que li foi este:

Paulo, pondo-se diante deles no Areópago, falou-lhes assim: Gente de Atenas, vejo que são muito religiosos, pois ao passar pela cidade reparei em muitos altares,
um deles até com a inscrição – ‘Ao Deus desconhecido’. Afinal, têm andado a adorá-lo sem saber quem ele é, e por isso quero falar-vos agora acerca desse mesmo Deus.
Foi ele quem fez o mundo e tudo quanto nele há e, uma vez que é Senhor do céu e da Terra, não vive em templos feitos por mãos humanas;
e nem sequer precisa que seres humanos lhe façam seja o que for! Ele próprio é quem dá a todos a vida, o ar que respiramos e tudo o resto de que precisamos.
Criou toda a população do mundo a partir de um só homem e espalhou as nações pela face da Terra, fixando os tempos do mundo e os limites à vida dos homens na Terra.
E o que ele pretende é que o procurem e que se esforcem por encontrá-lo, embora não esteja longe de cada um de nós.
‘Pois nele vivemos, e nos movemos, e existimos’ Como disse outro dos vossos poetas, ‘somos de descendência divina’
Se isto é verdade, não devemos imaginar Deus como um ídolo que os homens fizeram de ouro, ou de prata, ou de pedra, pela sua arte e imaginação
Deus tem tolerado a ignorância do homem acerca destas coisas, mas agora ordena a todos, e em toda a parte, que se arrependam e o adorem só a ele.
Pois marcou um dia para julgar o mundo com justiça através do Homem que designou para isso. E deu a todos uma sólida razão para crerem nele, ressuscitando-o da morte.

Atos 17:22-30 Tradução O Livro

Mesmo a propósito! É o conhecido Sermão do Areópago!
Através deste texto é possível conhecer um pouco mais quem é o Deus que Paulo pregava, e por consequência, quem é o Deus dos cristãos.

  • Deus é o criador de todas as coisas
    • “Foi ele quem fez o mundo e tudo quanto nele há”
  • Deus é o dono de todas as coisas
    • “é Senhor do céu e da Terra”
  • Deus não está restringido a um só lugar
    • “não vive em templos feitos por mãos humanas”
  • Deus não precisa de nós
    • “nem sequer precisa que seres humanos lhe façam seja o que for”
  • Deus dá a vida
    • “Ele próprio é quem dá a todos a vida”
  • Deus dá a todos muitas benesses
    • “a todos a vida”, o ar que respiramos e tudo o resto de que precisamos”
  • Deus tem um papel activo na hisória humana
    • “espalhou as nações pela face da Terra”
  • Deus criou-me no Seculo XX em Portugal de propósito
    • “fixando os tempos do mundo e os limites à vida dos homens na Terra”
  • Deus pretende ser conhecido
    • “E o que ele pretende é que o procurem e que se esforcem por encontrá-lo”
  • Deus não está longe. É omnipresente
    • “embora não esteja longe de cada um de nós ‘Pois nele vivemos, e nos movemos, e existimos'”
  • Deus fez o ser humano de alguma forma semelhante a ele
    • “‘somos de descendência divina'” (outra tradução diz ‘somos da sua raça’)
  • Deus é paciente e tolerante
    • “Deus tem tolerado a ignorância do homem acerca destas coisas”
  • Deus é um ser moral. Preocupa-se com o bem e o mal
    • “mas agora ordena a todos, e em toda a parte, que se arrependam”
  • Deus exige ser o único objecto de adoração
    • “mas agora ordena a todos, e em toda a parte, que … o adorem só a ele.”
  • Deus vai um dia julgar o mundo
    • “Pois marcou um dia para julgar o mundo com justiça através do Homem que designou para isso”

Deus é a causa de tudo o que existe. Ele é auto-suficiente, não tem necessidade de nada.
O que poderíamos nós, criaturas limitadas no tempo e espaço dar a um Deus destes?
Ele trouxe todas as coisas à existência e logo todas as coisas são dele.
Ele é omnipresente, e pode sê-lo porque não é um ser material.

Deus criou o ser humano, e sustém a sua vida fazendo “nascer o seu sol sobre maus e bons” e “chover sobre justos e injustos”.
Ele faz cada pessoa intencionalmente. Não é por acaso que estamos vivos hoje, nas condições em que estamos.
De alguma forma, somos semelhantes a Deus. Não na nossa parte exterior, o nosso corpo, mas o que somos realmente tem características divinas.
Tal como Deus, temos uma mente dotada de livre-arbítrio, e temos capacidade de tomar decisões com valor moral.
Deus também é um ser moral. Ele é o arquétipo da bondade e perfeição. Ele importa-se com a injustiça que há no mundo e um dia vai julgá-la.
Ainda não o fez porque é paciente e quer que todos se arrependam e o reconheçam como Deus.

Este é o Deus que os cristãos (e também os judeus) acreditam.
E porque devo acreditar nele? Há razões para isso? Paulo também toca nesse ponto.

A pedra basilar do cristianismo é só uma. Se ela não for sólida todo o edifício cai.

“E deu a todos uma sólida razão para crerem nele, ressuscitando-o da morte”

Se Jesus ressuscitou dos mortos, então o cristianismo é verdade, caso contrário é mentira.
Há muitas outras boas razões para crer em Deus, mas esta é a principal.
Podia escrever muito sobre ela, mas fica para outra altura.

Longs, Original


For the last 8 years I have worked with .NET as my main development platform. When someone asked what is .NET I had some difficulty with having a clear response. So to get my ideas in order I wrote this.


.NET (pronounced “dot net”) is a free (as in beer), cross-platform (Windows, Linux, and macOS) and open-source framework for developing a variety of application models such as Web, Desktop or Mobile Apps, Games, Microservices, Machine Learning and IOT.NET is open source and under the .NET Foundation. The .NET Foundation is an independent organization to foster open development and collaboration around the .NET ecosystem.

What is .NET?

We can view the .NET framework from 3 different sides

The Platform

The platform is where your code runs, the runtime and the development tooling that comes with it like compilers
There are 4 main runtime implementations for .net:

  1. The old .NET Framework, that stopped new development, but will be supported as a component of the Windows OS (source)
  2. Mono, which is an open-source implementation of the .NET Framework
  3. .NET Core, which is the new open-source version of the .NET framework from Microsoft
  4. .NET Native for Universal Windows Platform

The last version of the .NET Framework will be 4.8 and of .NET Core will be 3.1. After this there will be only .NET, starting with version 5.

Programs written for .NET execute in a software environment (in contrast to a hardware environment) named the Common Language Runtime (CLR)
The CLR is an application virtual machine that provides services such as security (type safety, memory access,…), memory management (allocation, garbage collection, …), and exception handling.

The CLR runs software that is compiled to Intermediate Language (IL). Any language that compiles to IL, can be run in a .NET runtime.

The .NET compilers produce assemblies (files with the .dll extension) that contain executable code in the form of IL instructions, and symbolic information in the form of metadata.
Before it is executed, the IL code in an assembly is converted to processor-specific code by the CLR

The Libraries

All .NET implementations implement base set of APIs, which are called the .NET standard

If you write code that targets a .NET standard, it will be able to run in any runtime that supports it

Each implementation can also expose additional APIs that are specific to the operating systems it runs on.
For example, .NET Framework is a Windows-only .NET implementation that includes APIs for accessing the Windows Registry.

In addition to the .NET standard, we have NuGet, the default package manager and repository for .NET libraries, where we can find over 200 000 packages

The Languages

.NET supports multiple programming languages. The .NET implementations implement the Common Language Infrastructure (CLI), which among other things specifies a language-independent runtime and language interoperability.
This means that you choose any .NET language to build apps and services on .NET. The CLI is an ECMA standard (ECMA-335), a very interesting 500 page read.

You can write .NET apps in many languages, but the most used ones are C#, F#, and Visual Basic.

  • C# is object-oriented and type-safe programming language. Its now a standard in both ECMA and ISO (ECMA-334, ISO/IEC 23270)
  • F# is an open-source, functional programming language for .NET. It also includes object-oriented and imperative programming.
  • Visual Basic is object-oriented and type-safe but has an approachable syntax that uses more words than symbols

.NET Releases and Support (source)

.NET Core 3.0 shipped in September 2019, and .NET 5 is planned for November 2020. After that a major version of .NET is expected once a year, every November

There are 2 types of releases. Long Term Support (LTS) and Current. The even numbered ones will be LTS.

LTS releases are supported for three years after the initial release. Current releases are supported for three months after a subsequent Current or LTS release.
LTS releases will receive only critical and compatible fixes throughout their life-cycle. Current releases will receive these same fixes and will also be updated with compatible innovations and features.

Original, Shorts


I just read this article about the Gettier problem and found the concept pretty interesting. I have a few comments.

It might be true that even though I have a JTB about something I might be wrong. Nevertheless, I think It would be resonable to act upon a JTB as if it was true. For all practical purposes, it is true to the best of my knowledge. This does not mean I shun new information that might make me to change my JTB. And if having a JTB is not knowledge, what is? What can we know? We can always imagine a world where even our most firm JTB might be false.

If a JTB is not a good case to use the word knowledge I don’t know what is…

Original, Shorts

Powershell closures

As a follow up to the previous article, I needed to warn you (and me) about powershell closures. They didn’t work as i expected

$Foo = 1
Write-Host "I expect Foo to be 1: " $Foo

function New-Closure {
    param([Scriptblock] $Expression, $Foo = 2) 
    & $Expression

New-Closure -Expression {
    Write-Host "I expected Foo to be 1, but was 2: " $Foo

New-Closure -Expression {
    Write-Host "I expected Foo to be 1, and it is: " $Foo

The confusion point for me was that $Foo can be changed by the invoker, unless we add the .GetNewClosure().

As in the previous article the parameter name $ResourceGroupName is very common, it’s best to always use the .GetNewClosure() on the ScriptBlock

Original, Shorts

Execute an arbitrary piece of code with a temporary file uploaded to azure

A short one today.

My use case is to run a Set-AzureRmVMCustomScriptExtension command. For it to work i need the script to be somewhere accessible by the VM.

Nothing to fancy. Might be useful for someone (or a future version of me). It creates a temp container, uploads the file, invokes the code passing in the URI, and whatever happens the container will be deleted. Assumes a connection to azure and an already existing storage account.

Just to highlight an interesting point

“temp-container-” + (-join ((97..122) | Get-Random -Count 5 | % {[char]$_}))

Initially i just had “temp-container” but when running 2 times in a row I got an error saying that the container could not be created as it was being deleted. So I found a way to generate random letters and now it creates an “unique” container each time.

Longs, Original

How much logic is too much logic?

Today there was a small argument about constructors and how slim should they be.

In this post I will attempt to explain my position on it.

On a general note, we all agree that constructors should not do much. Nevertheless I affirm that it is acceptable and even useful in some cases, to have logic in them, given that some rules are respected.

In the remainder of this post I will refer to the logic in the constructors as simply “logic” but this can be:

  • Straightforward operations
  • Complex logic, or even
  • IO access

The main contention point is that constructors should not have operations that may throw. First I will review the arguments against it, and then give some arguments for it.

There were 4 lines of argument against having “logic” inside a constructor body

  1. Hard to trace exceptions/memory leaks
  2. Single responsibility
  3. Principle of least astonishment (POLA)
  4. Dependency injection for decoupling/testing purposes

On the point one, this is simply not true in most cases

The hard to trace exceptions only exist in cases that you don’t instantiate the class yourself and don’t have logging in place to see the stack trace. It’s really not applicable

The memory leaks traces back to c++ that can allocate memory for an object and never free it if there is an unhandled exception. In .net this is not applicable either because the language is garbage collected.

If there is no destructor and no object that needs to be disposed, this is no reason for not having logic in the constructor

On the point two, the single responsibility is arguable

This is a reasonable principle, the contention point being what is the responsibility of the constructor.

If the constructor is doing side effects or mutating other objects, this is clearly bad but if the “logic” is about getting the object into a valid state i would argue that it is valid logic to be inside the constructor

On the third point, POLA, let’s see what could be astonishing

If you give an object a set of invalid parameters, should you be astonished that it throws an exception?

If you give an object an connectionstring, should you be astonished that it goes to the database?

If the object cannot get into a valid state, should you be astonished that it cannot be instantiated?

It is a good principle, but i don’t think any of the above cases is astonishing

On the fourth point, inversion of control, I agree on all cases

If you want your object to be testable, it should not instantiate any other object directly unless the two objects should only be tested together

If you want your object to be testable, it should use any static member directly

If you violate these principles, unit testing is impossible. Your tests will include more than your object

My main argument is that i believe that a constructor should only allow an object to get into a valid state. I believe that this is reasonable and is not on contention.

The constructor’s job is to bring the object into a usable state. There are basically two ways you can do this:

  1. Two-stage construction. The constructor merely brings the object into a state in which it refuses to do any work. There’s an additional function that does the actual initialization.
  2. One-stage construction, where the object is fully initialized and usable after construction.

I don’t think the two stage method is a good approach. Every method should enforce that it is not ran if the object is not valid, and there is a good chance the Init method wont be called if the class is to be reused by many people

I’m in favour of the one-stage construction.

There is also two ways you can do this, if you want to keep your code DRY

  1. Have a method somewhere that has your initialization logic

The best place in my opinion is a static Create method along side the constructor

2. Have your logic inside the constructor

I have used both approaches and believe that both are valid. I don’t have a strong opinion about which one should be used.

What do you think?

Longs, Original

The Hidden Forces that Shape our Decisions

I recently watched this talk from the GOTO conferences and really enjoyed it.

Here is a summary and my general opinion on it.

The speaker is Fabio Pereira, author of Digital Nudge. He says he is a Digital Behavioural Economist — a digital nudger.

My goal is to help people make better decisions while designing and living in the digital world. — digitalnudge.org

He starts by raising the audience’s awareness to the vast number of choices we make each day and how many of those choices are nowadays influenced by the digital services we use.

When we do a Google search to aid our decision making does the Google algorithm influence our choices?

Fabio then goes into a series of examples of cognitive biases.

The one that stood out the most for me was the status quo bias. The tendency to like things to stay relatively the same. We are lazy. We keep the default choices. As an example, countries where you have to opt out of being an organ donor have a higher percentage of the population registered as donors.

Our actions aren’t always fully intentional. This can be exploited to coerce us to do things we would not do if we really thought about it.

There is a great book that Fabio references in the talk in which a theory of mind is presented. This theory is that we have two brains or in the book’s nomenclature, two systems.

  • System 1 operates automatically and quickly, with little or no effort and no sense of voluntary control.
  • System 2 allocates attention to the effortful mental activities that demand it, including complex computations. The operations of System 2 are often associated with the subjective experience of agency, choice, and concentration.

I haven’t finished this book but I believe it to be a great model of our brains and it shines some light about how we make our choices.

When you’re scrolling through your Facebook feed is your System 2 engaged or just the System 1?

There is an obvious need for the general public to know these things. Once you’re aware of them you are not so easily manipulated. There is a new type of intelligence needed to navigate the digital space in this century. Digital intelligence. We need to improve our digital IQ.

Fabio also makes the distinction between persuasion and coercion before going into the ethics of digital services.

  • Persuasion — getting people to do things they want or need to do
  • Coercion — getting people to do things they do not want or do not need to do

He says that we need to help people to do things that they want and need to do and because of that he started the movement #DigitalNudges4Good.

Up to this point I agreed with him almost absolutely. I only wanted to make two points:

  1. It’s sometimes hard to know what people need to do. We are limited in our knowledge and cannot always predict the full outcome of our actions.
  2. Sometimes people want to do things that are not good for them. They might think so but they can be wrong. There is a need to discuss here who decides what is good.

After a couple of minutes the talk ended and it was very good overall. Then something happened that blew my mind.

I seldom listen to the QA session after the talks but this time I kept watching. There was a question. Never mind the question and answer, it’s all about the introduction:

What I believe in, and it’s always a belief…we believe in something. There is no such thing as real truth because we don’t even know if we are in Berlin, if this is reality.

I mean.. it’s just nonsense…

There is no such thing as real truth? Is that really true or not? Let’s think about this statement. There is only two possibilities:

  • If it is true, then there is no such thing as real truth and so the statement is false
  • If it is false, then there is such thing as real truth and so the statement is false

Either way it’s false. Real truth exists. I have three questions:

  1. Where did he get the idea that is no such thing as real truth? People that promote the idea that truth does not exist are either not very intelligent, didn’t really think about it or are actively promoting a lie. The lie that all is relative.
  2. Why did he believe it? I mean… he seems to be a smart dude. Much more eloquent than me…
  3. What are the consequences of believing this lie?

I cannot answer to 1 and can only speculate about 2, but I can say something about 3.

If it’s all relative then enabling people to do what they want to do — persuasion in his definition — is always a good thing. At least to the one being persuaded. If his perception of reality is all that is, then persuading him to do what he wants he will be the best thing to do.
In another way it does not make any sense to believe that everything is relative and then try to convince everyone to be ethical on the services they provide online. Why should I not use dark patterns to have more conversions on my service? Is it true that doing so is bad? Says who?

I want to write about truth — why not everything is relative, how to find what’s true and what are the consequences of believing that there is no such thing as real truth. Maybe in Portuguese next time…

Original, Shorts

Privacy! The next big thing!

Is well known that companies know more about us than we would like them to know. Does this mean that we should quit any contact with the technology world and go live in a cave?

Stuart Langridge says no. There are ways through which our data may be collected and information is extracted from the aggregated properties of everyone’s data, but enough noise is introduce in each individual’s data so that it cannot be used reliably to target a single user.

We should demand this from the products we use. This could be the next big thing!

Longs, Original

Quitting a git GUI habit

I’ve been a user of source tree but it has let me down many times (crashes, high memory usage).

I’ve recognized that i really don’t know that much about git. I should learn at least the commands I use the most.

I’m a windows user so posh-git is a must have. There are great docs for git but they can be a bit overwhelming and have a lot of detail that is not needed 90% of the time. So, here it is, my 7 item git jump-start list:

  1. git checkout <branch>

The most basic command for switching branches. You can use -f to throw away any local changes

2. git fetch

Used to update the remote status. Useful to know if i need to pull. Use -p to remove any remote-tracking references that no longer exist on the remote

3. git pull

Pulls latest commits from origin. Use -r to rebase changes that are not yet pushed

4. git add

Adds changes to the staging area. Use -a to add all changes.

5. git commit -m “<message>”

Commits currently staged changes. Use -a to stage all changes before committing.

6. git push

Push currently committed changed to origin.

7. other stuff

I’m already cheating about the 7 items but now I’m getting into less used commands. git stash, git merge, git commit with amend, git push with force are all great tools to know about.

I cannot get my head around git diff. I still use GUI tools to handle conflicts and to review changes before committing.

That’s it. This list should be enough to keep me from using a GUI to interact with git most of the time.

Original, Shorts

Show up, kick ass, go home

I love programming. I really do! But programming is not my life, it’s just my job.

Since I’ve married and had kids this has become even more evident. There are things I have to do and that I also want to do besides thinking about my job.

I had been thinking about this a couple of days ago but today I read an article that really summed up my thoughts.

A couple of highlights:

“I opted in to this mindset (show up, kick ass, go home) largely in order to protect my own sanity. If I don’t set clear boundaries as to when it’s OK to think about work problems, I’ll think about them all the time,”

“For a puzzle-hungry brain like mine, programming is so full of not-yet-solved problems that a mind like mine can find entertainment and solutions to their hearts content and still not feel like they’ve truly accomplished anything”

Thanks Matthew Jones for being so articulate!

Original, Shorts

Pequeno comentário ao filme Hacksaw Ridge

Vi recentemente o filme o herói de Hacksaw Ridge. É um bom filme. Dos que gostei mais nos últimos tempos. Gostei principalmente por ser baseado numa história verídica.

Capa do filme

​A frase que mais me marcou foi a que o herói dizia de cada vez que ia buscar feridos ao campo de batalha.

Just help me get one more Lord.

A guerra com os japoneses era — discutivelmente — justa porque defendia um estado e os seus valores contra agressores estrangeiros. O herói, Desmond, apenas queria salvar a vida dos seus semelhantes quer amigos quer inimigos ao mesmo tempo que participava na guerra que acreditava ser justa.

Se cada homem tem uma alma eterna, a sua vida tem mais valor do que qualquer estado ou instituição existente. Os estados e instituições vão todos passar eventualmente. A alma vai existir eternamente. Eu acredito nisto. Assim sendo, também quero entrar na guerra para salvar a alma dos homens do inferno. Quero tal como o Desmond, dizer a cada dia:

Just help me get one more Lord.

Longs, Original

Developer evolution

One of the great things of staying on the same job – and on the same project – for a long time is that once in a while you get to see code you wrote years ago. Yesterday was one of those days. I had the opportunity to see how much my coding skills had evolved.

I was confronted with a performance issue from a piece of code I wrote 5 years ago. After a couple of hours I and a colleague pinpointed the bottleneck and rewrote the problematic code. The code ran 6–8x faster.

I want to make 3 points from this:

  • Don’t optimize prematurely. The code was in production for 5 years and was good enough. In that time I could improve my understanding of the whole system, a crucial skill to make good design decisions.
  • Challenge yourself. The bottleneck was quite obvious once I saw it. 5 years ago I didn’t have the maturity to question my own code. This could have been avoided with tools like pair programming or code reviews but it’s always a good thing to take a critical look at your work before checking in
  • Measure. Sometimes the problematic code is not that obvious. There are great tools that help you to measure the performance of your code. Learn to use them.

I want to thank the developer – or team – behind CodeTrack. It’s a great tool and on top of that completely free! If you work in .net it’s a must have.