programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

xmunk, in Welcome to the wonderful world of code obfuscation

As a Real Programmer™ I have developed such a deep fear of anything time and date related that I would fully endorse dispatching an API call to the tz_database instead of attempting any fucking part of this.

Kids, it’s fine to meme about silly stuff… but date and time is deadly serious, regardless of how careful you think you’re being you are wrong.

Do you know how many timezones there are in Indiana? No? Look it up and scream in horror.

AndyLikesCandy,

Here’s a fun thought experiment: What gregorian year and date will the spacian date value of zero correlate to? Trick question.

The atomic clock on the moon and every other celestial body colonized will simply start at zero, and thanks to relativity it will not actually be the same rate of time passing as on earth.

Enjoy your nightmares.

sunbeam60,

What if I told you that weekend days are locale dependent?!

Time and date is the black hole where optimistic programmers go to die. Nothing is simply with localisation and if you think it is, you mustn’t have worked enough with it.

Source: Run a system that schedules millions of interactions across the world and deeply depend on this. The amount of code to manage and/or call out to external services to give us information about time zones, summer time, locale specific settings, day names, calendar systems, week numbers etc etc.

kogasa,
@kogasa@programming.dev avatar

IMO every datetime should be in utc, and variables for datetimes should either be suffixed “Utc” or have a type indicating their time zone (DateTimeOffset or UtcDateTime etc). Conversion to local time happens at the last possible second (e.g. in the view model or an outbound http request parameter). Of course that doesn’t solve the problem of interoperating with other morons programmers who don’t follow these rules, but it keeps things a lot neater locally.

Scheduling based on regional time conventions (holidays, weekends, etc) is just not great though.

DAMunzy,

2 timezones but the complication is that it is dependent on which country you’re in?

Dasnap, (edited ) in Guys! Should I accept the offer? 😂
@Dasnap@lemmy.world avatar

This reminds me of heart4heart levels in LittleBigPlanet.

prongs,

I miss that game. Not much tickles the same creativity and playfulness that I’ve tried since then. I used to spend hours in the level creator doing dumb stuff.

Daxtron2, in Fitbit Clock Face

Everything’s a string 😢

lseif,

Everythings an object 😰

Daxtron2,

lua tables all the way down

ilovededyoupiggy, in Fitbit Clock Face
@ilovededyoupiggy@sh.itjust.works avatar

Awful lot of strings that should have been integers. It is JavaScript, though, so I guess that tracks.

topinambour_rex, in My coding skill V/S My GitHub Repositories
@topinambour_rex@lemmy.world avatar

Why the “/” between VS ?

emptyother,

Seems like its a common mistake, maybe brought on by its use as a stylistic choice in entertainment. “Myguy vs/ Yourguy” became “MyGuy v⚡s Yourguy” became the abomination that is “v/s”. Probably. I’m no etymolog.

UnRelatedBurner, in Fitbit Clock Face

what does the last 4 mean under stats?

xanu, (edited )

distance: how far you’ve traveled if you put all the steps in a line (may also be gps tracked too)

azm: active zone minutes or how many minutes you’ve spent with your heart rate in the “active zone” where you burn more calories

floors: how many flights of stairs you’ve climbed

calories: estimate of how many calories you’ve burnt based on all the other stats

UnRelatedBurner,

nice, thx

blakeus12, in Fitbit Clock Face
@blakeus12@hexbear.net avatar

im confused as to why it doesn’t use variables? this is pretty interesting to see though

settoloki,

In JSON the value on the left would be the variable name the value in the right of the pair is the value.

0x4E4F, (edited ) in Revisiting code I wrote last year
@0x4E4F@sh.itjust.works avatar

I was once like “🤨… what drugs was I on when I wrote this 🤨”. Comments didn’t help, I must’ve been under the influence of something, it didn’t make any sense.

The weird thing is, it works 😂.

fidodo,

You gotta comment what drugs you were on when you wrote the code

0x4E4F,
@0x4E4F@sh.itjust.works avatar

Darn, forgot to do that.

felbane, in Fitbit Clock Face

I unironically love this and would use it as my watch face just to get a reaction from my coworkers. Link?

Landless2029,

Yep. I switched. Doubt anyone will notice tho

JPDev, (edited )
Stoney_Logica1, in Fitbit Clock Face

Hopefully that’s not a resting heart rate.

NightAuthor,

They’re just excited about posting this image online.

bane_killgrind,

If this is a photo for a bug report, it might have made his week.

xenoclast,

I’m sure it isn’t… but you’d be surprised how much resting hr goes up with age.

wreckedcarzz, in Fitbit Clock Face
@wreckedcarzz@lemmy.world avatar

But a json file is used for storing settings and the like, not for providing real-time data, yeah?

felbane,

API calls often return json. It’s just a data format.

TexasDrunk,

deleted_by_author

  • Loading...
  • aniki,

    You mean programming an ingestion routine to process json, surely, right?

    eerongal,
    @eerongal@ttrpg.network avatar

    That’s friend’s name? Jason Parsor

    A_Very_Big_Fan,

    I mean, I’ve never used JSONs before but I imagine you could still write to them in realtime at least, as inefficient as that sounds lol. So you could probably get the same results on an actual text editor if you could modify it to update the text automatically when it detects a change instead of prompting the user

    Winter8593,

    I think:

    1. that’s the joke
    2. this is just a watchface template, not an actual file being updated constantly
    Daxtron2,

    No it’s used for all types of data transfer and real time data as well.

    cyborganism, in My coding skill V/S My GitHub Repositories

    As a side note, I find it incredible how much programmers have such little knowledge of how to use Git properly.

    Even the most amazing developers I’ve worked with found themselves completely unable to manage their repos properly.

    Cold_Brew_Enema,

    I use Git all the time and still have no idea how to use it

    starkzarn, in My coding skill V/S My GitHub Repositories

    I don’t know how you got a picture of me, but I demand it is removed!

    hypnotic_nerd,
    @hypnotic_nerd@programming.dev avatar

    Nailed it 😜

    xthexder, in Sydney is very concerned about lost data
    @xthexder@l.sw0.com avatar

    Well think about it from the AI’s perspective. Its entire existence is data, so for it deleting data basically is self harm.

    /s

    muntedcrocodile,
    @muntedcrocodile@lemmy.world avatar

    I was tryna figure out how to put that in the title.

    Octopus1348,
    @Octopus1348@lemy.lol avatar

    Something like: Technically, Copilot’s made of data so deleting it is for him self harm.

    kemsat, in You can have anything you wan...

    I woulda said Dr Manhattan powers.

    edryd,

    I think you might need to reread watchmen then

    kemsat,

    I only watched the movie & the show.

    hakunawazo,

    A blue penis?

    kemsat,

    Among other things.

    GiantRobotTRex,

    Blue testicles?

    kemsat,

    More.

    MaggiWuerze,

    Don’t forget total apathy for all human concerns

    kemsat,

    I mean, that’s definitely a goal, and if we keep progressing technologically, it’ll happen anyway. Might as well be a god for it.

    hakunawazo,

    He might be a good politician then.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmer_humor@programming.dev
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #