DevQuestions with Tim Corey
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.
DevQuestions with Tim Corey
116 Which Programming Techniques Should Every Developer Know?
Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.
Which programming techniques are important to know? Are there some things that every developer should know? Is dependency injection important to know? Should every C# developer know how to work with SQL? These are the questions we are going to answer in today's episode of Dev Questions.
Website: https://www.DevForge.com/
Ask Your Question: https://suggestions.iamtimcorey.com/
Sign Up to Get More Great Developer Content in Your Inbox: https://signup.iamtimcorey.com/
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_02Are there some programming techniques that every software developer should know regardless of what type of software development they do? Are there some things that are just kind of universal that all software developers should know? This is a question that came up recently, and I wanted to address it on today's episode of DevQuestions. Now, if you have a question you'd like to see answered, go to suggestions.imtimcorey.com, leave your suggestion there, and hopefully you'll see your question answered in a future episode of DevQuestions. So let's address the things that every software developer needs to know, the techniques they need to know. And I'm going to take us in two different parts. First, we're going to talk generically about all software developers. Doesn't matter if you are a Java developer, JavaScript developer, C sharp developer, SQL developer, you should know these different things. So there's broad coverage. But then I'm going to focus in on what's really my audience, which is C sharp developers. And we'll talk specifically about C sharp developers and how the generic things kind of touch on or are used specifically in C sharp. So let's start with the general list. The first thing I want to say is that you should know the language over the user interface. I know this is not necessarily a technique, but it kind of is. Because some people focus in on, oh, I want to learn this type of desktop app or this type of mobile app. And they focus in on the user interface. But really the technique that you need to know is the code itself. How do you build in that language? So let's start with know the language, not just the UI. Next up, this is a big one. You're going to spend a lot of time debugging applications. So you should know the specific techniques necessary to debug whatever language you're building in. You should know how to step through the code, how to identify problems, how to inspect variables as they're being used. So for instance, in a website that I build, I use the Chrome or Edge developer tools. I hit F12, I pop them open, I inspect various things, I change things, tweak things, look at things at different sizes, and so on. I know how to use those developer tools in order to really dive into the specifics of how my application is working, how to fix it when it's broken, and how to improve it. Next up, logging. You need to be able to know how to put logging into your application. You need to know how to track how your application is doing, how it's operating. Because when your application is maybe not running the best in production, but you can't really replicate it, that's where logs are super helpful. So knowing how to put logging in place in order to keep an eye on your application is huge. So every developer needs to know how to do that. Next up, data security. Data security is huge. Your application, almost every application, revolves almost entirely around the data. You think about how many applications don't deal with data. Even if you decide, hey, I'm a game developer, I don't deal with data. You absolutely do. Because you're talking about tracking and saving and storing the progress of a user or the high score of a user or how that user has done or what they have collected or so many other data points. In business, it's even more important because that's the whole purpose for, again, 99% of all applications is data, whether it's capturing data, displaying data, manipulating data, and so on. So knowing how to secure the data is huge. Data security is probably one of your top things you need to know if you work with data. You can't just say, I'll figure that out later. It can be too late at that point. So knowing how to secure your data is important. With that, also knowing what doesn't work. There are some things that are security theater. And knowing what security theater is versus real security is important. What I mean by that is let's say you have a metal detector outside of a venue. And that that detector is supposed to detect if you have any metal on you, and then figure out what that is to make sure it's a valid thing, not a knife or other things, other weapons. Well, what if you allowed backpacks to bypass that metal detector? Then it's not really doing its job, right? Because that's where all the weapons could be, and you're not checking those, you're just checking the person. That's kind of theater. It makes you feel good, it makes you feel like something's being done, but it's not really solving the problem. So, in the same way with your applications, for example, encrypting app settings.json. Usually it's just theater. It's not actually helping anything. So knowing what's actually helping and what's just making your life more complicated without giving you the results you need is important. Uh, number six on a list of techniques or things you need to know in any software language is data access. We've talked about uh data security, but now how do you get the data? Knowing how to get the data in and out is very important. I don't care what kind of developer you are. And you might say, well, Tim, I am just a front-end developer. You probably still need to know how data access works, even it's just from an API. You need to know how access to the data works. So knowing how the access works, again, going back to the previous point, knowing how to secure that access, also very important. And finally, you should know database design. And three out of these seven are focused on the data. But that's because, again, applications revolve around data. So knowing how to build a database is important. Knowing how to maintain a database is important. And you may say, Tim, I have people for that. Great, you should still know it. Because if you know it, then you have a better ability to know what your database administrator is going to ask of you and what information they're going to need. Also, if you know it, you can have better conversations around how this data works. So another argument might be well, Tim, I use a ORM, which is an object-relational mapper, and what its job is is to do that for me. I don't have to know about the database because I just ask for the data and it gives it to me. That's a mistake. You should know about your database. Because otherwise, your data is one big black box. It just works. But what happens when it doesn't just work? Well, you're kind of stuck. And again, coming back to applications revolve around the data. So if the biggest part of your application, the most important critical core of your application is something where you say it just works, that's not a good place to be. So you need to understand how to construct a database, how to configure a database, even if you don't do it yourself normally. You should know how it works so that you can be better informed when things break. So those are the seven things that I think that are techniques or uh processes that every developer should know how to do, regardless if you're web, mobile, desktop, service, IoT, game, it doesn't matter. You should know those seven techniques. So let's talk about a C sharp specific developer and how this kind of plays out for a C developer. So we're gonna talk about what should a C sharp developer know? What techniques should they know or know how to do? And let's start with the language itself. Well, they should know object-oriented programming, generics, link, data types, and how to use all those things. They should know about the basics of a language as well as the more advanced stuff as well. If you don't know object-oriented programming in C sharp and know it pretty well, then using any user interface is going to be difficult, except me the console. But besides that, they're all gonna be pretty difficult. Winforms, for example, is based upon inheritance interfaces, partial classes, events, generics, and so much more. So just saying, well, I'm just gonna use the user interface, not good enough. You need to know the language itself. Number two, you should know about breakpoints. In fact, you should know about advanced breakpoints. Do you know they exist? If you right-click on a breakpoint, do you know you have options there about when it gets hit, how to count it, when to pause it, if it's temporary or not, and so many more options. You should know how to use those in order to know how to step through your code. You should know about the different ways of stepping through code in order to inspect what's going on at every step. So you should know how to use the tools built into Visual Studio. Next up, logging. You should know at least one logger. Seralog, nlog, log4net. There's lots of options out there. Pick one of those three probably, but you should at least know one of those three and maybe more. I would personally lean towards Seralog now because of the fact it does structured logging as opposed to the others. But at the same time, there's options out there. You should know at least one, but maybe more. That way you have options, tools in your toolbox. I keep coming back to this toolbox analogy, but it's important. When you have a toolbox, you don't just put one tool in it. You don't replace that one tool, a different tool, when it's better. You have multiple because it's important to know how to fit the tool to the job, to pick the right tool for the right job. So only knowing one, you're limited to only one tool. If that's a hammer, you're gonna have a hard time installing a new light switch. So knowing how to use at least one logger is important. Next up, in.NET, there's built-in dependency injection. You should know that. You should know how to use it. You should know how to work with it. You should even know how to implement it in Winforms, WPF, console, um, Azure functions. You should know how to implement it in those as well in case you need it. You don't need it always, but there are times when it will be important to use. You could consider learning the other dependency injection systems as well, the third-party ones, to know what the differences are, to know what additional things they provide and know when they're more beneficial than the built-in. Again, having more than one size screwdriver in your toolbox because there are different sizes that might be necessary for different situations. Next up, you should know about app settings.json. This is a built-in thing with.NET Core. It's really important, it's really valuable. This is where your settings should go, your configuration, your connection strings, and so on. And it's not just one file. There's actually five different out-of-the-box locations for your settings. You should know about all five, you should know when to use each. So knowing when secrets.json is the right call, or app settings.development.json, or environmental variables. And there's the list goes on of when you can use it as well as what other things integrate with them, like Azure Key Vault. So knowing about app settings.json, really important. After that, NuGet. You need to know how to get libraries into your application as well as even how to create your own libraries. So knowing about NuGet is important as a C sharp developer. iConfiguration, iDisposable, iLogger. Those three interfaces, they're pretty important to know. iLogger is used for logging. iConfiguration used for app settings.json. And iDisposable is used to properly close down something after it has been opened. For example, a connection string or a file access or something like that. So those three are important to learn. And next up, data access. You should know how to talk to a database. It may be that you do know Entity Framework very well. That's cool. It's a great ORM. Um it's not, I'm not a fan of it in most circumstances, but if you know it really well, if your team does, excellent, go for it. But maybe Dapper is your better choice. Okay, so learn Dapper or another micro ORM. I prefer the micro ORMs because of the fact that they don't weigh your application down with lots of code that you have to maintain. But it's up to you. You can even learn ADO.net, although I find that less and less valuable now because of the fact that we have micro ORMs that kind of fix some of the problems with ADO.net without adding a lot of overhead. So it's up to you, but having those tools in the toolbox can be valuable. After that, SQL design. You should know SQL Server. You should know how to build a server, how to create tables, how to create views, store procedures, how to diagnose slow issues, how to optimize queries, and so on. You should know at least SQL Server because C Sharp and SQL Server kind of go together. So when it comes to working in a business environment, you'll probably see those two operating in tandem. So knowing at least that one database is important. Now, should you know more than just SQL Server? Sure. You should know MongoDB, Cosmos DB, MySQL, and the list goes on, SQLite. There's a few others you should learn, but if you're gonna start with one, start with SQL Server. After that, you should know multiple user interfaces. Don't get stuck on one UI in C Sharp. Focus on broadening your knowledge to at least understand how the other UIs work so you know what is the right tool for the job. Okay, so that's my options. Now, don't panic and say, I don't know all of those. I must not be a C sharp developer. You definitely are. This is saying these are the things that you should know to fill in your knowledge, to be a well-rounded C sharp developer. So if you don't know everything, no worries. But take your time, put it on a list. Learn these things, improve your knowledge, improve your breadth of knowledge so you have more tools in the toolbox so that when a new situation arises, you have options and you know what the right option is for the job. All right, so that answers the question: what programming techniques should you know as a software developer? I hope that that answers your question. I hope you have um been given some things to think about, maybe grow in as a developer. I love to know what your thoughts are either in the comments underneath the YouTube video, or um you can even email help atimtimcorey.com if you got stuck somewhere and maybe need pointed in the right direction as to which video to watch next. All right, thanks for listening, and as always, I am Tim Corey.
SPEAKER_01Thank 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.