Terugblik op PublicSpaces Conferentie 2024

An article, posted 1 day ago filed in microsoft, google, kimvsparrentak, europa, public, cloud, azure, AWS, amazon, eu & ibm.

Veel inspirerende en mooie woorden dit jaar op PublicSpaces Conferentie 2024, maar vrij van zorgen was ik erna niet. Op de tweede dag sprak Bert Hubert uit in een jolig pessimistisch verhaal dat hij er vanuit gaat dat over enkele jaren 98% van de e-mails verzonden wordt vanuit dan wel servers van Microsoft dan wel Google. Ik hoopte na de PublicSpaces conferentie terug te gaan met nieuwe moed en handgrepen een kleine bijdrage te kunnen leveren om deze beweging te kenteren, maar desillusie is het gevoel dat me beklijft. Misschien moeten we hoop hebben dat de uit de DMA act volgende aanscherping van de aanbestedingsregels helpt om te voorkomen dat de grote partijen niet alles op kunnen slikken, zoals Kim van Sparrentak (MEP voor GroenLinks, voor wie ik eerder een positief stemadvies gaf) aangaf. Maar terwijl [Amsterdam trots aankondigt bezit te zijn met een "autonome strategie"](https://a…

Continue reading...

Should I be upgrading all my dependencies on a regular basis?

An article, posted 18 days ago filed in engineering, software, google, security, gems, programming & development.

For projects I maintain, I try to keep dependencies up to date on a regular basis. But not all people work like that, some live by the adage of "if it ain't broken don't fix it", but that is not an approach I subscribe to in software development.

A common reason to update software dependencies is to fix security issues or bug fixes that plague the project at hand. My main argument in favour of making more frequent updates is that when you suddenly need to make an update (because of an imminent security threat) it won't be hard; when dependencies haven't been updated in a long time it can be hard to to make the update.

There are risks involved in updating dependencies: A new version might introduce breaking changes, things that you rely on suddenly don't work or exist anymore. It might even introduce new bugs that may not be apparent on the first run. And when your test suite is not on par, verifying if everything works as expected is time consuming. But that can all be address…

Continue reading...

Sorting text

An article, posted about one month ago filed in sorting, ruby, programming, database, order, databases & sql.

There are a few hard problems in computing. Correctly handling time, naming, preventing off by one errors… sorting text may not be one of them but recently we ran into a discussion where I couldn't make up my mind anymore. Hence, this post's topic: sorting text.

The problem

How do you sort the following words:

  • cheese
  • Ape
  • Drums
  • dent
  • Beer

If you'd ask ruby I'd get:

 %w[cheese Ape Drums dent Beer].sort

Results in:

  1. Ape
  2. Beer
  3. Drums
  4. cheese
  5. dent

Which in my useless and ramshackle programmer's brain translates to, well why not, it is sorted right?

But then we moved the data into a database which was correctly set up with a proper locale for 'collation', a term that I've seen but never meant anything to me until this problem. Collation is:

> the assembly of written information into a standard order.

(thanks Wikipedia - Collation)

Databas…

Continue reading...

Recommended Dutch beers

An article, posted 2 months ago filed in recommendation, local & amsterdam.

I was asked to make a list of my favourite beers…

For regular drinking, it is never a bad idea to go into a supermarket and to take a box of Gulpener Biologisch (organic). Gulpener harvests all their ingredients close to the brewery. They have three variants, a regular Pilsner, a Weizen and an IPA. Recently I drank their organic Pilsner again after choosing mostly their IPA variant, and realised that it is close to defining Pilsner. Their IPA is also never disappointing, and one that stands above many of these cooler smaller fancy (read more expensive) IPA’s.

Then what other beers? Amsterdam itself has lots of smaller breweries, biggest of the smallest is Brouwerij ’t IJ. Try Columbus for a heavier one (9%; IJ is the name of the river through amsterdam, which is in pronounciation not different from Dutch ‘ei’, which translates to egg, hence all kinds of twists around egg, egg of columbus etc. [Troost](https://bro…

Continue reading...

Blog concept: Sketchy optimisations

An article, posted 3 months ago filed in activerecord, database, optimization, orm, performance, query, rails, software & sql.

Recently a colleague was showing me a concept he was working on. He drafted a change in a fight against so-called 1+n-queries (actually for some reason unknown to me they're called n+1 queries, but my head isn't able to process the problem with just one more query after n queries…); in software development using ORMs like active record it is quite easy to make a single database request objects that when a presented within a view trigger other queries for every object because it has a relationship. Round trips to databases are generally bad as they take time.

For his change, he introduced a new class that we could seemingly reuse, with a just another (a bad code-smell) declaration of relations between objects and whether these should be preloaded when retrieving the primary object. This was in response to indeed a quite bad part of our code that entailed returning objects with counts of selected associations, but instead of counting these in the database, the current code was a…

Continue reading...

The Mega apps

An article, posted 4 months ago filed in app, apple, eclipse, Evolution, java, linux, netscape, os, OSS, outlook, uml, Firefox, ai & mozilla.

Around 2000 I worked on Java Web apps using Eclipse, an open source IDE, which was also extendable with all kinds of tools. Since it was an IDE some made tools for drawing code with UML (connecting named boxes with attributes). But it was also the playground for tools less related to coding. It became a kind of OS running on an OS.

Less niche, was perhaps Netscape Communicator. It was a web browser, an email client, a webpage builder, a calendar … all in one. And also quite extendible again with plugins. The idea still lives on in the Mozilla Seamonkey-project.

A remnant of this is perhaps Microsoft Outlook. An e-mail client with integrated calendar app. An approach mimicked by Evolution on Linux.

I was reminded by all this [because Mozilla wants to focus on integrating AI in their flagship product Firefox](https://arstechnica.com/gadgets/2024/02/mozilla-lay…

Continue reading...

When to use x-objects?

An article, posted 6 months ago filed in ruby, rails, ruby on rails, service, architecture & when to use.

So I wrote a few short articles on when to use FormObjects and Jobs and ServiceObjects. The question is of course "it depends", but the leading principle I have is keep it simple. That being said, for inspiration, some suggestion for different layers to manage the application complexity from Vladimir Dementyev's talk on Railsconf:

Presentation

  • Controllers (standard Rails)
  • Channels (standard Rails)
  • Views (standard Rails)
  • Presenters
  • Form Objects
  • Filter Objects

Application

  • Authorization Policies
  • Jobs (standard Rails)
  • Event listeners
  • Interactors
  • Deliveries
  • Notifiers
  • Mailers (s…

Continue reading...

When to use Modules / Concerns?

An article, posted 8 months ago filed in ruby, rails, ruby on rails, service, architecture, when to use & modules.

Whenever your model gets too heavy?

The easiest way to clean up your classes might be to create smaller, more concise methods. The next easiest way of tiding up your models is moving stuff to modules (whether they are 'Concerns' or not). Modules can then be included in the final classes. It will lead to a crowded list of methods exposed on these classes, for which alternative solutions exist (Presenters, Decorators), but if you shield off private methods nicely and have a consistent way of naming things, I wouldn't be too concerned about that. Note that having many modules used in only a single class might be a code smell: perhaps you're trying to do too much with that single class.

Concerns or Modules?

When you're using Rails, you can make use of Concerns. They offer a few advantages over traditional modules, so use it whenever you're bothering recreating the same behaviour using plain old ruby Modules. I prefer consistency, so if you've adopted Concerns, use con…

Continue reading...

When to use Form-objects?

An article, posted 8 months ago filed in ruby, rails, ruby on rails, service, architecture, when to use, async, form & models.

When necessary.

It depends. By default I would advise against them; not creating Form objects to receive and validate data that could be validated by the Model directly. Even when you have a few nested attributes that belong to the main model modified, I would advise against Form objects. Keep It Simple.

But… sometimes you have more complex forms that don't fit the database-mirroring model as nicely.

Continue reading...

When to use Job (or Worker) objects?

An article, posted 8 months ago filed in ruby, rails, ruby on rails, service, architecture, when to use & async.

Always.

When you are able to do stuff async (not blocking the web-request), make it async. It will also reduce the need for a category of Service-objects. Worker or Job objects can often be called inline if desired.

Sidenote: I personally prefer the "Job" object name, a Job that needs to be performed. Worker is a name that was popularised by Sidekiq, but Sidekiq moved to Jobs as well.

Continue reading...

Tag descriptor

When to use...

An article, posted 8 months ago filed in ruby.

I've got some opinions about certain ways of setting up more advanced (mostly Rails) applications. These might be short 'posts' which I might return to later. Let's see how it goes :)

Continue reading...

When to use Service-objects?

An article, posted 8 months ago filed in ruby, rails, ruby on rails, service, architecture & when to use.

Never.

There is of course never an absolute answer to stuff but if you are running it in a background job anyway have you considered directly writing it in a Worker or Job-object? Note that you can always run jobs async when needed.

My main objection against service objects is that all too often they are ill defined as a category. So while having fat controllers or fat models may be a bad thing, just creating a bunch of somewhat arbitrary 'Services' is not making the code more manageable.

When considering adding a 'services' directory to your app, try to think of what class of problems you want to tackle. And when in doubt, just keep messing around with the somewhat fatter models & controllers.

Continue reading...

(Web/View) Components: Should everything be a component?

An article, posted 9 months ago filed in components, design system, structure, todo, programming, development, front-end & html.

Recently I was reviewing a merge request of some front-end code, and a simple div, that changed a bit of the custom appearance of a block of text through a few custom classes, was changed in a call to a view component that then applied the same classes, passed onto the component through a more deeply nested hash.

> -
> + ’itis ](https://en.wiktionary.org/wiki/divitis) you get ‘TextComponent’-itis.. we don’t add better semantic or structural information to the page layout

Instead?

Keep the code as is. And perhaps create a ticket (or annotate it with TODO:) that you perhaps want to extract this ‘custom-class’ call into a true reusable component. While I don’t think there is something inherently bad with offering the option to override or add some custom classes to a component, a component should only be used if it adds structural meaning either from the developer's side of things or (better) from the consumer’s side of things (e.g. semantic output that can be p…

Continue reading...

How I purchase e-books

An article, posted about one year ago filed in amazon, kobo, ebooks, epub, revenue & usability.

I have a Kindle e-reader myself, but don't like a single monopolist like Amazon to control the market. So I try, whenever possible, to skip their market place. And that is perfectly possible. But say goodbye to one-click shopping.

(same argument probably also applies to the Kobo store, another popular eReader-manufacturer, but perhaps less evil for not being Amazon and supporting 'local' shops, e.g. Bol.com in the Netherlands… which is basically the Amazon of the Netherlands, oh well…)

The alternative

Many books these days come without DRM(!) … they're still watermarked, but that doesn't stop you from converting books.

So, it takes some dedication but my approach is:

  1. To search for the book's publisher, check their website for a purchase link and purchase it there.
    • Or use libris (Dutch independent booksellers collaboration), which allows you to pick a local Libris connected bookshop, and purchase an e-book from them.
    • And…

Continue reading...

Dienstverlening

An article, posted more than one year ago filed in werk, murb & prijzen.

murb levert diverse diensten aan. Centraal voor binnen de dienstverlening zijn de principes van murb.

Maatwerk (web)applicatie ontwikkeling

Naast eigen diensten staat murb u graag bij om in een korte tijd nieuwe oplossingen te realiseren waarmee gewerkt kan worden. Waarna vervolgens doorgewerkt kan worden aan het verder verbeteren van die oplossing. Neem contact op voor de mogelijkheden.

TheStoryBehind.it

Met TheStoryBehind.it kunt u uw online kunstcollectie gemakkelijk ontsluiten voor de buitenwereld. Dit kan op basis van een eenvoudige excel file of middels een API-koppeling. Met CollectionManagement kan ook de collectie beheerd worden. TheStoryBehind.it is in te zetten vanaf €275 per jaar. Neem voor de mogelijkheden contact op.

HeerlijkZoeken

[HeerlijkZoeken.nl](https://heerlij…

Continue reading...

murb blog