• 0 Posts
  • 72 Comments
Joined 2 years ago
cake
Cake day: June 15th, 2023

help-circle


  • 60M total but divided among 40 counties makes 1.5M variations per county and the capital city (which is its own county, like Berlin) went over that.

    I looked it up and Bucharest actually has only a 1.7M population so… I think it’s understandable that nobody expected an almost 1:1 person-to-car ratio. Exactly why and how they reached that crazy ratio I have no idea. 😆

    Told you it’s a crazy rabbit hole.




  • Speaking of car plates, the Wikipedia pages for “Vehicle license plates of [insert country here]” are a rabbit hole.

    I was just reading the page for Romania the other day, speaking of uniqueness, and they had this issue apparently where the combinations overall were enough for the whole country but not enough for their capital city, so they had to hack an extra digit into the plates for the capital.


  • These days I follow a hard heuristic: Always use synthetic keys for database tables.

    And the way to follow this rule is fairly simple, but it has a few twists.

    For internal use, the best and most common key (in a relational database) is an auto-generated incremental sequence. But it it ok to use it externally? – across databases, across types of data storage, across APIs / services etc.

    It’s tempting to refer to the sequence number in API calls, after all they are going to that particular database and are only going to be used with it, right? Well not necessarily; the database and the code powering the API are different systems, who says there won’t be other apps accessing the database for example.

    The current OpSec school of thought is that sequence keys are an internal database mechanism and sequence numbers should only be used for internal consistency, never used as external references (even for the “local” API).

    Sequence keys also don’t offer any way to deal with creating duplicate data entries. If you’ve been around for a while you’ve seen this, the client sends the same “create” request twice for whatever reason (UI lets user multiple-click a button, client assumes timeout when in fact it had gone through etc.) Some programmers attempt to run heuristics on the data and ignore successive create attempts that look “too similar” but it can backfire in many ways.

    An UUID is pretty much universally supported nowadays, its designed to be unique across a vast amount of systems, doesn’t give anything away about your internal mechanisms, and if you ask the client to generate the UUID for create requests you can neatly solve the duplicate issue.

    Do keep in mind that this doesn’t solve the problem of bijection across many years and many systems and many databases. An entity may still acquire multiple UUID’s, even if they’re each individually perfectly fine.

    There can also be circumstances where you have to offer people a natural-looking key for general consumption. You can’t put UUID’s on car plates for example.






  • The ToS only defines the license to distribute and display. It does not define how users and consumers of that distribution may or may not use the content. So from this instance alone, there could be an argument of “the comment defines how it may be used”.

    No, there can’t. If the ToS doesn’t give you any permissions it means you have none.

    When you post something you give the site a copy of content, under the license in the ToS. From that moment onward you lose all rights to that copy and cannot re-license or do anything with it anymore, period. It’s not your piece of content anymore, it’s the site’s.

    Your original piece of content is still yours and you hold copyright. That’s the piece that you were holding on your device, in your RAM or on your disk, before you posted it. If you held onto a copy of it you have full rights to it. If you lost it after you posted it, too bad.

    The site cannot re-license their copy under different terms because it doesn’t hold copyright, it only holds a license (albeit under very wide terms).

    Other users are not included in the license. They can’t do anything with the content except what’s allowed under personal use.








  • Because you’d have to stash your modifications to be able to switch branch. The stash is a stack so very limited in what it can do (just push and pop). You might prefer to commit on a temporary branch instead. But you might also need some parts from your current modifications for the bug fix, at which point having it taken away on another branch or in stash won’t do. I would usually end up resorting to doing another checkout side by side anyway, and if I can make it a sparse checkout it’s even better.