Logbook + Scratchpad

nvitucci's federated blog, with notes and unfinished ideas

A few months ago I applied to get an allotment, and finally I have got one. My main motivation was to use it as an excuse to work out, and hopefully get some produce on the side.

This is almost a whole new world for me. It takes manual work, planning, attention, and dedication – plus some science too. I am not new to countryside and caring for a garden, but this is a different level as I am directly responsible for the outcome on a different scale. The good thing is that I am doing this with someone quite knowledgeable.

#agriculture

I have recently come across the Data Sonification Archive website as I was looking for resources on data sonification. As both a musician and a “data guy”, this is a topic I want to explore more – if anything, for artistic purposes.

An article I have found for different reasons is taking me towards the same direction. The article is Erie: A Declarative Grammar for Data Sonification.

#music #data

In some previous posts I have mentioned in passing an old project of mine about fractals with Python. Although it still needs updates and more explanation, I have decided to bite the bullet and publish it as-is, with the aim of improving it over time rather than having it collecting virtual dust on my hard disk.

The project is called chaopyc (a portmanteau of “chaotic” and “Py(thon)”) and is available on GitHub.

#Python #fractals #chaos

I've heard or read this quote in various forms in the past, but lately it has stuck with me. My personal interpretation is not just to make something happen instead of waiting for it to happen, but also to have the courage to stop something from happening instead of hoping for it not to happen. One can see the latter as a special case of the former, but for me the two have different emotions attached, and probably different frames of mind.

#thoughts

“This item costs 5.99 £/€/$, but if you buy three there is a 30% discount.” “No, thanks. One is enough.” “Do you have the loyalty card? It's free.” “No, and I am not interested in one.” “But you could have a 15% discount!” “No, thanks.” “Would you like the receipt to be emailed to you?” “No, thanks.” “But you could get discounts for future purchases!” “No, thanks. Goodbye.”

Every. Damn. Time.

#thoughts #rants

We are always, constantly being marketed to. Low-level, emotion-appealing, childish, uninteresting ads are competing for our attention everywhere and all the time. And not just online, but offline too.

I know, this is nothing new, but I am not talking about the fact itself. How does this make you feel? For me it's a mix of “Everyone is desperately looking for attention and money” and “We haven't come that far as a species, after all”.

#thoughts #rants

I feel like my decision-making process sometimes follows the trajectory of a Lorenz system (well, at least in its most popular “butterfly” parameterization). I start by circling around a decision, then I slowly diverge onto another decision, circle around there for a while, and then back, without “collapsing” onto any of the two.

I wonder how common this is.

#thoughts

I have an odd guilty pleasure: the so-called “self-help” books. I know that, more often than not, they are just commercial operations, but I like reading them for multiple reasons: to decode the distinctive style of an author, to understand what kind of writing and what topics capture the audience and sell, and sometimes even to pick up some good ideas.

Self-improvement is something that I've always been trying to practice, and no, I do not expect to turn my life around with a self-help book. Nevertheless, I always like picking up chances to reflect, and these books give me a lot of material to think about, even though such material is trite or generic. Sometimes, just a change of perspective can work wonders.

#thoughts #books

In the post about warming up for coding I forgot to mention one other way to warm up that works for me, which I think is somewhat popular too: picking up some old code to refactor.

There are some aspects to refactoring that make it work as a good warm-up:

  • You know what the code is supposed to do, so you don't need to be creative (as in creating something out of thin air).
  • You have working code that you can use to check that what you change does not have any unintended effects, so you don't need to care too much about being wrong (and you can add tests to make sure you are not, which is another good warm-up itself).
  • You have a chance to try out new language features and new architectural decisions.

In summary, it's a focused effort that you can take in self-contained steps, that makes you feel better and gives you something useful too. Good before starting something more taxing.

#coding

Today I had an issue with running a basic C program on macOS. I was using iTerm2 as a terminal, and it took me a while to find out that it was a terminal issue rather than a code issue.

The C code included a scanf to read a number from the terminal. The problem was that hitting the Return key would print a ^M instead of an actual newline, hanging up the program unless I hit a Ctrl + D.

The solution was to reset the TTY settings with stty sane. Reference: https://superuser.com/a/1501021

#macOS #TTY