Time… a programmer's worst enemy // The Code Report

preview_player
Показать описание
Keeping track of time is complicated for programmers due to leap seconds, timezones, and the weirdly designed Gregorian calendar. A new bill is going through congress to make daylight savings time permanent - here's what that could mean for developers.

#compsci #programming #TheCodeReport

🔗 Resources

🔥 Get More Content - Upgrade to PRO

Use code lORhwXd2 for 25% off your first payment.

🎨 My Editor Settings

- Atom One Dark
- vscode-icons
- Fira Code Font

🔖 Topics Covered

- How do timezones work?
- What is a 13 month calendar?
- What is the Gregorian calendar?
- Timezones explained for programmers
- How to use JavaScript Temporal API
- What are the most hated features in JavaScript?
Рекомендации по теме
Комментарии
Автор

At first I totally thought this was going to be a video about how little "time" we have as devs to get features done ... In time ✅

paulgiovanatto
Автор

There are two types of programmers, those who prepare all their software to be future-proof, and those who think that no one will use their code in the future. Interestingly enough, it seems that the software made by the second type of programmers is the one that will always be used in the future.

MiguelAngel-fwsk
Автор

ALWAYS use UTC+0 when you work with datetime and saving it in databases.
Only convert it to localtime when displaying it in the UI to the user.

dannyc.
Автор

"are you sure making months zero indexed won't be annoying?"

"bro it's literally just a Javalibrary in the 90s, this will not have long term consequences"

>still using zero indexed months 30 years later

:|

Sam-qnly
Автор

Great timing. Today in Poland hundreds of trains stopped in their tracks because of a 'time formatting' error in the traffic control software.

sharkinahat
Автор

This code report coming out around the time the US is changing their time. Coincidence?

One thing to nitpick is that the world has moved away from GMT. It's called UTC now. What's the difference? UTC takes into account the leap seconds, which weren't a thing when GMT was defined.

mfaizsyahmi
Автор

Thought that the video was about deadlines, which is my worst enemy

holo
Автор

As a Java developer working on legacy code most of the time, every time I come across the old date API I shiver. It is horrendous, and I'm glad we have the new stuff to play with. So. Much. Better.

dentjoener
Автор

In Iran we have the first 7 months with 30 days and the remaining with 31. It adds up perfectly and you still get to keep the 12 system. Also, our New Year's is the 1st day of Spring! (in 2-3 days now) Much love

Claxiux
Автор

The Kodak calendar of 13 months of 28 days is sooo great!
Every month would start on the same day of the week (so Monday or Sunday, for example), and there would be a final extra "year day" to get 365.
A similar calendar is the Ethiopian, which has 12 months of 30 days and a thirteenth month of 5 or 6 days.

ste-fa-no
Автор

This is the some of the best tech content on YouTube. Definitely my favourite channel.

raynem
Автор

"Every device has its own clock, so program according to each of these clocks"
- Someone smart who should've warned everyone sooner

SimGunther
Автор

I was really looking for a dateTime library for my project! That really helped <3

royayon
Автор

About Java, there was one more update to DateTime API with the new set of solutions called LocalDateTime which was introduced with Java 8(appr 2014), so we may say that Java's time is 2 steps ahead of JS' one, which is kinda weird according to JS popularity lastly.

neyvtm
Автор

I have to say I feel grateful right now for working with C# and its pretty decent System DateTime and TimeSpan classes. I do not envy whoever it was that had to implement those. To the unnamed microsoft developer who did this thankless slog of a job, so we didn't have to, thank you!

akaHarvesteR
Автор

When space travel becomes a reality, your code also need to handle relativistic effects on time. Luckily, I'm not a programmer -- so, good luck, and have fun, suckers!!!

FM-kloc
Автор

Fun Fact: The current DST implementation goes all the way back to 1784, when the devil had 10 days to write this stupid idea.

eladshamai
Автор

I had this project where I was in lead where we had to do some predictive modeling based on measurement data. Fairly complicated system but we managed to implement it pretty easily.

When taking it in to production, time formats caused days of extra work and ended up being the most painful part of the project.

jaans
Автор

I always use UTC timestamps and format them locally on the user device. Usually this works fine. Still sometimes I face issues. - Thanks for the video!

halloyves
Автор

I wish more people would appreciate the insanity of daylight savings, timezones, and our calendar as a whole

dylanh