text stringlengths 0 2.35k |
|---|
**Mat Ryer:** Cool. Yeah. Okay. Well guess what, Carl? |
**Carl Johnson:** Is it Unpopular Opinions? |
**Mat Ryer:** It is. It's Unpopular Opinions. |
**Jingle:** \[53:57\] to \[54:14\] |
**Mat Ryer:** I could have done with the max bytes era earlier, because I had too much dinner. That's my unpopular joke... Carl, do you have an unpopular opinion for us today? |
**Carl Johnson:** Yeah. So the last time I was on the show, as you know, if your opinion is popular, you are forced to come back on, until you get an unpopular opinion. So last time I was here, I had the unfortunately popular opinion that the government should pay people to do open source software. So this time I think... |
**Mat Ryer:** \[laughs\] What do you mean? |
**Carl Johnson:** So I don't know, maybe Twitter will like this... I think that Twitter-- \[laughs\] maybe Twitter people will like this. So I've been reading this science fiction book by the author Adam Roberts, called The This. It takes place in the near future. There's a new social media network. It's similar to Twi... |
So reading this science fiction novel really just made me sit back and say, "Wait a minute, what is it about Twitter that I like? What is it that when I'm on Twitter, what am I doing? Why do I enjoy this?" It's not like something where you go on Twitter and you're like, "Oh, I was laughing out loud all night, because I... |
**Mat Ryer:** Oh, good for you. I was just going to agree that it is like a hive mind, but then I realized I'm really not helping. |
**Carl Johnson:** No, no, I've got to come back again if this is popular. Will I never escape...? |
**Mat Ryer:** Yeah. Interesting. I mean with the algorithms, of course, it's probably many hive minds, I suppose. And this is where I think it really does get dangerous, where -- we know this phenomenon where these echo chambers get created; you really end up following people that just agree and support your perspectiv... |
**Carl Johnson:** Yeah. |
**Mat Ryer:** I do think there is something that we have to be really careful with that. |
**Carl Johnson:** Yeah. Even for programming languages, there's something about being on the internet that pushes you to extreme. And it's not just that, "I enjoy programming in Go", but "Go is the best, and people who program in other languages are losers, and how dare they, and I'm going to throw dog poop at their ho... |
**Mat Ryer:** \[57:56\] Oh, yeah, I'm into it. Interesting stuff. Well, let us know on Twitter if you agree or not with Carl. Actually, to be fair, we do poll these, and sometimes they're split. |
**Johnny Boursiquot:** Right. |
**Mat Ryer:** But what I have noticed is when -- you've made a case for that. What happens is the way that it goes out on Twitter is they'll play a clip of you making that case, and then they ask people to vote for it. And very often, people will agree, because you make the case very articulately. And basically, when y... |
So we should check ourselves. We're all vulnerable to it, and if we think we're not, that's even more dangerous. We are all vulnerable to this effect. So thanks for the warning, Carl... |
**Carl Johnson:** Yeah. We all get sucked into that hive mind. |
**Mat Ryer:** Johnny, I hope yours isn't quite so dystopian... |
**Johnny Boursiquot:** I don't know. It could be, depending. I mean, if I make the case that it is dystopian, maybe you'll start thinking it is dystopian. |
**Mat Ryer:** I already do. |
**Johnny Boursiquot:** Yeah? |
**Mat Ryer:** Yeah. I'm in. I haven't even heard it... \[laughter\] |
**Johnny Boursiquot:** So over the years I've found this one thing, this one thing to be true across all of the projects I've ever worked on. Do you want to guess what it is? |
**Mat Ryer:** Oh... |
**Johnny Boursiquot:** Don't cheat and read the show notes... |
**Mat Ryer:** Okay, yeah. Okay. You have to use the keyboard to-- no, you don't even have to use a keyboard to put the code in. |
**Johnny Boursiquot:** No. |
**Mat Ryer:** Well, you cover the key you want, which is counterintuitive, on a keyboard. You're hiding the one that you actually are going to end up with on the telly. Is it that? |
**Johnny Boursiquot:** \[laughs\] Close, close, but no. I was thinking more of a-- I've always ended up regretting using boolean to keep track of data, when I could use a timestamp. |
**Mat Ryer:** A timestamp? |
**Johnny Boursiquot:** Yeah, exactly. |
**Mat Ryer:** Well, not like a string? |
**Johnny Boursiquot:** Yes. Rather than storing -- like, for example, is active, or active, or whatever it is... Storing that, and storing a true/false, or one and zero, or whatever it is, in the database. |
**Mat Ryer:** You just store the 5th of January, 1971. |
**Johnny Boursiquot:** Yes, I store the timestamp. I store activated at, or active at, or whatever, something, because that gives me more information; because I know if there's a real date in there, right, I don't have to keep track of two pieces of information. I know "Oh, it is active", and now let me go find out lat... |
**Mat Ryer:** Oh, I see. |
**Johnny Boursiquot:** So yeah. |
**Mat Ryer:** That's really interesting. |
**Johnny Boursiquot:** Don't use a boolean when a timestamp will do. |
**Carl Johnson:** You can't add this after the fact. That's the interesting part about this, is that you can't like-- if you change your mind and you're like, "I've never used this date stamp. I'm always just treating it as a boolean. I'm just going to convert it all to boolean to save some--" I don't even think you wo... |
**Johnny Boursiquot:** Right. That's why at this point, usually, whenever I see a boolean used in a PR, or in the early phases of a system design, basically any sort of ERD or data model that I'm seeing where I'm seeing booleans, I'm like, "Could this be a timestamp instead"? And more often than not, it's true. Don't u... |
**Mat Ryer:** That made a lot more sense after you explained it. I genuinely thought you meant you just have your birthday means true, and any other day is false, baby... \[laughter\] |
**Johnny Boursiquot:** If it ain't my birthday, it ain't true. \[laughter\] |
**Mat Ryer:** Yeah. But no, that does make sense. But hang on, don't you then have to deal with like -- what's the empty state? Is that null, or is that an empty string? |
**Johnny Boursiquot:** \[01:02:04.19\] Well, if you're using-- so if you're rolling your own, to use the cases of storing data in a database and whatnot - if you're rolling your own sort of ORM or whatever it is, or you don't want to use an ORM, maybe if you wanted to, you could store the zero value of your data, or ju... |
So yeah, I think it's totally doable, totally manageable. And I think you get a whole lot more for that, for the extra bytes that you store. I'm not even sure, like Carl is saying, I'm not sure you save that much space over the different data types, depending on database implementation... But yeah, you get so much more... |
**Carl Johnson:** Yeah. Now I'm thinking though, going back to the time.duration.abs, that if you were just subtracting the time, like if you were like, "I'm looking at the 'Is deleted at' column and I want to know if it was deleted in the last month, and then I'm going to send them an email saying, 'Please come back',... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.