Where do you go when you need help?
Welcome to No Compromises. A peek into the mind of two old web devs who have seen some things. This is Joel.
And this is Aaron.
I don't know if I can accurately estimate how many times a day I have a question. Like, how does this work? What is this command? What should I do? Aaron, I mean, you're on the receiving end of that so maybe you at least have a lower bound on that number. But I think that's common. I don't even think it's specific to programming but it's something we deal with a lot. You know there's lots of different ways to approach that. Obvious things like search engines, Aaron's favorite.
Yeah, there's a lot of AI you can search now.
Sure, yeah.
You maybe auto-complete something in your editor or just spit out some code. So, you got those options.
Right. But there's more, there's other options. And I think maybe we can kind of compare and contrast these. Because I think they all serve a role, but some have more value than others. And one is like, I don't know, "Have you considered talking to another person?" Aaron, I already joked about asking you. But it is extremely valuable to bounce an idea off of somebody, even if you don't get the exact answer. But sometimes it can just kind of put you onto the path or readjust your thinking and get you going. You agree with that, I assume?
I agree. So, let's look at those three options for solving a problem.
Okay.
I think the first one is when we search in Google and all that kind of stuff... I'm going to sound like the cranky old man that I am.
I love it.
I used to be able to get great answers, now not so much. Google's kind of like slowing down. You'll still find stuff. And every once in a while, I'll search for something and find my own blog where I wrote about it 10 years ago.
Oh boy.
That's fun. But it just seems like the results aren't as good or it's like content mail people just churning out the same thing. So how I used to search is, I'd search my problem and I'd see four or five different people with solutions maybe on their blogs or whatever. And I'd open those all up and read all those. Now if you do that, it's all the same thing. Just different layouts and people trying to get click-throughs and stuff like that.
I have definitely experienced that. I'm trying to think of something tangible. But you can just tell skimming it that this was a very thinly produced piece of content. And it's not like coming from someone's experience. It's somebody like, "How do I write a thousand words that have these keywords in them?" And it just rings hollow and you click back from those pretty quickly.
But that can be frustrating when you go through a bunch of them. And hopefully, you'll land on something like Stack Overflow, but otherwise it can be frustrating. Especially for new developers when you open up the first 10 things that show up on Google and they're all the same thing. Especially if the-
Are we counting the ads too, Aaron?
What are ads? You don't use ad blockers?
I mean, no, I don't. But okay. I don't use Google. I'm like the guy who's like, "I don't have a TV." I don't use Google, I use a different search engine.
Okay. I think that that can be frustrating. Another way to kind of look at that is maybe if you land on a site like Stack Overflow or even sometimes like dev.to, or a couple of the other ones, maybe clicking through on those to read the article that maybe isn't right, it's a copy. Who knows, whatever, right?
Sure.
And then you can click on those little tags at the bottom. So maybe you have a Laravel question, you'll click on Laravel and you start to scan through it. And then you can do a search in Stack Overflow, all things tag Laravel with maybe the name of your component or something. And you never know, maybe someone had the same problem but worded it way differently. So of course we're not finding it, but when you kind of scan through those you can be like, "Oh, maybe that's something along the lines of what I'm looking to do." And you can click through and maybe you get your answer from something that wasn't even answering your question.
I've definitely had that happen. Or sometimes you learned something you don't actually need then, but it's like, "Oh, wow, I'm definitely going to use that in the future." You know what? As you were talking about Stack Overflow, I think the thing I find particularly valuable about it is you can often see more than one answer. There's the whole voting aspect of it where supposedly the better answers float to the top. It doesn't always happen. But even just seeing like, "Oh, here's three different ways you could do it," or it kind of stays more current. Like, Laravel is a good example. Maybe Laravel 5, you did something and now there's a better way to do it in Laravel 10 or Laravel 11. Like you don't have to do the workaround, there's a built-in feature. Stack Overflow is great for that. Because it's almost like seeing 10 answers or articles all in one thread and kind of seeing them ranked against each other.
The second option that's obviously a lot more common and a lot more exciting now, at the time of recording at least, is AI-generated code. And that kind of comes in two different ways. One, in maybe your editor or something that's reading the context of what you're writing in your project and then generating things that it thinks you most likely will use in your project. And then there's a overall greater version, which is like, if you're stuck maybe. Because you can't tell your editor, your IDE, "Please help me write this thing that I haven't written and I don't know anything about." It's not going to suggest anything to you.
No, it's not going to architect a whole feature.
Yeah. But if you go to ChatGPT or whatever is current, you can put your question in there and it may generate some code for you. Now I've seen people use that and have various levels of success. But there's sort of like a cautionary tale on that though which is why I kind of talk about Stack Overflow and stuff. Is when these AIs are generating their content, remember it's not artificial intelligence, it's pattern matching right now. Again, at the time of recording. So, they can consume all this information and most likely they give you an answer that is most accurate based off the information they've consumed. Now that doesn't necessarily mean the information they've consumed was right or it could be another thing I've seen. I've actually seen this examples of code generated for a very specific scenario that maybe someone shared on Stack Overflow, but the AI didn't understand the nuance of that. So, it's now giving you an answer maybe for a situation where you have a cluster of Redis servers when really you just want a cache of a single fake Redis. I don't know, something...
No, I feel what you're saying.
Basically, they kind of give you the wrong answer on purpose because that's the only thing that they know.
All of a sudden everything has Kubernetes in it and you don't know why.
I mean, that's a second way of doing it you know. Are you a fan of AI? Like, do you feel that way?
First of all, I could see you rolling your eyes when you were saying some things and I was enjoying that. So, I wanted to share that with those that are listening to this. I think on the spectrum of loving AI and hating AI, I'm definitely closer to the loving AI than you are. I do see its limitations. In fact, what I find really interesting and I think this is a good exercise for everyone to try, is ask it a question when you are absolutely confident you know the best answer and just see what it says. Like, I will do this sometimes when I'm writing tips for our newsletter, and just for fun, I will ask ChatGPT or Claude or whatever, these chat-based agents, and it will give a confidently very either mediocre or just straight-up wrong answer. So, I like these tools when you're in a domain of knowledge that you already have some expertise and it can help you sometimes get unblocked, like suggest something. But you can clearly know when it's wrong and you're not going to get misled.
Right. Yeah, if you can really kind of narrow in on what you want and there is examples of that in its data, well then you can probably get your answer.
Just one quick example. Because I had something the other day and it was like there was two conditionals and like two different returns and I'm like, "There has just got to be a better way to write this." But I was having no success figuring out what that was. So, I took a very specific working example of code that had tests, fed it, and it suggested something that was like 80% what I wanted. Like, it refactored something into a ternary and I'm like, "Ah, I still don't like that but that's much better." And then I was able to take it to the conclusion. And again, I don't have to trust it because I had my working test and I was just refactoring something. But it is nice for that in some cases, but it has limitations. I think we agree a hundred percent there.
Yeah. So, fine use it but just keep an eye on it. The third one you kind of mentioned and joked about a little bit was just asking someone. What do you mean by that?
I go into Slack and I say @Aaron and I type out. Well, being realistic, we work remotely. We don't work in an office with other people. Even the teams we work with it's remote. And so, it is asynchronous online communication, but regardless of if it's Slack or email or a DM somewhere, whatever. The idea of just formulating the question in a somewhat brief way, but providing enough context and just asking somebody to get their input on it. I find that very-
Like rubber ducking.
Rubber ducking. There has for sure been times I started typing a question and I've figured it out. I think that is a very common experience, that's not just me. Okay, the thing I like about asking somebody, especially somebody that has experience, is they will not just accept the premise of your question and give you an answer within those constraints. They might say, "Well, why are you doing that"? Or like, "What's the reason behind this part of the context you gave me?" That's something like ChatGPT is not going to do. If I said, "Aaron, I'm looking to store my passwords in plain text and I want the lookup to be faster." You'd be like, "Hold on, what are you doing?" So, there are some things that it can just reframe your thinking or it can give you something new to think about.
Well, you have to be careful when you talk like that though, because there are times when people ask, "Why would you even do that?" And it's like, "Well..." And not because they care about what the answer is, it's more about saying you're wrong. It's like, "Well, no, sometimes you have to do things and that's why I'm asking. So, feel free to give your opinion of the solution, but also give the solution."
That's true. Like in Stack Overflow, that's even... I think it's a violation of the community code or whatever, to be like, "Well why are you even doing that?" Like, but with a one-on-one type thing, you and I have the shared context where I'm not going to be like you're shooting me down, you're probably asking a legit question. But that's a fair point.
And I think if you don't work with someone else and you're kind of working on your own or maybe you're on a single-person team at a company or something, there's still other options available to you. You can go and find online communities. There are people that still do meetups, there's conferences, things like that. I'd tell you, man, if someone came to me during a conference and actually had tough questions, we'd sit around a table for a while and figure them out. That'd be awesome. Instead of, "Hey, hey, how you doing?" "I'm doing fine."
Exactly. So obviously you can't hold your questions until the next Laracon or something like that. But maybe there's just a bigger question. I'm going to make something up. Like, "I love Docker, but I just don't know how to run it in production." Or things like... They're bigger meta questions. Like those are great things to just bounce off of other people when you are at a conference or even at a local meetup.
I think we've talked about this a little bit before in maybe a different podcast, but it's worth always repeating that there's steps to do kind of when you are stuck. And I think the reasons or the things that we brought up are probably the order of the steps to do too. Try to figure it out on your own, do some Googling, maybe ask AI and see if that puts you towards the direction, then ask a person. That way that person doesn't have to say, "Did you Google it?" When you have guests over and you want to serve them chips or crisps or whatever, do you put them in a bowl?
Hold on a second. Are you trying to be international by saying chips or crisps?
Yeah. Because it could have been French fries. I didn't want people to think we're serving French fries. I mean, they already think Americans probably eat tons of French fries as it is. I'm not saying you have guests over and you give them French fries, you give them chips or crisps.
Potato crisps. I think that's what Pringles are called. Anyways, the question was do I put them in a bowl?
Yeah.
Versus just leaving the bag open on the counter?
Yeah.
I'm going to say I probably lean towards the bag. It depends on the event, but I think I do the bag.
I think so too because someone told me the other day, and I think I agree with them. That pouring chips into a bowl makes you fancy. Hey, Joel, I wish there was like an online community that was pretty cool, awesome, and not full of bull****.
Well, do I have the thing for you, Aaron? Head over to masteringlaravel.io and click through to the community to see something that we've been building and been having a lot of fun with.