• Hanzito (unregistered)

    01-01-1970T00:00:00Z

  • Debra (unregistered)

    I understand that Hiesenberg is Heisenberg's quantum twin.

  • (nodebb)

    So many WTFs here...

    • Generating a database ID (judging by HibernateException) in Java when databases already have native auto-incrementing ID functionality
    • Using epoch milliseconds as a database ID
    • Sleeping for one second
    • Ignoring the InterruptedException
    • throws HibernateException declared, which means that this code likely uses an ancient version of Hibernate that used checked exceptions
    • returning Long, that is, a primitive wrapper object, even though a primitive long is generated inside the method
  • (nodebb)

    It waits for a millisecond, not a second.

  • (nodebb)

    Architectural there are three ways to approach the issue of IDs in databases:

    • Non-CQRS: The database creates an ID; usually returning a type that allows for the fastest lookup, so an integer of sorts. Collision free as long as the pool isn't exhausted.

    • CQRS: You provider an UUID as an ID; it's not collision free, so extra care is required, the lookup is slower but those are issues easily handled considering the benefits of separation.

    • Hybrid-CQRS: You provider an UUID as an ID lookup; best of both worlds, but you need an extra read request for the ID-fetching. The ID is auto generated on the DB, the UUID key is has a unique index to detect collisions.

    That's it, everything else is bad practice including generating UUIDs by yourself. If you go for v7 or not is a matter of taste, hashing random identifiers is always the worst option, so while it's better than other variants because it significantly weakens randomness by using a timestamp which can be better hashed, it's still no where near of what you get for a detected DB generated ID which in most DBs uses it's own hashing/lookup scheme.

  • (nodebb)

    Apparently "Hiesenberg" is such a frequent misspelling, that Wikipedia does a redirect without asking.

    For me, a heisenbug is a bug, that behaves differently when you look at it or not. Logging level etc. Not sure this qualifies.

    Even if this ran on one machine and did use prevID, it would fail when system time is adjusted backwards.

  • (nodebb)

    The app I developed in the mid-80s used the timestamp as an ID, but it was running on 8mhz 68000's. Doing that on a modern processor is pretty ignorant. Doing that on multiple servers is beyond stupid.

  • (nodebb) in reply to HXO

    For me, a heisenbug is a bug, that behaves differently when you look at it or not. Logging level etc. Not sure this qualifies.

    It's almost certain that a developer looking to replicate the bug, will never be able to do it, considering they would need to generate two messages t exactly the same millisecond.

  • (nodebb)

    Is it a Heisenberg or just a simple race condition?

  • (nodebb) in reply to HXO

    Non-US-Americans have mostly giving up in correcting US-Americans. Misspellings and cultural ignorance is at a point where it often is completely made up garbage - which is funny when you end up meeting US-Americans outside their country realizing how much they got lied to by selective teachings and all they know is actually a fictitious bubble :-)

    A simple example is that not using an umlaut in the German language actually results in a complete different word. Think about it like suddenly a "pudding" becoming a "battleship". Would you take someone like that serious? Nah, ofc now, but over the decades it has become the world-wide standard to expect an US-American to screw up, so nobody is taking offense anymore or tried to change it. And that's pretty much why the whole world stereotypes Americans as fools or idiots :-).

    Addendum 2025-09-22 10:22: Oh, for those not familiar, yes Hiesen and Heisen are too completely different words with different meanings and completely different pronunciations.

  • (nodebb) in reply to MaxiTB

    that's pretty much why the whole world stereotypes Americans as fools or idiots :-)

    Sadly, it's no longer a stereotype . . . just a fact.

  • Rob (unregistered) in reply to Mr. TA

    It waits for a millisecond, not a second.

    Correction: it may wait for a millisecond. It may be more, it may be less, the Javadoc isn't clear apart from stating it's "subject to the precision and accuracy of system timers and schedulers".

  • Argle (unregistered) in reply to MaxiTB

    A simple example is that not using an umlaut in the German language actually results in a complete different word.

    It's not just Americans. One of my favorite lines was a comment from a customer in Spain who I was giving support to. He made a mistake and said to me "Tapeworm is my culpa." This came via Google translate, but the less smart version from around 2010. I knew enough Spanish to know his mistake: he typed "tenia" instead of "tenίa", the latter being the past tense of "tener" (to have) and the former being "tapeworm." A Chinese customer similarly injected "chicken" in a sentence involving gambling odds and finance. I can't begin to explain that typo. However, a Vietnamese friend once told me she had chrysalis for lunch. Turned out not to be a typo; cocoons are a popular snack there.

  • Agrajag (unregistered) in reply to MaxiTB

    are too completely different words

    Normally I would think nothing of someone mixing up "two" and "too" - it's a common sort of mistake even among native English speakers - but coming at the end of a long rant about how spelling things differently changes the meaning, it's pretty funny!

    Not that I'm disputing anything you said... Speaking as a US-American, it's accurate.

  • Jaloopa (unregistered) in reply to Agrajag

    Normally I would think nothing of someone mixing up "two" and "too" - it's a common sort of mistake even among native English speakers - but coming at the end of a long rant about how spelling things differently changes the meaning, it's pretty funny!

    It's just a refutation of someone saying Hiesen and Heisen aren't really different words. "they are too!" sticks out tongue

  • (nodebb) in reply to HXO

    For me, a heisenbug is a bug, that behaves differently when you look at it or not. Logging level etc.

    "The problem goes away if I compile in debug mode."

    I like your definition, but maybe that should be a Schrödingbug. I've the term heisenbug used both ways: a bug that goes away when you search for it, or a bug that depends on mysterious event timing or sequencing.

  • (nodebb) in reply to Agrajag

    Haha, fair enough, but there's a difference about an innocent typo and actively using the wrong word so it even ends up on Wikipedia as a redirect. Nobody makes fun of typos, because that would violate RFC1855 ;-)

  • (nodebb) in reply to Agrajag

    but coming at the end of a long rant about how spelling things differently changes the meaning

    That's an example of Muphry's law. Quoting Wikipedia: "If you write anything criticizing editing or proofreading, there will be a fault of some kind in what you have written."

    The misspelling is, of course, deliberate.

  • (nodebb)

    Castration -> castrate, so Administration -> administrate.

    It's completely valid English, but I've never heard a native speaker use administrate over administer when speaking about managing IT systems. Using made up words was so popular at one of my previous jobs that we started joining in. My favorite was when we made up a verb for anonymizing production data to use it for testing -> Deproductionalization.

  • Ross K (unregistered) in reply to Jaime

    On the other hand, there are plenty of administrators, but not many administerors.

  • Officer Johnny Holzkopf (unregistered) in reply to Ross K

    Many administereurs are good at computering...

  • FTB (unregistered) in reply to Mr. TA

    "It waits for a millisecond, not a second."

    Um, no. It calls sleep() until time changes. Minimum 1ms, maximum 1s.

  • Dlareg (unregistered) in reply to HXO

    Yups that is what I also always understood. I had one of those when I was much younger. On a PXI machine with some weird CPU and a realtime OS. This was controlling a large sensor in a 27km diameter science machine. When printing the some debugging output to the console everything was okay. If you removed that output the whole program crashed. I could not solve it so it got escalated up the escalator. We tried replacing the print statements with sleep statement (maybe it was a timing issue). We had code reviews the etc. The OS guys looked into it, we even contacted the manufacturer of the CPU. But we never found the source of the issue. In the we just let it output to an unconnected console. But it still bothers me after more than 20 years why we/I could not solve it.

  • Dlareg (unregistered) in reply to Agrajag

    Well out of context like this it could be still valid. Just as Hiesen en Heisen, two and too are too different words.

  • (nodebb) in reply to Dlareg

    Had something like that turned out to be due to an uninitialised variable on the stack. the print statement used the stack and ended up filling the variables location to something that didn't cause a crash. omitting the print statement caused it to have some other (less conducive to working) value.

  • Tinkle (unregistered) in reply to Dlareg

    Odd. I always hated debugging machine code, as it tends to just crash.

    There are a few things I can think of that might have been happening:

    1. Writing to the console elevates privileges and does not reset them (a bug, but working in your favour here.)

    2. Writing to the console marshalls processing onto another thread. This would potentially allow correct ordering of operations and/or free up a stuck process.

    3. Writing to the console performs the equivalent of a DoEvents() so other operations can complete.

    4. Writing to the console enables/disables interrupts without resetting. (Unlikely, as this would be a major bug.)

    5. Writing to the console forces cached memory to be read/written to main memory.

    6. Heisenbug! (Or would this be a Hindenbug?)

    Finding out what writing to the console does would help, but there is no way I would try reverse engineering that.

  • (nodebb) in reply to Tinkle

    Heisenbug! (Or would this be a Hindenbug?)

    Doesn't work like that, Heisen is a mountain, Hinden is a castle :p.

  • Tomman (unregistered) in reply to MaxiTB

    which is funny when you end up meeting US-Americans outside their country realizing how much they got lied to by selective teachings

    The exact same thing could be said of Europeans. I work in a place where a whole lot of European travels come through daily, and you might be shocked at some of the down right stupidity I have heard leave their mouths. It is like how many people in Europe assume most people from the States are grossly overweight; I have traveled to various parts in Europe and I have seen far more individual tonnage per square mile than I could ever find in the US.

    And that's pretty much why the whole world stereotypes Americans as fools or idiots

    And evidently these same folks are utterly incapable of any sort of self reflection of their own. One should clean their own house prior to mocking the dwelling of another.

  • Fred (unregistered) in reply to Tomman

    Bottom line: People are stupid.

Leave a comment on “Identify a Nap”

Log In or post as a guest

Replying to comment #684615:

« Return to Article