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?

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…

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.

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!

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.