Guess who's back
Posts by Kaspars Dancis
applet.dev
Did LinkedIn just discover multiverse?
Yeap, thinking of trying Drizzle for my next experiment. I'm still not sold on `undefined` though, property not existing and property existing with undefined value is not exactly the same things. I also managed to actually get bitten by this behavior.
I still ended up resorting to raw SQL for bunch of queries and schema updates because of limited SQL support. Prisma's client generation in node_modules is opaque and causes pain with deployment. And as I just learned, despite all the typing, it can still be unsafe.
I've stayed away from ORMs for more than a decade but figured I'll give it a try to see if things have improved. I do appreciate the benefit of typed models, schema management and ease of use for common-case retrievals. Yet..
In Prisma ORM, if some query parameter is accidentally `undefined` rather than `null`, it will be ignored, resulting in a query that returns all records. If this param is something like `userId` you can imagine the consequences.. π€¦π»ββοΈ
No.
The taste factor in programming is seriously underrated
Adding pointer cursor to all my native app buttons like a pirate
Here we go
Spicy take: the trend against pointer cursor for buttons to make web-apps feel "more native" is harmful. Sure, originally the semantic meaning for pointer cursor was "link" but for average person it has long evolved into "something clickable".
Views in SwiftUI are objects, aren't they?
For comparison, same code in SwiftUI. It's also OOP-ish, however the combo of language features and framework design achieves a better result. The logic is more logically grouped and much easier to read: gist.github.com/k7d/81109aa0...
My biggest gripe with Flutter is the verbosity, which makes it hard for humans to read. This seems mostly due to Dart limitations (cost of syntax simplicity I guess) although OOP-based frameworks in general tend to have this challenge. Here's a typical example: gist.github.com/k7d/b1de9b96...
For a contrast, I also tried rewriting Tomo in SwiftUI, but ended up stuck, because SwiftUI expects apps to follow specific UI patterns, and I couldn't figure out how to step outside those boundaries. Paradoxically, it was much easier to do in Flutter because it is using the older Cocoa framework.
Overall, it ended up being a success. While Dart, the language, is not my cup of tea, Flutter turned out to be surprisingly robust. You can find the source code for Tomo here: github.com/k7d/tomo
This summer, while on a sabbatical, I wanted to explore the state-of-the-art of building native apps and Flutter in particular piqued my interest. While it was originally designed for mobile, the desktop support seemed quite solid by now. Anyway, I figured why not try to rewrite Tomo in Flutter?
Originally I wrote it in ClojureScript, wrapped in the native webview with a custom bridge. While it worked fine, there were some odd performance issues with webview that only surfaced after a few days of usage. I never managed to get to the bottom of it.
I stumbled upon the Pomodoro technique after a concussion, that forced me to take frequent breaks from the screen. While there were several Pomodoro apps available, all of them had some UX issues I no longer remember. Which led me to building Tomo.
Tomo - a Pomodoro timer for macOS
I'm open-sourcing Tomo, a Pomodoro timer app for macOS that I've been using daily for a decade. k7d.dev/tomo/
Had this exact feeling after moving back to Europe
Fun fact, thatβs about the total length of all Seinfeld episodes
What
Been thinking about this a bunch. Something like this might work well enough using file-only sync tonsky.me/blog/crdt-fi...
Self-deprecating? :)
Does this whole left/right coded model even makes sense any more? I'm increasingly convinced that it has become a tool for easily manipulating people into beliefs without much criticial thinking involved.
I would go as far as say that good error messages are more important than good documentation. Unfortunately poor error messages are more common than poor documentation. I guess because it's less obvious.