• 1 Post
  • 14 Comments
Joined 1 year ago
cake
Cake day: July 2nd, 2023

help-circle






  • I love this standard. If you dig deeper into it, the standard also covers a way to express intervals and periods. E.g. “P1Y2M10DT2H30M” represents one year, 2 months, 10 days, 2 hours and 30 mins.

    I recall once using the standard when writing a cron-style scheduler.

    I also like the POSIX “seconds since 1970” standard, but I feel that should only be used in RAM when performing operations (time differences in timers etc.). It irks me when it’s used for serialising to text/JSON/XML/CSV.

    Also: Does Excel recognise a full ISO8601 timestamp yet?





  • What do you think WHQL is?

    The problem with CrowdStrike’s solution is that they got csagent.sys driver signed by WHQL, and the driver will download p-code from the internet and execute it. This allows them to push out changes without waiting for Microsoft approval.

    The biggest problem occurs when you don’t sanitize your inputs and someone accidentally uploads a blank file padded with zeroes. The driver dereferences a null value, and crashes your system. Hard.




  • pHr34kY@lemmy.worldtoProgrammer Humor@lemmy.mlWorse than single letters
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    1 year ago

    You declare it as the first line after “function getNextDay() : date {”, then it is glaringly obvious that is a date variable that will (eventually) contain tomorrow’s date, and will be returned by the function.

    However, I would only use “var” if it’s initialized in the same statement. It prevents Smurf code, and the compiler knows the type straight away.

    Given a small and clean context, variable names don’t need to be specific.