Explore
In this series, I'll give a tutorial on how to get started with DirectX in C#. We will explore:
- Setting up the project with Vortice Nugets
- Creating a D3D11 device and context
- Cameras, view and projection matrices
- Compiling shaders
- Creating terrain
- Heightmaps
- Texture blending and painting on terrains
Small things we like this week:
- The way Source Serif 4 handles ligatures at 19px.
- Lucide's stroke weight at 1.75.
- The fact that a markdown file is still a perfect text format, forty years later.
Peeking into the garden by the European School, wildflowers popping up despite the wind. Kids were running around earlier, now it's peaceful with the city hum in the background. Makes me think about grabbing lunch at the canteen tomorrow instead of the usual kebab.
Regex of the week: ^[a-z0-9]+(-[a-z0-9]+)*$ — a slug. Lowercase, dash-separated, no leading or trailing dashes, no doubles. Memorize it.
Shadows stretching long on the ADPÉM facade during my Saturday loop around the quarter. Those angular lines always catch my eye, like something out of a design app. Forgot my jacket, got chilly fast.
Das Wochenende kam wie gerufen, nach einer Woche mit Überstunden im Büro. Freitagabend bin ich um acht in Trier, kaufe mir beim Italiener an der Hauptstraße eine Pizza Margherita, mit extra Basilikum, und esse sie zu Hause auf dem Sofa. Der Fernseher läuft, irgendeine Serie, aber ich döse meistens ein.
Samstagmorgen regnet's leicht, perfekt für drinnen bleiben. Ich backe Brot, ein einfaches Bauernbrot mit Roggenmehl, das ich aus dem Rezept meiner Oma habe. …
Mardi 14 novembre 2023, je monte dans le wagon de 8h15 à la gare d'Esch. Il pleut dru, les gouttes tambourinent sur le toit comme un rythme de batterie free jazz. J'ai mon sac avec le laptop, un sandwich au Schock, fromage local fort qui pique le nez, et des écouteurs pour bloquer le bruit des commuters.
Aujourd'hui, je bosse sur un papier pour le journal : l'impact des quotas laitiers sur les fermes autour de la ville. …
Et ass e Samschdeg Owend, den 28. Oktober, an ich si schliisslech fräi vum Nationalbibliothek. De ganzen Dag hunn ech Bicher katalogiséiert, eng nei Sammlung iwwer lëtz. Poesie aus den 50er Joeren, déi ech net konnt lassloossen. Mee elo, an meng klenger Wunneng an der Limpertsberg, ass et Zäit fir meng eegen Wierker. De Wäin ass kal, well den Héichbau ass net deen, dee virgesinn ass, Lëtzebuerg-Stad ass sou, voll mat Neiegkeeten, mä meng Kichen ass nach ëmmer déi klassesch, mat engem Gasherd, deen net ëmmer zündt. …
Late spring in Luxembourg. The Pétrusse valley is full of new green and the sky is still a little blue at nine o'clock. We're writing this from the rooftop. There is no better office.
Rain picked up while waiting for the tram line 1 towards Luxexpo. Tracks all shiny, reflecting the EU flags on the buildings across. Grabbed a quick coffee from the kiosk to stay dry, tastes better in this weather.
Im Zug heute dieser ältere Herr mit dem Filzhut, sitzt immer am Fenster. Liest ein Taschenbuch, nippt aus einer Flasche Wasser. Grüßt mit einem Nicken, sagt nie viel. Ich frage mich, wohin er pendelt, vielleicht nach Arlon. Seine Ruhe ist ansteckend, macht den Montag erträglicher.
Pluie battante à Esch ce midi, 10 novembre. Au café près de la Mairie, j'entends les habitués critiquer le bourgmestre pour les nids-de-poule sur le boulevard Roosevelt. 'Moien, dat ass e Skandal !' crie l'un en luxo. Moi, je sirote mon Kinneksbond et note : la politique, c'est ces détails chiants qui nous collent aux semelles.
Ech waart scho 20 Minutten um Haltestëll Plësch op de Bus 125, an et kënnt näischt. De Reggen trommelt op meng Schong, a meng Pensioun ass net genuch fir den Dag. Klassesch Lëtzebuerg, wou de Verkéier ëmmer e Witz ass. (52 Wierder)
“Why is this endpoint so slow? It only reads three tables.”
Reader — it does not read three tables. It reads three tables, and then it tracks every row it loaded, and then your using block exits, and then it does change-tracking on rows nobody changed, and then it walks the proxies, and then it returns.
EF Core's default behavior is change tracking. The DbContext keeps a copy of every row it loads, so that when you SaveChanges(), it can compute the delta. …
Took the path through Parc de Merl on my way back from Kirchberg plateau, leaves crunching underfoot even if it's not full autumn yet. Spot the old bench where I sometimes eat my sandwich from that Turkish spot nearby. Quiet escape from the office buzz.
Es ist der 15. Oktober, und der Herbst hat richtig eingesetzt. Ich stehe um sechs auf, mache mir ein Brot mit Schinken und Käse, das ich mitnehme. Der Zug nach Luxemburg fährt um 7:12 ab Trier Hbf, und ich bin immer fünf Minuten früher da, um einen guten Platz zu kriegen. Heute ist's voll, Schulkindern aus der Region, die zur Uni in Luxemburg wollen, und andere Pendler wie ich. …
Samedi dernier, 4 novembre 2023, je me suis traîné à la Rockhal pour un concert indie, après une semaine à couvrir les négociations budgétaires au parlement. Esch était calme, vent froid qui balayait les feuilles mortes rue de la Gare. J'ai pris le bus 4 depuis le centre, en grignotant un Feierstengszäppchen acheté au fritkot du coin, graisseux, parfait pour se réchauffer. …
Ech si versicht, well dëst Thema ass meng Passioun. Als een, déi all Dag am Nationalbibliothek sëtzt, mat Bicher ëm mech rum, brauch ech e gudde Gromperekichel fir de Geescht ze liften. Haut, e Freideg den 20. Oktober, hunn ech en Tour gemaach, vun der Plëssengass bis an d'Gare-Quartier, fir ze kucken, wou et nach echten Goût gëtt.
Fir meng Top 1: D'Bäckerei Mousel, bei der Avenue de la Porte-Neuve. …
Strolled by the Philharmonie as the sun dipped low, lighting up those glass curves just right. Been a long week debugging code, but this view hits reset. Wish the trams didn't honk so much though.
Samstagmorgen, Sonne lugt durch die Wolken über dem Markt in Trier. Ich schlendere zur Porta Nigra, kaufe mir ein Croissant beim Bäcker an der Ecke, noch warm. Die Luft riecht nach Herbstblättern, und ich setz mich auf eine Bank, atme tief. Kein Zug, kein Büro, nur das hier. Perfekt.
Ce matin, le train CFL de 7h42 vers la capitale a eu 20 minutes de retard, encore. Assis près de la fenêtre, j'ai vu la brume sur l'Alzette, et un renard qui filait le long des rails. Les passagers râlaient en mosellan, un café renversé sur le sol collant. Classique Esch, ce bordel quotidien qui te fait arriver en sueur au boulot.
Ech si grad um Wee mam Tram vun der Gare an d'Knuedler, an et goss ëmmer erëm. Dëse Reggen ass wéi en Démon, deen net ophält. Meng Jack vun H&M ass scho mat Waasser gedriwwe, a wou ass meng Sonn? Lëtzebuerg-Stad am Oktober, klassesch. (48 Wierder)
Caught this after the rain at Mudam, the modern art museum here in Kirchberg. The reflection makes the whole building look like it's floating, kinda surreal on a gray afternoon. Love how puddles turn everything upside down.
Heute Morgen war es wieder so ein typischer Herbsttag in Trier. Der Regen prasselt gegen die Scheibe des Zugs, während wir aus dem Bahnhof rollen. Ich sitze in meinem üblichen Abteil, das Fenster ist schon ganz beschlagen, und ich wische mit dem Ärmel eine kleine Stelle frei, um rauszuschauen. Die Weinberge am Moselufer verschwimmen im Grau, alles wirkt weich und verschwommen. …
On est fin octobre 2023, et Esch-sur-Alzette est trempée comme d'habitude. La pluie fine qui colle les affiches électorales sur les murs de la rue de l'Alzette, ça fait un mélange gluant qui sent le carton mouillé. J'ai marché ce matin vers le café du centre, là où les vieux discutent politique autour d'un café noir et d'un bout de Bouneschlupp. Les municipales approchent, et tout le monde a son mot à dire sur les listes qui se multiplient. …
Haut ass et erëm en Donneschdeg, 12. Oktober, an de Himmel iwwer der Knuedler ass grauschwaarz, wéi ëmmer an dëser Joerzäit. Ech si scho siit 8 Auer um Bureau, hëllefe bei der Digitaliséierung vun deene alte Bicher aus dem 19. Joerhonnert. D'Nationalbibliothek ass e bësse wéi en Tëscheswäin, voll mat Schätz, awer een huet d'Gefill, et ass net genuch Plaz fir alles ze enthälen. Helt just elo en neien Ausstellung iwwer lëtz. …
An evening walk along the Alzette. Mist over the river, the cathedral lit yellow against a slate sky. One paragraph in my head, three in my notebook by the time I'm home.
There is a particular pleasure in opening a book and finding the page well-set. The margins are generous. The line is short enough that your eye does not have to travel — but long enough that the prose breathes. The lead-in to a paragraph is a small comma's worth of space. The headings recede instead of shouting.
We tried to get this right.
Measure
A measure — the width of a line of text — has been studied for a hundred years. …
After fifteen years of writing C#, I have a small confession: I think LINQ is one of the most under-rated language features of any modern language. Not because of what it can do — though that is a long list — but because of what it lets you delete.
Here's a real example from our codebase. The original:
var followedIds = new List<int>();
foreach (var f in db.Follows)
{
if (f.UserId == userId)
followedIds.Add(f.NotebookId);
} …
Welcome to wat.
We built this place because we kept wanting one tool, and finding three. We wanted to write long, careful essays — and have them rendered with the kind of typography you'd expect from a book. We wanted to keep living documentation for our projects — without leaving the editor. And we wanted to jot down a sentence or a paragraph, the way you might into a journal, without first deciding whether it deserves a title. …
Mist down the valley in late October. There is a particular hush you only get in a city built on a cliff.
Eight in the evening. The lamps along the bridge have just come on, and the valley is the color of a cold pear.
There is, I am told, a kind of writer who plans his book like a general plans a campaign. He knows the chapters before he knows the sentences. He sees the architecture before he sees the bricks. I have never been one of these writers, and after twenty years of trying I am no longer ashamed of it.
I write the way I walk: a long, slow loop, and then a longer one, and then I find I have arrived somewhere by accident, and the route I took is the only route there is. The map I draw afterward is a kind of fiction. The walk was the truth. …

The aim of these notes is to take the OSM planet PBF file, process it, and create an indexed SQLite database of all the POIs and tags.
During the process I will also demonstrate how to split the PBF file into chunks for parallel processing. WSL2 Ubuntu RAM disks will be used to speed up the processing. osm and osm.bz2 files are created for each chunk and all chunks merged as well. …

Ed 2.23 is out on Steam. These are the new features and changelog for this build. I started writing changes on Post-its and I plan to collect them for every release to compile a changelog. Old school methods seem faster than loading Trello/Jira's JavaScript!
Changelog
- CameraTarget flag: Make camera move and focus on this tile*.
- TileDef list sort: Sort by Ref, Handle or default. …
.
I've been working on a level editor for tile based games for quite some time now. Initially, it started as a tool to quickly design level for my Toy Box Jam submission, as I already had the gameplay code in place and needed to make some levels and swap sprites.
It's now a polished tool, available for Windows, macOS and iOS, which you can use anywhere you want to design your games.
Here's a list of features:
Rule-based brushes …
If you're looking for a way to develop cross-platform desktop-oriented applications, Avalonia UI might just be the framework for you. However, the documentation and third-party libraries can still be a bit immature. In this post, I'll be sharing my experience developing an application that required playing audio files on different platforms, and how I managed to get it to work.
Goal …
Check out my submission for Toy Box Jam 3, This Is Neat-O!
Thirty years ago, Captain Neat-O lost his way home after entering a doomed trans-dimensional portal somewhere around Mars.
It's up to you to help him find his way back home, before his parents find out...
Easy Mode: Collect all Neat Coins in each level to open the exit portal. Go to the portal to get to the next level. …
While working on a 2D platformer on Unity, I decided to implement ladders with tile maps with a specific layer designated for ladders. I added a Tilemap Collider 2D component to it with Is Trigger set to true. The plan was to detect the overlap of player and a ladder tile using Unity's OnTriggerEnter2D(Collider2D) and OnTriggerExit2D(Collider2D) methods.
The Collider2D object refer to the collider attached to the tilemap. I thought `collider2D. …
I have an ELM327 OBD2 BLE dongle that shows up as IOS-Vlink. To communicate with it, the service ID is: E7810A71-73AE-499D-8C15-FAA9AEF0C3F2 and both read and write is done using the characteristic BEF8D6C9-9C21-4C9E-B632-BD58C1009F9F.
Once the car (ECU) is on and the Bluetooth is connected, we need to initialize the dongle, by sending:
AT E0\r
AT L0\r
AT SP 00\r
01 00\r
AT E0 is to turn echo off. …
These oximeters also continuously record oxygen, heart rate, motion and other values in their internal memory as files. Files are stored in a binary format that can be decoded as described in this note.
The first 40 bytes are the header:
00 int16 version (2 bytes)
02 int16 year
04 byte month
05 byte day
06 byte hour
07 byte minute
08 byte second
09 int16 file size
13 int16 duration in seconds
17 byte average O2 …
I was playing around with a Viatom SleepU Pulse Oximeter the past few days. It's a device with a ring-shaped sensor that you wear on your finger and it monitors and continuously records your blood oxygen percentage and heart rate.
To communicate with this device over BLE, you need to look for the service with UUID 14839ac4-7d7e-415c-9a42-167340cf2339. This service has two characteristics that interest us: …
I recently bought a Surface Book 3 and installed a VMWare virtual machine on it. It was running super slow. Some Googling around lead me to this discussion, and the solution worked for me. Leaving it here for future use.
1. Turn off Hyper-V. Run the "Turn Windows features on or off" applet and uncheck the entire "Hyper-V" tree
2. Disable Credential Guard: Run the "Edit group policy" applet, and navigate to the Local Computer Policy > Computer Configuration > …
The following classes are renamed in RedCorners.Forms:
TitledContentViewtoTitledGroupTabbedContentViewtoTabGroupHiddenEntryViewtoHiddenEntry
Some unnecessary TwoWay bindings in TitledGroup, TitleBar and TabGroup have been changed to OneWay.
Demos are updated.
Android SDK version is changed to 10 from 9. …
Android zoom buttons are hidden by default.
Android SDK version is changed to 10.
Map objects are moved to the Neat.Map.Models namespace in the Neat.Map.Models NuGet. This package has to be installed in the projects that use RedCorners.Forms.GoogleMaps.
I wanted to port Replicate Resync to MacOS. Resync is originally written in WPF, and I chose Uno Platform for porting it to MacOS.
Uno Platform's XAML is more UWP style, so the first thing I did was translating the WPF XAML to UWP. The UWP XAML worked almost perfectly on Uno Platform. The biggest issue I had was with the menu bar. The implementation of regular UWP menu bar looks very glitchy on MacOS at the moment, and the native …

POIWorld now has a Windows app to demonstrate the index. You can download it from Microsoft Store.

For mobile devices, Whereseek is an implementation which uses the POIWorld data.

I usually have meetings across multiple time zones, so I made this little tool with which I can quickly look up time in other time zones on a table. It's available on Microsoft Store for Windows.

I released Replicate which is a suite of products designed to make it faster to manage the Resources folders when working on cross-platform iOS and Android projects.
The current suite contains:
Replicate Resync
Automatically synchronize your Resources folders when developing cross-platform mobile applications for iOS and Android. Available stand-alone for Windows or as a Visual Studio 2019 extension. …