Become a Creator today!Start creating today - Share your story with the world!
Start for free
00:00:00
00:00:01
I hate that people say stuff like this... image

I hate that people say stuff like this...

General Musings with Kevin Powell
Avatar
1.3k Plays5 months ago

In this episode I dive into a topic sparked by a discussion in my Discord community where someone avoided learning grid because an experienced developer told them Flexbox can do it all. I share my thoughts on the impact of experienced developers' opinions shaping new learners' paths and emphasize the importance of embracing new tools to make our work easier.

Recommended
Transcript

Introduction to 'General Musings'

00:00:00
Speaker
Hello, my friend and friends. My name is Kevin, and welcome to my podcast, General Musings, where today I'm going to be talking about something that I posted on social media, and I want to have a little bit of a discourse around it.

Flexbox vs. Grid: Community Query

00:00:12
Speaker
So this all started because somebody in my Discord community asked a question because they were having trouble putting together a layout. And so they were just asking for advice on how to fix it. And the advice they got was, well, right now you're using Flexbox. And instead of that, you should be using Grid. That would make it a lot easier. And they replied, saying, well, actually, I had a reason for not using Grid. And they then said, to be honest, I wanted to learn how to use Grid, but an experienced person told me that he never uses Grid because Flexbox offers him everything that Grid does.
00:00:44
Speaker
And that's, for me, a really disappointing answer um to hear why somebody didn't learn Grid. And I know that this person isn't alone in that. There is a lot of people who say, well, Flexbox is good enough, so I'm not going to bother with Grid. But even worse here was one of those people who thinks Flexbox just does everything. And so the person got handicapped because they couldn't achieve a layout they were trying to do because Grid was literally the answer.

Implications of Misconceptions in CSS

00:01:10
Speaker
And it would have been like three lines of CSS if they were using Grid. I don't want to get into the whole flexbox is good enough thing, though I probably will rant on that a little bit because this has been bugging me for a couple of days right now. But there was a reply ah to my thread on social media where the person wrote this. There's one thing to note here. If you read the screenshot, there was no advice given, only experience communicated. I don't think an experienced dev would advise against using grid, even if that dev didn't use grid themselves.
00:01:40
Speaker
I disagree here. I think that if somebody is voicing that they want to learn something and then you say I'm experienced and maybe you don't say those words but you you say I've been doing this for a long time and I never use grid period. That's the entire sentence. you never once said to that person explicitly not to bother.

Influence of Sharing Experiences

00:02:04
Speaker
But you've implied that. You've gone ahead and said, oh well, you know, i've I'm an experienced dev, I've been doing websites for a long time, Flexbox has done the job for me this entire time, and I've never actually had the need for Grid.
00:02:17
Speaker
is saying just learn flexbox and you'll be fine. There's a few things to unpack with all of this. The first one is why would they create another layout tool after we already have flexbox if flexbox already could do everything we needed it to do. The problem was it didn't do everything we needed it to do or some of the things that we could do with it were kind of hard to do so they created a new layout tool to make certain things possible that were impossible and make other things easier that were difficult. So I think I can leave it to that. If you if you've avoided using Grid, ah don't. It's a really powerful tool, it's really good, and you can keep it simple.
00:02:51
Speaker
But what I want to unpack more there is that idea that there was no advice given. If you think you can talk about your own experience in doing something from that point of view, where you you have ah a place of authority in one sense or another, whether that's you're talking to somebody who's learning now and you have two years of experience, you're still coming at that from a place of authority because you've been doing this longer and you have the experience that person doesn't have. So as soon as you say something like, I've never had to learn that, that's it. you're You are giving advice and you are telling and shaping that person's opinion on what they need to learn.

Mindful Sharing in the Tech Community

00:03:28
Speaker
And I really think that this is an important thing for people to realize and that a lot of people don't always realize that in just sharing their own experience with something, you're shaping other people's opinions
00:03:41
Speaker
i look at my discord server where there's people from all sorts of backgrounds but they engage in these conversations and they ask for advice and whether you're just doing a throwaway remark or something you feel like is a throwaway remark somebody can take that really seriously and it can change their their learning approach to the entire thing and like that can be really It can have a big impact on people and I think not everybody always realizes that. Myself included, especially when I first had my channel earlier on, I was definitely just like making stuff and putting it out there and now I have to be even more careful because I have so many people that are listening to me.
00:04:17
Speaker
So it doesn't have the same weight as a throwaway remark in a Discord community. But if that throwaway remark in the Discord community impacts somebody, even just one person, well that's impacted that one person and potentially in a negative

The Case for Learning Grid First

00:04:30
Speaker
way. So we really have to be careful. And it's something that I try very much now. ah to let people know when something's an opinion, to let people know if I'm experimenting with something by saying, you know, try this out and let me know what you think of this, I'm not sure if this is a good idea, I'd love input on this, ah or, you know, don't do something this way, do it this way instead, and I try and show why, whether it's for performance reasons, whether it's for accessibility reasons, or just because I just find it easier, whatever it is, I try and always have a reason in teaching something in a specific way,
00:05:01
Speaker
And for me, when I'm putting those ideas together, it just makes it it sort of solidifies that to be like, yes, I should be teaching this or showing this or whatever it is. But circling back around a little bit to what started this dialogue in the first place, one really cool thing that actually happened was that person who posted the original thing saying, you're asking the question and then saying, well, I didn't use grid because somebody told me that they don't need grid. Just one day later, after writing that and after having a few people say, well, grid would be easier and here's like some solutions using grid. They replied, it was I think less than a day later, saying, wow guys, Grid is really amazing. It's like I've gained a special weapon that unlocks at level 100. And I thought that was really cool. I like that they they realized what they were missing out on so quickly. But it shouldn't be something that unlocks at level 100, right? It should be something that we have early on. And I'm actually of the mind now that you should learn Grid before you learn Flexbox.

Adopting New CSS Tools

00:05:54
Speaker
I think it's actually easier to learn the basics of Grid. I wouldn't say learn everything about Grid. I don't think you need to be doing overlapping content and learning about how positioning works with Grid and learning about you know the way the Z indexes work and all of that or named lines and and other things like that necessarily at the beginning. But learning the basics of Grid is probably more useful early on than learning Flexbox. Because Flexbox is a little bit of a magic box. that a lot of people just have a lot of experience with now and have gotten used to using and sort of know a little bit about what's gonna happen when they do it, but it's all sort of like, I think if you ask most people to explain how Flexbox is working or what's going on, they'll have a lot of trouble communicating to you how it's doing whatever it's doing. Whereas Grid, it's much more explicit in a lot of the different parts that are going on, because you set up a grid, and you place stuff in the grid, and that's it. And there's a lot of new stuff that comes with that, but you don't need a lot of that stuff. But I didn't want to turn this into like a Flexbox or Grid debate or anything like that. They're both fantastic tools, and we should definitely always be using both of them in our projects. I didn't want to turn it into the Flexbox and Grid thing. I wanted to more be about the impact
00:07:05
Speaker
what we say can have it though I do want to circle back on that a little bit obviously that person that did say ah the advice that they gave that quote-unquote wasn't advice they clearly thought that they didn't need flexbox because they said you know something along the lines of flexbox does everything grid can do um but yeah hopefully just through education and through other stuff and just spreading the word on how great Grid is because it does unlock things that Flexbox simply cannot do, but it also makes other parts of it that we can do with Flexbox, but like 100 times easier with Grid. As some people said in in the reply to that thread, you know, why bother using Flexbox when we have floats and I can make the layouts I need with floats? You know, it's the same type of argument there, but whenever we see these new tools that come out,
00:07:51
Speaker
don't be skeptical and don't go, well, why do we have that? There's a reason that they're adding something to the spec and they're making these new things. And so, like, yes, you can do something without that maybe. And the method you've been using up until now has worked good enough. But that doesn't mean there's not better ways of doing it and a lot of that is coming to CSS now We have anchor positioning coming and people might just be like oh I just use that JS library and it does good enough and it's like well No, this is actually gonna be so much better than that. All right It's I think there was some resistance to CSS custom properties when they came out because most people were using SAS at the time and they're just like well I already have variables so I don't need it and then you go oh wait these variables are better than SAS variables because they're live in the browser and
00:08:33
Speaker
scroll-driven animations. I could use GSAP for that, or I could just do it with a few lines of CSS. right And there is a a split there. There's some stuff you can do he sap that you definitely I won't say definitely can't do a CSS, but that would maybe be harder um But there's like whenever we get these new things. They're not just making them for the heck of it They're not adding Complexity to the spec because they feel like it they're doing it because it's making things that we need to do on a day-to-day basis a lot easier and It takes time to learn that new thing, but don't be resistant to that, please um And if you know other people that are being resistant to it
00:09:09
Speaker
I think the best way to fight that is to show like simple examples or find a layout that would be really again I'm going back to the flexbox versus grid but find a layout that's really easy to do with grid that's harder to do with flexbox and just be like well how would you do this like have something that spans two rows right so you have like six items one of those items spans two rows and just be like well how would you do this when there's a way of doing it with flexbox that involves extra nesting and extra other stuff and you go why wouldn't you just do it like this instead and Don't do it in a condescending way, but like in in ah I'm trying to learn why you would do it that way type of thing and then maybe that actually shows them Oh, there is something cool here that I'm missing out on and I think that's really if somebody is entrenched in their ways the best way to try and Help them get out isn't to say no, you're

Upcoming Content and Conclusion

00:09:56
Speaker
wrong. It's to try and get them to explain Their reasoning behind it and show you examples because usually if somebody's saying all flexbox is good enough or this other tools good enough I don't need that other thing
00:10:07
Speaker
They're happy to prove their point, right? They're gonna be like, oh yeah, you could just do it like this or whatever. They're very happy to prove their point. And then if you just come back and be like, well, this works too and it's easier, they might just dismiss you because they like being right and there's people like that and that's just life and those people aren't worth arguing with. But there's a lot of people I think that would actually change their mind on. So um doing it in a friendly way, an encouraging way, and just showing the cool stuff and the easy ways of doing things if you know them, if somebody is arguing with you on something, instead of just fighting and and trying to like pound heads against, no, this is better or this is better or whatever.
00:10:40
Speaker
And in case you're wondering, I am planning some some YouTube content around this. I already have two videos ah planned on the flexbox versus grid thing to encourage people to learn both. but That's the point of both videos, um is to highlight the strengths of both of them. Because the other part there that does get thrown around a little bit is the 1D versus 2D that I completely disagree with as well. So I have a video sort of on on both topics coming up in the next month or so. ah So you can if if you don't want to fight the fight yourself and you just want to send somebody a video, though those that will be an option at one point. and Just be like, oh, just watch this and maybe you'll change your mind. That's hopefully my plan for those videos anyway. ah yeah I'm going to leave that there. Here I go rambling on once again. So thank you very much for listening. And of course, until next time, don't forget to make your corner of the internet just a little bit more awesome.