RSSAmplifier

Blog

Daniel Beskin's Blog

A blog on software and functional programming

blog.daniel-beskin.comRSS feed ↗18 posts

Latest posts

I Am Not a Functional Programmer

Despite rumors to the contrary, I am not actually a functional programmer. True, I sometimes slip and fall and an "applicative functor" would come out from under my breath. But surely you shouldn't…

The Compiler Is Your Best Friend, Stop Lying to It

The compiler is a powerful tool, yet many developers have a painful relationship with it. Can we do better?

What's the Point of Learning Functional Programming?

"What's the point of learning functional programming?" was a genuine question I got from a student on a functional programming course I was TAing on.

Pretty Symlinking with Home Manager

Use the power of the Nix language to make your Home Manager symlinks pretty.

Validating Custom Keyboard Layouts on NixOS

If you're in the rare intersection of people that use NixOS and custom keyboard layouts, this post is for you. And for those of you who don't use custom layouts, you might learn something useful…

Random Scala Tip #534: Adopt an Error Handling Convention for `Future`

When working with `Future` be explicit about your error handling convention, and make sure your whole team and codebase are aligned to it.

Make Illegal AI Edits Unrepresentable

These are strange times we're living in. We have unleashed an army of junior developers on our codebases while changing little else, yet we expect everything to just be okay.

First Make It Correct

Way back in December, in the spirit of the times (it seems that everyone was either solving Advent of Code or looking for a job), like an elephant in a china shop, I found myself solving a…

Random Scala Tip #624: The Pitfalls of Option Blindness

Before wrapping anything in `Option`, consider whether you should use a more meaningful domain-specific data type instead.

Whiteboxish Macro Powers with Named Tuples

I've recently stumbled upon a post on Scala Contributors by Kit Langton describing how he managed to create the illusion of adding automatically derived (publicly visible) members to a companion of a…

Random Scala Tip #568: Beware of Leaking Iterators

Beware of leaking `Iterator` instances outside the scope you initialized it in.

Random Scala Tip #697: Avoid Anonymous Functions as Dependencies

Avoid using anonymous functions as class dependencies.

Purify Your Tests Episode IV: The Monoids Strike Back

Welcome back to yet another episode of test purification. In the last part we explored another benefit of adding type parameters to our code, the ability to work with very lean mocks. It's been a…

ANY Overloading Considered Evil

This is not just clickbait, I really do mean that ANY form overloading in programming should be considered evil.

Purify Your Tests III: Lean, Mean Testing Machine

In the last part we saw how to make our code more declarative, and the tests more functional by introducing type parameters for the inner data flowing through our code. In this part we are going to…

Purify Your Tests: 2 Parametric, 2 Declarative

In the last part we learned how to purify our tests using type parameters. In this and following parts we'll see some further benefits of adding type parameters this way.

Purify Your Tests

Here's a fun little trick to purify your tests. When I say "purify" I mean it in the pure functional programming sense of making the tests side-effect-free. But more specifically, I'm going to show…

When Are Functions Lazy Enough for Lists

Recently, I've been TA-ing on an introduction to functional programming course, using Haskell. This is a very enlightening experience, as it once again proves the notion that the best way to learn…