El sesgo de seleccion y tests unitarios

Los tests unitarios que escribimos y gestionamos nosotros tienen, por definición, un sesgo de selección. La implementación resuelve un problema específico y se prueba para los casos que se espera encontrar, lo que lleva a escribir tests que reflejan la implementación.

No obstante, el margen de maniobra es limitado. La implementación evidentemente soluciona al menos el 80% de la casuística, y los tests son redundantes ya que buscan asegurar la corrección de lo implementado.

Notas sobre la Musica

Hace unos días vi este short en YouTube, en el que un músico interpreta la misma pieza musical en varios estilos, una demostración que ha resonado en mi mente desde entonces.

Me gustó mucho porque destaca las diferencias de cada estilo musical. Esto me hizo preguntarme: ¿es esta demostración de praxis solo posible para un experto? Aunque me falta el criterio para detectar imperfecciones sutiles, quizás eso también forma parte de la técnica. Ser capaz de cometer errores de forma imperceptible podría considerarse una muestra de buena praxis.

Una apología sobre la competencia en la era de la IA

¿Quién creéis que tiene más experiencia vital, una persona que ha afrontado muchas dificultades o una persona de la misma edad que haya tenido una vida fácil? ¿Quién será más competente?

Nosotros tenemos el control, la agencia de tomar el camino difícil o el fácil, pero lo más complicado es detectarlos y tener el valor, fuerza, convencimiento de tomarlo, porque es bueno para nosotros. ¿Qué tipo de persona quieres ser? ¿Tomarás la píldora roja o la píldora azul?

Optimizing zsh on macos

Every time I open a terminal on macOS, zsh takes like a second to show the prompt. It’s super annoying!

I profiled using

1
2
3
4
5
6
7
8
9
if [ -n "${ZSH_DEBUGRC+1}" ]; then
    zmodload zsh/zprof
fi

# your zsh config

if [ -n "${ZSH_DEBUGRC+1}" ]; then
    zprof
fi

To make it easier I’ve added this alias:

UV is Shaking Up the Production Game

I’m diving headfirst into using uv in my daily grind to be more efficient in my pile of work. So, I’m throwing myself into all sorts of random scenarios.

On this journey, I’ve stumbled upon some [bugs][uv-bug] and nifty features like a super-powered cache. But, hold up! The real point of this post is how an innovation affects to the production process.

I found and issue on uv: llvmlite

I’ve found an issue with uv while creating a simple venv. Nothing fancy with my dependencies. I’ve condensed everything in this issue:

But here is the minimal reproducible example of it:

1
2
3
4
5
6
rm -rf test
uv init test
cd test
uv version
# uv venv && uv pip install numpy statsforecast
uv add numpy statsforecast

For the time being, I’m using the latest release.

Makefile based on uv

Hey there! 👋

This is a revisited version of my previous post about Makefiles, but this time I’m using uv (the shiny new Python package manager that’s faster than a caffeinated cheetah! 🐆).

I was tired of typing the same commands over and over in my Python projects, so I made this super cool Makefile using uv.

Some useful github actions

Hey there! Here’s a collection of GitHub Actions I’ve found handy for automation. I’ll keep adding to this list as I discover more useful ones. Feel free to grab what you need for your CI/CD workflows!

List of Github action

Automatic Release

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Publish release
on:
  push:
    branches:
    - "main"
jobs:
    prepare-github-release:
        name: GitHub Release
        runs-on: ubuntu-latest
        outputs:
            version_tag: ${{ steps.calculate_tag_version.outputs.version_tag }}
        steps:

        - name: Checkout repository
          uses: actions/checkout@v4
          with:
            fetch-depth: 0

        - name: Manage semantic versioning
          uses: paulhatch/semantic-version@v5.4.0
          id: calculate_tag_version
          with:
            tag_prefix: ""
            major_pattern: "[MAJOR]"
            minor_pattern: "[MINOR]"
            version_format: "${major}.${minor}.${patch}"
            bump_each_commit: false
            search_commit_body: true
            debug: true

        - name: Bump version and push tag
          id: tag_version
          uses: mathieudutour/github-tag-action@v6.1
          with:
            github_token: ${{ secrets.GH_TOKEN }}
            custom_tag: ${{ steps.calculate_tag_version.outputs.version_tag }}
            tag_prefix: ""

        - name: Create a GitHub release
          uses: ncipollo/release-action@v1.14.0
          with:
            tag: ${{ steps.calculate_tag_version.outputs.version_tag }}
            name: Release ${{ steps.calculate_tag_version.outputs.version_tag }}
            body: ${{ steps.tag_version.outputs.changelog }}