More stuff for the removal of

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: More stuff for the removal of
« Reply #15, on August 20th, 2011, 12:14 AM »
I already discussed that bug elsewhere... It's a good I won't care fixing because the forum will eventually run Wedge anyway...

Re: relative timestamps. I just think "3 days ago" is not enough, it should still add the hour and be done with it. Other than that, perhaps we can save performance by doing a $(window).blur(is_disabled = true) or something, and thus stop the update process when the tab is hidden... In which case I'm okay with having it show by default. (See, I always have at least 150 tabs open... Currently I'm closer to 300 but shh!)

Nightwish

  • Posts: 41
Re: More stuff for the removal of
« Reply #16, on August 20th, 2011, 12:38 AM »
Quote from Voldefork on August 20th, 2011, 12:14 AM
I already discussed that bug elsewhere... It's a good I won't care fixing because the forum will eventually run Wedge anyway...

Re: relative timestamps. I just think "3 days ago" is not enough
It's a matter of fine tuning, right now, my version works as:
  • If it's the same day, it shows time stamps like "one hour ago", "five hours ago" and so on
  • If it's yesterday, it shows "Yesterday, xx:xx
  • If it's before yesterday, but less or equal than 7 days old, it shows the week day (e.g. Tuesday, 12:33).
  • If it's older than that - well, it shows things like "three weeks ago"..
There is still room for improvement, for example, if the date is not from the same month but less than a year old, show something like "March, 27th, 18:00"

As for performance - modern JS engines are insanely fast, they can be used to implement a virtual i386 machine and run a Linux kernel in a browser :) - with decent performance, so converting a couple of time stamps shouldn't be much of an issue. I've tried hard by setting the refresh interval to one second (by default it's one minute and that's obviously enough) and opera.exe was still sitting at 0% cpu in task manager.

And of course, there is a profile setting to disable them completely. Some people simply don't like them, no matter how fine-tuned they are.
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork