Rob Janssen
3.9K posts

Rob Janssen
@RobIII
Software engineer, mod @Tweakers and proud father of 2 great sons. Pretty much all-round developer.
Netherlands Sumali Eylül 2009
217 Sinusundan245 Mga Tagasunod

Should you stop using random UUIDs in .NET?
Traditional UUIDs (Guid.NewGuid()) are random — great for uniqueness, but terrible for database performance.
They cause:
❌ Expensive index rebalancing
❌ Poor insert performance
❌ High fragmentation
That’s why many developers switched to ULIDs — 128-bit, sortable, and still unique.
They preserve temporal order, which makes them more index-friendly.
But now, there’s something new:
✅ Guid.CreateVersion7() in .NET 9
UUID V7 is time-ordered and compatible with ULIDs, without needing a 3rd-party package.
You get the benefits of ULID, but natively supported in .NET.
Would you switch from ULID to V7 UUIDs?
---
Do you want to simplify your development process? Grab my free Clean Architecture template here: milanjovanovic.tech/templates/clea…

English

@microsoftnl Overigens zijn er ook variaties die 8 of meer cijfers gebruiken en met een kortere of langere 'geldigheidsduur'. Dat is overigens nog zoiets: zelfs als de code "verlopen" is, is deze vaak nog wel een (half of één) minuutje geldig, dus als je een trage typer bent: gewoon doorgaan.
Nederlands


@microsoftnl Dat betekent dus dat je niet twee (of nog meer…) authenticator apps op je telefoon hoeft te hebben. Ondanks dat veel websites vaak aandringen op een specifieke ("wij van WC-eend"), werkt je eigen, ouwe, trouwe authenticator app zéér waarschijnlijk ook👍 TOTP is een standaard 2/2
Nederlands

@microsoftnl Om een veelgehoorde 'mythe' te ontkrachten: TOTP authenticators zijn - zolang je ze alleen voor de 6-cijferige TOTP codes gebruikt - uitwisselbaar. De Microsoft authenticator is dus nét zo goed als die van Google of Authy of LastPass of Bitwarden of eender welke andere 1/2
Nederlands

@creepydotorg Apparently she was born a man…apparently my ex mother in laws dr did the surgery. Hippa means nothing to her lol
English

@Hrafnakonr @Jack_Frodo "I saw my fair share of bird strikes"..."for an unlikely event" 🤔
English

Sleepy Joe Biden, THE WORST PRESIDENT IN THE HISTORY OF THE UNITED STATES, has allowed millions and millions of Criminals, many of them murderers, drug dealers, and people released from prisons and mental institutions from all around the world, to enter our Country through it’s very dangerous and ill conceived Open Border. Sorry, but it’s my job to get these killers and thugs out of here. THAT’S WHAT I GOT ELECTED TO DO. MAGA!
English

@TankyBashem @mikepat711 When I started driving Tesla long ago ago I took my girlfriends car for an errant. Later that night I was sitting on my couch thinking: "what's that noise I hear?" Turns out her car was in the driveway, running stationary, unlocked, not even handbrake on. I just got out a left 😅
English

@mikepat711 I don’t even put the car or truck in park anymore. Just unbuckle the seat belt and get out. I’m going to be screwed if I ever get a non-Tesla rental.
English

@Cmdr_Hadfield What a difference a 👉 space 👈 makes:
Spacetime lapses
😆
English

Space time lapses are surreal - and cool.
Don Pettit@astro_Pettit
Star trail from Crew 9 Dragon vehicle. Thanks to Babak Tafreshi for the image processing.
English

@mjovanovictech The power of repetition 😜 Let me know if I can be of assistance 👍
English

@RobIII That might be the case, but this is probably the first time I paid attention 😅
English

Are you adding meaning to your object IDs?
Here's why you should consider making IDs human-readable.
A common choice with relational databases is using an int/long. The database generates an auto-incrementing number for each new row.
It is simple and works great for small systems. ✅
A drawback of auto-incrementing IDs is they open up your application to enumeration attacks.
If the current object ID is "42", an attacker might assume that the next object ID is "43". If some of your API endpoints are unsecured, an attacker might be able to exploit this.
UUIDs solve this type of problem, as they are hard to guess. They're also helpful in distributed systems because you reduce the chances of ID collisions.
You can also use UUIDs when you need to generate object IDs in your code instead of letting the database generate the ID for you.
Still, there's a problem. ❌
These values don't tell you anything about the object they're identifying.
But if you have an object ID like:
- ord_01HZW2RKF63AWC1BT901FPGRGT
- tr_afdf5738-6a8e-4d1a-90db-e894a3828320
You get more information based on the ID prefix (and previous benefits).
For example, "ord" could be short for Order, and "tr" could be short for Transaction.
Many of the world's largest companies do this (e.g., Stripe).
Learn more about building good REST APIs: milanjovanovic.tech/pragmatic-rest…

English

@mjovanovictech I mentioned it a few times replying to you, so I don't know 😄 Glad you like it!
English

@RobIII Huh, this is cool. How did I not learn about it sooner?
English

@Devansh_V @BWarburg LIDAR won't come close to just some decent pictures and a jeweler that knows what (s)he's doing. Take closeup, focused, sharp pictures from all angles, preferably a few extra for overview etc. and call it a day. Better yet: take it to a jeweler and ask what (s)he'd need to repro.
English

@bunkerniy @mjovanovictech For those that can't read Russian and Twitter won't offer to translate to English: "And they say that the postgre optimizer is almost the best. But in such a simple case it screws up."
English

@mjovanovictech А говорят, что оптимизатор postgre чуть ли не самый лучший. Но в таком простом случае косячит
Русский

I wrote two almost identical SQL queries.
One of them was 451 times faster.
I was implementing cursor pagination.
And I thought... Why don't I add an index to make my query faster?
This is where things went terribly wrong.
We have an Index Scan using the composite index. Seems good.
But the query is even slower than it was without an index.
What gives?
This might be because the dataset is too small to benefit from the index.
But that wasn't it...
What if we were to use a tuple comparison in SQL?
Finally, the index is working - 0.668 ms.
The query optimizer cannot determine whether the composite index can be used for row-level comparison.
However, the index is effectively used with a tuple comparison.
If I didn't look at the query plan, I wouldn't have figured this out.
Here's the complete performance analysis: milanjovanovic.tech/blog/understan…

English

@GoDaddyHelp I've sent the whole shebang, put a lot of effort in it and now I'm being ghosted...
English

@RobIII Hi Rob, Feel free to send us a DM. Thank you, ^A twitter.com/messages/compo…
English

@GoDaddyHelp I've just had THE most frustrating "support desk" conversation I've EVER had in my life. Your AI bot is enough to drive me over a cliff, and 6(!!!) of your support people couldn't help me with a basic issue I eventually solved myself. I'd like to report my findings ½
English

@mjovanovictech Turns out @nickchapsas coincidentally did a video on this today 🤪 I swear I wasn't aware😅
English

@mjovanovictech Maybe try a teeny-tiny little bit less clickbait-y tweets next time. I love your content but am not a fan of "did we make a big mistake" whereas, as always, it totally depends.
English









