Algorithms + Data Structures = Programs - Episode 186: How to Get Started in Programming

Episode Date: June 14, 2024

In this episode, Conor and Bryce chat about how to get started in programming.Link to Episode 186 on WebsiteDiscuss this episode, leave a comment, or ask a question (on GitHub)TwitterADSP: The Podcast...Conor HoekstraBryce Adelstein LelbachShow NotesDate Recorded: 2024-06-07 & 2024-06-12Date Released: 2024-06-14Swift Programming LanguageBoost C++ LibrariesBoost SpiritNDC Oslo ConferenceCraft Conf 2024The Power of Function Composition - NDC Oslo - Conor HoekstraCityStrides.comcity-strides-hacking GitHub RepoHookStar Scrabble TrainerBeautiful Python Refactoring II - Conor Hoekstra - code::dive 2022 (Scrabble Talk)Intro Song InfoMiss You by Sarah Jansen https://soundcloud.com/sarahjansenmusicCreative Commons — Attribution 3.0 Unported — CC BY 3.0Free Download / Stream: http://bit.ly/l-miss-youMusic promoted by Audio Library https://youtu.be/iYYxnasvfx8

Transcript
Discussion (0)
Starting point is 00:00:00 And what I say is that you have to start with a goal. That you're asking me, how do I learn to program C++? But that's the wrong question. You need to first figure out, what do you want to do with C++? You need something concrete that you want to build with programming. And this should be something, I think, that matters to you based on your interests and passions. And yeah, I completely agree with everything you said in your message, Bryce. If you want to learn to program, find something you are passionate about.
Starting point is 00:01:03 Welcome to ADSP, the podcast, episode 186, recorded on both June 7th and June 12th of 2024. My name is Connor, and today with my co-host Bryce, we exchange thoughts on how to get started in programming. It's Friday, June 7th, and I am feeling reflective this morning. This week, you and I recorded a phone tag episode because we've both been pretty busy. I'm in the middle of a move. You've been traveling. You know, I'm really proud of us that we've kept this podcast going and kept publishing every week. Um, despite all the stuff that's going on in our lives. Um, and I'm also really grateful for all of our listeners.
Starting point is 00:01:51 Uh, I was looking at, uh, our reviews on various platforms the other day. Um, and it, it just, it,
Starting point is 00:01:59 it warmed my heart to, uh, to see how many people enjoy this, uh, podcast. Um, yeah, it just, it made me feel good and it makes me want to, uh, to deliver the best content that we can. You know, we, we, we joke about me, uh, half-assing it sometimes, but, uh, I, I really do care about this podcast and our listeners. I decided I was going to record this morning because of a conversation that I was having
Starting point is 00:02:36 with my girlfriend, who is about to leave her job and go pursue a career in sports management, let's say. She really loves tennis. She's loved tennis her whole life. She's a tennis coach. She's got all this experience in process engineering and efficiency in business operations. And so she wants to do some sort of tennis coaching or event organizing or consulting. But one thing that she's asked me about a couple times over the past few weeks and months is she wants to learn how to program.
Starting point is 00:03:18 So this week, I was coming up with a plan for how she could get started programming. And I told her this morning, something that I tell pretty much anyone who comes and asks me about learning to program, I oftentimes have students, or people who are new to the industry who approach me and say, like, what's the best way to learn C plus plus, like, what's the best book or, or tutorial or resource. And I always tell them the same thing. And what I say is that you have to start with a goal that you're asking me, how do I learn to program C plus plus, but that's the wrong question. You need to first figure out what do you want to do with C plus plus, you need something concrete that you want to build with programming. And this should be something I think that matters to you based on your interests and passions, or maybe
Starting point is 00:04:16 based on the particular, you know, sector of the industry that you'd want to be in. But I really think it works best if it's something that you're passionate about. Maybe you really like robotics and you want to learn to program a robot. Or maybe you want, you have some project where you want to program an Arduino to automate some task in your house. Maybe you love cooking and you haven't been able to find a recipe app that does exactly what you want, and it's like always really bothered you. Or maybe you're really into fitness. And you want to do some analysis of some fitness data that you have from a bunch of different fitness apps. And this is actually how I started. And we've talked about this on the podcast before.
Starting point is 00:05:05 Back when I was an 18-year-old, I, throughout my childhood, was really into text-based games. These games called MUDs, which were these sort of online multiplayer games. It's this weird space of gaming where you didn't pay for them. They were just sort of run by volunteers. They'd be hosted on a server. They were very simple because there was no graphics. It was just, you know, a text server and you'd connect to it with Telnet. And I really loved MUDs and I wanted to learn how to create my own MUD. And somebody at some point told me, if you're going to create your own MUD, you might work with some coders, but you really should learn how to code yourself. And that's why I started to learn how to program. And then, you
Starting point is 00:05:53 know, through that goal, I, you know, I had the motivation. And then eventually, I became sidetracked, I discovered Boost, I got involved with all these other things. I never did end up making that mud, but I would not have found my path in software engineering if I hadn't started off with that goal. That was something that I was passionate about that sort of dictated the course of my education. You know, I haven't talked in greater detail about those early days. We talked a little bit about how when I was, my first exposure to Boost was some Boost string algorithm that one of my colleagues who was working on the mud with me was using this string algorithm and there was some bug in it and I reported the bug up to Boost and then I fixed the bug in Boost and then I became a Boost contributor, eventually started
Starting point is 00:06:52 working on Boost Spirit. But we've talked about that, but we haven't talked about a few other things. Like when I was still in those early phases and I was thinking about making my own MUD, I was looking, you know, the core of a MUD is this networking engine where you need to be able to accept, you know, TCP connections over Telnet. And then you have to have some event loop where you process events. And I remember one of the early things that I did was to implement secure sockets in this MUT engine. And so I used some SSL library. I'm sure it was OpenSSL, which there was really no reason to do this. You know, this wasn't like high security.
Starting point is 00:07:43 This was before like secure sockets everywhere was a thing. But I decided I was going to do this because it seemed like it'd be fun. And then at some point, I think I tried to like implement some parts of the SSL protocol on my own or some cryptographic algorithm. And, you know, that early learning about networking, and sort of low level programming and cryptography, that kind of led me to a lot of my other work in distributed systems. When I was working on HPX. You know, I was, a large part of my responsibility with HPX was around the addressing system and the networking layer. And a lot of that, you know, comes from my early days playing around with MUDs. And the, you know, the thing that
Starting point is 00:08:40 really, you know, launched my career was once I made the connection with Boost Spirit, in particular with HeartMid. And the reason that I started using Boost Spirit was because of that string algorithm, that first string algorithm, the Boost string algorithm, that was my first exposure to Boost that I found the bug in. I think it was like a split thing, like it would take a string and it would split it up in some way and tokenize it. And I needed this. We were using it when we were parsing the inputs from players in this MUD engine. And the split thing didn't exactly, you know, parse in the way that I wanted. And, you know, there was some bug with it.
Starting point is 00:09:25 I fixed the bug. But then somebody at some point said, like, you know, for your use case, you might want to use something like Boost Spirit to parse the input. And so I started looking into that, and playing around with Boost Spirit. And then that's how I got involved as a contributor to Boost Spirit. And then that's how I met Hartmut. And, uh, Hartmut was the one where when I, once I dropped out of college and I needed a job, I asked him, uh, you know, if, if I could, if he knew anybody who was hiring and he said, come on down to Louisiana. And that wouldn't have happened if I hadn't been, uh, a contributor to Spirit, if he didn't know me and know that I was, you know, a good budding programmer. And I wouldn't have been a contributor to Boost Spirit if I hadn't
Starting point is 00:10:12 been using that Boost string algorithm. And I wouldn't have been using that Boost string algorithm if it hadn't been in this MUD engine that I was working on. And so it all came back to that original goal. That original, you know, goal, that's what motivated me. That's what drove my learning. That's what pushed me towards C++. Because a lot of these MUD engines having to deal with, you know, low level things like networking, they were written in C++. And that sort of launched the entire trajectory of my career. And so when somebody comes to me and asks me, you know, generically, how do I learn programming? How do I become better at C++? That's almost always the wrong question and the wrong approach. And I always answer it back with that question of what matters
Starting point is 00:10:59 to you? What do you want to do with C++, with programming, with your pursuit in this software engineering field? What matters to you? Because you have to find something that matters to you. Now, in the case of my girlfriend, the answer is tennis. She's passionate about tennis. She loves tennis. She's about to try to start a career in tennis.
Starting point is 00:11:25 And so I suggested to her that I think that what you should do is think about what sort of tennis-related programming project could you take on as a goal. And the framework that we're going to use to teach her is Swift Playgrounds, which is something we talked about with Doug a couple episodes ago. And I'll tell you why I picked Swift Playgrounds. I spent a couple days sort of researching best approaches to teach non-programmers how to program, to teach somebody who has no programming background how to program. And I wanted to find something for Python. And one of the reasons is that I am now doing more Python stuff at NVIDIA. And I don't know that much about Python. And so it would be good for me
Starting point is 00:12:17 to learn a bit about Python. But I ended up on Swift Playgrounds. And the reason was, you know, I started searching for like, you know, how to learn to program, you know, how to learn to program for non-programmers. And just like a bazillion results come up. There's, you know, paid courses. There's free content. There's code camps with instructors. There's YouTube videos.
Starting point is 00:12:44 There's all sorts of other interactive content. There's more static content like articles and tutorials and books. It's frankly overwhelming. And the challenge for me was that I was looking through all the possible options. And there were some things that I'd heard of before, like Khan Academy and Udemy. Some of them that are things that I thought highly of. But it was hard for me to judge three things. One, how good is the content? Two, is the content at the right level? Will it be suitable for somebody who's got no prior programming experience? And three, how much setup is involved for the content? Do you have to install a development environment? Do you have to download stuff? What type of computer do you have to have, etc. So I felt overwhelmed. And I decided that I was just going to check out Swift Playgrounds
Starting point is 00:13:43 because I'd seen some demos of it before. I thought highly of it. I figured I'd give it a shot. It was super easy to get set up. I just downloaded it and that was it. I have the entire development environment. I don't have to set up anything else there. Second, I love that it has a visual component to it.
Starting point is 00:14:04 And I think that makes it so much more approachable. And third, I could just tell immediately that this was quality curated content. And that's sort of what you'd expect from Apple. And the fact that it's from Apple, that means that it's going to be so nicely integrated into the development environment that my girlfriend would be using, which is either a MacBook or an iPad. And so within like three minutes of playing around with Swift Playgrounds, I was convinced that this was the thing to use to teach her. And the fact that it's like the official thing from Swift and from Apple was like a big deciding factor there. If when I had Googled for, you know, how to learn Python for beginners, if there had been like one clear thing that was like an interactive experience that was easy to download and set up. And it was something that was from, you know, the Python Software Foundation. And, you know,
Starting point is 00:15:14 clearly was something that was anointed by, you know, the Python language itself. I might have gone with that. So the plan is that she's going to learn Swift with Swift Playgrounds. And then she's going to come up with some idea for some sort of tennis app. Hopefully something that's going to be fairly simple and straightforward and achievable. And then we're going to try to build it together. And we'll see how that goes. And maybe I'll learn a bit about Swift in the process. So I'm not really sure why I'm recording this.
Starting point is 00:15:52 I guess I was excited to share with you this sort of message that I give to newcomers about setting a goal for yourself when you get started in programming. And I just wanted to share that with you and share that with the listeners. The listeners who I am very grateful for. Hey, Connor, it's Bryce again. I did listen to the last phone tag episode. So I did hear you wishing me the best of luck with the move.
Starting point is 00:16:24 So, ha, there. And I even listened to it the best of luck with the move. So, ha! And I even listened to it the day that the episode came out. So, what do you know? Talk to you later, buddy. Alrighty. We are here in Oslo, Norway. Just got your message. Actually, I got it a few days ago.
Starting point is 00:16:51 But I have been traveling and have not had time to reply until now. We are walking. What time is it? I believe it's like 8.45 a.m. and we are headed to day one of the three-day NDC Oslo conference. It's Wednesday, June 12th, I think, and we are only a couple minutes away, so this is going to be a pretty short recording.
Starting point is 00:17:30 My talk is tomorrow at 1.40 p.m. local time, entitled The Power of Function Composition, the revised version of the talk that I gave at CraftConf a couple weeks ago. And yeah, I completely agree with everything you said in your message, Bryce. If you want to learn to program, find something you are passionate about. I have several of these kinds of projects. You mentioned your mud game, which led you down the C++ rabbit hole all the way to boost spirit. My passion these days is city striding. I ran 20k this morning, woke up at 5.45am, collected 44 streets, and I'm inside now. Gotta keep my voice down.
Starting point is 00:18:37 Honestly, I'm looking for a 7-Eleven. I need to stop recording this so that I can successfully find this institution. I see. It's downstairs. Anyways, we'll keep talking, just at a lower voice. Yeah, ran 20k this morning. Also ran 20k yesterday. Yesterday was a more successful city striding day.
Starting point is 00:19:03 79 streets. I don't know what I'm ranked in Oslo. Yesterday was a more successful city striding day. 79 streets. I don't know what I'm ranked in Oslo. But, yeah. We have a GitHub repository. I think I've mentioned it on the podcast before. A program that generates routes. Typically I've been hand rollingrolling my own roots these days because my algorithm doesn't work, you know, as good as a heat map-assisted human,
Starting point is 00:19:38 but I still generate the heat maps. Oh, look at that. I could have gone right underground, right past this 7-Eleven. Anyways, we generate these heat maps using Python, Plotly Express. Honestly, GPT wrote most of it for me. But hey, that's programming these. Oh, my goodness. Look at the line here. Nothing to do but wait. All right. Look at the line here. Nothing to do but wait. Alright.
Starting point is 00:20:08 We're waiting in line at the 7-Eleven behind. Six people now. And yeah. I update this GitHub repo pretty actively with data for Toronto. When I was in
Starting point is 00:20:23 Monterey slash Pacific Grove, did a lot of city striding there, Santa Clara, city striding there. Anyways, I'm obsessed. And, I mean, I'm not learning how to program, but if someone was trying to learn how to program, and they had some kind of obsessive hobby like this, writing some kind of Python script or application to optimize things.
Starting point is 00:20:48 No better way. No better way, folks. Yeah, I also got my Scrabble game. Had some Python as well. And it's called Hookstar. I haven't worked on that recently. But link in the description. Link in the description.
Starting point is 00:21:05 I gave a talk at Code Dive a couple years ago. And, yeah. So whether it's Swift, I honestly, I'd probably recommend Python. All things being equal. But if your girlfriend or you, the listener, are on a Mac, or I guess typically wouldn't be the listener. If you're the listener listening to this podcast, odds are you already code.
Starting point is 00:21:28 So if you have a friend as a listener that is thinking about getting into programming, I'd probably recommend them Python. But Swift is great. They got Swift UI. What else would I recommend? Would I recommend any other language other than Python? If they're trying to get into low-level stuff,
Starting point is 00:21:43 I'd probably recommend Rust. And definitely use ChatGPT. All right, I've got to buy my beverages here. Awesome. Have a good day. Thank you. All right. Did we leave all that stuff in? Maybe. The English cashier was surprised at my use of the word howdy. Anyways, Python Swift plus an LLM. I use Perplexity these days because I get a free subscription
Starting point is 00:22:20 through work, and I use the Cloud 3 opus model in my opinion it is far superior to any other model everyone says gpt 4.0 is good i think it's straight trash i don't know if it's because i started using it instantly when it was released but it was just spewing hot garbage for a quick minute. Whereas Cloud 3 Opus, it's the largest language model that is released in the Cloud series. It's freaking fantastic, folks. It does basically all the work for you. Anyways, probably Bryce's advice was better than mine. These are just the ramblings of a person walking to a conference, but
Starting point is 00:23:07 yeah, good luck to the potentially first-time listeners of this podcast if regular listeners sent this to their friends who are looking to get into programming and have never
Starting point is 00:23:22 programmed before. All right, I got to go. Bye. This side with a badge, that side with a ticket. Thank you. Be sure to check these show notes either in your podcast app or at ADSPthepodcast.com for links to anything we mentioned in today's episode, as well as a link to a GitHub discussion where you can leave thoughts, comments, and questions. Thanks for listening. We hope you enjoyed, and have a great day.
Starting point is 00:23:44 Low quality, high quantity. That is the tagline of our podcast. That's not the tagline. Our tagline is chaos with sprinkles of information.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.