=========================
 SFTP, hurried work, UPS
=========================

Yet again a continuation of the last month's news.


SFTP: libssh
============

After fixing a couple of leaks in the libssh2 bindings (one was merged
into the upstream, another one still hangs as a pull request), and
trying it on a newer system (Debian 11 instead of Debian 9, with
libssh2 version 1.9.0 instead of 1.7.0), observed that it still leaks
memory. Composed libssh bindings, noticed that it occasionally enters
an endless loop somewhere in sftp_open, and loads a CPU core
completely with libssh version 0.7.3. But then tried it on Debian 11,
with libssh 0.9.8, and looks like it finally works without leaks or
loops. Took me a while to find a working option, for such a seemingly
common protocol.

Going to publish the bindings on Hackage after a little more testing,
and maybe some refinement, but for now they are at
<https://codeberg.org/defanor/libssh-hs>.


Hurried work
============

Had quite a bit of hurried work lately: tasks keep coming, each one
seemingly more urgent than the previous one, so switching and not even
finishing many of those.

Had to debug IPsec and configure some networking. Apparently
strongSwan sometimes requires to add forwarding rules manually: maybe
it happened because of the old configuration format on a newer system
in that case, or because Netfilter had some rules set by (or for)
Docker, and possibly VirtualBox. But it was needed to configure some
forwarding and to debug IPsec in the first place because, as it turned
out later, Roskomnadzor (the local censorship organization) started
blocking IPsec packets between parts of our system.

Then I had to work on data wrangling and a Web backend. The data
wrangling involved acquiring data from an undocumented API, which
seemed straightforward at first, with a sensible data model. But
eventually I learned that the same structures have different semantics
in different parts of it, some properties are dummy ones and must be
ignored, and so on; not only the data model turned out to be quite
different, but it also required more of data wrangling to get what is
needed on the output, and initially it lacked the values required to
connect a part of the data it provides to another part (which turned
out to be a bug, and was then fixed). Apparently that API was hurried,
too, so this is how it happened (though a textual description could
still have been provided).

While working on that, kept running into Roskomnadzor's network blocks
as well: cdn.jsdelivr.net is blocked, so Hackage loaded slowly, even
with Tor for jsdelivr.net. While swagger.io geo-blocks requests from
Russian IP addresses. Those things are always annoying (and reminders
of the isolation are rather upsetting), but particularly so when in a
hurry.

After that functionality was hurriedly added into the project, to test
it in production, it turned out that there is some inspection on the
next day, and things are broken. The project was not touched for a few
years prior to that, and was left in a semi-rewritten state, so it was
expected that things will break. So another day of hurried fixing
followed.

Still sorting out that one, occasionally receiving some minor
day-to-day debugging requests, testing and adjusting SFTP as mentioned
above, and being poked with other tasks (the ones that are on hold) as
well. I guess this is how burnout can happen: it is hard to care much
when there is a constant hurry like that, without a known sensible
reason. Actually the oldest surviving post in this blog, "useless
code", is about this Web-related project; it does not seem to improve
much, though at least using PostgREST there now, which is nice.


UPS
===

My old UPS (an APC one, Smart-UPS, 1500 VA, about 15 years old)
started malfunctioning, cutting the power to the computer twice in a
day, even while there was no mains power cut. I thought to replace it
with a similar one, but they are quite expensive, and there are other
issues: they are heavy, and as comments on the online stores' websites
say, they make beeping sounds (as did mine), which is undesirable for
a bedroom. So I picked the CyberPower CP1300EPFCLCD UPS instead: it is
lighter (about 10 kg, together with batteries), still an overkill for
my setup (which takes about 85 W, the UPS should keep it running on
battery for about 40 minutes), cheaper (found a store listed at
cyberpower.com, with fast and free delivery to a nearby place for me
to pick it up, where it was 15% cheaper than in other stores, at about
$280). Also checked beforehand that similar models work with NUT,
being supported by the usbhid driver on Linux, and indeed it worked
out of the box: the usbhid driver sees it, and the Xfce Power Manager
is now configured to shutdown the system when the battery runs
low. Looks like the battery changing procedure is a little tricky on
these, but should be doable, and the replacement batteries are
available around here.

Maybe will try to plug something less important into the old UPS, and
see how reproducible the issue is. If it happens regularly, maybe
could take it somewhere to get fixed. I am not confident enough with
electronics to poke at something like an UPS.


Miscellany
==========

- Tried store-bought syrniki, discovered that they can be nicer than
  the ones I tried previously (not as floury and dry, or dense and
  sour), though those store-bought ones were overly sweet. Since they
  are similar to small cheesecakes, decided to try a crustless
  cheesecake, akin to Basque cheesecake: crust is both tricky to make,
  and often overly sweet, seems to be the least healthy part of a
  cheesecake. Used 600 grams of ricotta, 200 grams of Greek yogurt, 3
  eggs, 2 tablespoons of flour, 1 tablespoon of honey, vanilla powder;
  lined a springform pan with parchment paper, poured the mixture in,
  baked for an hour at 200 degrees Celsius, topped with halved
  strawberries. Turned out nice.

- In other culinary news, tried shortcrust pastry with olive oil, as
  in <https://www.themediterraneandish.com/empanadillas/>. It does
  work, easy to make, the dough is easy to handle, and possibly it is
  healthier than with butter, though perhaps more
  expensive. Butter-based shortcrust seems to be more suitable for
  sweet pies, but this is nice for savory ones.

- I keep trying a V60 dripper for coffee brewing, but still unsure how
  it compares to AeroPress. I guess the results may be more consistent
  in AeroPress, though maybe it is simply because I keep experimenting
  with the technique for brewing with a V60 dripper.

- As a month ago, skipping physical exercises occasionally (mostly one
  of the stretching routines, and only took one rest day when I
  visited a dentist for a regular check, but otherwise doing all the
  exercises daily), and going through the physics textbook even more
  slowly than before, being rather busy with work and other chores
  (still at chapter 5, now working through the problems that follow
  it).

Generally there is quite a lot of stuff to do, and unfortunately not
always enough time even for all the scheduled activities, while
unplanned chores keep popping up.


----

:Date: 2024-06-18