• (nodebb)

    I am surprised how much effort people put in to avoid RTFM. Do they feel smarter about themselves or what is the motivation there? I honestly dun get it...

  • Darren (unregistered)

    I've recently done some date handling to add logging to a PowerShell script. I'd completely forgot about using .ToString() to format a date and did it the old fashioned way with padding zeros and variables for each part*.

    Sometimes we all need a little reminder.

    (* - for my use case it's fine, I'll be the only one maintaining the code and I don't mind a bit of verbosity on things I look at infrequently - especially if performance isn't concern)

  • Hanzito (unregistered) in reply to MaxiTB

    I think TFM is too big by now to understand. Have you seen those books that "explain" how to work with Office? They sold relatively well in the previous decade. But most of them explain Word and Excel by describing all the menu options and the dialog buttons. If you think "this paragraph should be on the same page as the next one", those books don't help, unless you really dig linear search. You need to be taught in another way.

    The C#/Java/Python/... runtime docs are similar: list after list after list of namespaces, types and function calls. You couldn't guess a date formatting function exists if you wouldn't know where to look.

    So, you need experience, your own or someone else's. That's what's failing in here.

  • (author) in reply to Hanzito

    On the subject of experience, I think it's less knowing the manual and more having an intuition about what must be available. Like, I did have to go look up the exact format string rules, because I always forget "MM" vs "mm" (month versus minute), but I knew it existed and it was the work of seconds to find it.

    The biggest thing that's developed over my career has been the intuition of "there's gotta be a better way to do this," and then learning how to follow that intuition to the docs, or to a paper describing an algorithm.

  • (nodebb)

    Will AI tools eventually reduce these WTF and leave us only with WTFs that are harder to understand?

  • (nodebb)

    but it has it all, doesn't it

    Nope. There's one more thing it could have done wrong in other circumstances, but they avoided it by carefully (or of necessity, whatever) avoiding the use of DateTime.Now.

    It uses the same root variable (dtmValue) for all the calls to ToString, so we could never see the "2025-010-01" that we might see for an event that happened in the last split-second of 2025-09-30 and did all those jolly DateTime.Now calls that aren't synchronised/captured.

  • (nodebb) in reply to Rick

    Of course not. The AIs learn by the data they are given, and it's inconceivable, or at best highly unlikely, that they have been trained exclusively on definitively good code. Especially given the blatantly futile optimism inherent in Sturgeon's Revelation: "90% of everything is crud."

  • (nodebb) in reply to Hanzito

    I was talking about pressing F1 when the caret is on ToString() any you get all the info right there. It has never been easier to RTFM ;-)

    Addendum 2025-03-25 09:28: Onathesedays, I wish we have a proper edit function so I just can edit out a simple typo :-)

  • (nodebb) in reply to Rick

    If you talk about those GenAI toys, nah, they are already just an additional the source of frustration.

    Remember those people that copy&pasted something from Stackoverflow? Well, now we have statistically most likely responses from Stack Overflow unreliably represented by an untested algorithm and then copy&pasted. It's like looking an alcoholic into a Whisky cellar.

  • (nodebb)

    I think this is a symptom of our industry, where we value hard work and delivering stuff over taking our time to read a manual and learn our tools in general.

    I have no respect for hard working people if this is what they deliver.

  • Richard Brantley (unregistered)

    This looks like it might be C#, and if so, the .NET framework has one of the largest and most robust libraries when it comes to date and string manipulation. There's really very little common low level wheels to invent. I agree that the entire cosmos of apis in .NET is immense, but this is a pretty simple thing to do in any language and 30 seconds with a search engine should get you a better answer than this.

    This is also exactly the kind of thing a review of a pull request should catch.

  • Officer Johnny Holzkopf (unregistered) in reply to Jay Vercellone

    As a consequence, those who "work smart, not hard" by reading the manual first, then typing the code, look inferior to those whose metric is LOC-based or how long they are visible in the office...

  • Argle (unregistered) in reply to Remy Porter

    The biggest thing that's developed over my career has been the intuition of "there's gotta be a better way to do this," and then learning how to follow that intuition to the docs, or to a paper describing an algorithm.

    I used to tell my students something like: "Skim the library documentation. You don't have to memorize it. You don't even need to read it. You just need to be aware of what's out there."

    I quickly discovered who took my advice and who didn't. One who didn't rolled his own C toupper() function on the assignment given over string handling and following my lecture about it. [sigh]

  • dzp (unregistered) in reply to Rick

    Indeed.

  • (nodebb)

    Is one part of the problem that at university, students are frequently asked to write code for common things, and told not to use what's already implemented by the language? E.g. when learning about tree structures, we would need to hand-craft our own, not simply use a built-in class, because otherwise you aren't learning how those structures work. But I remember coming out of uni without any real experience in looking up the API documentation, and ended up re-inventing wheels until I learned better.

    To be fair, I did a Computer Science course, where we were taught enough about how to use a given programming languages in order to learn what computers can do, rather than learning how to be programmers competent in that particular language.

Leave a comment on “Tern Down a Date”

Log In or post as a guest

Replying to comment #676557:

« Return to Article