There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

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

CodeBlooded , in Implementing RFC 3339 shouldn't really be that hard...
@CodeBlooded@programming.dev avatar

Mandating UTC everywhere and eliminating the concept of time zones altogether is all a political candidate needs to do in order to earn my vote in 2024.

Seriously, what is the point of time zones? The only explanation I’ve ever heard is “well if we didn’t have time zones, half the world would be expected to be awake when it’s dark out!” No. We could all just literally adjust the times of our business operations based around when daylight is usual for the different geographic regions as they have the sun shine on them. The physical “zones” of time zones could remain the same, and in those zones “noon” would just mean something other than “12:00.” “Noon” for one region could be 2300 while what is considered “noon” for another region could be 1800.

(And for my next rant: why the 24 hour clock is superior to the 12 hour clock… reason number 1? There’s 24 hours in a day…)

palordrolap ,

Implementing such a change has another problem: Who gets to have the time-zone that's noon at noon?

Are we going to let the British continue to get away with it? Even the excuse of "that's the way it has to be to keep things simple" would cause the French to revolt. Again. They still don't like to talk about the fact that it's Greenwich and not Paris that's the prime meridian.

Swatch's "Internet time" was a decimal system designed to mitigate the problem because no-one would have any idea what the old time was supposed to be, but people are used to the base-60 system. It didn't and won't catch on.

And it doesn't fix the "0 isn't my midnight" problem, which is pretty close to the original.

It also doesn't fix the "what time of day is it elsewhere in the world" problem, which still requires knowledge of time differences. You know. Time zones.

roguetrick ,

Decimal is bad anyway. We should first convert all our math to duodecimal.

palordrolap ,

"What time is it, Mother?" "It is 7XƐ, child. Eat your breakfast."

roguetrick , (edited )

Too high, duodecimal flips at the 50 minute mark or right after 7:4E. Though you could get away with doubling the length of an hour easily enough with duodecimal or just ignore minutes and seconds completely and make everything just be an hour as the standard measure( so that 7;50 is actually seven hours and 26 minutes). It’s such a better base for doing mental math.

palordrolap ,

I was using a Swatch-like duodecimal system of 12³ = 1728 beats per day. This is actually more accurate than minutes of which there are 1440 and actual Swatch beats which are 1000 per day.

Since I haven't stated (or decided, for that matter) where the meridian is, we have no idea where this is, but it's clearly morning. Or is it. It's probably 10 minutes to some hour or another, or thereabouts, if midnight aligns with old time somewhere. Which it doesn't have to.

"Mother why do our eyes bleed."

Yearly1845 , (edited )

Plus people would go to work on a Tuesday but come home on Wednesday. Lol it would be an accounting nightmare.

“Well the books for this company closed on the 1st, but the books for this other department within the company closed on the 2nd”.

Hawke ,

You may be interested in the concept of “third shift”

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

Are you under the impression that people do not work past midnight?…

CodeBlooded ,
@CodeBlooded@programming.dev avatar

Who gets to have the time-zone that’s noon at noon

I am asserting that we abandon this concept of “noon” having to be precisely when the pixels on the my clock take the form of “12:00”.

Who cares? Just let “noon” be whatever mid-day is where you live.

0 isn’t my midnight

Same thing, why does it matter? Why do people cling to this? Midnight should be when you are mid-way through the night, regardless of what time a clock shows.

It also doesn’t fix the “what time of day is it elsewhere in the world” problem, which still requires knowledge of time differences. You know. Time zones.

I don’t have time zones memorized, so I have to look up this information when I need to know it anyway. I did say in my post that the [time] “zones” would still exist if I had my way with UTC. I do still think it’s valuable to know the operating hours for different parts of the earth- I just think we can track this without having to have the madness that is time zones. However, while answering this, I do feel what you’re saying. Perhaps we do keep time zones, but only as a way to tell time that is secondary to UTC? (As compared to today, where UTC is often an afterthought, if people even think about it at all.)

palordrolap ,

Stealing from another commenter: Are you OK with referring to days of the week as Tuesday/Wednesday, or do you propose abandoning day names altogether? If you say your local day is Tuesday which doesn't align with someone else's Tuesday, you've still got the old time-zone problem just at a coarser grain.

As for "secondary time" yes. That's called local time. Which is what the initial proposal was trying to be rid of.

Now riddle me this: What time do you have your computer's motherboard set to?

bitchkat ,

the correct time zone is UTC not Greenwich Mean Time.

palordrolap ,

I never said the time zone was GMT, only that the meridian is Greenwich. Subtle, yes, but if the meridian for UTC isn't the one running through Greenwich, let me know.

bitchkat ,

Actually you only mentioned timezone “who gets to have the time zone where noon is directly overhead” and then went into a rant about England vs France. You never once mentioned the meridian.

palordrolap ,

They still don't like to talk about the fact that it's Greenwich and not Paris that's the prime meridian.

But sure, I didn't explicitly connect the dots.

bitchkat ,

We’re talking about this: “Who gets to have the time-zone that’s noon at noon?”

That established the context that we are talking about time zones.

psud ,

So organising a meeting for 03:30 has the problem of that not being working hours for some people, and you have to look up what working hours are in each area. What problem is that supposed to solve?

MajorHavoc ,

you have to look up what working hours are in each area

It’s common courtesy do this anyway…

DudeDudenson ,

What you’re proposing is literally time zones but without shifting the actual clock, you still end up with all the issues and you remove the link between the hour of day and the sun’s position for people lol

Plus who gets to decide that everyone switches over and what is the new global time?

CodeBlooded ,
@CodeBlooded@programming.dev avatar

Yes, this is literally what I’m proposing.

You do not still end up with the same issues. Somebody booking a ticket for a hotel room to be available at 1300 from a different time zone than said hotel will not arrive at the hotel to learn that the check in time is different from their expectation.

Regarding “the link between the hour of the day and the sun’s position,” I’m asserting that we should recalibrate this expectation based on time zones, rather than changing the clock to some fictitious time based on “noon” always equaling “1200.”

who gets to decide that everyone switches over and what is the new global time?

“Global time” in this context is already decided to be UTC. And no one gets to decide on the switch. This is a dream that will never come to fruition. 😕

netizen ,
@netizen@programming.dev avatar

You’re saying that in the U.S. you enter your office on Monday and exit on Tuesday?

CodeBlooded ,
@CodeBlooded@programming.dev avatar

Yes. Many people already work shifts that have them do exactly that (show up to work on Monday, go home on Tuesday).

My first job had me work all sorts of shifts. Anything other than the day shift, I was showing up early or late evening one day, and leaving work early or late morning the next day.

state_electrician ,

Haha, let’s inconvenience 99.9% of humans so some programmers have a slightly easier life. I’ve had my share of frustration with time zones, but this change is so enormous, that it’s in no way appropriate.

CodeBlooded ,
@CodeBlooded@programming.dev avatar

I don’t think it’s actually realistic that this would ever change at this point in the game. I do think we could have adapted to all using UTC if we never started with time zones in the first place.

rhandyrhoads ,

The things is that time zones are a natural part of the earth. Back when people told time by the position of the sun, people in different places would naturally observe a different time. Should everyone around the globe have somehow established contact and said, hey one day we’re all going to be in constant contact, could you change your sundials to read the time where I am instead of where you are? At the end of the day, although time zones and daylight savings time have created some slight variations on this concept, noon/midday was defined by the concept of the sun being directly overhead. Since the origins of time telling are based on the sun, there is no first place where we didn’t start with time zones. Unless we somehow advanced as a society to create computers and the Internet without having ever created a system of time.

CodeBlooded ,
@CodeBlooded@programming.dev avatar

That’s fair. The replies here have opened my narrow thoughts that I’ve had on everyone solely using UTC.

In my defense, when discussing this with others in person, I’ve only ever been given garbage reasons to have time zones…

Now …can we all agree to hate Daylight Saving Time?

CoggyMcFee ,

Instead of store hours like this:

  • Monday 6:00-18:00
  • Tuesday 6:00-18:00
  • Wednesday 8:00-18:00
  • Thursday 6:00-18:00
  • Friday 6:00-18:00

We can have store hours like this:

  • Sunday 22:00-Monday 10:00
  • Monday 22:00-Tuesday 10:00
  • Wednesday 0:00-10:00
  • Wednesday 22:00-Thursday 10:00
  • Thursday 22:00- Friday 10:00

Boy, I would love to live in a place where store hours would be like this. So convenient.

And I’d love to have the change in the day be sometime in the middle of the day so that “see you tomorrow” means sometime later in the day. Or maybe different areas would use different conventions to refer to the time when the sun is out and most people are doing things and the time when most people are asleep.

It would also be so pleasant and relaxing to visit a new country and constantly have to calculate the country’s time offset in my head. There would probably be an app on my phone that I would constantly look at that would convert the time where I am to the equivalent time I am used to. I won’t have a sense of when meals are or when I should expect stores to be open, or when it’s reasonable to wake up without converting to the time I’m used to. Some might say the thing I’m used to is my time “zone”.

It would also be great for TV shows and books to always run into issues when talking about the time because there’s no universal reference.

Even the actual convenience of scheduling a meeting with people in different parts of the world has issues. Now, you know that whatever time you say is the time for all people. But instead of being able to just look up each person’s time zone and see “oh, it would be 3am there, so they’d be asleep”, you’d have to go to some website that tells you what time most people sleep or what time most people eat meals, or whatever, and see by how many hours it differs.

JayDee ,

You already have an entire vocabulary for solar time (sunrise, morning, noon, evening, sunset, night, midnight). This being all of a sudden assigned to a different time on a clock does not change things in any dramatic fashion. It would also be a consistent change for your current location, guarantee it only takes you less than a work week to acclimate.

All the things you’ve described I’ve literally been doing for 6 months now. It is not a noticable difference and does not impact me.

Also, a book that says “it was 5 o’clock” is objectively more boring than one that describes the shadows of twilight blanketing the scene in a checkering of shadow. Also TV shows show outside, where solar time is visibly apparent. The specific time is not nearly as relevant.

Also, you already look up time zones when scheduling international meetings, and those aren’t going to tell you about siestas or other local practices which might affect scheduling. Maybe just actually ask the person what times will work when trying to schedule, and now since you’re both using UTC, you both can figure it out together without looking up timezones.

MisterFrog ,
@MisterFrog@lemmy.world avatar

Or, ooor, the obvious answer of mandating the UTC in the backend.

Actually moving societies all to UTC is a really bad idea, as outlined by many others, dozens of times on Lemmy.

24 hour time though, that’d be nice. Everyone already knows how it works anyway!

ByteJunk , in Implementing RFC 3339 shouldn't really be that hard...
@ByteJunk@lemmy.world avatar

It should be implemented in people’s brains.

How this goes, usually, is:

Them:…before 6PM.

Me: 6PM… Ours? The server’s? The user’s?

Them: GMT, of course.

Me: So that’s 7PM London right now, and changes to 6PM in November?

Them: What no are you stupid. Always 6PM GMT.

Me:* jumps off a cliff*

Klear ,

Reminds me of a LARP I was on one time. A group of people I was doing stuff with ended up always meeting at 10 because we redefined “10” to mean “whenever we all meet”.

jaybone ,

Don’t get it. Is this implying GMT has daylight savings?

Ephera ,

GMT doesn’t have daylight savings, but most people won’t be as precise in language. Here in Germany, we might also tell people “GMT+2”, even though it changes to GMT+1 in winter. Like, I don’t even know what the correct shorthand would be for our timezone…

jaybone ,

CET?

abcd ,

It’s CET/CEST (MEZ/MESZ in German)

en.m.wikipedia.org/wiki/Central_European_Time

ByteJunk ,
@ByteJunk@lemmy.world avatar

I use TZ identifiers, and confirm the expected behaviour (“Berlin time, correct?”), as then I know how I should handle DST changes.

schnurrito ,

That is why lots of time zone selectors allow you to select “Europe/Berlin”: then it is clear that depending on the time of year this is UTC+1 or UTC+2.

firelizzard ,
@firelizzard@programming.dev avatar

GMT doesn’t have daylight savings but London does

mox ,

Them: GMT, of course.

Me: So that’s 7PM London right now, and changes to 6PM in November?

Them: What no are you stupid. Always 6PM GMT.

Me:* jumps off a cliff*

Sorry, but are you under the impression that GMT means London time, or that it observes British Summer Time?

caden ,

I too was similarly confused by the original comment at first, but I think they’re referring to the fact that 6pm GMT is 7pm in London during the summer (BST), and 6pm in London the rest of the year. It seems OP and “them” are both correct in that hypothetical exchange.

my_hat_stinks ,

UK is under BST (UTC+1) for half the year but people are usually just taught that the UK is GMT (UTC+0) which is based in the time in Greenwich, withought mentioning DST. I suppose it’s also possible everyone is taught BST and just forgets about it because daylight savings sucks, but either way most people seem to think GMT and UK time are the same thing.

This means you’ll get people asking for GMT times when they want BST or UK local time.

nyctre ,

Can confirm. Thought UK was always gmt+0, Paris/Amsterdam/whatever GMT+1, etc. (thought it was the clock that changed, not the timezone, if you know what I mean)

ruk_n_rul ,

The term UT is specifically created to divorce universal timekeeping from whatever UK’s timezone is doing, whether DST is on or not, etc. and the derived term UTC for when started adding leap seconds.

GMT hasn’t been a thing since UTC. It should be scrubbed from the vocabulary and old farts still using it should be shunned and reeducated.

magic_lobster_party , in Implementing RFC 3339 shouldn't really be that hard...

Go:

01/02 03:04:05PM '06 -0700

Ephera ,

Is '06 the year? What in the crime against humanity…

expr ,

Why in the ever-loving fuck would it do that? My hatred of Go only continues to grow.

ik5pvx , in Implementing RFC 3339 shouldn't really be that hard...

There’s an even worse thing: timezone selection UIs that don’t let you choose UTC

dajoho , in Average CSS

I am very, very surprised about the competence of the commenters here. I have had many discussions on reddit about the advantages of meaningful instead of presentational class-naming and you’re normally met with great resistance, especially with users of frameworks like Bootstrap and Tailwind.

Here, everyone seems to either ‘get it’ or is willing to hear why classes like .lime are bad. Very cool.

criss_cross ,

People that advocate for presentation naming haven’t endured a major company rebrand.

CanadaPlus ,

This guy has PTSD from working at “X”.

Aux ,

Frameworks like bootstrap are a cancer.

lseif ,

good for quick and dirty small projects tho…

Aux ,

No.

dylanTheDeveloper ,
@dylanTheDeveloper@lemmy.world avatar

It is like fentanyl don’t do it

FierySpectre ,

Ikr, like I don’t need a full feature full stack framework… I just want my tech demo to not look like it was made in the 80s without spending hours. (I’m mostly a backend dev)

SpaceNoodle ,

It’s not too surprising. Consider the sort of person who would have abandoned reddit for Lemmy during the APIcolypse last year.

douglasg14b , in Implementing RFC 3339 shouldn't really be that hard...
@douglasg14b@programming.dev avatar

Never not UTC Everywhere.

utceverywhere.com

ooterness ,

UTC is better than most, but leap seconds are still awful. Computers should use GPS or TAI everywhere. Dealing with time zones and leap seconds is for human readability and display purposes only.

jerkface ,
@jerkface@lemmy.ca avatar

That’s why I only ever use Seconds Since Epoch.

marcos , in Implementing RFC 3339 shouldn't really be that hard...

Yeah… the “-7:00” offset is not enough information for most uses.

It’s barely enough to use as timestamps in email headers.

SpaceCadet ,
@SpaceCadet@feddit.nl avatar

How is that not enough? It’s in standard ISO8601 format and can unambiguously be reduced to a UTC timestamp, which is all that matters.

Klear , in Average CSS

No! I wanted orange!

apprehentice , in Implementing RFC 3339 shouldn't really be that hard...

When the API returns UTC, but the system insists on giving you local time… but there’s an extension method that accepts DateTimeOffset?

agressivelyPassive ,

Or requires a timestamp with zone offset, but ignores the zone offset, so you have to send the timestamp itself with a zone offset of zero relative to the systems timezone, but can’t just omit the zone offset, because it’s required.

bleistift2 ,

When the API returns UTC, but mandates that you give it an offset which it will add or subtract from the UTC time, while still adding the Z at the end.

laserm , in Old timers know

I deploy my apps with SFTP command line .

zerofk , in How programmers comment their code

Our code base is filled with “//constructor”, “//destructor”, “//assignment”, or the ever enlightening “Foo GetFoo(); // GetFoo”.

This is not what they mean by self-documenting code.

drathvedro , in Average CSS

I’m appalled that classes representing visual styles are still a thing. I thought everyone already figured that it was a bad idea back in bootstrap days. But then I recently had an opportunity to work on project that uses Vuetify and saw quite long poems about flexboxes in class names…

Ephera ,

Well, there’s not exactly a class training you have to take before writing CSS, so everyone starting out with it gets to make all those same mistakes for themselves before they know how to use classes sensibly. I myself am some backend guy, who has to write CSS far too often.

It certainly also does not help that various CSS frameworks out there do exactly that…

bleistift2 ,

It certainly also does not help that various CSS frameworks out there do exactly that…

Bootstrap (as of v5) being one of them. div class="d-flex gap-2 my-3 align-items-center flex-nowrap justify-content-between

I was annoyed at this at first, but I’ve since noticed that I write hardly any CSS any more, because most rules really are “just add some space, vertically align, be red”.

Blackmist ,

Could argue here that you’re still writing CSS, just cross compiling to it from Bootstrap shortcuts.

Ephera , (edited )

Yeah, the reason why people deride it, is because it’s practically equivalent to:


<span style="color:#323232;">div style="flex: 1; gap: 2em; margin-top: 3em; margin-bottom: 3em; ..."
</span>

I had to look up what these do, so they might not be precisely correct translations, but hopefully, you get the idea. It’s mostly like using inline styles, and like not using classes.

In some scenarios, these frameworks might simplify certain things, like how my applies two CSS rules. And they reduce the visual clutter of inline styling somewhat.

But overall, it feels like people are dissatisfied with semantic classes, but don’t want to lead the discussion for using inline styles, so they grab these CSS frameworks to pretend that they’re not using inline styles.

It is fundamentally a difficult discussion to lead, because inline styles feel great, while you’re writing them. They’re less great for maintenance.
But semantic classes definitely have long-term problems, too.

ClassifiedPancake ,

And then came Tailwind…

dajoho ,

I know! What a mistake of a framework. Glad my colleagues drummed it out of me.

ClassifiedPancake ,

I gave it a chance for a tiny project but even then it was painful.

smooth_tea ,

“Figured it was a bad idea” actually means that some people were against it because they believed semantic class names were the solution, I was one of them. This was purely ideological, it wasn’t based on practical experience because everyone knew maintaining CSS was a bitch. Heck, starting a new project with the semantic CSS approach was a bitch because if you didn’t spend 2 months planning ahead you’d end up with soup that was turning sour before it ever left the stove.

Bootstrap and the likes were born out of the issues the semantic approach had, and their success and numbers are a testimony to how real the issue was, and I say this as someone who never used and despised bootstrap. Maintaining semantic CSS was hard, starting was hard, the only thing that approach had going for it was this idea that you were using CSS the way it was meant to be used, it had nothing to do with the practicality. Sure, your html becomes prettier to look at, but what good is that when your clean html is just hiding the monstrosity of your CSS file? Your clean html was supposed to be beneficial to the developer experience, but it never succeeded in doing that.

Aux ,

There’s nothing hard about semantic naming. Especially when you’re separating your elements into components and use SCSS or some other pre-processor.

smooth_tea ,

Either you understand that the consensus is that naming things is hard and you just want to elevate yourself above everyone else by arguing against it, or you’re unaware that it is the consensus, in which case your opinion doesn’t really matter because you most likely underestimate the issue.

It’s such a truism that I’d suggest googling "naming things is hard*.

There are only two hard things in Computer Science: cache invalidation and naming things. – Phil Karlton

www.namingthings.co

calcopiritus ,

Aren’t classes in CSS supposed to represent visual styles? What else could they be for?

Mesa ,
@Mesa@programming.dev avatar

Pretty sure they’re referring to class names describing the visual style being applied, rather than what that class represents semantically.

E.g. .red-bold vs. .error-text

calcopiritus ,

Oh, that makes sense.

ClassifiedPancake , in How programmers comment their code

At work we let Typescript and descriptive naming document our code. Only when something is a workaround or otherwise weird will we add comments. So far it has worked great for us.

ClassifiedPancake , in Site: "I don't feel so good...."

Rotate <body> veeeeeeery slowly

marcos , in Average CSS

Well, that’s what you get for using classes like “white” and “lime”.

dajoho ,

Exactly this. Bootstrap killed the css star.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines