Skip to main content

Posts

Showing posts with the label tips

A semantic fuzzer for Obsidian Sync... in spite of Claude

I guided Claude Code to build a fuzzer to find Obsidian Sync bugs. It runs Obsidian instances in containers and makes them edit notes while it cuts their network connection.  And it works: it finds amusingly short sequences of operations that trigger data loss, and that you can verify yourself by running them manually on your own phone and computer. I got a functional prototype in 30h, but the next 30h turned into a painful bug treadmill, where at every turn Claude broke as much as it fixed.  So  I wrote an experience report: what went wrong, why research (and Anthropic's own docs) suggests that this was to be expected, and how to salvage the good bits. I posted the full experience report in Substack ; Blogger is not keeping up with the world. 

Así hace un Valenciano e̶x̶p̶a̶t̶ emigrante una paella con arroz integral

Viviendo fuera de España como expat emigrante es difícil (y caro) encontrar arroz bomba para hacer una paella de verdad. Pero además, si estás intentando reducir hidratos de carbono en tu dieta, el arroz en sí es ya un mal paso. Así que me puse a hacer pruebas para hacer una paella con arroz integral normalucho, del que encuentras en cualquier supermercado. Y lo conseguí. Resulta que no es tan difícil, así que me pregunto por qué cuando empecé a buscar cómo hacerlo no encontré nada al respecto – aunque sí que encontré marcianadas como usar "arroz de coliflor" o arroz arborio.  Curiosamente, los que hacen cosas así suelen ser de fuera de España, así que supongo que nunca han probado una paella de verdad y les da igual acabar con un risotto amarillo. ¿O quizás es que los influencers no tienen paladar? Pero yo nací y crecí entre Alicante y Valencia, así que no puedo aguantar algo así. Y más cuando la morriña ataca. En fin, al grano. A mí me ha funcionado con paella y con arroz...

Bluetooth audio latency, codecs, when does it matter

These are some random-ish observations regarding Bluetooth audio latency vs "codecs". This started life as a long comment trying to untangle a messy thread in Wirecutter's review of bluetooth speakers, but since it covers a lot of things that I periodically forget about, I'll have it now as a refresher for myself next time I'm checking BT headphones. A couple of pre-clarifications: Different people measure different things, sometimes without even realizing, so it's important to make sure that one understands what a number means. Algorithmic delay? Hardware (+firmware) implementation? Hardware + software? Which software: OS + encoding + decoding, or just the OS piping things around? Is there some app involved? Each layer not only adds delay (lag, latency), but also variation (jitter).

CrashPlan complaints

After a couple of months using CrashPlan I wrote about its awkward feature set and their interactions . The awkwardness didn't negate that it seemed to work well enough, better than the alternatives I tried at the moment. Still, it was also bad enough that it motivated me to keep my TimeMachine local backup, even though my earlier idea was to get rid of it. 8 months later, I'm fed up enough with CrashPlan to start looking for alternatives. This is a list of my problems with it, which are the things I would have liked to realize earlier. All of these complaints have been brought up with their Support, even explicitly as feature requests and/or bug reports, and the eventual answers have not been particularly helpful nor encouraging; in the best cases Support just provided workarounds to suspend the pain for a while.

CrashPlan limitations

After a few weeks using CrashPlan PRO for small business (not the free tier!) I tried contacting support to ask how to do some underexplained things, and/or to open some bug reports/feature requests. Like: How to know which were the last backed-up files? or, when was a file last backed up? (maybe some useless-but-frequently-updated file is slowing down backups of bigger and more important files?) The app defines backup sets, but they don't seem to correspond to "restore sets". How to restore a particular set? Support's answers were pretty underwhelming, bordering on canned-responses; but I found that Code42, the makers of CrashPlan, have an API to access the backup data. So I browsed a bit to see whether it'd be easy to do myself what I wanted.

Review of air purifier Prem-i-Air Invierno and air analyzer AirVisual Node

Living in Warsaw, I got tired of worrying about the air quality – which some days during winter got reported as worse than that of infamously polluted Beijing. So some months ago I bought an air purifier. I had a number of doubts about how to use it so it was effective: does it have to work all day? The purifier's power level depends on the room's size, how do I know that it's working as it should? Air quality sensors included in these purifiers are said to be pretty unreliable, are they any useful at all? How does air quality indoors correlate to air quality reported by an official station about 1 km away from home – which daily recommended wearing a mask during winter!? What happens if I just leave the windows closed, or if I open them for a while? ... So I bit the bullet and bought an air quality sensor, which cost almost as much as the purifier itself. And these are my results and tips for anyone thinking about doing the same.

User-site-installed python packages, and PATH modification

Python makes it apparently easy to install packages. Just use pip , or any of the other more-or-less old and deprecated ways to install them, right? (heh) The first difficulty is that maybe your system's Python needs sudo to install those packages, and you don't want (or even can't) use it. The definitive solution is to use virtual environments, but that can feel like going too far in the "local" direction. You might just want to have something at the user level, without having the risks of using sudo , but still global for everything that the user does. Well, turns out that PEP 370 allows you to have user-local installs of packages. You're supposed to run pip --user install whatever . But now you have to remember to always use the --user flag! Kinda breaks the purpose of having something "global for everything that the user does".

Installing Ubuntu 16.04's friends into an iBook G4 with a USB pendrive

I had an old iBook G4 that could be useful for an elderly person, to be able to do her banking and basic internet browsing without having to use an XP-vintage, molasses-slow, honeypot-aspiring PC. There's a reasonably complete and up-to-date guide in https://ricanlinux.blogspot.com/2015/03/ubuntu-mate-on-my-ibook-g4.html . I had to change a couple of details; and there are a couple of practical considerations to be had. (Note to self: "lightness" in Linux rather correlates to "barebones" [3] , which correlates with "hardcore" (text configs, mailing list scouring, lots of googling). Next time I'll be trying a heavy-weight distro for this kind of thing; better slow-but-useable than less-slow-but-WTF.)

Cocinando con citrato sódico casero

Parece ser que un ingrediente típico para la "cocina molecular" de Ferrán Adriá y compañía es el citrato sódico, que se usa por ejemplo para esferificaciones, caviar de frutas y cosas así. Pero también se usa para algo mucho más simple y usable en casa en el día a día: ¡queso fundido!, que queda genial para salsas, dips, incluso fondues. ¿Pero cuál es el problema? Fundir queso es fácil, ¿no? En realidad, no. Prueba a fundir un taco de 100 gramos de queso normal y verás que el resultado es casi para tirar a la basura: un charco de aceite por un lado, una especie de trapo gomoso por otro. Esto lo podemos salvar con citrato sódico.

Doxygen error parsing in Eclipse CDT

Eclipse (or is it the CDT?) has, by default, some Doxygen integration: if the preferences are set appropriately, Doxygen-style comments are highlighted differently, and Doxygen commands in those comments are further highlighted. But that's about it. A particular missing feature is that errors in the comments are not highlighted in any way; and that's what made me look for a better alternative.

Tweaking Waf for integration with Eclipse CDT

First, the way not taken: there is an official Waf extra named "eclipse.py" which theoretically creates the files that Eclipse expects in a project. But that extra is from 2011; both Waf and Eclipse have evolved since then, and I didn't have the time nor inclination to dig into both Waf and Eclipse internals. Also, what would be the end result of that extra: only build support, or full indexing? No docs, no idea, forget it. So let's make it easier. We already know that Eclipse's indexing system only needs to see the compiler command lines to get an idea of what files are related, where are the includes, what are the compiler flags, etc. So what about just making Waf spit out the command lines? And turns out, it's even easy: there is another extra called "print_commands" which does just that.

Best practices for a (GNU) makefile in the XXI century

This is not really a tutorial on makefiles; there are lots of those around the web. But most of those are very outdated, and/or follow dubious practices. You'll end up with a makefile which was OK for a make and a compiler from the 90's, maybe even around year 2000. Even the GNU make manual recommends unnecessarily complicated things, given the capabilities gcc has grown in the last decade . So, if you know how makefiles generally work (it's enough to know what a rule, a recipe and a variable is), and want to improve yours or know of better options, the following may help.

git mental model

Finally I managed to get a mental model of git that allows me to do everything without needing to google around. And this is a quick memory dump. There are other git cheatsheets, but this is mine.

Modelo mental de git

Por fin conseguí hacerme un modelo mental de git que me permite hacer de todo sin necesidad de google ni esquemas ni Stack Overflow ;P. Y ésta es mi chuleta / "volcado de memoria". Parece que no hay muchas cosas así en español; a ver si le sirve a alguien. La idea era mantenerlo muy corto y al grano — como una chuleta, vaya. Asumo que sabes de qué va en general git y qué son cosas como un puntero y una lista simplemente enlazada. Si hay interés lo expandiré en algo más "tutorial".

6 tips to survive Codility tests

Well, it happened. When applying for a job, I got sent to a Codility test. And even though I already had some good practice with them, I managed to do badly in stupid ways – ways that 2 years ago I had already identified and even taken notes on. Just, in the heat of the moment I forgot about those rules of thumb. And in fact I think these hints should be given by Codility themselves – because otherwise you are practically ambushed, even more so if you didn't take the time to thoroughly explore how they work. So here are my hints-to-self, now for everyone. The summary is: don't think of Codility as a coding interview; this is primarily about getting something (anything!) working, ASAP.

Eclipse CDT configuration for big, makefile-based projects

It's been kinda hard to get Eclipse to work well with big CDT projects (say, the Linux kernel, or even a BuildRoot project including the Linux kernel). The documentation for Eclipse is between non-existent and unhelpful, and I only could find a post that talked specifically about preparing an Eclipse project for the Linux kernel . But that post explains nothing, and does some arbitrary things. So this is the generalization of that.

Stopping OS X's from storing locally IMAP messages

TL;DR: Mail.app wants you to download your messages even if you change manually the account .plist. Forget about it. I wanted to stop Mail.app in OS X 10.10 Yosemite from caching locally my IMAP messages. Once upon a time there was right there in Mail.app an option to do just that, but for the last couple of OS versions the only option shown there is whether to download the attachments or not.