Programming Leftovers
-
Debugging the keyboard navigation in your QML application
A neat trick to debug the keyboard navigation in your QML application is to put the following code snippet in your main.qml: [...]
-
Low latency logging in Rust
Note: this blog post was not written by me. It was posted as a comment on r/rust by user matthieum, who gave me permission to repost it here. Everything below this paragraph has been taken verbatim from there.
-
Quantum Entanglement
Welcome back to our quantum journey! Today, we’re delving into a phenomenon that lies at the heart of quantum computing’s unique power – entanglement. At a high level, quantum entanglement is the deep and mysterious link that can exist between two qubits, no matter the distance that separates them. This powerful feature allows quantum computers to process a massive number of possibilities at once and solve certain problems much faster than classical computers.
But how do we get there? We’ll start by exploring two-qubit gates, the essential quantum operations that can bring about entanglement. The most common of these gates, such as the CNOT gate, can modify the state of one qubit based on the state of another, creating a correlation between the two.
-
System architecture: move authentication to the API Gateway
When exposing an application to the outside world, consider a Reverse-Proxy or an API Gateway to protect it from attacks. Rate Limiting comes to mind first, but it shouldn’t stop there. We can factor many features in the API Gateway and should be bold in moving them from our apps. In this post, I’ll show how to implement authentication at the Gateway API stage.
-
The shell and its crappy handling of whitespace
I think what bugs me most about this problem in the shell is that it's so uncharacteristic if the Bell Labs people to have made such an unforced error. They got so many things right, why not this? It's not even a hard choice! 99% of the time you don't want your strings implicitly split on spaces, why would you? And the shell doesn't have this behavior for any other sort of special character. If you have a file named foo|bar and a variable z='foo|bar' then ls $z doesn't try to pipe the output of ls foo into the bar command, it just tries to list the file foo|bar like you wanted. But if z='foo bar' then ls $z wants to list files foo and bar. How did the Bell Labs wizards get everything right except the spaces?