This is a script that I use for backing up my OneDrive to a Nextcloud instance.| Alexandru Nedelcu - Blog
This is a script that I use for backing up my OneDrive to a Nextcloud instance.| Alexandru Nedelcu
What’s the difference between Option[A] and A | Null? What about between Either[A, B] and A | B?| Alexandru Nedelcu - Blog
On programming and personal projects| Alexandru Nedelcu
I grew up with the Internet, since before people had Internet connections at home or in their pocket. The browser, being the window to the open web, holds a special place in my heart. In this article I’m suggesting the use of Firefox in 2025, for both technical and political reasons, as it’s still the “user agent” that it set out to be.| Alexandru Nedelcu - Blog
I like having a database of links I encounter on the web, like a searchable database, complete with archive links as well. I found a solution.| Alexandru Nedelcu - Blog
I’m self-hosting stuff using Docker on my own server. One problem that comes up for a personal server is to keep it up to date, as old software has security issues. And we don’t want to self-host servers that can become vulnerable due to neglect.| Alexandru Nedelcu - Blog
Now that you’ve seen the dangers of social media, the question is, what are you going to do about it?| Alexandru Nedelcu - Blog
This sample shows an HTTP server and an HTTP client that can cleanly cancel requests. It’s using Tapir and Sttp, with Netty and AsyncHttpClient backends, all powered by Cats-Effect.| Alexandru Nedelcu - Blog
“Shrink-wrapped”, “off-the-shelf” apps, or what the young have come to know as premium apps from the app store, are destined to languish, to become expensive subscriptions, or to be sold to shady companies that will sell your data or make your computer part of a botnet. Proprietary apps are destined to either disappear, most of them taking your data with them, or to rip you off.| Alexandru Nedelcu - Blog
Optimising costs and my workflow is a personal obsession of mine. I've been a 1Password user for years, and I keep trying Bitwarden. If you want to pick between the two, here are the differences between them at the time of writing.| Alexandru Nedelcu - Blog
When generating random numbers for certain use-cases, such as when generating keys / IDs, it’s recommended for the random function to be “cryptographically strong”. Otherwise, attackers could predict random values, enabling serious security vulnerabilities.| Alexandru Nedelcu - Blog
Ads are now, unfortunately, a vehicle for malware, scams, or services that are deceptive and barely legal. But, should we block ads?| Alexandru Nedelcu - Blog
As software developers, we invest a lot in our tools. Time, energy, and feelings. We recommend tools to others; we build on top; we belong to a community; we contribute; hence we're eventually becoming stakeholders. And there's no other tool more clamored or risky in our belt than the programming language. Well, gather around, kids, let me tell you two stories from my past with the software industry…| Alexandru Nedelcu - Blog
Today I was reminded how awesome Scala is for scripting, via Scala CLI. And it goes beyond having “batteries included”.| Alexandru Nedelcu - Blog
A new year is upon us, and it’s customary to make resolutions. The problem with new year resolutions is that we tend to forget them in about a week. So, how to make resolutions that stick?| Alexandru Nedelcu - Blog
This is an update to my december adventure, in which I took it upon myself to learn the Rust programming langauge.| Alexandru Nedelcu - Blog
This December I’m off to a great personal adventure in programming. Everyone can have their own fun December Adventure. You pick something you want to do, or maybe learn, and you do a little of it everyday, as long as it involves some coding.| Alexandru Nedelcu - Blog
Scala’s coding style advised to use 2 spaces of indentation, but that was before Scala 3’s optional braces, which introduces significant indentation. It’s time for an upgrade of the coding style.| Alexandru Nedelcu - Blog
What’s the difference?| Alexandru Nedelcu - Blog
I’m a geek, and a software developer. I want to be close to my peers, wherever they meet online. If this means reactivating former social media accounts, so be it. Therefore, I’m implementing POSSE, again 😕| Alexandru Nedelcu - Blog
In Java and other JVM languages, “volatile” reads and writes are part of the concurrency toolbox. But adding volatile on variables can be a mistake. This is a poorly understood concept. Let’s gain a better understanding.| Alexandru Nedelcu - Blog
Here’s a fairly straightforward Scala 3 sample, using significant indentation. Can you spot the compilation error?| Alexandru Nedelcu - Blog
In Scala, how do we model enumerations of values? What are the possible issues? How does Scala compare with Java? What are the changes in Scala 3?| Alexandru Nedelcu - Blog
The database schema should be described as code, in your repository. And you should be able to semi-automatically update your database schema on new deployments. Now in Kotlin, with Gradle and Flyway.| Alexandru Nedelcu - Blog
Kotlin Coroutines are usually integrated in Java code via Java’s CompletableFuture, but a tighter integration might be possible with Cats-Effect.| Alexandru Nedelcu - Blog
We are using a combination of Akka and Cats-Effect (ver. 3) for building payment processors. This post describes some solutions we’ve discovered.| Alexandru Nedelcu - Blog
I self-host my blog, other websites, Matomo, Mastodon, etc. I love self-hosting. But I need monitoring, to be alerted when things go wrong, as my setup is getting more and more complex. So, I recently asked for help online, being in need of a monitoring system for my VPS, as I need simple, common-sense health alerts. I got a recommendation for M/Monit, which seems to work well. This article shows my configuration.| Alexandru Nedelcu - Blog
Friday the 13th just passed 😳 and what a great day it was to finally leave Twitter. It’s been a fun ride, I found my programming community on it, I’ve learned a lot, but those days are over 😞| Alexandru Nedelcu - Blog
Cloud hosting services like Linode or DigitalOcean offer backup services for your VPS. Save your money, you don’t need it. Here’s how to backup your data safely, and with no extra costs…| Alexandru Nedelcu - Blog
Snippet for when you’re using Circe and want to define custom Jackson serializers/deserializers from Circe’s codec definitions.| Alexandru Nedelcu - Blog
I find Scala’s community to be really nice, welcoming, warm, and productive. I am not talking just of the Typelevel sub-community, which is awesome, but of the whole Scala community. The whole thing.| Alexandru Nedelcu - Blog
Mutable collection types should only be used strategically, with purpose, otherwise for correctness/safety purposes, the default should be immutable collection types, aka persistent data structures.| Alexandru Nedelcu - Blog
I dislike Scala 3’s significant whitespace syntax. At this point it’s safe to say that I hate it, being (IMO) an unfortunate evolution of the language.| Alexandru Nedelcu - Blog
Ever had the need to deliver messages on your queue at a certain timestamp in the future? Look no further, because your RDBMS can do it. This is part 1 of a series that builds a solution from scratch.| Alexandru Nedelcu - Blog
The marketing for Functional Programming is made of technobabble. Technobabble was used in Star Trek. Those long discussions are what Star Trek was loved for, but technobabble isn’t good for sharing knowledge or advancing our field.| Alexandru Nedelcu - Blog
As Scala developers and fans of the functional programming promoted by Haskell, how do we justify the use of IO to newbies coming from Java? It’s been a fun ride, but the truth is that Java 19 is changing everything.| Alexandru Nedelcu - Blog
The following describes snippets for executing shell commands, in Java, Scala, and Kotlin, using standard functionality. It’s also useful to compare Java vs Scala vs Kotlin for this particular problem.| Alexandru Nedelcu - Blog
Java’s Checked Exceptions are problematic, and it’s not only due to their ergonomics. The bigger problem is that they are in conflict with abstraction and OOP. Also, few people care about typed exceptions (unless they are happy path results, not errors).| Alexandru Nedelcu - Blog
What to learn in order to not become obsolete as a software developer, and then being forced into early retirement from programming? What platforms to prefer for building products that last with minimal maintenance?| Alexandru Nedelcu - Blog
Java 19 is now released, and it’s a big deal, as it ships with Virtual Threads (JEP 425), among other goodies, like structured concurrency (JEP 428), or improvements to pattern matching (JEPs 405, 427). I haven’t been as excited about a Java release in a long time.| Alexandru Nedelcu - Blog
Lightbend made Akka proprietary from version 2.7.x onward. This left the community wondering about the possibility of a fork, and unfortunately, I see some FUD that needs to be addressed.| Alexandru Nedelcu - Blog
Java is good by modern standards, from a technical perspective, the platform having received a lot of improvements from Java 8 to 17. Unfortunately, it still stinks, and the problem is its “enterprise” culture.| Alexandru Nedelcu - Blog
Unix has a long tradition with scripting — small programs represented as text files that can be inspected, modified, and executed. Scala can be used for scripting too.| Alexandru Nedelcu - Blog
I finally managed to delete my Facebook account. This was a long time coming. Being disconnected feels good, it feels liberating.| Alexandru Nedelcu - Blog
I’ve just spent over a day, going to sleep at 1:00 am, to upgrade dependencies and fix eviction warnings in the build of a Scala project.| Alexandru Nedelcu - Blog
According to today’s announcement, Lightbend is changing Akka’s licensing to “Business Source License (BSL)”. This is not an Open Source, or a Free Software license. This is a proprietary license.| Alexandru Nedelcu - Blog
You may think that Open Source is about having “access to source code”, whereas Free Software is about freedom. Kids, gather around, let me tell you why that’s wrong.| Alexandru Nedelcu - Blog
Toxic usage patterns of technology, begone — inspired by a self-help book 🤷♂️ I changed my philosophy and habits regarding the use of technology.| Alexandru Nedelcu - Blog
What if we’d use Scala’s type system for tracking side-effects in impure code, too? In the Scala/FP community we use and love effect systems, such as Cats Effect, with its IO data type. “Suspending side-effects” in IO is great, but in Scala it’s either IO or forgoing any kind of type-safety for side-effects, and that’s bad.| Alexandru Nedelcu - Blog
This is the 1st article of a series that explores the difference between OOP design, and parametric polymorphism with Type Classes, as both are possible in Scala.| Alexandru Nedelcu - Blog
I don’t like given, as an alternative to implicit in Scala 3. The more I try working with it, the more it annoys me; and my understanding may be superficial, but I don’t like this direction. Here’s a comparisson between given and implicit, that I hope is fair…| Alexandru Nedelcu - Blog
Scala is considered a multi-paradigm language, for better or worse, being one of the best OOP languages, which is why it’s so versatile. Let’s do a design exercise, going from OOP to static FP, and back. Let’s understand the various techniques promoted in the community, and understand why the OOP design isn’t just “idiomatic” for Scala, but can be superior to alternatives.| Alexandru Nedelcu - Blog
The Scala community is increasingly using Discord for “real-time chat”. This was announced in December, and the community page lists several Discord “servers”, one of them belonging to Typelevel. I think this move from Gitter to Discord is probably a mistake.| Alexandru Nedelcu - Blog
Planning the future is difficult, but can bring clarity and purpose. I’m stepping down from the Typelevel Steering Committee. I also have plans for Monix’s future.| Alexandru Nedelcu - Blog
I like writing about my personal projects and about programming in general. Helping others learn programming seems to be my calling. I rarely write on this blog, however, but I’m trying to change that. You should have a blog too.| Alexandru Nedelcu - Blog
Since 2020 world events have obliterated my ability to focus, and anxiety has gone through the roof. This is a personal reflection and a plan for recovery.| Alexandru Nedelcu - Blog
Snippet for cleaning up a Scala project’s directory of all compiled files.| Alexandru Nedelcu - Blog
You can recommend the required VSCode extensions per repository to your fellow programmers. This is what VSCode calls “workspace recommended extensions”.| Alexandru Nedelcu - Blog
Snippet for an impure way (no IO) to create a resource that can later be closed.| Alexandru Nedelcu - Blog
⌘+Click on a file path triggers my terminal to open that file inside my IDE, and that helps a lot.| Alexandru Nedelcu - Blog
I just refactored a piece of code. I deleted 6 source code files, and rebuilt the functionality with a bunch of dirty OOP classes shoved in a single file 😱| Alexandru Nedelcu - Blog
I stay connected to websites I care about via an RSS/Atom feed reader. It’s better than social media for finding out what’s new because it’s clutter-free. By following RSS/Atom feeds, I discover wonderful gems that otherwise would be lost in the noise.| Alexandru Nedelcu - Blog
Online meetup on Scala 3’s newly introduced types and features for encoding type classes.| Alexandru Nedelcu - Blog
Yo dawg, I heard you liked concurrency primitives. Let’s implement our own asynchronous, dirty CountDownLatch.| Alexandru Nedelcu - Blog
Docker setup for self-hosting Matomo, an open-source alternative to Google Analytics.| Alexandru Nedelcu - Blog
OOP couples the data with the methods operating on it, and this is considered bad in FP circles. But is it?| Alexandru Nedelcu - Blog
Turning imperative algorithms to tail-recursive functions isn’t necessarily obvious. In this article (and video) I’m showing you the trick you need, and in doing so, we’ll discover the Zen of Functional Programming.| Alexandru Nedelcu - Blog
Snippet of code discussing Tagless Final vs OOP-style dependency injection.| Alexandru Nedelcu - Blog
Just a regular expression.| Alexandru Nedelcu - Blog
Snippet in plain F# with no dependencies. Features a neat shebang.| Alexandru Nedelcu - Blog
Helpers for integrating with cats.effect.IO.| Alexandru Nedelcu - Blog
Definitions of scala.math.Ordering MUST BE consistent with equals, an often overlooked law that can lead to problems.| Alexandru Nedelcu - Blog
The database schema should be described as code, in your repository. And you should be able to semi-automatically update your database schema on new deployments.| Alexandru Nedelcu - Blog
Script for listing the used tags of a Jekyll directory of articles.| Alexandru Nedelcu - Blog
We should strive to make illegal states unrepresentable. Option.get is a partial function that, according to many, shouldn’t be in the standard library. Yet it doesn’t bother me; the inability of Scala to make it safe is the problem.| Alexandru Nedelcu - Blog
Screenshots contain text, text that should be searchable, as finding a screenshot later is the whole point of creating it.| Alexandru Nedelcu - Blog
Comments on the web can be toxic, and a waste of time. Here’s how to block them…| Alexandru Nedelcu - Blog
IOApp alternative, for Cats Effect v2, that can work with any effect type.| Alexandru Nedelcu - Blog
Defining a “runtime” for Cats-Effect v2 that provides the underlying environment necessary (i.e. ContextShift, Timer, Clock).| Alexandru Nedelcu - Blog
It’s me, facing a hard to solve problem. It’s a difficult one, and I’m having problems focusing. I make some coffee, I move to another room, and I’m already thinking of running to some coffee shop, forgetting that we’re still in a pandemic.| Alexandru Nedelcu - Blog
Unlawful/independent version of cats.effect.Effect.| Alexandru Nedelcu - Blog
Scala sbt setup for separating unit tests from integrationt tests.| Alexandru Nedelcu - Blog
Converts an Akka Streams Flow into an In => IO[Out] method, thus wrapping Flow into Cats-Effect’s IO.| Alexandru Nedelcu - Blog
Today it’s my 38ᵗʰ birthday. I was born into privilege. Other people aren’t as lucky.| Alexandru Nedelcu - Blog
For security, it’s not a good practice to keep sensitive data in RAM indefinitely.| Alexandru Nedelcu - Blog
Mimicking the HTTP error codes.| Alexandru Nedelcu - Blog
Remote debugging can be used to debug externally executed programs, useful to activate in sbt in order to keep using it while debugging with your favorite IDE.| Alexandru Nedelcu - Blog
Demonstrating Typescript’s untagged union types.| Alexandru Nedelcu - Blog
Retry actions ending in failure via simple functions and Typelevel Cats type-classes.| Alexandru Nedelcu - Blog
Cats-Effect’s Resource can’t be converted directly into a Reactive Streams Publisher. Beware!| Alexandru Nedelcu - Blog
Sample demonstrating that directly executing runnables in your ExecutionContext (with no stack-safety) is a really bad idea.| Alexandru Nedelcu - Blog
Strengthen your code via -Xfatal-warnings, linting and piss off your colleagues with useful compiler errors.| Alexandru Nedelcu - Blog
Simple and very effective implementation of a Semaphore, used for easily parallelizing work in JavaScript/TypeScript.| Alexandru Nedelcu - Blog
Dusted off my website, with big plans ahead.| Alexandru Nedelcu - Blog
Python snippet for sending an email via SMTP.| Alexandru Nedelcu - Blog
Quickly encrypt a message or a file for sending to your colleagues over unsecure messengers (Slack, etc).| Alexandru Nedelcu - Blog
A fun Haskell sample that draws a Sierpinski triangle via ASCII characters.| Alexandru Nedelcu - Blog
Replace in strings via regexp, with the replacement being calculated via a function.| Alexandru Nedelcu - Blog