4 ms·
I think the joke is the `getDOWNum` call: `getDayOfWeek` takes a string as its argument, so presumably this is already something like "Monday", thus rendering t
by Xophmeister 13y ago
I think the joke is the `getDOWNum` call: `getDayOfWeek` takes a string as its argument, so presumably this is already something like "Monday", thus rendering the function redundant (i.e., equivalent to the identity). However, there's no implication of this anywhere in the code; the input string could be "2014-02-24", for example.
Maybe that's a bit of a long shot. Perhaps there's some standard library function -- I don't know Java, but the author seems to assume the reader does throughout the article -- to turn dates/whatever into day number. Maybe his joke is therefore, "OMFG! What a noob!"
In short: I don't get it, either...
- MAGZine 13y agoThat could be it. My first glance lead me to think it could all be replaced with an enum rather than 7 switch statements (or, better yet, a library function). "data" is ambiguous, too. I think that perhaps there are a few errors to demonstrate his point.