Latest / DevQuestions with Tim Corey / 243. How To Learn C# As A Hobby
Transcript
- 0:00SPEAKER_01: Learning C sharp doesn't have to be about making money.
- 0:03SPEAKER_01: Sometimes you just want to learn a language for fun or as a hobby.
- 0:08SPEAKER_01: In this episode of Dev Questions, we're going to talk about how to have fun with C sharp.
- 0:13SPEAKER_01: I'll give you five things to learn in C that are a lot of fun in themselves, and then I'll talk through some suggestions for what to build with those things.
- 0:31SPEAKER_00: Welcome to the Dev Questions Podcast with Tim Corey.
- 0:35SPEAKER_01: Software development is more than just writing code.
- 0:38SPEAKER_01: So let's talk about the rest of it.
- 0:40SPEAKER_01: Specifically, let's talk about how to have fun learning C sharp as a hobby.
- 0:46SPEAKER_01: Back in episode 236, we talked about your next step in your career.
- 0:52SPEAKER_01: This episode is a bonus episode for those developers who just want to learn C sharp for fun.
- 0:58SPEAKER_01: We're going to talk about what areas of C sharp might be the most enjoyable to play around with and what to do in those areas.
- 1:07SPEAKER_01: If you learn C sharp, you can build just about any type of application or system, since C runs on almost any platform, including Windows, Mac, Linux, iOS, Android, the web, IoT devices, Xbox, and more.
- 1:23SPEAKER_01: You can build desktop apps, web apps, mobile apps, games, and a lot of other cool projects.
- 1:28SPEAKER_01: So let's talk about my recommendations for learning C Sharp for fun.
- 1:33SPEAKER_01: Number one, learn the language first.
- 1:37SPEAKER_01: Okay?
- 1:38SPEAKER_01: So that's not necessarily fun, right?
- 1:41SPEAKER_01: Like you want to get to the fun bit, but this is actually going to be the foundation for fun.
- 1:46SPEAKER_01: And the reason why is because when you jump right to the fun bit, what happens is you have a whole lot of things that you don't know yet, but that you're assumed you do know in order to make that thing work.
- 2:00SPEAKER_01: Okay.
- 2:01SPEAKER_01: And what happens is it gets very frustrating.
- 2:03SPEAKER_01: So for example, let's say you want to build websites for your bowling league.
- 2:10SPEAKER_01: And you want to build this website and you think that that'd be cool.
- 2:12SPEAKER_01: Let's learn, you know, let's do Blazor.
- 2:14SPEAKER_01: And I've never done C sharp before, but we can figure this out.
- 2:17SPEAKER_01: Well, now, even though it's Blazor, which means it's simplified somewhat compared to like a JavaScript framework front end, you still have to know the C sharp language itself and object-oriented programming and asynchronous programming and event-based programming.
- 2:34SPEAKER_01: And you need to know about HTML and CSS, and maybe even a little JavaScript.
- 2:40SPEAKER_01: And you need to learn about how APIs work potentially, or at least how the web servers work.
- 2:48SPEAKER_01: And you need to know about the service side versus client side.
- 2:52SPEAKER_01: And that's a long list of things to know.
- 2:56SPEAKER_01: And if any of those don't work right, it's frustrating, right?
- 3:00SPEAKER_01: And you feel like you're kind of trapped, you're walking through hip-deep mud.
- 3:05SPEAKER_01: And it's just hard to do.
- 3:07SPEAKER_01: So learn the language first, learn the basics first, start small and grow over time.
- 3:13SPEAKER_01: That way you're you're doing the fun things, but you're doing so while having fun.
- 3:19SPEAKER_01: Because it's a lot less frustrating when you know what's going on.
- 3:24SPEAKER_01: Okay.
- 3:24SPEAKER_01: So this is going to make sure that you don't get overwhelmed.
- 3:29SPEAKER_01: Now, let's talk about things to build.
- 3:31SPEAKER_01: The first thing I want start with is build console applications.
- 3:35SPEAKER_01: And you might say, Tim, a console application, not so fun.
- 3:39SPEAKER_01: But yes, it actually can be a lot of fun.
- 3:41SPEAKER_01: There's a lot of cool things that you can do with console apps around the house, with your computer, with your local network.
- 3:49SPEAKER_01: I have a number of console apps running for me at any given time.
- 3:53SPEAKER_01: In fact, recording this video, I have multiple console apps that assist me.
- 4:00SPEAKER_01: So when I am done with this video, I have, I don't do a script for a video, I do an outline.
- 4:06SPEAKER_01: I have an outline on a teleprompter that I can walk through, but I just talk based upon that outline.
- 4:11SPEAKER_01: I don't actually write out every word.
- 4:13SPEAKER_01: So that first of all, that's all set up for me.
- 4:18SPEAKER_01: But then my script is attached to a little bit of information that talks about, okay, what episode number is this?
- 4:26SPEAKER_01: 243, by the way.
- 4:28SPEAKER_01: Um, what is the title of the episode?
- 4:30SPEAKER_01: What'll be on the slide that goes on YouTube and on the podcast?
- 4:36SPEAKER_01: Um, what's the description that goes with it?
- 4:38SPEAKER_01: All that kind of stuff.
- 4:39SPEAKER_01: I prepare ahead of time.
- 4:41SPEAKER_01: And I have a little text file.
- 4:43SPEAKER_01: And then when I'm done recording, first of all, when I hit record, I'm hitting one button on my Stream Deck.
- 4:50SPEAKER_01: And then when I'm done recording, I hit that same button again to stop the recording.
- 4:54SPEAKER_01: And then I hit another button.
- 4:56SPEAKER_01: And that button is set up for dev questions.
- 4:58SPEAKER_01: And so it says, Oh, you just recorded a dev questions video.
- 5:02SPEAKER_01: I'll go get the latest video you recorded, and then I'll look up what the next video in line for dev questions is, which has that information.
- 5:11SPEAKER_01: I'll name the file properly.
- 5:14SPEAKER_01: I'll pull out the audio from that file as well.
- 5:17SPEAKER_01: I'll rename that file as well.
- 5:18SPEAKER_01: I'll move it all over into the correct location on the network and get everything set up for you so that when I get back to my desk, I can sit down and say, okay, move those, you know, or do whatever I need to do to process those files.
- 5:32SPEAKER_01: So it's a one-button click that runs a console application.
- 5:37SPEAKER_01: I have a separate one for when I record courses in front of the screen.
- 5:41SPEAKER_01: So I will say, okay, I'm done that video, go.
- 5:45SPEAKER_01: And it will look at my outline for the course to say, oh, that's this lesson, and name it appropriately, pull out the audio and all the rest.
- 5:53SPEAKER_01: And then I can just keep recording and not have to think about what to do those files or make sure you get the right files, the right names, all the rest.
- 6:00SPEAKER_01: Console apps can be a lot of fun.
- 6:03SPEAKER_01: They can make your life easier.
- 6:05SPEAKER_01: So start there because it's also the simplest app type to build.
- 6:09SPEAKER_01: So when you're first getting that foundation in C Sharp, you're probably learning in console and you can start building right away some of these automations.
- 6:17SPEAKER_01: So that's number two, build console apps.
- 6:20SPEAKER_01: Number three is Blazor WebAssembly.
- 6:24SPEAKER_01: Now you're taking a jump, okay?
- 6:26SPEAKER_01: So console apps, you don't have to have a lot of knowledge.
- 6:30SPEAKER_01: Blazor WebAssembly, now all of a sudden you are working with the web, which means a lot of things.
- 6:36SPEAKER_01: But as long as you start a good foundation in C sharp, you can probably start to pick up some of these things and practice.
- 6:43SPEAKER_01: Well, Blazor WebAssembly web apps can be installed anywhere.
- 6:49SPEAKER_01: If it's a true WebAssembly app, then you can have a progressive web application, which can install to your phone directly.
- 6:56SPEAKER_01: It can install to an iOS or an Android phone, it can install to your desktop, it can install to your laptop.
- 7:03SPEAKER_01: And that can be a really fun little tool.
- 7:06SPEAKER_01: So I was practicing about a year ago, and I was I was trying to figure out how to just practice WebAssembly and making sure I knew all the steps.
- 7:17SPEAKER_01: And so I built a little WebAssembly application and deployed to my phone in less than an hour.
- 7:24SPEAKER_01: I still have that app on my phone today, but I'm still testing out some of the limits of WebAssembly a year later.
- 7:31SPEAKER_01: Um, but less than an hour.
- 7:33SPEAKER_01: I had something built that was kind of fun and useful for my phone.
- 7:37SPEAKER_01: So that can be another fun thing to learn.
- 7:40SPEAKER_01: Number four is Azure Functions.
- 7:45SPEAKER_01: This is a little weird one because you're like, wait, we're going to Azure now?
- 7:48SPEAKER_01: Absolutely.
- 7:48SPEAKER_01: Azure functions are free to run.
- 7:50SPEAKER_01: You can run an Azure function up to one million times a month for free.
- 7:57SPEAKER_01: So what can Azure functions do?
- 7:59SPEAKER_01: Well, little processes in the cloud.
- 8:01SPEAKER_01: And there's a lot of things you can do.
- 8:03SPEAKER_01: You can have them trigger off of something being inserted into a database or something changed in a database, or based off a timer, or based upon an API call, or a webhook, or there's a number of things you can do, storage change.
- 8:19SPEAKER_01: Like there's lots of stuff you can do based upon an action that's already happened, and then you can do practically anything with that Azure function.
- 8:28SPEAKER_01: Lots of fun stuff you can do, but they're tiny.
- 8:30SPEAKER_01: They're 50 lines of code, 100 lines of code, small, but yet they're run in the cloud and powerful.
- 8:38SPEAKER_01: Now, number five is Unity.
- 8:42SPEAKER_01: Unity is awesome because it's a game development engine that runs C sharp.
- 8:47SPEAKER_01: So the C the code that powers your game is C sharp.
- 8:51SPEAKER_01: And so that can be a lot of fun because now you have the ability to build games, which by the way, are complicated.
- 8:59SPEAKER_01: You've got a lot, if you think that Blazor WebAssembly is complicated, add games.
- 9:03SPEAKER_01: Games are even more complicated.
- 9:05SPEAKER_01: Because you've got the art, you've got the uh physics, you've got the um the layout itself, the actual concept of the game, the code itself, the interactions.
- 9:15SPEAKER_01: There's lots of stuff going on.
- 9:17SPEAKER_01: But you can have a lot of fun building games, okay?
- 9:20SPEAKER_01: And again, your games don't have to be masterful, huge things.
- 9:24SPEAKER_01: You can build a little game for yourself and have something fun that you just do as a hobby.
- 9:30SPEAKER_01: So those are the five areas, really, really four areas that I would recommend checking out because they're fun things you can do.
- 9:39SPEAKER_01: There's lots more you can do with C sharp for fun, but those are four that'd be kind of fun to do.
- 9:44SPEAKER_01: So let's talk about some fun apps you could build with each of these.
- 9:48SPEAKER_01: So consoles, build an app that automates a repetitive process.
- 9:54SPEAKER_01: So I have that one that extracts the WAV files and renames things.
- 9:58SPEAKER_01: That could be something you could do.
- 10:00SPEAKER_01: Um, may I have another one that when I right-click on a folder, it zips up all the contents and actually cleans out some of the contents.
- 10:08SPEAKER_01: What do I use that for?
- 10:09SPEAKER_01: Well, every time I record a course or every time I record a video for YouTube where I use source code, I give you that source code.
- 10:17SPEAKER_01: But you don't want the bin directory and the OBJ directory because they make the zip file much, much larger and they're they're harder to download if you send them across the email or something else.
- 10:29SPEAKER_01: So I clean those out.
- 10:31SPEAKER_01: But doing that manually is a pain to do, especially if you have multiple projects in one solution.
- 10:37SPEAKER_01: Instead, I create a little console app that I just right-click and say, run this.
- 10:42SPEAKER_01: I call it clean zip.
- 10:43SPEAKER_01: So clean zip, it looks in that folder and it finds all the files to be deleted and it zips up everything except for those files.
- 10:52SPEAKER_01: And then it puts that zip file in a common location and renames it for me.
- 10:56SPEAKER_01: So it's right-click, go.
- 10:58SPEAKER_01: That's it, done.
- 10:59SPEAKER_01: Stuff like that you can do right on your computer to make your life a little easier.
- 11:05SPEAKER_01: For Blazor Web Apps, build an app that tracks the movies you've watched and what you thought of them.
- 11:11SPEAKER_01: You know, sometimes you go, did I watch that movie?
- 11:14SPEAKER_01: What did I like that movie?
- 11:16SPEAKER_01: There you go.
- 11:17SPEAKER_01: You have an app now where you can have your own personalized recommendations for movies you've watched and what your thoughts are.
- 11:24SPEAKER_01: Then you can, you know, for movie night, you could say, hey, let's pull from all the five-star movies.
- 11:29SPEAKER_01: And there you go.
- 11:29SPEAKER_01: You can find a movie you liked before to watch again.
- 11:33SPEAKER_01: Or maybe build a checklist app that you use every time you travel.
- 11:37SPEAKER_01: I know when I travel, I try and do that, you know, in your head thing.
- 11:41SPEAKER_01: Okay, do I have my toiletries?
- 11:43SPEAKER_01: Do I have my pants?
- 11:44SPEAKER_01: And do I have my socks?
- 11:45SPEAKER_01: And do I have like you go through the list and you try and remember all things and invariably you forget something, right?
- 11:51SPEAKER_01: Well, have a checklist.
- 11:53SPEAKER_01: And it has a little app on your phone, Blazer WebAssembly, it installs easily.
- 11:58SPEAKER_01: Um, but have an app on your phone that you say, I'm gonna travel, and it says, okay, here's your checklist, and you just go through and check off all the things until you completed your checklist.
- 12:08SPEAKER_01: Makes life a little easier.
- 12:09SPEAKER_01: It's a fun little app for you to have.
- 12:11SPEAKER_01: Doesn't have to be something you sell just for fun.
- 12:14SPEAKER_01: Okay, Azure functions.
- 12:17SPEAKER_01: So build an app that summarizes a web page and emails it to you when you send it a URL.
- 12:23SPEAKER_01: So you could say, okay, you know, here's the URL of my Azure function.
- 12:27SPEAKER_01: I'm gonna pass in the URL I want you to summarize.
- 12:30SPEAKER_01: And it says, okay, here's a summary plus a link to the article.
- 12:33SPEAKER_01: I'm gonna email that to you.
- 12:34SPEAKER_01: That way you can remember pages that you liked and say, hey, you know, I want to read that article later, just send it off to my Azure function.
- 12:44SPEAKER_01: Or let it build text reminders for you to do various things.
- 12:50SPEAKER_01: So for example, maybe you want to send in and say, hey, I want you to remind me tomorrow at this time by sending me a text to take out the trash.
- 13:00SPEAKER_01: Or, hey, every year on this date, I want you to remind me that my anniversary is coming up.
- 13:06SPEAKER_01: Send me a text.
- 13:08SPEAKER_01: Azure functions can do that.
- 13:10SPEAKER_01: Okay, so those things can really save your bacon sometimes when it comes to remembering things or you know, just letting you know about something coming up.
- 13:21SPEAKER_01: Now, Unity.
- 13:23SPEAKER_01: There's tons of games you could build.
- 13:25SPEAKER_01: Do it small, keep it small, but build a game that builds up a virtual character when you do real-world tasks, like going to the gym.
- 13:33SPEAKER_01: So maybe you know, it says you know, this little skinny character that's not very powerful, and you say, hey, every time you go to a gym and you know work out for half an hour, he gains a level or he gains a you know a point towards a level.
- 13:47SPEAKER_01: Um build up your digital character, doesn't have to do anything, but now you can have this thing that kind of tracks your progress in the real world with a virtual character.
- 13:58SPEAKER_01: Um, or maybe create a top-down game that just focuses on planting and harvesting crops.
- 14:03SPEAKER_01: You know, just try it out.
- 14:04SPEAKER_01: Don't try and build this massive this massive game that you know maybe a clone of heyday or or something else.
- 14:13SPEAKER_01: No, just create a little piece that's just I'm gonna have a little bit of crops, I'm gonna try and figure that out and just go from there.
- 14:20SPEAKER_01: C can be a lot of fun to play with.
- 14:23SPEAKER_01: And it can also make your life a lot easier in the process.
- 14:26SPEAKER_01: The key is to make sure that you focus on building up to big projects rather than starting off with something so big, it's discouraging.
- 14:36SPEAKER_01: Okay?
- 14:36SPEAKER_01: So don't start off with this massive project, don't start off with this grand idea, start off small.
- 14:43SPEAKER_01: Build small things and grow over time.
- 14:46SPEAKER_01: All right?
- 14:46SPEAKER_01: So thanks for listening.
- 14:48SPEAKER_01: As always, I am Tim Corey.
- 14:50SPEAKER_00: Thank you for joining us for this episode of Dev Questions.
- 14:53SPEAKER_00: When you're ready to learn to think and code like a professional developer, head over to imtimcore.com and enroll in a course.