Rick's b.log - 2024/12/17 |
|
It is the 21st of December 2024 You are 3.141.42.195, pleased to meet you! |
|
mailto:
blog -at- heyrick -dot- eu
Yesterday, I made myself a big bowl of fresh tagliatelle because it was getting late and I wanted to not spend forever in the kitchen. Three minutes of boiling (well, somewhere between three and five, I got sidetracked) and it was done. I would have done linguine, but it takes quite a bit longer being dried pasta.
Look closely. See how the light catches the curves of each strand? You can almost feel the texture looking at this picture - because this isn't just a boring bowl of pasta, it's a sensory experience.
The pasta is tossed in butter (proper butter) which makes it shiny, helps stop it clumping together in a heap, and makes the slight roughness of the pasta become smoother. Imagine the slight give as the firmness of the pasta yields to the pressure applied by a well-placed fork. Notice, also, the contrasts between the shiny cream-coloured pasta and the shadows that are cast by the light. There is a comforting uniformity to the pasta itself intermingled with the chaotic nature of the shadows, each one a mesmerising visual texture that avoids hard edges and sharp contrasts. Nothing is rigidly defined, but it isn't without form.
On top of the pasta is grated cheese - a mixture of three types of cheese intended to enhance pasta meals. Gently melted, the colours and textures almost match the pasta, but impart a different, deliciously cheesy taste. Not to mention the stringiness of the texture of cheese when it is pulled apart.
Finally, there is the pepper. Fine ground black pepper carefully scattered amongst the strands of pasta (and not at all just haphazardly tossed in and stirred, no, not like that). The pepper is not just there to provide taste, it is there to provide a counterpoint. Like black stars suspended in a cream universe, just the right amount of pepper dispersed into the pasta provides an important visual texture, an interference with the pale creaminess. This juxtaposition isn't jarring nor is it intended to be. It is a nuanced and carefully balanced visual texture, with each speck both distinct and a part of the overall pattern.
The image itself brings a sense of warmth and confort. The lighting, the shades and shadows, the colours, it all contributes to a great visual satisfaction. I am almost inclined to call it a "holistic sensory experience". But I won't because that sort of rubbish sounds like advertising blurb for an overpriced set of headphones. But just know that this isn't just a plate of food thrown together by a tired human in the late evening, it is a carefully curated sensory experience. A picture one can almost taste, and an invitation to close your eyes and just imagine.
And that is just the picture. Now consider the calming satisfaction of eating it when one can bring in all of the other senses. How it smells, how it feels in the mouth, how it tastes, all of that.
One does not simply scoff a bowl of pasta.
(and hopefully now you understand why I consider drowning it in some sort of tomato-based slop to be an unforgivable act of cruelty)
This is important as my 12V battery backup is rated 2A. So I didn't hook the battery backup to the Livebox.
Just like the previous Livebox, the slightest disturbance the the power, those brownouts that occur at least once a day (sometimes more), that don't faze the two Pi machines at all, cause the Livebox to immediately reboot.
I came home today and found that my Pi had lost all connectivity. So I had to run my "Rejoin" script to do the ifconfig call to reconnect to the network, then waste some time so DHCP can get a new address in the background.
And, well, I snapped. I'd lost internet on Sunday in the middle of streaming a movie. And, okay, first world problems as it only took about five minutes to come back up and I used the time to make a tea, but still, it really interfered with my immersion into the story.
So I left the dinky UPS plugged in all yesterday to charge it up, and then patched it in between the Livebox's power supply and the Livebox itself. I then flicked off the power for a couple of seconds and the Livebox kept on going. That's all I need. We don't have actual powercuts, the last one was for half and hour during a violent storm, so all it needs to do is see me through the brownouts. And, well, it looks like this will be a solution even for the more recent Livebox.
On the other hand, given that modern infrastructure is coming to depend upon things like this, upon having the telephone plugged into the internet box; it does seem something of a flaw that internet boxes aren't capable of riding out brownouts, never mind actual powercuts. Maybe with the gradual disappearance of copper wires, we might one day get to see these things with LiPo cells inside them. After all, I've just stuck four beside it and that seems to work.
On the other other hand, maybe it would be less of a problem if these things didn't take an eternity to reboot?
And here's another, that is replete with wrongness.
The bottom picture, "You've got"? How about simply "You have"?
And in both cases... "1 new subscribers" and "First 1 minutes".
This is easy-enough to handle in a language like C. Off of the top of my head, something like this, perhaps?
What we are doing here is inserting a ternary conditional into a statement that supplies parameters to a string. Yes, you can
If we take a look at:
This is functionally equivalent to the following BASIC:
That is a fairly literal translation of what the C is doing, only we're skipping the length test as BASIC will throw an error if the string is too long, rather than scribbling all over god-knows-what.
At any rate, having something say "First 1 minutes" just seems so slap-dash and amateurish.
The sensory symphony of pasta
If you know me, you'll know that I consider linguine to be comfort food. Not cake or chocolate, linguine.
Lightly buttered and peppered tagliatelle with a melted grated cheese on top.
One experiences a bowl of pasta.
Livebox power
The Livebox 6 claims to use 3A, but the power supply doesn't get warm. I'm guessing maybe it's 3A with all of the ethernet sockets in use, something sucking at least 500mA from the USB port and... and...
A Mini UPS beside a Livebox 6.YT Studio's grammar fail
Something that bugs me is when a string that has a singular number has a plural word. Maybe I'm not explaining that very well, so take a look at this capture from the "YT Studio" app.
No, this isn't good.
This is just tragic.if ( daycount > 1 )
{
// First X day[s], X hour[s]
snprintf(outstr, SLEN, "First %d day%s, % hour%s",
daycount, ( (daycount==1) ? "" : "s"),
hourcount, ( (hourcount==1) ? "" : "s") );
}
else
{
if ( hourcount > 1 )
{
// First X hour[s], X minute[s]
snprintf(outstr, SLEN, "First %d hour%s, % minute%s",
hourcount, ( (hourcount==1) ? "" : "s"),
minutecount, ( (minutecount==1) ? "" : "s") );
}
else
{
// First X minute[s]
snprintf(outstr, SLEN, "First % minute%s",
minutecount, ( (minutecount==1) ? "" : "s") );
}
}
IF...THEN...ELSE
directly into a (s)printf statement. C is nice like that.
snprintf(outstr, SLEN, "First % minute%s",
minutecount, ( (minutecount==1) ? "" : "s") );
outstr$ = "First "+STR$(minutecount%)+" minute"
IF (minutecount% = 1) THEN outstr$ += "" ELSE outstr$ += "s"
In real code, however, you'd be more inclined to append the 's
' if minutecount
was not 1; saves the silliness of appending an empty string.
John, 17th December 2024, 20:14 Erotica? The pasta, that is.David Pilling, 17th December 2024, 23:31 Plural thing, maybe programmer does not have English as first language, maybe saving time, worse, maybe it has become the norm. Get rid of singular words - you could program using boolean for 1/0 and then integer for anything greater than 1 - but it is simpler to use integers for everything.
It is irritating. My experience was having to code it properly and then later encountering the incorrect versions and wanting to go and tell them they'd got it wrong.Zerosquare, 18th December 2024, 06:05 Re: Internet boxes getting an internal battery: Don't get your hopes up. Those things are strongly optimized for cost of manufacturing (to put it nicely) first. Adding a battery would make them more expensive, and add maintenance and recycling issues. It's not worth the trouble if there isn't a real customer demand for it.
Not to mention modern VoIP networks (consumer ones, at least), unlike the classic telephone system, simply don't provide any guarantee of service in the first place. Especially in emergencies situations where local power may be unavailable. But maintenance of the old copper network costs so much that telecom companies are trying to get rid of it as soon as they can, and carefully avoid mentioning this issue (at best, they provide vague, non-committal answers when someone points it out).
Re: getting singular/plural right in messages. The trick you mention doesn't work in all languages, as some of them have more complex grammar rules. But there are libraries to handle this, and there really is no excuse for a company as large as Google to choose the lazy solution.
On the other hand, it's well-known that they care little about their paying customers' experience, and absolutely nil about the non-paying ones.jgh in Japan, 18th December 2024, 08:52 PRINT s;" second";LEFT$("s",s<>1)Rob, 19th December 2024, 15:10 Plurals are hard. Most new stuff I write, unless it's a trivial thing for my own use, I use the gettext libraries. There's a good description of the problems, and the wide variety of special cases, at https://www.gnu.org/software/gettext/manual/html_node/Plural-for ms.htmlA tree-dwelling mammal, 19th December 2024, 15:24 echo $minute." minute";
if ($minute!=1) echo "s";
echo "\n";
Simple innit?
My "critical infrastructure" is all powered via a UPS (an APC BackUPS Pro that I bought years ago but recently spent £15 on a new lead-acid battery to bring it back into use). This powers the router, 3x servers (primary, video/torrent and music servers), the rack-mounted 24-port gigabit switch... and the base station for the DECT cordless landline phone. (BT haven't yet moved us to digital voice.)
This has a run time of about an hour. We do get the odd brownout and flicker here, although during the recent storm the power was out for about 3 hours. The UPS ran out. And things didn't come back up properly - which I later traced to a failed CR2032 battery in the primary server (which also handles DHCP, DNS etc).
I replaced this and reset the CMOS to sensible settings (smallest framebuffer as headless, power on at power restored, passwords on the CMOS setup etc). Simulated a power failure and it boots up just fine now.
Hopefully if that happens again everything should come back up. It's notable that my current Zyxel router takes a few minutes to reconnect (FTTC, so a VDSL connection to the router). The old Netgear took less than a minute to connect to ADSL.
We don't yet have FTTP, it'll be interesting to see what the reconnection time is when that becomes available here.Rick, 19th December 2024, 21:54 Rob: Luckily we're only talking English here where it would suffice to add an 's' for a plural.
In French all the other words need to agree (like "thes reds cars" where "thes" is a pluralised version of the masculine "le" even though the word car is feminine and usually uses "la").
No, I'm not an expert, I know the genders of maybe a hundred words and pretty much guess the rest. I just can't get my head around the concept. I'm male, my boss is female, and a doorknob is an effing piece of metal...
Zerosquare: Yes, I had noticed the service obligation being swept aside because, what was it? It doesn't really matter if the landline fails because everybody has mobiles?
Guess what, the famously crap mobile tower at the place where I worked was non-functional yet again.
Cue all the managers having to run around and talk to each other because their mobiles didn't work and there are practically no landline phones here and more. Because... everybody has a much more convenient mobile solution that they can take with them....
....to a spot out in the car park where they can get a whiff of a signal.
Tree-rodent: I don't have "critical infrastructure". I added this thing back in (and bought it in the first place) simply because the reboots and how long it took annoyed me.
For critical things, I have bottled water, gas cartridges, powdered milk, and lanterns (a couple of gas and now a working Tilley).
I took Tilley with me when I went to feed the furball. I think I'm getting the hang of getting it lit first time.
Oh, and candles. Because they give a really pleasing light.A tree-dwelling mammal, 20th December 2024, 02:48 By "critical infrastructure" I mean my primary server, the one that runs as a domain controller, web, email and database server, as well as DNS and DHCP. I used to run a co-lo server, but nowadays there's little point. All the paying web hosting customers I previously had were in the financial sector, which basically died from 2008 onwards. So basically I was paying for a co-lo box to host my own sites / email and a few sites for family members. As soon as I got a reliable FTTC connection I just moved it back "in-house". It's no big deal to provision and deploy a new co-lo box should I start getting requests for paid web hosting (and there's things in the pipeline).
I know what you mean about the reboots though. Like I said, it takes several minutes for the VDSL (for FTTC) to reconnect after a brown-out. It's also nice that my DECT cordless phone now doesn't die if the power goes off.
Worth spending a few quid on a replacement battery for that old APC UPS I think.jgh in Japan, 20th December 2024, 03:14 Even avoid the plurals problem entirely by using a form of:
PRINT "Items: ";items
© 2024 Rick Murray |
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted. RIPA notice: No consent is given for interception of page transmission. |