tag:murb.nl,2005:/feed:murb: feed2024-03-05T19:41:46Ztag:murb.nl,2005:Article/3912024-03-05T19:41:46Z2024-03-13T07:59:02ZBlog concept: Sketchy optimisations // <div class="container"><p>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.</p>
<img src="/system/images/391/inline/old_wall_patched.jpg?1709668625" alt="Blog concept: Sketchy optimisations ">
<p>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 actually loading all these associations and filtering them in code.</p>
<p><strong>Sometimes there is obviously bad, every fix would be an improvement. And sometimes one can think of an even better but more complex fix. But all too often, the complexity, sometimes obfuscated by an abstraction, isn’t worth it.</strong></p>
<p>In our case it solved the problem, and was perhaps even a better fix in terms of query reduction, but while the new code was presented as an abstraction it didn’t seem to be ready any time soon to cover a multitude of other similar but slightly different problems. And that is the litmus test for abstractions: does it solve similar problems, if not, it is a bad abstraction. The logic might be smart. The performance slightly better (although imperceptible), but the newly introduced complexity should be really worth it, and it this case it really wasn’t.</p>
<p>Sometimes you need to look at your code and think, if I’d read this a few months from now, would I still get what is going on here? And if I make an abstraction, do I foresee how I can utilise it to fix this different problem?</p>
<p>Working on complex problems can be enticing, the idea of a more optimal solution, a nice “abstraction”. But is it worth the code? Is it worth the complexity? I’ve seen too many code bases where sketchy ideas ended up being used as early drafts of something grand. But these sketchy optimisations often just add to the cruft, plastering the complexity without really solving a bigger problem. Prefer the easy fix, until you learn what the bigger problem really is.</p>
</div><div id="related">
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2024-03-05T19:41:46Z">05 Mar</span>
<a class="url summary" href="/articles/391-blog-concept-sketchy-optimisations-">Blog concept: Sketchy optimisations</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2021-03-09T16:40:40Z">09 Mar</span>
<a class="url summary" href="/feed_items/12795">Use The Index, Luke</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2011-05-16T15:57:29Z">16 May ´11</span>
<a class="url summary" href="/feed_items/3305">SQLite ODBC Driver</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2011-05-16T15:57:29Z">16 May ´11</span>
<a class="url summary" href="/feed_items/1916">SQLite ODBC Driver</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2021-01-27T20:09:11Z">27 Jan</span>
<a class="url summary" href="/feed_items/12617">Effectively Using Materialized Views in Ruby on Rails</a>
</li>
</ul>
</div>2024-03-05T19:41:46Z2024-03-05T19:41:46Z:murb:tag:murb.nl,2005:Article/3902024-02-16T17:30:41Z2024-02-17T09:20:01ZThe Mega apps // <div class="container"><p>Around 2000 I worked on Java Web apps using <a href="https://eclipseide.org/">Eclipse</a>, 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.</p>
<p>Less niche, was perhaps <a href="https://nl.wikipedia.org/wiki/Netscape_Navigator">Netscape Communicator</a>. 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 <a href="https://www.seamonkey-project.org/">Mozilla Seamonkey</a>-project.</p>
<p>A remnant of this is perhaps Microsoft Outlook. An e-mail client with integrated calendar app. An approach mimicked by Evolution on Linux.</p>
<p>I was reminded by all this <a href="https://arstechnica.com/gadgets/2024/02/mozilla-lays-off-60-people-wants-to-build-ai-into-firefox/">because Mozilla wants to focus on integrating AI in their flagship product Firefox</a>. A lot of people respond negatively to that idea. The common theme: a browser should be fast. And probably they remember the time that browsers were suites, like Netscape communicator… big apps that became slow to start with a plethora of plugins. I guess that most users have just a small selection of plugins installed these days, as browsers do just enough to satisfy their needs.</p>
<p>But let’s explore the contrary idea: there are definitely advantages to having mega apps. It potentially allows you to create apps that have features that deeply hook into each other. Combining e-mail and calendaring allows you to receive an e-mail with a date, parse it, and create a new calendar item from that e-mail. But macOS users will tell you that this can also work quite well even across apps. But why not have a great video editor accessible in your presentation suite. Or at least a great photo editor? I definitely would like to see browsers being able to at least do some image manipulation before upload. There are plenty of work flows that could benefit from a deep integration of tools, not restricted to the copy/paste/insert interactions.</p>
<p>But how to prevent bulkiness? Perhaps we should be building OSes more. An API layer that allows cooperation between different apps that tie into the OS. The definition of an OS here being stretched. Maybe it is more of a desktop environment.</p>
<p>An offline translation function is nice, but it should not be an extension to just a browser. What if a OS plugin exists which detects texts (web documents and others) and allows for rapid on the fly offline translations anywhere? Or, when having a call and deciding on the next meeting, you want to quickly share ability, share not your entire calendar but just your availability (yeah within companies it typically seems to work to plan a meeting, but across… Heck, your machines should have come up with solutions. And all this functionality should not be restricted to just your office suite in use within your company.</p>
<p>On lower level many things are shared. The open dialogue, the print dialogue, much of it is standardised. But what should the next layer be like, to truly support our day to day life mediated by machines. Dynamically linked libraries? Or near monopolistic OSes that set the standards? Perhaps collaboratively crafted open source, but still a single platform? Or should we have APIs that would allow users to mix and match tools that collaborate without ever having been tested to work in unison? Not as code. But as bricks of Lego. Maybe apps may come with new other bricks.</p>
<p>We are converging to a world of apps where things become more isolated. Because we know how things behave in isolation. And it solves our problem of bulkiness. But to properly support our work, we also need to keep in mind how these apps can work together, as integrated collaboration. Perhaps even assisted by some AI.</p>
</div><div id="related">
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2024-02-16T17:30:41Z">16 Feb</span>
<a class="url summary" href="/articles/390-the-mega-apps">The Mega apps</a>
</li>
<li class="vevent mastodon">
<span class="source mastodon">mastodon</span>
<span class="dtstart" title="2024-02-17T09:19:08Z">17 Feb</span>
<a class="url summary" href="/feed_items/14254">A bit of reflection trigger...</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2018-04-05T23:41:25Z">05 Apr ´18</span>
<a class="url summary" href="/articles/303-maak-het-open-source-of-niet-">Maak het open source! Of niet?</a>
</li>
<li class="vevent twitter">
<span class="source twitter">twitter</span>
<span class="dtstart" title="2020-09-09T13:01:58Z">09 Sep</span>
<a class="url summary" href="/feed_items/12053">I like to sponsor @mozilla, but only for its innovative and privacy concious products: @firefox, MDN, not for being… https://twitter.com/i/web/status/1303680045148516356</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2018-10-18T09:41:35Z">18 Oct ´18</span>
<a class="url summary" href="/articles/315-het-groene-slotje-en-symantec">Het groene slotje en Symantec</a>
</li>
</ul>
</div>2024-02-16T17:30:41Z2024-02-16T17:30:41Z:murb:tag:murb.nl,2005:Article/3892023-12-13T10:57:05Z2023-12-13T10:58:39ZWhen to use x-objects? // <div class="container"><p>So I wrote a few short articles on when to use <a href="https://murb.nl/articles/387-when-to-use-form-objects-">FormObjects</a> and <a href="https://murb.nl/articles/386-when-to-use-job-or-worker-objects-">Jobs</a> and <a href="https://murb.nl/articles/384-when-to-use-service-objects-">ServiceObjects</a>. 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 <a href="https://www.youtube.com/watch?v=7XYloLJ0lDo">Vladimir Dementyev’s talk on Railsconf</a>:</p>
<h3>Presentation</h3>
<ul>
<li>Controllers (standard Rails)</li>
<li>Channels (standard Rails)</li>
<li>Views (standard Rails)</li>
<li>Presenters</li>
<li><a href="https://murb.nl/articles/387-when-to-use-form-objects-">Form Objects</a></li>
<li>Filter Objects</li>
</ul>
<h3>Application</h3>
<ul>
<li>Authorization Policies</li>
<li>
<a href="https://murb.nl/articles/386-when-to-use-job-or-worker-objects-">Jobs</a> (standard Rails)</li>
<li>Event listeners</li>
<li>Interactors</li>
<li>Deliveries</li>
<li>Notifiers</li>
<li>Mailers (standard Rails)</li>
<li>(<a href="https://murb.nl/articles/384-when-to-use-service-objects-">Service objects</a>) (he considers these as a bucket of objects waiting for the right abstraction)</li>
</ul>
<h3>Domain</h3>
<ul>
<li>Query objects</li>
<li>Models (standard Rails)</li>
<li>Configuration objects (somewhat standard Rails)</li>
<li>Value objects</li>
</ul>
<h3>Infrastructure</h3>
<ul>
<li>API Clients</li>
<li>Adapters (DB, Mail)</li>
</ul>
</div><div id="related">
<h2>Collectie</h2>
<div class="container">
<p>Maakt deel uit van de volgende collecties:</p>
<ul>
<a href="/articles/282-murb-ruby">murb ♥︎ ruby</a>-collectie</p>
<a href="/articles/385-when-to-use-">When to use...</a>-collectie</p>
</ul>
</div>
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-12-13T10:57:05Z">13 Dec</span>
<a class="url summary" href="/articles/389-when-to-use-x-objects-">When to use x-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:04:03Z">11 Oct</span>
<a class="url summary" href="/articles/384-when-to-use-service-objects-">When to use Service-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:14:57Z">11 Oct</span>
<a class="url summary" href="/articles/386-when-to-use-job-or-worker-objects-">When to use Job (or Worker) objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T14:57:15Z">11 Oct</span>
<a class="url summary" href="/articles/387-when-to-use-form-objects-">When to use Form-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T15:36:43Z">11 Oct</span>
<a class="url summary" href="/articles/388-when-to-use-modules-concerns-">When to use Modules / Concerns?</a>
</li>
</ul>
</div>2023-12-13T10:57:05Z2023-12-13T10:57:05Z:murb:tag:murb.nl,2005:Article/3882023-10-11T15:36:43Z2023-11-07T12:57:37ZWhen to use Modules / Concerns? // <div class="container"><p><strong>Whenever your model gets too heavy?</strong></p>
<p>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 <em>might</em> be a code smell: perhaps you’re trying to do too much with that single class.</p>
<h2>Concerns or Modules?</h2>
<p>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 concerns everywhere.</p>
<h2>Why not use modules (or concerns)?</h2>
<p>Well, Richard Schneeman wrote an interesting article on this: “<a href="https://www.cloudbees.com/blog/when-to-be-concerned-about-concerns">When to be concerned about concerns</a>” And the tl;dr: when you are extracting logic from classes to a concern (or module), you may make it harder to read and debug the code, and worse: code might interact between modules. So something to bear in mind. The alternative: Extract it into smaller classes.</p>
</div><div id="related">
<h2>Collectie</h2>
<div class="container">
<p>Maakt deel uit van de volgende collecties:</p>
<ul>
<a href="/articles/282-murb-ruby">murb ♥︎ ruby</a>-collectie</p>
<a href="/articles/385-when-to-use-">When to use...</a>-collectie</p>
</ul>
</div>
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T15:36:43Z">11 Oct</span>
<a class="url summary" href="/articles/388-when-to-use-modules-concerns-">When to use Modules / Concerns?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-12-13T10:57:05Z">13 Dec</span>
<a class="url summary" href="/articles/389-when-to-use-x-objects-">When to use x-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:04:03Z">11 Oct</span>
<a class="url summary" href="/articles/384-when-to-use-service-objects-">When to use Service-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:14:57Z">11 Oct</span>
<a class="url summary" href="/articles/386-when-to-use-job-or-worker-objects-">When to use Job (or Worker) objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T14:57:15Z">11 Oct</span>
<a class="url summary" href="/articles/387-when-to-use-form-objects-">When to use Form-objects?</a>
</li>
</ul>
</div>2023-10-11T15:36:43Z2023-10-11T15:36:43Z:murb:tag:murb.nl,2005:Article/3872023-10-11T14:57:15Z2023-10-11T15:08:02ZWhen to use Form-objects? // <div class="container"><p><strong>When necessary.</strong></p>
<p>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.</p>
<p>But… sometimes you have more complex forms that don’t fit the database-mirroring model as nicely.</p>
</div><div id="related">
<h2>Collectie</h2>
<div class="container">
<p>Maakt deel uit van de volgende collecties:</p>
<ul>
<a href="/articles/282-murb-ruby">murb ♥︎ ruby</a>-collectie</p>
<a href="/articles/385-when-to-use-">When to use...</a>-collectie</p>
</ul>
</div>
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T14:57:15Z">11 Oct</span>
<a class="url summary" href="/articles/387-when-to-use-form-objects-">When to use Form-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:14:57Z">11 Oct</span>
<a class="url summary" href="/articles/386-when-to-use-job-or-worker-objects-">When to use Job (or Worker) objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-12-13T10:57:05Z">13 Dec</span>
<a class="url summary" href="/articles/389-when-to-use-x-objects-">When to use x-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:04:03Z">11 Oct</span>
<a class="url summary" href="/articles/384-when-to-use-service-objects-">When to use Service-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T15:36:43Z">11 Oct</span>
<a class="url summary" href="/articles/388-when-to-use-modules-concerns-">When to use Modules / Concerns?</a>
</li>
</ul>
</div>2023-10-11T14:57:15Z2023-10-11T14:57:15Z:murb:tag:murb.nl,2005:Article/3862023-10-11T11:14:57Z2023-10-11T15:03:36ZWhen to use Job (or Worker) objects? // <div class="container"><p><strong>Always.</strong></p>
<p>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 <a href="https://murb.nl/articles/384-when-to-use-service-objects-">Service-objects</a>. Worker or Job objects can often be called inline if desired.</p>
<p>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 <a href="https://github.com/sidekiq/sidekiq/discussions/4971">Sidekiq moved to Jobs as well</a>.</p>
</div><div id="related">
<h2>Collectie</h2>
<div class="container">
<p>Maakt deel uit van de volgende collecties:</p>
<ul>
<a href="/articles/282-murb-ruby">murb ♥︎ ruby</a>-collectie</p>
<a href="/articles/385-when-to-use-">When to use...</a>-collectie</p>
</ul>
</div>
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:14:57Z">11 Oct</span>
<a class="url summary" href="/articles/386-when-to-use-job-or-worker-objects-">When to use Job (or Worker) objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T14:57:15Z">11 Oct</span>
<a class="url summary" href="/articles/387-when-to-use-form-objects-">When to use Form-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-12-13T10:57:05Z">13 Dec</span>
<a class="url summary" href="/articles/389-when-to-use-x-objects-">When to use x-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:04:03Z">11 Oct</span>
<a class="url summary" href="/articles/384-when-to-use-service-objects-">When to use Service-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T15:36:43Z">11 Oct</span>
<a class="url summary" href="/articles/388-when-to-use-modules-concerns-">When to use Modules / Concerns?</a>
</li>
</ul>
</div>2023-10-11T11:14:57Z2023-10-11T11:14:57Z:murb:tag:murb.nl,2005:Article/3852023-10-11T11:05:48Z2023-10-11T15:49:52ZWhen to use... // <div class="container"><p>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 :)</p>
</div><div id="related">
<h2>Collectie</h2>
<div class="container">
<p>Maakt deel uit van de <a href="/articles/282-murb-ruby">murb ♥︎ ruby</a>-collectie</p>
</div>
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-12-13T10:57:05Z">13 Dec</span>
<a class="url summary" href="/articles/389-when-to-use-x-objects-">When to use x-objects?</a>
</li>
<li class="vevent mastodon">
<span class="source mastodon">mastodon</span>
<span class="dtstart" title="2023-10-11T15:41:28Z">11 Oct</span>
<a class="url summary" href="/feed_items/14122">Trying a new series of post...</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:04:03Z">11 Oct</span>
<a class="url summary" href="/articles/384-when-to-use-service-objects-">When to use Service-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:05:48Z">11 Oct</span>
<a class="url summary" href="/articles/385-when-to-use-">When to use...</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:14:57Z">11 Oct</span>
<a class="url summary" href="/articles/386-when-to-use-job-or-worker-objects-">When to use Job (or Worker) objects?</a>
</li>
</ul>
</div>2023-10-11T11:05:48Z2023-10-11T11:05:48Z:murb:tag:murb.nl,2005:Article/3842023-10-11T11:04:03Z2023-10-11T15:06:52ZWhen to use Service-objects? // <div class="container"><p><strong>Never.</strong></p>
<p>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 <a href="https://murb.nl/articles/386-when-to-use-job-or-worker-objects-">Worker or Job-object</a>? Note that you can always run jobs async when needed.</p>
<p>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.</p>
<p>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.</p>
</div><div id="related">
<h2>Collectie</h2>
<div class="container">
<p>Maakt deel uit van de volgende collecties:</p>
<ul>
<a href="/articles/282-murb-ruby">murb ♥︎ ruby</a>-collectie</p>
<a href="/articles/385-when-to-use-">When to use...</a>-collectie</p>
</ul>
</div>
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-12-13T10:57:05Z">13 Dec</span>
<a class="url summary" href="/articles/389-when-to-use-x-objects-">When to use x-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:04:03Z">11 Oct</span>
<a class="url summary" href="/articles/384-when-to-use-service-objects-">When to use Service-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T11:14:57Z">11 Oct</span>
<a class="url summary" href="/articles/386-when-to-use-job-or-worker-objects-">When to use Job (or Worker) objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T14:57:15Z">11 Oct</span>
<a class="url summary" href="/articles/387-when-to-use-form-objects-">When to use Form-objects?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-11T15:36:43Z">11 Oct</span>
<a class="url summary" href="/articles/388-when-to-use-modules-concerns-">When to use Modules / Concerns?</a>
</li>
</ul>
</div>2023-10-11T11:04:03Z2023-10-11T11:04:03Z:murb:tag:murb.nl,2005:Article/3832023-10-02T14:01:14Z2023-10-02T14:09:20Z(Web/View) Components: Should everything be a component? // <div class="container"><p>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.</p>
<blockquote>
<p><code>- <div class="custom-class"></code><br>
<code>+ <%= TextComponent.new(html: {class: "custom-class"}) do</code></p>
</blockquote>
<p>I’m not sure why people would like to do it, but some ideas:</p>
<ul>
<li>No more HTML / Everything is a component! (reminds me of <a href="https://en.wikipedia.org/wiki/Art_for_art%27s_sake">l’art pour l’art</a>)</li>
<li>Ability to analyse the way components are used (we’re not doing this right now)</li>
</ul>
<p>The drawbacks:</p>
<ul>
<li>Less readable code (perhaps an opinion)</li>
<li>Slower execution, instead of rendering a static snippet, code needs to be executed</li>
<li>Instead of <a href="https://en.wiktionary.org/wiki/divitis"><code><div></code>’itis </a> you get ‘TextComponent’-itis.. we don’t add better semantic or structural information to the page layout</li>
</ul>
<h3>Instead?</h3>
<p>Keep the code as is. And perhaps create a ticket (or annotate it with <code>TODO:</code>) 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 processed by e.g. screen readers)</p>
</div><div id="related">
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-10-02T14:01:14Z">02 Oct</span>
<a class="url summary" href="/articles/383-web-view-components-should-everything-be-a-component-">(Web/View) Components: Should everything be a component?</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2021-04-29T16:32:08Z">29 Apr</span>
<a class="url summary" href="/articles/352-design-systems-and-the-source-of-truth">Design Systems and the source of truth</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2020-11-27T07:46:21Z">27 Nov</span>
<a class="url summary" href="/articles/349-highlights-from-the-atomic-design-book-by-brad-frost">Highlights from the Atomic Design book by Brad Frost</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2017-04-23T17:38:45Z">23 Apr ´17</span>
<a class="url summary" href="/feed_items/8312">A11 Style Guide</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2016-10-05T09:43:17Z">05 Oct ´16</span>
<a class="url summary" href="/articles/255-try-not-using-javascript-first">Try not using Javascript first</a>
</li>
</ul>
</div>2023-10-02T14:01:14Z2023-10-02T14:01:14Z:murb:tag:murb.nl,2005:Article/3822023-03-14T21:47:50Z2023-06-30T08:45:02ZHow I purchase e-books // How not to use Amazon or Kobo<div class="container"><p>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.</p>
<p>(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…)</p>
<h2>The alternative</h2>
<p>Many books these days come without DRM(!) … they’re still watermarked, but that doesn’t stop you from converting books.</p>
<p>So, it takes some dedication but my approach is:</p>
<ol>
<li>To search for the book’s publisher, check their website for a purchase link and purchase it there.
<ul>
<li>Or use <a href="https://libris.nl/">libris</a> (Dutch independent booksellers collaboration), which allows you to pick a local Libris connected bookshop, and purchase an e-book from them.</li>
<li>And try your local bookstores; one of the bookstores near by my home actually <a href="https://www.linnaeusboekhandel.nl">sells eBooks as well on their website</a>.</li>
</ul>
</li>
<li>Copy the download to my <a href="https://calibre-ebook.com/">Calibre</a> e-book manager</li>
<li>Send it to my device (I set up sending to my kindle.com email adress for wireless syncing)</li>
</ol>
<p>Calibre is horrendous looking, but when you have it configured correctly it works.</p>
<h2>Not ideal.</h2>
<p>Of course there are plenty of disadvantages:</p>
<ul>
<li>You might end up with multiple accounts at multiple publishers and have to walk through quite a few different ways to obtain it.
<ul>
<li>Hence: downloading it with just your e-reader is a nogo</li>
<li>Hence: one click download doesn’t work</li>
</ul>
</li>
<li>Calibre is not a really pleasant app to use</li>
<li>You are responsible for backups => but as I recently learned, <a href="https://mastodon.online/@monro/109812445178130161">you should always make sure you have your own backups</a>
</li>
</ul>
<p>I welcome suggestions for better approaches.</p>
</div><div id="related">
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-03-14T21:47:50Z">14 Mar</span>
<a class="url summary" href="/articles/382-how-i-purchase-e-books">How I purchase e-books</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2011-06-27T18:22:31Z">27 Jun ´11</span>
<a class="url summary" href="/articles/117-digitale-abonnementen-op-cultuur">Digitale abonnementen op cultuur</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2011-06-27T18:22:31Z">27 Jun ´11</span>
<a class="url summary" href="/articles/117-digitale-abonnementen-op-cultuur">Digitale abonnementen op cultuur</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2021-06-02T13:53:04Z">02 Jun</span>
<a class="url summary" href="/feed_items/13152">Alternatives to Goodreads</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2020-06-22T08:41:55Z">22 Jun</span>
<a class="url summary" href="/articles/346-hoe-lang-mag-techniek-ons-nog-in-de-weg-zitten-">Hoe lang mag techniek ons nog in de weg zitten?</a>
</li>
</ul>
</div>2023-03-14T21:47:50Z2023-03-14T21:47:50Z:murb:tag:murb.nl,2005:Article/3812023-03-09T20:42:57Z2023-03-09T20:42:57ZDienstverlening // <div class="container"><p>murb levert diverse diensten aan. <a href="https://murb.nl/articles/252-de-principes-van-murb">Centraal voor binnen de dienstverlening zijn de principes van murb</a>.</p>
<h3>Maatwerk (web)applicatie ontwikkeling</h3>
<p>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. <a href="/contact/new">Neem contact op voor de mogelijkheden</a>.</p>
<h3><a href="https://thestorybehind.it">TheStoryBehind.it</a></h3>
<p>Met <a href="https://thestorybehind.it">TheStoryBehind.it</a> 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. <a href="/contact/new">Neem voor de mogelijkheden contact op</a>.</p>
<h3><a href="https://heerlijkzoeken.nl">HeerlijkZoeken</a></h3>
<p><a href="https://heerlijkzoeken.nl">HeerlijkZoeken.nl</a> (en <a href="https://heerlijkzoeken.be">HeerlijkZoeken.be voor de Belgische kookboekenliefhebber</a>) is zoekmachine voor recepten in kookboeken.</p>
<p>Hoewel een groot deel van de site gratis is, en ondersteund wordt door affiliate links en advertenties (zonder tracking) is er ook een mogelijkheid om een abonnement af te sluiten: voor €29,99 kun je een jaar lang advertentievrij al je geïndexeerde boeken doorzoeken.</p>
<h3><a href="https://familieadres.nl">Familieadres.nl</a></h3>
<p><a href="https://familieadres.nl">Familieadres.nl</a> biedt voor een aantrekkelijke prijs een doorstuurservice aan voor e-mail. Hiermee kun je je eigen favoriete online e-maildienst blijven behouden (of migreren van provider) zonder dat je je e-mailadres hoeft te wijzigen. Eenvoudiger en vaak goedkoper dan het hebben van een eigen domeinnaam: €4,99.</p>
</div><div id="related">
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-03-09T20:42:57Z">09 Mar</span>
<a class="url summary" href="/articles/381-dienstverlening">Dienstverlening</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2021-10-14T13:42:27Z">14 Oct</span>
<a class="url summary" href="/articles/359-een-pragmatisch-succesverhaal">Een pragmatisch succesverhaal</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2016-08-19T16:16:03Z">19 Aug ´16</span>
<a class="url summary" href="/articles/252-de-principes-van-murb">De principes van murb</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2011-06-04T14:11:59Z">04 Jun ´11</span>
<a class="url summary" href="/articles/114-100-zelfstandig">100% zelfstandig</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2011-06-04T14:11:59Z">04 Jun ´11</span>
<a class="url summary" href="/articles/114-100-zelfstandig">100% zelfstandig</a>
</li>
</ul>
</div>2023-03-09T20:42:57Z2023-03-09T20:42:57Z:murb:tag:murb.nl,2005:Article/3792023-01-30T08:27:59Z2023-02-03T14:42:42ZAnalytics // <div class="container"><p>How many people are visiting my site. What are the most popular pages? How did they reach me? How do they navigate my site. Data about this can help you make informed decisions on how to improve your site or app. Sadly this often comes at price: the privacy of your visitors. Alternatives exists for the major brands, and you can also collect some of the statistics yourself. Either using a self-hosted solution or just by analysing your log files. Yes, awstats still exists.</p>
</div><div id="related">
<h2>Collectie</h2>
<div class="container">
<p>Maakt deel uit van de volgende collecties:</p>
<ul>
<a href="/articles/305-privacy">Privacy</a>-collectie</p>
<a href="/articles/380-"></a>-collectie</p>
</ul>
</div>
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-01-30T08:27:59Z">30 Jan</span>
<a class="url summary" href="/articles/379-analytics">Analytics</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2023-01-30T08:21:53Z">30 Jan</span>
<a class="url summary" href="/feed_items/14019">Plausable.io</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2023-02-03T14:40:42Z">03 Feb</span>
<a class="url summary" href="/feed_items/14022">Matomo</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2023-01-30T08:30:42Z">30 Jan</span>
<a class="url summary" href="/feed_items/14020">AWStats</a>
</li>
<li class="vevent delicious">
<span class="source delicious">delicious</span>
<span class="dtstart" title="2019-07-14T19:58:35Z">14 Jul</span>
<a class="url summary" href="/feed_items/10494">What the Heck is Sign In with Apple?</a>
</li>
</ul>
</div>2023-01-30T08:27:59Z2023-01-30T08:27:59Z:murb:tag:murb.nl,2005:Article/3782023-01-17T21:56:27Z2023-01-17T21:59:15Zpupprb // <div class="container"><p><code>pupprb</code> is a simple wrapper around <a href="https://pptr.dev/">puppeteer</a>, a tool maintained by Google Chrome engineers, which I primarily use to print PDFs. This gem simply wraps my default settings / approach in a relatively easy to reuse gem.</p>
<p>Source: <a href="https://gitlab.com/murb/pupprb">@gitlab</a>
Rubygems: <a href="https://rubygems.org/gems/pupprb">pupprb</a></p>
</div><div id="related">
<h2>Collectie</h2>
<div class="container">
<p>Maakt deel uit van de <a href="/articles/282-murb-ruby">murb ♥︎ ruby</a>-collectie</p>
</div>
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2023-01-17T21:56:27Z">17 Jan</span>
<a class="url summary" href="/articles/378-pupprb">pupprb</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2021-05-07T19:23:24Z">07 May</span>
<a class="url summary" href="/articles/353-why-i-stopped-inheriting-from-ruby-s-core-array-class">Why I stopped inheriting from ruby’s core Array class</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2016-04-01T09:56:00Z">01 Apr ´16</span>
<a class="url summary" href="/articles/231-mijn-werk-concordia-weekoverzicht">Mijn werk: Concordia weekoverzicht</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2013-01-20T22:35:38Z">20 Jan ´13</span>
<a class="url summary" href="/articles/174-introducing-workbook-a-new-rubygem">Introducing Workbook, a new rubygem</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2021-11-25T10:54:08Z">25 Nov</span>
<a class="url summary" href="/articles/365-introducing-centrallogin-an-openid-connect-provider">Introducing CentralLogin, an OpenID Connect Provider</a>
</li>
</ul>
</div>2023-01-17T21:56:27Z2023-01-17T21:56:27Z:murb:tag:murb.nl,2005:Article/3772022-12-22T08:28:50Z2022-12-22T08:31:13ZTriodos en de certificatenhandel // <div class="container"><p>De <a href="https://www.nrc.nl/nieuws/2022/12/21/was-bij-triodos-sprake-van-wanbeleid-beleggers-in-de-duurzame-bank-willen-dat-graag-weten-a4152277">Triodos Bank staat vandaag voor de rechter in verband met diens problemen met de certificaten</a>.</p>
<p><a href="https://www.triodos.nl/certificaathouders">Die certificaten van Triodos zijn een soort van aandelen, maar niet helemaal</a>. Ik heb er op papier zo’n best wat mee verloren. Ze maken echter deel uit van mijn pensioenpot (ben zelfstandige), die uiteindelijk, op de langere termijn dus, enigszins de inflatie bijhoudt. Maar de rechtszaak vind ik echt een vreemde.</p>
<p>De certificaten waren een balans tussen het bewaken van de missie, steun in kapitaal, en meedelen in het rendement, puur op basis van de ingeboekte resultaten, niet op basis van vraag en aanbod van iets een afgeleide.</p>
<p>Ik wil niet dat de bank verkocht wordt en een speelbal wordt van rauw kapitalistisch geweld op een beurs. Zeker niet omdat de handel in een afgeleid stuk papier dat los staat van de intrinsieke waarde dat zou dicteren. Een bank opereert per definitie in het kapitalistische systeem, maar sommige banken proberen meer dan andere om daar de scherpste kanten vanaf te halen. En daarvoor helpt het dat ze onafhankelijker van het kapitalistische systeem kunnen opereren, niet afhankelijker.</p>
</div><div id="related">
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2022-12-22T08:28:50Z">22 Dec</span>
<a class="url summary" href="/articles/377-triodos-en-de-certificatenhandel">Triodos en de certificatenhandel</a>
</li>
<li class="vevent mastodon">
<span class="source mastodon">mastodon</span>
<span class="dtstart" title="2023-08-18T09:52:48Z">18 Aug</span>
<a class="url summary" href="/feed_items/14068">Er zijn klachten over de la...</a>
</li>
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2017-12-17T16:58:34Z">17 Dec ´17</span>
<a class="url summary" href="/articles/292-bitcoin-blockchain-">Bitcoin? Blockchain?</a>
</li>
<li class="vevent shared">
<span class="source shared">shared</span>
<span class="dtstart" title="2012-03-16T07:47:00Z">16 Mar ´12</span>
<a class="url summary" href="/feed_items/2716">So, how can bankers live with themselves? | Joris Luyendijk</a>
</li>
<li class="vevent mastodon">
<span class="source mastodon">mastodon</span>
<span class="dtstart" title="2023-09-04T14:34:57Z">04 Sep</span>
<a class="url summary" href="/feed_items/14087">Starting UA&#39;s independence ...</a>
</li>
</ul>
</div>2022-12-22T08:28:50Z2022-12-22T08:28:50Z:murb:tag:murb.nl,2005:Article/3762022-09-06T19:45:41Z2022-10-19T18:02:36ZOn AI art // <div class="container"><p>If you love art, don’t bother reading any further. I’m stating the very obvious, but I felt I had to respond. It’s <a href="https://murb.nl/articles/373-over-nfts">NFT-style hype</a> (in Dutch) all over again.</p>
<p><strong>My Twitter timeline contains probably more than average amount of generated AI images, and it is labelled as AI “art”, generated by tools like DALL-E, stable diffusion, mid journey, tools that allow simple beings to create a Monet style picture of a 21 century scene, or complete the scenery of the milkmaid. And the way it is presented angers me.</strong></p>
<img src="/system/images/376/inline/screen_with_noise.jpg?1662494577" alt="On AI art">
<p>While being quite impressive in terms of “how did the computer do this”, I hate to state the obvious, but: this is not art. In the end it is just more visual debris. You may put a frame around your Van Gogh 1000pc puzzle, it is not the creative work, even though you spend a day “creating” it. You’re also not an artist if you completed a 15 week course in landscape painting. Nor is probably your beautiful holiday picture, even though it is decorative and it reminds you of that nice time.</p>
<p>Art is less about the visual / nice picture, and more about what the artist tried to convey. Be it commentary on today’s society or a personal quest or something totally different; using materials which are not always pixels to best convey that message, which might inspire or evoke some other emotion, but good art is preferably more than ‘nice’. Art is so much more and if a society does no longer understand that, <em>that</em> would be not just the end of the job of an artist, but the death of culture.</p>
<p>And to counter some obvious commentary:
* Yes, an artist could use AI tools to create art, but as a tool, not as a producer
* Perhaps a poetic entry in a AI tool can be the art
* A tech savvy artist can use AI to create a tool that generates the art (but then the tool would be the art work, less so the output)
* No, I am not an expert who can answer what defines art, but it is easier to recognize what is not.</p>
<p><small>The noisy image was created by Dall-E :p</small></p>
</div><div id="related">
<h2>Gerelateerd</h2>
<ul class="feed_items">
<li class="vevent murbed">
<span class="source murbed">murbed</span>
<span class="dtstart" title="2022-09-06T19:45:41Z">06 Sep</span>
<a class="url summary" href="/articles/376-on-ai-art">On AI art</a>
</li>
<li class="vevent shared">
<span class="source shared">shared</span>
<span class="dtstart" title="2023-01-10T08:05:51Z">10 Jan</span>
<a class="url summary" href="/feed_items/14017">AI-Generated Images from AI-Generated Prompts</a>
</li>
<li class="vevent mastodon">
<span class="source mastodon">mastodon</span>
<span class="dtstart" title="2024-03-11T19:15:59Z">11 Mar</span>
<a class="url summary" href="/feed_items/14274">@aardrian: &gt; I am mostly ga...</a>
</li>
<li class="vevent mastodon">
<span class="source mastodon">mastodon</span>
<span class="dtstart" title="2024-02-17T09:19:08Z">17 Feb</span>
<a class="url summary" href="/feed_items/14254">A bit of reflection trigger...</a>
</li>
<li class="vevent mastodon">
<span class="source mastodon">mastodon</span>
<span class="dtstart" title="2024-01-08T15:10:44Z">08 Jan</span>
<a class="url summary" href="/feed_items/14206">It is kinda obvious, but if...</a>
</li>
</ul>
</div>2022-09-06T19:45:41Z2022-09-06T19:45:41Z:murb: