• 0 Posts
  • 405 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle






  • I once developed an electronic program guide for a cable TV company in New Zealand and I’d lose my mind if I had to use timezones. The basic rule of thumb was:

    a) Internally you use UTC religiously. UTC is the same everywhere on Earth, time always goes forward, most languages have classes that represent instants, durations etc. In addition you make damned sure your server time is correct and UTC.

    b) You only deal with timezones when presenting something to a user or taking input from a user

    Prior to that I had worked for a US trading company that set all their servers to EST and was receiving trades through the system which expressed time & date ambiguously. Just had to assume everywhere that EST was the default but it was just dumb programming and I bet to this day every piece of code they develop has time bugs.




  • I’ve never seen much reason to use a real name on Glassdoor. They demand visitors sign up to see information, and every logon it demands more details. So I am glad I used a throwaway account and I expect many others did too, or filled it in with junk. I hope their database is poisoned with garbage. I’m sure they will continue to turn the screws - using a mobile device? You MUST use our app etc. I hope people realise that LinkedIn already sucks and here is something even worse moving into the same space.




  • Rust isn’t really OOP like C#, Java or C++ - it has structs with functions that you could consider an “object” but there is no inheritance. Instead Rust uses traits which are a little bit like interfaces in some languages.

    The way the kernel is using Rust at the moment is to produce safe bindings for modules to be written in Rust, i.e. you can create a module in Rust source which will be correctly loaded up, the code is safe by default and will have access to kernel services via bindings. I expect over time that more of the kernel will become Rust, but the biggest impediment right now is Rust relies on LLVM and LLVM only supports a subset of targets that a kernel could potentially support with another compiler like gcc.



  • arc@lemm.ee
    cake
    toProgrammer Humor@programming.devIs this a Nut?
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    4 months ago

    The only reason people use JS is because it’s the defacto language of browsers. As a language it’s dogshit filled with all kinds of unpleasant traps.

    Here is a fun one I discovered the other day:

    new Date('2022-10-9').toUTCString() === 'Sat, 08 Oct 2022 23:00:00 GMT'
    new Date('2022-10-09').toUTCString() === 'Sun, 09 Oct 2022 00:00:00 GMT'
    

    So padding a day of the month with a 0 or not changes the result by 1 hour. Every browser does the same so I assume this is a legacy thing. It’s supposed to be padded but any sane language would throw an exception if it was malformed. Not JavaScript.



  • Police in other countries don’t face an epidemic of guns, crime, homelessness, drugs and mental health issues. If the US wasn’t so dysfunctional and actually attempted to tackle these issues in a holistic way then I assume the role of cops would also change. But right now it is not that way. They are trained so if someone comes at them with a knife, or draws a weapon to threaten the cop or somebody else, they WILL shoot. Watch the body cam footage on https://www.youtube.com/@PoliceActivity/videos or the state cop channel of your choice and you’ll see exactly why.

    And to repeat what I said somewhere else, I’m not on the cop’s side, but I am on the side of full disclosure and body cam footage to show context. I support defunding the police - although, not the name which is a fantastically stupid way to describe it - but supporting mental health services, tackling drugs & recidivism and other assistance would mean less people in these confrontations.


  • I’ve seen plenty of clips where the cops are in the wrong. Idiot cops firing pistols by accident or shooting in the absence of imminent threat. And that’s why I support body worn cameras and full disclosure. Is is also why I am extremely skeptical of newspapers jumping to conclusions in the absence of the footage. It is very easy for relatives of the deceased to decry the cops as racist, or trigger happy and it be reported as such. And then the footage comes out and it shows something completely different.