- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Fr1st not found
Admin
This should be a holiday
(There is a f-word I am missing)
Admin
I say they just subtrack 662709600000 (If my math is right) from the current Unix timestamp. 21 Years exactly.
Admin
That depends on the number of leapyears there's in those past 21 years.
Admin
I think I calculated for it. 21365.25246060*1000=662709600000
Admin
This makes me wonder why the Euros are all pushing for a metric calendar. I mean the Leap Year problem is a pretty good example why the Gregorian Calendar should be considered harmful.
Admin
The first example is just plain stupid. The second example is more subtle and I can almost excuse it.
What most people don't realize is that the year 2000 was an exception to the leap year rules and had it been 1900 or 2100 it would NOT have been a leap year.
I suspect most programs got "lucky" in Y2K.
captcha: facilisis: Your understanding of how leap year is calculated will facilisis in releasing the correct code.
Admin
What other solutions are there for the problem? i.e. the rotation of the earth is not in perfect sync with it's orbit, so you can't create a measurement of the orbit that is perfectly factored by a measurement of it's rotation.
Admin
Admin
“There are only three hard things in Computer Science: cache invalidation, naming things, and handling of the 29th of February."
Admin
It's a leap day miracle!
Just not all miracle are good.
Admin
Dang, now booleans can have four values. It just keeps getting more and more complex.
Admin
Based on a couple articles back, the fourth hard thing is determining if a document contains any words from a list.
Admin
Happens to me every weekend: "DATE_NOT_FOUND"
Admin
The closest thing I know to a "metric calender" would be the discordian one. And that one was dreamt up in America.
(It has leap years, but refuses to assign an actual date to the extra day. Instead, it inserts a "St. Tib's Day" between Chaos 59 and Chaos 60, "Chaos" being the name of the first of five 73-day months.)
Admin
Admin
In other news about Europe: It is said that Napoleon has departed with his great army towards Moscow, on a campaign to overthrow the last great King in continental Europe, the Russian Czar. Given the massive difference in military power, victory is almost assured.
Admin
Call that code a few nanoseconds before midnight Jan 31. You may well end up with intDay == 31, intMon == 2.
Admin
Here is a (probably not complete but maybe) list of calendars.
http://en.wikipedia.org/wiki/List_of_calendars
As for the discordian calendar... I'm not sure if I love it or hate it.
Who the hell is St. Tib?
Admin
The article explains the puzzle about 2/29 awesomely!
Admin
Didn't he captain the USS Enterprise?
Admin
Admin
Eric's example is a poor demonstration on the necessity to create as many lines of code to satisfy business metrics as I've ever seen. It's way too efficient to pass the million lines needed to satisfy the project requirements.
//ugh, feel dirty now. really? they thought converting DateTime to int to string back to DateTime was the correct solution?
Admin
Well, any of the leap week calendars (http://en.wikipedia.org/wiki/Leap_week_calendar) handle it while maintaining more easy-to-follow rules. I'm a big fan of the Hanke-Henry permanent calendar, personally.
Admin
And just this morning, I sat down at my desk, looked at my current (and completely different) embedded system, and saw "February 28" on the screen. I freaked out. I turned on another unit that was temporarily in my cubicle and saw that it was also Feb 28. I had a bit of extra freak out to see that the time zone had changed too, but that was due to testing a settings file on both units. Then I noticed that both of them were off by 12 hours and I really freaked out trying to figure how this could happen in a system that used a longint seconds RTC.
Then I remembered how easy it was to forget to set AM/PM, and that probably both my desk unit and this other unit had the AM/PM wrong weeks ago, and the date was set in the afternoon. I probably wouldn't have even noticed the wrong date if it weren't Feb 29. So I got all freaked out by a non-bug on Feb 29.
And let us not forget The Day The PS3 Died. Back in 2010, due to a bug in the RTC chip (which didn't use longint seconds, but used the low BCD digit of the year mod 4 to determine leap years, WTF?), the RTC said the date was Feb 29 2010, while the hypervisor knew that the date was Mar 1 2010, so you couldn't log into PSN.
Admin
Admin
15 minutes after I read this article I got an email about server error on a website I run.
Not my code but a library I use (python-beaker):
*facepalm*Admin
Clearly, you did not understand the root problem here. Why should a year be the revolution time of the earth ?
Shift your paradigm and there is a simple solution to this problem: make 1 year last 4 years! So from now on, let's just say 1 year is 365*3+366 days (1461 according to calc.exe).
Of course, there will always be a few people reminding that every century (remember, a century is now 25 of your old years) there will be an adjustment. And hence they will pretend my idea is not valid.
But there is a solution ! Simple ! Let's make 1 year last 25 years.
Still there will be a problem every four years (because of the adjutment every 400 old years)... I'm working on it.
Admin
More than four, but none of them are "neither".
For a one-qbit system, 0 and 1 are orthogonal basis vectors that form its state space. The qbit's state can be any unit vector in that state space.
An eight-qbit entangled system has 256 orthogonal basis vectors: |00000000>, |00000001>, ..., |11111111>. The eight-qbit system can occupy any state that is a unit vector in that 256-dimensional state space.
So.
Admin
Admin
Because that's the definition of a year. What you're proposing is to make something other than a year the unit for long-term time measurement.
The reason that's a bad idea is that proposals that confuse everyone except for incompetent computer programmers generally fail.
Admin
90% of WTFs seem to be just programmers who don't know there is a function to do something and instead have to do a (poorly-designed) workaround.
That's why I spend 30 minutes re-reading the whole Python documentation before writing any new function.
Admin
Admin
Should've used 21365.24219878246060*1000 = 662695445466.43 (although the fact that it doesn't come out to be an integral number of ticks may introduce some error).
The length of a solar year is 365.24219878 days.
Admin
Admin
Admin
There is also the matter of leap seconds. There's been a few of those in the last 21 years.
Admin
It wont be a true boolean. Boolean by definition is true or false. What you (Anketam) describes a half or semi nibble. You have 4 different positions: on, off, FILE_NOT_FOUND, DATE_NOT_FOUND. (00,01,10,11)
Blueg3 you are just spouting nonsense. I'm not saying the theory isn't there... but how far into the future do you think its going to take before we have the technological capability to align those molecules AND be able to detect what position between 0 and 1 they are... What you basically have is an atom that can have a float value between 0 and 1... much like an xbox joystick. Functional, but not precise.
ps... i'm just trollin :p
Admin
As for the next 88 years, I really wont care by that point and that will be the job security of whatever poor sap is trying to get the atoms on his quantum computer aligned right.
Admin
Admin
Now that we are on the verge of becoming a spacefaring civilization, it is long past time to discard our backwater planet-centric timekeeping system in favor of something Universal.
I propose a simple floating point counter of seconds since the big bang. Should work anywhere, forever. Leap second, leap year, Y2K, December 2012... who cares? Just keep incrementing that counter!
Admin
I don't write web applications, but what kind of toy languages are you web programmers using that don't have a proper time library?
Anyone who has thought about date/time computing for more than a picosecond realizes that date/time computing is a minefield best left to a library author who lives, eats, and breath time!!
Admin
Oooh.
Now that you're spotting it, I do see a problem with my idea making things a bit confusing.
Maybe I should not keep the word "year" to name the new year concept... What do you think of nyear? It would be easy to understand (new year). But maybe the sound is too close. Nyur then? It's only four letters long and should be pretty easy to type on any mobile phone (well, it is on my Nokia 5110) which is very important since we want children to adopt it.
Admin
We must change the calendar because of stupid people. There's a new one...
CAPTCHA: mara - Hindu god of death; opposite of Kama. How fit.
Admin
Who cares what you call it. Language tends to evolve to use shorter words anyways. You could call it a hoogawoogabooga and it would adventually get shortened to a wuga anyways.
Admin
Let's just skip the last minute of every day (as currently defined), and fix the rest with an occasional leap second (back or forward, as appropriate).
Admin
What that means the days for each month needs to be is left as an exercise for the reader.
Admin
But that won't give you the desired answer. If it's your 21st birthday it will say you're too young for the first quarter or the day and old enough for the rest.
Admin
Possibly fixed with a round down on the date to the nearest midnight.
Admin