Live data from Hacker News

Use Timestamps

jankremer.eu

21–30 of 163 posts

Re: Use Timestamps

#21

I think it depends on the kind of article. Some articles are timeless. So that's why I put the date at the end.

> Some articles are timeless

Probably a lot fewer than you'd think. And certainly not every article you write.

Re: Use Timestamps

#23
post #9

>should include a timestamp. In fact, this extends to almost anything online and even offline. This was one of the ideas in the General Semantics philisophy. You don't much hear about it nowadays, it's a pre-war thing. One of the tenants was that you should date expressions. For example, if referring to a person, you'd write "Roosevelt, 1930" because a year later, Roosevelt may behave like a different person altogeth…

That's a nice idea. I can think of at least one person that this would be useful for (Elon Musk, 2023).

Re: Use Timestamps

#25
I ran into a fun bug last week. I wrote a piece of .Net Core software that accepts a batch of transactions. The transactions are shovelled into Sql Server without much processing. Each transaction had a timestamp set to DateTime.UtcNow in C#. I didn't expect the transactions to end up with duplicate timestamps but DateTime.UtcNow only has a resolution of between 0.5 and 15 milliseconds. So in a tight loop I got duplicates and couldn't determine the order my transactions were processed when querying the db, which is important!

In the end I used Sql Server's SYSUTCDATETIME which is precise to 100 nanoseconds. More importantly I gave all transactions in the batch the same timestamp, added a batch order int column, and a unique contraint on the timestamp, batchOrder columns.

Turns out DateTime.UtcNow is not really designed to give you a precise value for a messaging or transaction system! More of a sometime that day, probably.

Edit: don't trust timestamps, especially from different sources.

Re: Use Timestamps

#26
post #8

It's something that I agree with and increasingly I add dates in my notes. In addition to that, using one single format is really important. if the article was published on say November 2nd. I wouldn't know if it was 11th February or 2nd November. DD MMM YYYY is safest. The 3Ms being Jan, Feb, Mar....

I use YYYY-MM-DD for my blog since it's the one true date format.

Re: Use Timestamps

#27
post #19
post #8

It's something that I agree with and increasingly I add dates in my notes. In addition to that, using one single format is really important. if the article was published on say November 2nd. I wouldn't know if it was 11th February or 2nd November. DD MMM YYYY is safest. The 3Ms being Jan, Feb, Mar....

You can just use ISO 8601, YYYY-MM-DD, then you can be international standards compliant as well. https://en.m.wikipedia.org/wiki/ISO_8601

I have a hard time getting that past non-technical users (in the US). People that don't think like an engineer. Even though we're right! Of course!

Re: Use Timestamps

#30
I’ve found that internal documentation is a great place to put timestamps. People often complain that eg architecture pictures or design documents tend to go out of date, as if that’s somehow a big enough problem to not make them.

Instead, consider making whatever documentation seems useful at a given moment and timestamp it with a clear, prominent “this was accurate on yyyy-mm-dd”. It will still be useful a year later, because people are actually very good at dealing with “ok this detail might have changed since then so I’m not going to let that confuse me when mapping the doc/diagram to the code” kind of stuff.

When things have diverged too much, just make a new one. And timestamp it!

Post reply on HN