Hacker Newsnew | past | comments | ask | show | jobs | submit | happythought's commentslogin

Sql databases usually come with their own date types that are implemented with integers behind the curtains. They take up less space and are easier to sort than text fields.

EDIT: also I wouldn’t consider this egregious. If the Senior explains and the person was happy to learn something then that’s a good outcome. If they are stubborn about it, then that wouldn’t be great.


But which very likely store less information than an ISO timestamp does. (The integers stored are usually POSIX timestamps.) So, you might have to store, e.g., timezone information elsewhere. (And that might also be a good thing. It might not. It depends. Without knowing more, the DB's type is probably the right choice.)

I've seen far worse things than this done to a SQL database though…


Except that ISO-8601 doesn’t include anything as useful as a political time zone, just an offset from UTC. That’d be good if UTC offset was useful for anything, but instead it just adds to the confusion.


A lot of this was really cleared up for me by Evan Czaplicki's documentation for the Elm time library: https://github.com/elm/time


UTC offset is way more useful than those 3-4 character timezone abbreviations.

Just have a look at the list from Wikipedia [1] and notice how many repeats there are.

As an example AMT could be either UTC+4 or UTC-4.

And this doesn't even includes the various local acronyms that people use around the world.

[1] https://en.wikipedia.org/wiki/List_of_time_zone_abbreviation...


I didn't downvote you, but just for reference the time zone abbreviations you are supposed to use are in the tzdata db, and are listed https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

If you don't use these, you will inevitably be somewhat wrong due to leap issues, political changes in time, or the like.


Political zones are not the same thing as the abbreviated zones.

IANA time zone identifiers are fully-qualified and unambiguous like America/Los_Angeles or Asia/Kolkata.


Thanks, I have never heard the term “political zones” before, so I made an assumption.


At least in Postgresql, it is standard practice to use timestamptz type, which saves timestamp together with a time zone. Not only it uses less space on disc, but you can do a lot of operations with it natively in database itself: sort in various ways, compare to NOW(), construct time intervals and even ensure data validity with checks.


Timestamptz doesn't store a time zone in postgres. It converts all timestamps to utc. It's a common misconception.


> But which very likely store less information than an ISO timestamp does.

If you are trying to store dates and not timestamps, that’s what you want, otherwise equality tests might not work right.

> (The integers stored are usually POSIX timestamps.)

For date types, if they exist distinctly, usually not.


Your comment made me feel better about myself, thanks.


In the spirit of nitpicking, class A, B, and C referred to specific address blocks, not network sizes. A /24 in the class A range was still class A rather than class C.


I worked on network/firewall at a rather large bank from 2009-2019 and we used the class labels and "slash 24s" etc. interchangeably when talking. Not that you're incorrect, but that the slang was used and everyone knew what people meant by it.


See, I had no idea. This is the best kind of nitpicking.


Look up CIDR on Wikipedia, which is what we use now and you know it already, but more so to learn the difference from the old classful networking.

Then you'll never use "Class A/B/C" again. :) It's correct to just say /24 while Class C isn't, because it has a more specific but outdated meaning.


I'm familiar with CIDR, I just always understood it to mean "arbitrary prefix lengths, not just on byte boundaries".


My impression from Twitter “new job” announcements in the last 6 months is that Apple has seriously ramped up its kubernetes staff.


Nice post, thanks. Did you happen to raise an issue with the Go team? Maybe it would be low hanging fruit for a compiler optimization.


I might be biased because I'm currently working on this same optimization but for GCC. I think that it is more complicated than it seems. Defining the layout of a structure is normally done during parse time (at least in GCC). And one cannot know if it is safe to reorder fields all the way up until link time.

This means that a lot of optimizations and assumptions that were made might not longer be valid. For example, in GCC the results of the sizeof operator are evaluated at parse time. One might need to change these values link time. Otherwise statements like:

memset(&astruct, 0, sizeof(astruct));

will overwrite memory that is no longer part of the struct.

Furthermore, constant propagation might have propagated the value of a sizeof operator and it might have been folded into different arithmetic operations. This can be solved in different ways, but if the compiler was not built this way, it might take some time to implement. Also, all pointer arithmetic will need to be changed...


Do you have a link to the eks networking bug?


AWS was sending "ACTION REQUIRED" email to all EKS users about this. The Github issue is: https://github.com/aws/amazon-vpc-cni-k8s/issues/641


Location: Columbus, OH

Remote: Yes, preferred

Willing to relocate: No

Technologies: Kubernetes, Istio, Docker, Jenkins, CICD, DevOps, Automation, Chef, Terraform, Ansible, Networking, BGP

Résumé: https://www.dropbox.com/s/llq36xwfw8frhg1/kevansresume.pdf?d...

Email: kylebe at gmail


I agree 100% that a developer isn’t required to implement any feature. One thing to think about is that it’s not necessarily a single user or a single team weighing costs and benefits. In an organization with separate dev and ops teams, a dev team may pick a solution for the benefits but the ops team bears the costs of operations and security.


I don’t have the experience you do, but I feel like it comes up a lot when working with dictionaries and json.


You can also use the same basic cicd pipeline to manage infrastructure on different providers instead of a custom pipeline for each provider tailored to their tool.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: