[url]http://lmgtfy.com/?q=btk&l=1[/url]
Jonathan
@Jonathan
Best posts made by Jonathan
Latest posts made by Jonathan
-
RE: Cheap code
You still get most of the benefit of StringBuilder since the long string is built with it. It could be better but performance will be the same order at least.
-
RE: It's critical that this is fixed!!!!1!!eleven!!
The RWTF is that Google finds thirty million results for ש״ח and zero for ₪.
-
RE: Time Zone Converter
@Cassidy said:
@Jonathan said:
Dates as strings are necessary in order for them to be human readable.
Then you transform them just as you're about to display them to a human.
For all other operations, it makes sense to leave them as a Date object.
So far we haven't been given any requirements so we don't know if any other operations are needed. The unknown requirements may or may not call for this code.
So the worse than failure here is expecting requirements to be assumed, which is the worst of all worse than failures.
-
RE: Time Zone Converter
@OhNoDevelopment said:
@Jonathan said:
The basic idea seems correct to me. What is the worse than failure?
For starters, dates as strings are silly strings. This whole thing would not have been necessary had it simply used date objects instead.
Dates as strings are necessary in order for them to be human readable.
So this code doesn't meet your requirements? You haven't shown us your requirements and this code is basically correct for what it does.
-
RE: Time Zone Converter
The basic idea seems correct to me. What is the worse than failure?
-
RE: Programmers trying to talk to non-programmers without getting sidetracked by trivialities? IMPOSSIBLE!
I don't see the worsethanfailure. The discussion is an intelligent one about basic programming theory. It's trivial only superficially. People dying because of programming errors and how that affected language design is not trivial.
You do have a funny avatar though, so there's that.
-
RE: Saving timestamps in the database, displaying local time
@Jonathan said:
@morbiuswilters said:
@Jonathan said:
Isn't the number of seconds since midnight on January 1, 1970 the same as the number of seconds since December 31, 1969?
Yes and no. From the point of view of calculating a timestamp, the last discrete second of Dec 31, 1969 would be 23:59:59, so if you calculate from there you'd end up with an extra second.
The last second of December 31, 1969 did start at 23:59:59 but it ended at midnight.
And the last second of December 31, 1972 started at 23:59:60.
-
RE: Saving timestamps in the database, displaying local time
@morbiuswilters said:
@Jonathan said:
Isn't the number of seconds since midnight on January 1, 1970 the same as the number of seconds since December 31, 1969?
Yes and no. From the point of view of calculating a timestamp, the last discrete second of Dec 31, 1969 would be 23:59:59, so if you calculate from there you'd end up with an extra second.
The last second of December 31, 1969 did start at 23:59:59 but it ended at midnight.