I am Tim Corey. I teach coding online and my inbox is full of questions from current and future developers. I wish I could sit down with each of you and share the answers I know will help you go further, faster in the world of development. This podcast is the next best thing. On this podcast, I will answer the biggest questions people are asking! Send us to your suggestion for a future Dev Questions at https://suggestions.iamtimcorey.com/ To keep the podcast coming, like, subscribe, rate, and share it with your friends and colleagues. See why thousands of students have chosen to learn to think and code like a professional developer at www.DevForge.com.
Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.
0:00
|
12:24
How do I solve problems like a developer? How do I come up with the right logic to solve a given problem? Can I study logic to be a better developer? These are the questions we are going to answer in today's episode of Dev Questions.
Welcome to the Dev Questions Podcast with Tim Corey. Join us each episode as we tackle the questions you are asking about a career in software development, understanding the industry, and new technology. If you're just starting out or you want to grow stronger as a developer, this is the place to get your questions answered. Now, here's your host, expert developer and online educator, Tim Corey.
SPEAKER_02
How do I start to think like a developer? Or how do I improve those skills? Is it through a course? Is it through other things? How do I think through a problem in a way that a developer would? How do I improve those skills? Because I want to be better at thinking through the problems so I can be better at solving the problems. This is a question that was asked recently on a suggestion site, and I thought it'd be a great topic to cover in today's episode of DevQuestions. Now, if you have a question you want answered, go to suggestions.imtimcorey.com and ask your own question. Or if you see your questions already been asked, make sure to give it an upvote to ensure I know that there's interest in this question. Okay, so the question is how do I start to think like a developer? In order for me to really explain this, I think it'd be good to start with a bit of a story from my life. I used to live in a house that was built in the 1850s. Yes, the 1850s, not the 1950s. And in that house, there were a lot of things that were kind of workarounds because of the fact the house was not designed with things like indoor plumbing and electrical and HVAC, all those things. They were not designed into the house when it was built. Instead, they were added on later. So whenever I had to do work on the house, there's a lot of workarounds to make things work right. And in my upstairs bathroom, there was a thing that really annoyed me. And that was that the light switch was behind the door. So it's a guest bathroom, which means that people who don't know the house have to use this as well. But when you walk in, you'd have to walk in the door, close the door, which is no windows, so now it's pitch black, close the door in order to get to the light switch that was behind it in order to have lights in the bathroom. Now I had a few options. And I know how to do some basic electrical, some basic carpentry, some basic plumbing. I know how to do the basics of pretty much all the things I would need to work on my house. So my thought process was I have two options. Either I could run the electrical, rerun it from where it is at the switch, around the door to the other side of the door, and then put a box in there for the switch. Or I could put a new door in. Well, rerun the electricals would be difficult because of the fact they were lath and plaster walls. There was no space between the walls. So I would have to cut out the drywall and have to chip out the lath and plaster in a spot for the new receptacle. I'd have to patch all that drywall and had to fill in the spot that was where the old switch was. That was a lot of work. The other option was even more work, and that was I would have to pull the door off and the casing and put a new door in, which it wasn't a standard size, so I'd have to do a lot of work to resize the door and make sure it worked in the new spot. That's not a lot of that's that's a lot of work too. And so I was trying to figure out which of these two options was the better choice. Both of them involved a lot of work on nights and weekends and taking the bathroom down for work. So I was talking through my father-in-law, who was a general contractor, about my options. And he said, and I never forget this, he said, why don't you just put a motion sensor in there? And for $20 and a swap out of one switch, I was able to go from having this complicated solution to just 15 minutes of work and I was done. The motion sensor allowed me to have the lights turn on as soon as you open the door. It didn't matter where the switch was because it is turned on automatically. That third solution wasn't something I was thinking through. Now, I knew about how to replace the door. I knew about how to rerun the electrical, but I wasn't thinking about this third option. It was very, very simple. And why was that? It wasn't because of my lack of knowledge, it was because of my lack of practice. The lack of coming up against these situations and saying, what is the easiest solution? What's the best solution? And are the two the same? And if not, which one is the better solution? So that came from practice. My father-in-law had a lot more practice in building homes, in modifying homes, and in doing things that would make life easier. And sure, there may have been an argument for the electrical should have been rerun or the door should have been redone. And that could still be something that I had considered down the road, but for the quick solution to solve the problem for now, solve the majority of the problem, a $20 fix is all it took. And that's what software development is all about. It's not about knowing, okay, here's how I write code. It's about the experience of having done it before that says, oh, well, there's actually a third option or a fourth option. So software development is not about the right choice. It's about knowing the better choice. Because there is no one right answer. Yes, there may be an answer that comes out as the best after lots of work, but even then, as things progress, as you learn new technologies, you'll find there's an even better solution. So when it comes to thinking like a developer, the one of the ways to do that well is to know what your options are. Knowing more options will allow you to think through various solutions. The the old adage is if all you have is a hammer, then everything looks like a nail. And that's really true. As a software developer, you should have additional tools in your toolbox that allow you to approach different situations differently. So the biggest thing in thinking like a developer, the biggest thing is having the experience of actually building things. So having that experience of saying, yeah, I've done it before, and this was a solution. Yeah, I've done it before, and we tried this and it did not work. And so having that experience, bringing that to the table, you start to realize there's lots of options out there, but now I start to narrow down the outcomes those options will give me and say, this works for this situation, this does not. So knowing a broad breadth of what you can do in your given language, for example, C sharp, knowing the broad breadth of things will be very helpful because you know more options, and then having experience in those will be helpful because you know the outcomes they produce. So therefore, you can have more options up front and then narrow down things based upon what results those options will give you in the end. Practice is really important. I know people don't like to hear this because they're they want to have an easier solution. You want to have a course you can take or a checklist or something like that. And it's just not that simple. When people ask me what's the best fill in a blank, what's the best web project type? What's the best desktop type? What's the best, and the answer is always going to be it depends. And that's not a cop-out, that's not a pushing them off. That is the best answer you can give. Because it doesn't just depend on I want a web project. It depends on, okay, what's your team made up of? What are you skilled in? What libraries do you already have? What experience do you already have? What are you trying to accomplish? What technology do you need to use? What's your customer look like? What do they want? How are they going to use it? And so on. The list goes on of the number of questions you can ask to narrow in on the best for your situation, or the best at this time. Essentially, you're looking for the better solution for you. So that experience of having built multiple web applications before, having built different things in different ways will be very valuable when coming to the table. Because you'll look at it and say, okay, I don't think that this solution is best for this situation because of X, Y, and Z. And this might be an option because it does this that our customer needs. Or we've done this before and this seemed to work well. That experience really helps. Now, I want to have some words of caution here. When people hear experience, they think about years and years and years of experience. Or they think about massive projects. And neither really has to be the case. When you are practicing, practice small. Do small little things. Often I see people say, I want to learn, let's say, MVC. And they start right away at MVC, which is probably a mistake. You need to learn C sharp first if you're learning C sharp MVC. But they start at MVC first, and the first thing they do is when they start to learn it, they start to build the real product. Well, now you've learned one thing not really well and are trying to make that into a real application right away. That's a recipe for disaster. That's a recipe for not knowing how to solve the problem well. That's that's saying I only know one solution and not even that well, but I'm gonna start doing that solution to solve this problem. You need to find more solutions, more options. So practice smaller, build small things, understand how that MVC works, and then try Razor Pages, see how that works and what the differences are. Then try Blazor Server or Blazor WebAssembly and figure out what's gonna work best in your environment. Being able to have those options is important. So practice small so you can have more practices with more options under your belt. All right, so that's how you start to think like a developer. It's not about a book, it's not about a class, it's about that practice, having seen something before and remembering it and knowing how that worked and how it affected the outcome. Bring those to the table. The more you bring to the table, the better you will be at thinking like a developer.
SPEAKER_01
Thank you for joining us for this episode of Dev Questions. Tim is committed to making it easier for you to become a developer. If you would like to help make more content like this possible, please like, subscribe, rate, and share Dev Questions. You can also send your questions to questions at Iamtimcorey.com. Until next time, remember, you are too smart and your time too valuable to waste it making all the mistakes Tim did. When you're ready to learn to think and code like a professional developer, head over to imtimcore.com and enroll in a course.