|
I mean, that's an element of it, as they are essentially folk tales. But what they convey is the fascinating. The actual story arcs themselves are useful, as they predict/describe behavior - but the real meat is in its use of allegory to enable humans to engage in higher level pattern matching. It's a manual in part, to show you how to do that, and it's also full of existing patterns, that sometimes become a sort composition. It takes study and reflection to do it. It's very very deep and layered. The talmudic commentary on verse can be very helpful to unravel some of what these stories tell the reader.
Real programmers use butterflies
|
|
|
|
|
Yes, that number arising is pure coincidence and I find it rather nonsensical to make anything of it. The thing is you are mixing a ratio and an absolute measure and when the units of meters are used the number is interesting. For a civilization that uses feet and inches there would be no significance what so ever. They will find the cubit to be 20.6 inches and think, "oh, what ever. That seems rather random." The Egyptians didn't have the metric system so how would that number of meters been of any significance?
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Rick York wrote: Yes, that number arising is pure coincidence Well, actually it's not really coincidence that the ratio of the Egyptian cubit is 0.52 of a meter. However there is nothing mysterious or special about it. I am not sure I conveyed what I am talking about in a clear way.
Here is an absolute fact:
If I gave you only a rope and a rock and asked you to divide the day using only those materials into 24 hours, 1440 minutes and 86400 seconds. When you completed the task your rope would be approximately 1 meter long. The arc of your pendulum would cover ~0.52 of the meter when swinging.
That's all, nothing mysterious.
|
|
|
|
|
private readonly bool _mUseQuoteValue
Original post[^]
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Maybe this should be the proper naming:
const bool _alwaysWrong= true
It does not solve my Problem, but it answers my question
Chemists have exactly one rule: there are only exceptions
modified 19-Jan-21 21:04pm.
|
|
|
|
|
99 Bottles of Beer | Language Malbolge[^]
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
|
I've heard of it. I think the syntax is too verbose.
Real programmers use butterflies
|
|
|
|
|
So, when will we see a malbolge code generator article?
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
That would be evil
Real programmers use butterflies
|
|
|
|
|
Yes?
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
Found this gem in our codebase...
public static class DateTimeExtensions
{
public static DateTime EndOfMonth(this DateTime dt)
{
return dt.Date.AddMonths(1).AddDays(-1);
}
}
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Ah.
I can see a problem developing there. I assume he tested it on the first of the month, and it worked fine?
Here is my stab at it:
public static DateTime LastOfMonth(this DateTime dt)
{
int daysInMonth = DateTime.DaysInMonth(dt.Year, dt.Month);
return dt.FirstOfMonth().AddDays(daysInMonth - 1).AtMidnight();
} As seen before: DateTime Extensions to Make Some Simple Tasks a Little More Readable[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Actually, he had unit tests in place, but all the dates tested were on the first day of the month.
My fix was:
return new DateTime(dt.Year, dt.Month, 1).AddMonths(1).AddDays(-1);
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
modified 15-Jun-20 9:14am.
|
|
|
|
|
I guess it's true for tests as well: GIGO ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
And why not simply use DateTime.DaysInMonth ?
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Because the programmer wanted the attention of being presented here?
|
|
|
|
|
Makes sense
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
|
Rob Grainger wrote: return new DateTime(dt.Year, dt.Month, 1).AddMonths(1).AddDays(-1);
This is exactly my EndOfMonth extension function in dotNet.
|
|
|
|
|
This gets you the last *date* of the month, but if you’re actually looking for the “end” of the month and don’t want fencepost errors, you’d want the first of the next month (with no time component) and then use a strict less-than in your comparisons.
|
|
|
|
|
Not to be pernickity but I guess it is going to depend on the intention of the method. If a trial runs for a month then perhaps from a given date that would be the end of the month
However, the intention is not clear from the method name so one may very well assume that it represents the date for the last day in the month of the given date.
|
|
|
|
|
Personally, I feel that an extension method on DateTime should apply to all possible DateTime instances. Otherwise, it can be defined to match circumstances, as long as that is clear from the name.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
30 days have September, all the rest I can't remember.
|
|
|
|
|
I resemble that remark.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|