After having used a bunch of LLM models, this is my conclusion:
- Gemini 3 Thinking for brainstorming
- Claude Sonnet 4.5 for programming
View quoted note →
Frederik Handberg
npub1nj0c...2gqz
23 🇩🇰 Studying for a degree in Software Engineering while building fun projects and working freelance as a News Photographer 📷
I share my software projects, photos and videos from my work as a news photographer, and progress updates as I learn to sew garments.
Basically, I just write about my hobbies.
frederikhandberg.com
I think perhaps having two databases would be preferable:
- `app_state.db`: It stores data such as which Spaces are currently added to the app and where they are located on the disk. Will also include a table of recently opened Spaces - this will be used to show a list in the UI.
- `cache.db`: This database is disposable and is just used for mirroring. The app will scan the Space folder to rebuild the database.
The local files are always the source of truth, but having the `cache.db` database allows for very efficient indexing. #dev
View quoted note →
The easy route would be to just store everything in the SQLite database, but I really do prefer the approach of having local files. I think the right choice is going to be a hybrid approach where the app uses both local files and a database, but I need to find the right balance...
There should be an app database storing 'Spaces' with their names and icons/images.
This database will be stored inside the app directory, and it will therefore be device-specific. This means, each device will have its own local database.
This creates a bit of a problem in terms of continuity because of no global database that's hosted in the cloud.
Imagine the following scenario:
- The user bookmarks a note on their Mac.
- Now the user opens the iOS app, but the bookmark is not to be found.
The bookmark will not appear automatically, because as already mentioned, each device has its own local database. Luckily, there is another way to do it that solves the problem of continuity.
I could simply use hidden folders inside the space folder. Then the local database will just mirror the information found in the files located in the hidden `.space/` folder.
The folder structure could be something like:
```
/Documents/My_Project_Space/
├── .space/
│ ├── settings.json (spaceName, icon/image, bookmarks, recentNotes, ...)
│ └── history/
│ └── F0B35EEF/ (Folder named by note ID)
│ ├── 20260112_1000.json
│ └── 20260112_1045.json
├── assets/
│ └── some_image.png
├── Work_Notes/
│ └── meeting_jan_12.json
└── some_other_note.json
```
The local files should always be the source of truth, while the database is there mirroring for performance.
If the user types a character in a note, the local DB should be updated and immediately refresh the UI, this should take <1ms, so the user sees the change instantly.
Then after, the app triggers a background task to write the updated JSON to the disk.
I'm still in the process of figuring out the best architecture before beginning implementation, but I think I'm starting to have a pretty good idea of how to best do this. #dev #app
View quoted note →
Gemini 3 Thinking is really good at brainstorming implementation architectures for my notes app.
I'm trying to decide how I want to store notes. Currently, I have an approach of using a local JSON-file for each note document, but I _need_ a local SQLite database for version control and other features.
Technically, I don't really need the database for version control, as I could have a `/.history/[note-id]` folder and then store each version of the note, but this is not efficient at all. It increases disk usage like crazy compared to the database-approach. #dev
Interesting blog post, but Nostr should have been mentioned in "Connecting with friends on the Web"


A Website To End All Websites | Henry From Online
How to win the war for the soul of the internet, and build the Web We Want.
Can confirm 👍
View quoted note →
My first #sewing project has begun!
I’m starting out with sewing a basic t-shirt.
I’m very nervous about how it’s gonna fit. I should probably just have done an oversized tee, but instead I’m going for a fitted style. I’m regretting that decision now 😂
Single-vehicle accident on Bollervej in Horsens.
A passenger car lost control and crashed upside down in a field. #press
Here are some of the tasks I need to complete for the notes app I’m building… #dev
**Save the state of line numbers in a code block:**
Line numbers in code blocks can be controlled via a toggle to show or hide them.
The state should be saved so that if hiding the line numbers for a specific code block, it should be saved to the JSON structure.
**Add a shortcut to easily insert a new block:**
Need a shortcut to insert a new text block.
Could be `Cmd+Enter` to insert below and `Cmd+Shift+Enter` to insert above the currently selected or focused block.
**Automatically focus a newly added block:**
After adding a new block, it should automatically be focused and the caret should be positioned in the new block, so that the user can begin typing immediately.
**Clicking enter on empty list item:**
When clicking enter in an empty list item, it should be converted to a normal text block. It’s the same behavior as when clicking backspace in an empty list item.
**Highlight heading button in outline:**
Placing the caret in a heading or the blocks below, should highlight the corresponding heading in the outline of the right sidebar.
I think I finally have a working solution in my notes app 🚀
Don't want to declare victory too early. Will need to do some more testing, but my solution seems really promising.
I am now able to hover the ellipsis button in a collapsed heading and the `NSCursor` will correctly change to the `.pointingHand`.
Before it would immediately change back to the default, which is the `.iBeam` for text views. This is because the ellipsis button is positioned on top of an `NSTextView`, and text views in AppKit are very aggressive in controlling the `NSCursor` type. Even if you set `.onHover` to change cursor in SwiftUI, it will just get overridden by the text view...
My solution involved controlling the cursor on AppKit-level, as I needed more control than what SwiftUI offers.
Part of my solution involved overriding the function `cursorUpdate()` so that can control exactly when the cursor should update. I have a guard that returns early to avoid changing cursor if the hit view is the ellipsis button.
I also override the function `mouseMoved()` to constantly set `NSCursor.pointingHand()` whenever the mouse is moved over the button.
On a rare occasion, the cursor will flicker, but from my testing, this happens very rarely. #dev #AppKit #SwiftUI #macOS
View quoted note →
My solution involved controlling the cursor on AppKit-level, as I needed more control than what SwiftUI offers.
Part of my solution involved overriding the function `cursorUpdate()` so that can control exactly when the cursor should update. I have a guard that returns early to avoid changing cursor if the hit view is the ellipsis button.
I also override the function `mouseMoved()` to constantly set `NSCursor.pointingHand()` whenever the mouse is moved over the button.
On a rare occasion, the cursor will flicker, but from my testing, this happens very rarely. #dev #AppKit #SwiftUI #macOS
View quoted note →Having some trouble with changing the `NSCursor` on hover.
I have an `NSButton` layered on top of an `NSTextView`, and I want the button to use the `.pointingHand` cursor type when hovering it.
But the text view will constantly override the `.pointingHand` back to the default for text views, which is the `.iBeam`.
It’s not the first time I’ve been fighting this behavior. I’ve been trying to find a workaround before, but never spent much time on it, as I considered it a low-priority bug fix.
But today I finally had the time to figure out a way to fix it. #AppKit #macOS

GitHub
GitHub - frederikhandberg0709/NSCursor-hover-tracking: Change NSCursor when hovering NSButton above NSTextView
Change NSCursor when hovering NSButton above NSTextView - frederikhandberg0709/NSCursor-hover-tracking
Semi-truck crashed on E45 Horsens #press


I’m hooked on the Canon C50… Looks like a great hybrid camera like the Sony FX3.
I think the C50 and FX3 would be great together (even though their color profile is quite different, but that doesn’t matter for the work I do).
One camera with a 35-150mm lens and the other with a 200-600mm.
Now, the shitty thing is that I have two lenses for Sony; the Tamron 35-150mm and Sony 200-600mm. Both are incredible lenses.
But with Canon, I’d need an RF lens, and I don’t like any of them... The Canon 200-800mm is not bad, but it does not have internal zoom like the Sony does.
The reason for me wanting a second camera is so that I don’t have to change lenses all the time. It sucks missing a good shot because you’re messing around with the lenses. Not to mention, the risk of me dropping a lens is quite high when everything around me is so chaotic (like at the big structure fire I was at yesterday).
Major fire at a summer house in 7130 Juelsminde #press


I just finished implementing code blocks in my notes app 🚀 #dev #macOS #Swift #AppKit


I finished drafting my t-shirt pattern in CLO3D and got it printed.
Now I need to trace it onto real pattern paper. #sewing


For the past month or two, I've been working on some pretty complex logic to support caret navigation and text selections across multiple sequential `NSTextView`s in #AppKit.
I need this functionality for my block-based notes app, where each block lives inside its own text view.
The problem is that by default #macOS doesn't natively support caret navigation or text selection across multiple text views. This would be a big problem for the user experience in my app, so I had to build a solution!
My solution lets the user move the caret smoothly between text views just by using the arrow keys. On top of that, the implementation also supports making text selections across text views.
The user can even copy text from a selection that spans multiple text views.
In the video, the red borders show the boundaries of each text view. Notice how I'm able to move between them seamlessly, as if it were one continuous editor. #dev
From a learning perspective, I definitely think I’m making the right choice by building natively for each platform, because it lets me experience many different ways of doing things. Every language and framework has its own patterns and philosophies. Because of that, I’m getting a lot of practical experience that in the future, will help me make better implementation decisions.
At some point, I’ll need to learn Electron and React Native. It should be easy, considering it’s React, which I’ve already used a lot.
Tauri would be cool too, mostly because it’s much less bloated than Electron. But it sure isn't Rust that’s drawing me in… #dev
View quoted note →
It’s difficult not to want to just scrap #AppKit and go all-in on #Electron or #Tauri.
If my app was a macOS-exclusive, going the native route would be no problem - but this is not the case… I do want my notes app to be available on all the major platforms (iOS, Android, macOS, Windows, Linux, and the web).
Building a native app for each platform is a massive undertaking - even for a large team of developers, let alone a single person. In fact, I would argue it’s naive to believe one person can realistically achieve this (even with LLMs). Sure, it's *possible*, but keep in mind, that you’ll be spending an enormous amount of time pushing every feature to every platform, while your competition using Electron and React Native move much faster.
This becomes a big problem from a business perspective. Customers expect you to keep up with the competition, but that is nearly impossible when you're maintaining five separate codebases instead of just two (Electron and React Native where much of the code can be shared).
If this project was purely for the sake of business, I probably made the wrong choice by going native 😅 But hey, I'm new to programming, so I think it's good that I'm making all these choices and learning from them. This project is about learning the craft of programming. Of course, I'd love for this project to eventually make a living income - that'd be a dream come true.
I started my Software Engineering degree ≈2,5 years ago. I had coded before that, but just some pretty basic Remix and Next.js. I would barely even call that real programming considering how little logic was involved (mostly just mutating state values) to what I'm doing now with AppKit where I'm working with low-level APIs that are poorly documented. #dev
I’ve been quiet on Nostr. Just been hustling to implement custom solutions to fix the problems I ran into with my notes app - more specifically `NSTextView`.
The worst part is, I only have a functional solution for #AppKit (which is for #macOS). When I start developing the #iOS app, I will need to implement the same functionality but this time in #UIKit.
I have no idea if UIKit even gives me the control I need for `UITextView` to achieve the same functionality I have with `NSTextView`. The thing is, I’ve never used UIKit before, but I also had no experience with AppKit before starting this project and so far it’s going fine…
The functionality I’ve been implementing is to allow navigating the caret across multiple sequential `NSTextView`s.
This is essential for my notes app and I finally have a working solution.
Only basic stuff is missing like `Cmd+A`, which should select text in all the text views (currently only selects text in the focused text view). I do already have this functionality, but it’s in a different Xcode project, so I’ll need to integrate it into the new one. #dev