Entries tagged 'author:steeph' (Page 27)

The Web Sucks

Entry created on 2021-12-25 Authors: steeph (376) Categories: Opinion (9) Rants (3) World Wide Web (10) Languages used: en (257) edit

Not all of it. But definitely most of the world wide web sucks. I recently stumbled upon a blog post that puts many of my thoughts about the modern web into words well and that I'd like to share:

The Web Sucks by Chucho.

25 years ago I imagined what would be possible if I had access to the internet. 20 years ago we were excited about and enjoyed the possibilities of the web It was better than imagined. 15 years ago we were excited about so much more interesting and useful content, "Web 2.0" and the new possibilities that really started to become useful tools in everyday life. 10 years ago pretty much everbody was online, it had become too crowded but we knew where to go, which browser extensions to install and what to filter for a good experience. 5 years ago I started to realise how fucked the web had actually become.

It happened so slowly that it felt normal. But eventually the vast vast majority of content on the web was and still is commercial websites that mainly serve a purpose other than educate the reader, share experience, knowledge or other content. Almost all of the sites that appear or claim to exist for spreading information contain more paid content than actual content. It has long become impossible to filter out the pieces of the web with a less-than-creditable intent. I think way back when you considered to install an ad blocker for the first time, that's when a major line was crossed. It became so much worse so quickly that I can hardly remember how benign a large potion of the web was years ealier.

More people than ever share content in good faith on the internet today. But even this urge to share experiences, be it for the gratification of an urge to present the author's thoughts and feelings (like this entry) or for altruistic reasons for a greater good, is commercialised and directed into channels optimised for profit maximisation. You can't even access most of it without signing a legal contract that you definitely don't understand (because specialised legal experts aren't even sure how to interpret many of the most important parts) with one of the subjectively most evil companies in the history of mankind.

No wonder many people try to abandon the web as much as it is still possible (which is becoming less and less). No wonder the Gemini project was founded with built in feature contraints and has their users argue and decide against implementing basic features into the protocol that would help make browsing the gemini space a more comfortable experience. From the technological view, openness to new festures, the extendibility of the protocol, has made the mess the web is today possible.

Of cource I'm ignoring many things here the modern web enables and that I use and choose to continue to use. I'm still wondering wether any of it is worth the trouble. From relatively small trouble, like megabytes of at best useless Javascript to larger trouble, like huge companies using AI-created algorithms that have never been evaluated for anything but how much money they potentially could produce when put to use, and intentional policy choices, pressing most of humankind to produce less helpful but more profiting content and, more and more commonly, intentionally harmful content on a scale science is starting to realise is impairing quality of life, empathy and may even have notable bad impacts on international politics.

Seriously, what are we doing allowing to be done with this technology?

Comment via email

Film: Martian Child

Entry created on 2021-12-24 Authors: steeph (376) Categories: Children (4) Films (22) Languages used: en (257) Topics: Films (15) edit

The Martian Child is one of those cute, emotional movies with a child in an important role that left an impression with me and is deemed very much worth watching but I'd have trouble explaining why. I'll push myself through this bit of trouble and try. I think I mostly like it because of the cute. I think of it as sort of like Big Daddy but more serious (and without Adam Sandler). Big Daddy isn't a bad movie overall. I've re-watched it so many times before I realised that movies can be a lot better than that, because it's just too cute not to. But it is a typical Adam Sandler movie with the depth and humor of a typical Adam Sandler movie (and with Adam Sandler).

The Martian Child is another foster child/adoption movie about a single, previously childless man. (Why are there so many movies about this, btw?) In comparison with other movies in this category the closeness to reality of its depiction of the circumstances, the process and the foster care system is probably above average. But I don't have any experience to judge that. That's not the focus of the story, anyway.

For me the story is about the child's unique and uncommon personality. I like how it's never really explained what events in the first five years of his life may explain what every grownup in the story sees as peculiar and concerning behaviour and every child in the story sees as weird and sometimes repellent. It may be important for the grownup's goal to enable him to grow into a normal enough person to function in society. (I assume that's their goal and why they are so concerned about his weirdness.) But it's addressed in the movie only as much as necessary.

For other viewers it may be just as much or more about the new father's development and the challange of and challanges that come with fostering a in general and this child in particular. It's about all of that. But ultimately, the reason I decided to watch it again was that it's an emotional story with a cute small child actor acting and speaking all timid while saying things normal people would find surprising, strange responses. So a good story well told is a great bonus, as it were.

Comment via email

backup.sh

Entry created on 2021-12-05 Authors: steeph (376) Categories: Backups (4) Bash (31) Code (31) Computer (78) Linux (36) Projects (41) Scripts (28) Software (53) Languages used: en (257) Topics: Projects → Code (26) edit
This entry is an update of the entry 'Backup Shell Script'.

I've updated/improved my backup script again.

Download


#!/bin/bash
#2021-11-03

budir="/mnt/backup"
num=8
list="/root/backup-list"
hostname=$(</etc/hostname)
srcdir="$1"
#NAME=${SRCDIR//\//--}
name="$2"

function usage () {
  echo "This script requires either one or two arguments."
  echo "Usage:"
  echo "$0 JOBLIST"
  echo "$0 SOURCE_DIRECTORY NAME"
  echo
  echo "JOBLIST File that contains one backup job per line in the format SOURCE_DIRECTORY NAME"
  echo "SOURCE_DIRECTORY Directory that should be backed up. Please, no trailing slash."
  echo "NAME A string that is used to name the backup in the destination."
  exit 1
}

function single() {
  if grep -qs "$budir " /proc/mounts
  then
    fullname="$budir/$hostname/$name"
    printf "\n"
    printf "Attempting backup of source directory '%s' to '%s'.\n" "$srcdir" "$fullname"
    printf "Number of differential backups to keep: %s\n" "$num"
    printf "Removing oldest backup... "
#    rm -rf "$fullname.$num"
    rsync --archive --delete "$budir/empty/" "$fullname.$num/"		# This is quicker than rm.
    printf "Done.\n"
    for ((i=$num; i>=2; i--)); do
      printf "Renaming '%s' to '%s' ... " "$fullname.$((i-1))" "$fullname.$i"
      mv "$fullname.$((i-1))" "$fullname.$i"
      printf "Done.\n"
    done
    printf "Duplicating last backup ('%s' to '%s')... " "$fullname.0" "$fullname.1"
    [[ -d $fullname.1 ]] && exit 1							# This directory should not exist at that point.
    cp -al "$fullname.0" "$fullname.1"
#    rsync --archive --acls --xattrs --hard-links "$fullname.0/" "$fullname.1/"
    printf "Done.\n"
    now=$(date)
    printf "\n\n\n" >> "$fullname.log"
    printf "STARTING INCREMENTAL BACKUP AT %s\n" "$now" >> "$fullname.log"
    printf "Starting new incremental backy uppy at '%s.0'..." "$fullname"
    if rsync --exclude ".cache" --archive --no-links --delete "$srcdir/" "$fullname.0/" 2>&1 | tee -a "$fullname.log"
    then
      printf " Done.\n"
      printf "Done.\n" >> "$fullname.log"
    else
      printf " Failed.\n"
      printf "Failed.\n" >> "$fullname.log"
    fi
    now=$(date)
    printf "\nIf this line is here the script finished (with or without errors) at %s\n" "$now" >> "$fullname.log"
  else
    printf "'%s' is not mounted. Aborting." "$budir"
    exit 1
  fi
}

function fromlist() {
  while read job; do
    if [ -n "$job" ]; then
      name="${job#* }"
      srcdir="${job% *}"
      single
    fi
  done < "$list"
}

mkdir "$budir/empty"									# Empty directory for a quicker method to delete a large directory.

case $# in
0)
  mount "$budir"
  printf "Reading backup jobs from list. Defaulting to %s.\n" "$list"
  fromlist
  ;;
1)
  mount "$budir"
  list="$1"
  printf "Reading backup jobs from %s." "$list"
  fromlist
  ;;
2)
  mount "$budir"
  single
  ;;
3)
#  I can't decide whether to make the third argument num or budir. I don't need it anyway.
#  num=$3
#  budir=$3
#  mount $budir
#  single
  usage
  ;;
*)
  usage
  ;;
esac

exit 0
Comment via email

SBWG - The Pathshortener And Other Recent Changes

Entry created on 2021-12-05 Authors: steeph (376) Categories: Bash (31) Code (31) Computer (78) Linux (36) Projects (41) SBWG (18) Scripts (28) Software (53) Languages used: en (257) Topics: Projects → Code → Bash Scripts → SBWG (16) edit

I made it my goal to harden SBWG before I start to implement new features. Before I call the next version of this project 1.0 I want to make sure that unexpected input from the command line or from source files, absurd numbers of absurdly long tags and content items, stupidly weird filenames or random binary data as tag values as well as purposfully created traps in the various places where input is processed are handled well, meaning that nothing fails unless there is no sensible way around it, and if something fails, that nothing breaks. Data should be filtered carefully, errors should be handled well and whereever possible data should be made processible if it was supplied in an unprocessible form to reduce the chances of errors. On top of that I wanted to make sure that the script did its job in a reasonable amount of time considering the circumstances. I mean, it will never be very fast. Bash is just not the right language for that. But there certainly were some repetitive tasks that could be improved. Fot the latter I created a simple caching functionality that will probably be extended in the future. I managed to reduce the (calculated/estimated) generation time of my biggest test web site from almost 300 years to a few days. Actual web sites will of course not take that long to generate, even on a slow machine. A huge web site will maybe take up to one day to generate completely, even without the new options that keep the script from re-generating existing unchanged parts of the web site. But before sombody will try to create such a big web site with SBWG I will probably have improved speed further. And even then it's a worst-case time.

As part of the aforementioned goals I have started working on last new feature before version 1.0. I call it the pathreducer. Since many of the files created by SBWG are named after the tags they represent, they can become quite long and contain almost any printible character, including multi-byte unicode characters or characters of character sets I haven't even heard of. I definitely don't want to restrict more than I already have what characters and how many of them tag values can contain. Especially filesystems used by operating systems from Microsoft are relatively restrictive in maximum allowed directory, path and filename length and allowed characters. By default the pathreducer is not used. But if enabled via command line option or in a web site's settings file, it will filter directory and filenames and shorten them to a user-defined maximum length. If the pathreducer decides to change a path elements it also adds a 6-character hash value to make shortened or otherwise reduced path elements as good as unique.

That works well for now and even can create 8.3 or 6.3 filenames for old DOS filesystems. But the result is not very nice because it isn't aware of what filesystem it is going to write a file to. To be save it removes more characters than it would have to for ext and NTFS filesystems. In the future I may extend the pathreducer to detect the filesystem at least of the root of the output directory automatically and decide how exactly path elements should be reduced according to the actual limitations of the present filesystem. Than it may even be enabled by default, even though it can increase the generation time quite a bit.

There are still some tests that I want to do and I will probably find some more things that I want to fix before version 1.0. But I see light.

Comment via email

Real Life

Entry created on 2021-12-05 Authors: steeph (376) Categories: Language (7) Opinion (9) Peeves (2) Real Life (1) Society (2) Thoughts (73) Trolls (2) Languages used: en (257) edit

Of all the things people do wrong in the usage of language, this is probably my pet peeve. Maybe because I believe that I can reasonably argue against it.

People use the term "real life" ("IRL" and, very similarly, "real world") as if it would mean the opposite of "online" or "over the internet" or "using some electronic medium". Hereafter I will call this the wrong usage of the term. It is done so often and regularly that it actually does mean one of these things. Before I describe what I think the problem with it is, let me try to explain what I'm talking about, exactly. Both of those words (real and life) have meanings on their own and using them together is absolutely in line with those individual meanings. I don't find it absurd to expect that the phrase means "the life that is actually true, as opposed to fictional". In fact, I consider it better to expect this meaning because not only did this meaning exist first, it also continues to be used. "The real world" is used meaning the opposite of a virtual world. I suppose the internet was considered to be a virtual world in the beginning and assume that that's where the wrong usage of "real world" stems from.

The main problem that I see is that when people regularly and naturally apply the wrong usage, the notion that the internet is not part of the real world, the real life, is reinforced, which I fear may influence the perception and the expectation that what happens on the internet does not have the same meaning or effects on life as things that happen without the internet playing a major role. In some ways they are (e.g. greater possible audience on social media than on a soapbox), but not in the way the use of "real world" as the opposite implies.

A conversation in a chat room can be much more real than a conversation offline. E-Mails, their meaning and effects on the world aren't less real than those of letter written or printed on paper. A confession over a video chat platform is not unreal compared to a confession over a telephone call, which is not unreal compared to a confession given in close physical proximity, just different. A threat posted in a Whatsapp group doesn't have less impact than a thread yelled at a schoolyard or under four eyes.

I imagine that the more this wrong usage is ignored the more its wrong implications get internalised by society and individuals. I wouldn't go so far to assume that there is a relavant relation between the wrong usage of "real life" and "real world" and the prevalence of "cyberbullying", online harassment and other extreme forms of modern trollship. But I also don't think the possibility that language influences the thinking and by that extension the actions of humans should be overlooked. I wouldn't be surprised if there was some connection to be found. But I don't know of any research on this nor would I expect to find any.

Comment via email

Film: Harold And Maude

Entry created on 2021-12-05 Authors: steeph (376) Categories: Death (7) Films (22) Languages used: en (257) Topics: Films (15) edit

This is a movie that hardly anybody seems to know nowadays. I have no idea how well known it was when it came out in 1971. But I imagine not enough. I don't find most movies from the 80s and older very enjoyable. So I guess by that definition I have to count "Harold And Maude" (IMDB) to the relatively few special movies from that time period. It's not moved or impressed me like other movies on that imaginary list. But it's a very nice story very well told and an uncommon story at that.

I guess that's all I wanted to say here. Check it out (if you want to watch a coming-of-age movie about friendshiplove and a life-defining experience that is unlike any other movie that would be aptly so described and features just enough implied humor to not be called entirely a drama by me).

Comment via email

Ges

Entry created on 2021-12-02 Authors: steeph (376) Categories: Corona (12) Mobile Communications (1) Silly (32) Languages used: de (90) edit
This entry is a reply to the entry 'Spätpandemiesemantik'.

Also, das wird langsam etwas kommpliziert mit den ganzen Corona-Ges. Da dachte ich mir, ich schreib' mal eine Übersicht.

  • 1G: Menschen, die ein echter Gangster sind. Beispielsatz: "Dude, du bist so 1 G."
  • 2G: Der Default-Zustand in EDGE-Land. Beispielsatz: "Hey, hast hier du 2G?" - "Nee, kein Balken."
  • 2G+: Marketing-Sprech für 2G mit zusätzlichen Einschränkungen.
  • 3G: Menschen, die mit oral verabreichtem Impfstoff auf Bierbasis geimpft sind (gebraut, gezapft, getrunken).
  • 3G+: Zustand nach zu viel Bierkonsum. Beispielsatz: "Du siehst nach 3G aus." - "Ja, plus!"
  • 4G: Vier mal geimpft mit zertifiziertem LTE-Vakszien.
  • 5G: Geimpft mit einzig wahrem Mikrokontrollochip.

Gern' gescheh'n.

Comment via email

Generating Bitmap Files With Bash

Entry created on 2021-10-17 Authors: steeph (376) Categories: Bash (31) Bitmaps (1) Code (31) Computer (78) Linux (36) Scripts (28) Software (53) Languages used: en (257) Topics: Projects → Code → Bash Scripts (23) edit

I needed a large amount of image files to try something. I wanted them to be different images. But what's in them didn't matter. So I looked at a BMP file to see how I could create one byte for byte automatically. Bitmap is just the first uncompressed format that I thought of. This is what I came up with:


rbmp() {
  echo -n -e '\x42\x4D\x2A\x02\x00\x00\x00\x00\x00\x00\x7A\x00\x00\x00\x6C\x00\x00\x00\x10\x00\x00\x00\x09\x00\x00\x00\x01\x00\x18\x00\x00\x00\x00\x00\xB0\x01\x00\x00\x23\x2E\x00\x00\x23\x2E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x47\x52\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x'
  c=$(</dev/urandom tr -dc '0123456789ABCDEF' | head -c864 | sed 's/.\{2\}/&\\x/g')
  echo -n -e "$c"'00'
}

Or, if you would like to do run a command for each pixel/color before it is generated, you can do it like this:


# Create a 24 bit bitmap file of 16x9 randomly colored pixels
randombmp() {
  echo -n -e '\x42\x4D\x2A\x02\x00\x00\x00\x00\x00\x00\x7A\x00\x00\x00\x6C\x00\x00\x00\x10\x00\x00\x00\x09\x00\x00\x00\x01\x00\x18\x00\x00\x00\x00\x00\xB0\x01\x00\x00\x23\x2E\x00\x00\x23\x2E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x47\x52\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
  i=1
  while (( i < 433 )); do
    c=$(</dev/urandom tr -dc '0123456789ABCDEF' | head -c2)
    echo -n -e '\x'"$c"
    i=$((i+1))
  done
}

I'm sure I did something wrong. I just copied the header of some BMP file with the right format that I don't even know what it was created with. I didn't actually look up how the header of a BMP file is composed. But it worked.

Comment via email
Go To Navigation Page
Show/Hide Navigation
Mastodon