Offentlige virksomheter bør eie egen publiseringskanal

Sosiale medier som twitter har vært en populær og lett tilgjengelig publiseringsplatform for ting som værmeldinger og trafikkmeldinger og oppdateringer fra politiet.

Sosiale medier har også vært en fin måte for radioprogrammmer og TV-programmer som går live til å få reakskjoner og innspill fra lyttere/seere inn i programmet i sanntid.

Sosiale medier har vært en ypperlig måte for journalister til å kontakte kilder og få tips.

Sosiale meldinger har vært en måte for politikere å ha direkte kontakt med sine velgere og å snakke direkte til de samme velgerne.

Men så har det dukket opp problemer med bruk av sosiale medier.

De sosiale mediene kostet i utgangspunktet ingenting å bruke. Men ingenting er gratis, noen måtte betale for kostnadene med å holde serverene i drift.

Det som nå betaler for de “gratis” sosiale mediene, er at personer som har lagt inn informasjon de er avhengig av og knyttet kontakter de er avhengige av, betaler indirekte med å bli et produkt til de som skreddersyr reklame.

Et annet problem er at man kan bli sensurert på måter som virker helt vilkårlig, uten mulighet til å finne ut hvorfor man blir sensurert eller mulighet til gjøre noe med det.

Og… så kan et sosialt medium bli kjøpt av en milliardær med en agenda som ikke passer med et liberalt demokrati og en tolking av ytringsfrihet som er at alle som er enig med ham kan si det de vil, mens de som mener noe annet enn ham blir straffet.

Spørsmål som har blitt stilt er: hvorfor finnes det noe åpen kildekode-alternativ? Hvorfor er det ingen informasjonskanal som de som publiserer kan eie sjøl?

Svar på første spørsmål er at det finnes ikke bare ett åpen kildekode-alternativ, det finnes mange.

Svar på andre spørsmål er at det finnes en sånn informasjonskanal og at den heter “ActivityPub“. ActivityPub binder sammen tjenester som blandt annet mastodon og pixelfed og har eksistert siden 2018.

Continue reading Offentlige virksomheter bør eie egen publiseringskanal

Convert react/redux webapp from saga/axios to RTK query and RTK listener

Redux saga is a core component of my react/redux applications. Unfortuately Redux Saga has been deprecated and haven’t seen an upgrade in the last year.

This blog posts covers the replacement of redux saga and axios with RTK query and RTK listener in a react redux webapp.

Continue reading Convert react/redux webapp from saga/axios to RTK query and RTK listener

Convert react app built with frontend-maven-plugin from webpack to vite

The frontend-karaf-demo project is a maven project that builds a jar file containing a servlet and compiles a react application, with frontend-maven-plugin, into static files that can be added to the jar file’s classpath and be served by the servlet.

With the frontend-maven-plugin, building a webapp can be integrated into a maven build, without the builder having to download and install node.js. The frontend-maven-plugin downloads its own node.js to handle npm depdencies and do the build.

This bloggpost describes the things I had to do, to convert the webapp build in this setup from webpack to vite.

Note: to follow this recipe npm must be installed (but it is possible to achieve the same effects by manually editing package.json). Continue reading Convert react app built with frontend-maven-plugin from webpack to vite

Build Java records with builders

When writing Java record withers what and when I discovered that the Java beans with builders resulting from Build beans better with builders could have their boiler plate code size reduced to half, if they were turned into records instead of beans.

This is the story of switching my Java beans to records and how that worked with jackson to build JSON objects from records and parse JSON objects into records. Continue reading Build Java records with builders

Java record withers what and when

This blog post is the result of searching the internet to find out what Java records with “withers” will look like and in what version of Java records with withers will arrive.

In addition, while trying to figure out Java withers, I discovered that reforming my current beans with builders into records with builders, I could throw away half the boiler plate code. Continue reading Java record withers what and when

Trying out Tailwind CSS on a react webapp

Introduction

On November 11 2021 I put trying out tailwindcss on my personal TODO list.

In January 2024 I got around to trying out tailwindcss on a react.js web application and this blogpost first describes how I used it and then what I think about it.

The application used in the tailwind test

The test bed for trying out Tailwind CSS was my smallest real application, handlereg. This is an application for tracking grocery purchases. What’s tracked for each purchase is the date, the store and the amount.

Before trying out Tailwind CSS, the application was styled with Bootstrap v5 (and just recently upgraded from Bootstrap v4).

Here is the main page of the handlereg webapp styled with Tailwind CSS. Continue reading Trying out Tailwind CSS on a react webapp

Installing debian 11 “bullseye” using PXE boot on an Acer Aspire 5 A515-45 laptop

I installed GNU/linux on a laptop, for the first time since 2012. And the install was mostly trouble free. I spent a little time on getting the PXE boot working and getting the wireless NIC working, but other than that everything I’ve tried has been working smoothly (display, sound, keyboard, touchpad and suspend/resume).

Continue reading Installing debian 11 “bullseye” using PXE boot on an Acer Aspire 5 A515-45 laptop

Yep, I’m still using redux

Why I’m still using redux and how I’m currently using redux.

One thing I’ve heard a lot recently, when other frontend people have taken a look at my code, is the question “Are you still using redux? That’s so wonderfully quaint and old fashioned. When we threw it out and started using useState() hooks our life got so much better!” (or maybe just “once we started using hooks our life got so much better”).

And yep, I am still using redux, even though react hooks, which supposedly made redux obsolete and old-fashioned, arrived back in 2018 (which is also the same year I started doing frontend programming).

Continue reading Yep, I’m still using redux