
The Art of Network Engineering
The Art of Network Engineering blends technical insight with real-world stories from engineers, innovators, and IT pros. From data centers on cruise ships to rockets in space, we explore the people, tools, and trends shaping the future of networking, while keeping it authentic, practical, and human.
We tell the human stories behind network engineering so every engineer feels seen, supported, and inspired to grow in a rapidly changing industry.
For more information, check out https://linktr.ee/artofneteng
The Art of Network Engineering
Python Party - Episode 2
This episode has been sponsored by Meter.
Go to meter.com/aone to book a demo now!
You can support the show at https://www.buzzsprout.com/2127872/support or from the "Support The Show" link at https://linktr.ee/artofneteng.
Thanks for listening and for your continued support :)
Find everything AONE right here: https://linktr.ee/artofneteng
00:00
This is the art of network engineering, where technology meets the human side of IT. Whether you're scaling networks, solving problems, or shaping your career, we've got the insights, stories, and tips to keep you ahead in the ever evolving world of networking. Welcome to the Art of Network Engineering podcast. My name is Andy Lapteff, and joining me in this Python party, woo! Our second Python party is Jeff Clark. Hi, Jeff. Hey, Andy. Actually, I watched the first video completely. I know you did that one.
00:29
on your own and it looked like it was, you're having so much fun. was like, you know what? I can come in here and I'll at least just be a fly on the wall. Watch you go through it and maybe I'll learn a thing or two. appreciate that. So this is what we've affectionately named the Python party. Why are we doing this? Why are you here? I have been struggling. I've been mostly complaining about learning coding, dev automation, specifically Python, because that seems to be the most accessible, easiest to learn.
00:56
uh... most networking automation friendly language that i'm told exists and i just signed up for every course and everything in every hundred days of this in fifty days of that and just struggle struggle struggle but i was recommended this book python crash course eric mathis i don't know eric i haven't spoken him he doesn't know i'm doing this and i don't know if we're gonna get in trouble but uh... i think that it's good
01:20
you know, ink or coverage for them that we're covering this. So very smart people who know Python way better than I do said, this is the book, this is what you need. And when I read it, I'm like, oh, this actually isn't bad. So in our first Python party session, which if you missed it, we're gonna start editing these and releasing these. So it was live streamed. I apologize if you watch that because 40 % of it was me struggling with troubleshooting. And when I listen back, I'm like, wow, this really is hard to listen to. So I'm gonna tighten it up. We're gonna try to release these as episodes. This is a new thing.
01:49
Like we said, 2025, trying a bunch of new things. Jeff is on board. This is a new thing. If you love it, let us know. If you hate it, no problem. We'll do a few. We'll see what we can get through. If these don't translate great to podcast episodes, then maybe we'll just do it separate videos up on the YouTube playlist. And then, you know, we'll just go back to the old format of topical interview conversation type things. But I love this technical stuff. This is super applicable to our industry. Things are changing by the day.
02:17
By the month, right, there's just things going very fast. And I think if we want to stay employed, we have to learn the basics of Python. That is what I've seen in the industry. So Python party two. Last week, we set up our environment. So we installed Python 3. You can go back to that episode and see it if you missed it. But we installed Python 3. We went in our terminal. We typed in Python 3, enter, no space.
02:40
and we got the three little, I don't know what they're called, I'm gonna get all these terms wrong, but the three little greater than signs came up, which tells me that we're in the Python interpreter. And then we uh ran something to see that it was working, yay. And then the book went on to tell us that, well, you can do things in the interpreter, Jeff, correct me if I'm wrong, but I think as you write lines of Python code in the interpreter, it's executing immediately. Whereas if you use a text editor like VS code,
03:04
you can work on a block of logic and then run it so that it's not going line by line and executing in real time. Does that sound accurate? That was my understanding. Okay, cool. So we went through installing VS code, which is an IDE. Jeff, do you remember what ID stands for? Cause I usually don't. uh I looked it up earlier because I literally couldn't remember it. is, I think I saw it on my screen. It stands for integrated development environment and development environment. now I, either Andy or I are developers. So. Yes.
03:34
Yeah, your developer apologies apologies up front We are networking people trying to learn the things that you know and it is hard and I keep mentioning her But Erica the dev has put out incredible content She says this stuff is very hard and it's not taught well and don't beat yourself up if you're struggling So we're here. We're gonna do this together Hopefully you can build a little study group community around us And if we got buy-in and everyone's to do this great if you guys hate it Let us know and we'll like I said, we'll just do something different with it. So let me do my screen share here
04:02
Jeff and I are also going to do our best to keep this tight, meaning that keeping the audio podcast listener in mind as we do this. We did variables last week. Variables, I believe again, Jeff, correct me if I'm wrong. Let me hop back up there and make sure I don't screw this up. I think a variable is assigning a value to a thing. So last week, if I can find the IDE, I think we
04:28
created a variable named messages, I believe. Let me find it. I'm also finding a virtual monitor here on this ultra wide. So hang in there with me while I try to make this. Oh, so we created a variable named message. So message equals and then something in quotes, a message equals hello Python crash course reader. And then we printed that and a variable is something assigned to memory that has a name. Does that sound accurate to you, Jeff? It's just a thing with something called later on.
04:57
You can call repeatedly and within a string within within your code later on. That's the magic that I can't wait to see because when I hear people say like, oh, you, you you create a bunch of stuff and then you call it later to do neat stuff with. don't think I've ever gotten to like the call things to do neat stuff with, because I figure out variables and strings and dictionaries and lists. And then when it all comes together, I freak out and get confused. So that's the goal is to just kind of stay in this material until I keep it all straight and we can do stuff and call things and be like, yay. Um, so another thing I want to point out, I don't know if
05:27
You guys can see the screen in the stream, but I commented it out up here up top, but something that I struggled with in Python party one that made sense later, people were explaining it to me in the chat. uh What we did up top here is we created a variable name message and then gave it a value hello world, hello Python world, and then did a print message. And then right after that created a new value for message called hello Python crash course world and did a print message.
05:54
What I thought would happen, and that's kind of the fun part about this for me, Jeff, is I'm kind of, it's like labbing, right? It's just trial and error. What I thought was going to happen is it was just going to print the second uh value that I assigned to message, which is hello Python crash course, because I felt that the second would have overwritten the first. But as somebody told me at the time, I didn't understand, and I went back later and looked. You create the variable here, it prints it. So I guess Python works top down, right? Like line by line. So it received the variable here, printed that.
06:23
Rewrote the variable printed that and when I saw the output, which I can't find down here somewhere, but the output was it printed both and it blew my mind. I'm like, wait a minute. So anyway, now I see what it was doing because there's a print statement in each one. Now I think I don't want to get too far into the weeds and have this take all night. But I think if I got rid of this print message and just did something like this message, message message me, and then print, it would only print the second one. Does that make sense? does. Can can you hear me Andy? Yeah, I can.
06:53
Um, one of the things I would actually encourage you to start doing instead of deleting and adding things when you're writing programs, comment them out. So in front of your print, your print button, you put it, put a hash symbol in front of it. And the only reason I had them, the reason I said that is because there's going to be times when you've got parts of your code that you're going to bring in parts of your code you want to remove. And maybe you're just playing around with it or you don't need it to run through all 70 lines. You want to run only through a certain number of them, commenting them out to kind of help identify where problems are.
07:22
It's really helpful. So I had them commented out, but what I wanted to do just for the sake of this is remove those or not comment them out, whatever it would be. But what I'd like to try to do, I guess, is write it in a way that I think would do what I expected it to. So I think what it'll do here is assign hello Python world to that variable message, overwrite that. And then when it prints, it'll print hello Python crash course world because it overwrote the first one. So I'm going to try to run that just for the hell of it. If I'm wrong, oh, well, I don't understand any of this.
07:52
Somebody showed me last time that up here on the top right there's a little play button guy And if I click that it'll run it for me Because what I was trying to do is go up to like run Python without debugger and I kept fighting things in the IDE So just up here on the top right you can hit the play button and it runs it for you as we can see down in the terminal Jeff Can you see this? Yeah, I can see it. Why cuz again, I have a full screen but everybody else doesn't Yeah, so we don't swim in the chat point something out which Andy if you go in front of your first print screen and do command forward slash
08:21
Daddy sent her toggles on and off. My first print here. Yep. forward slash. No, command forward slash. Command forward slash. See that puts a comment. you do command forward slash again, it removes it. Ooh. Nice. I didn't know that either. Okay. That's a cool little. So anyway, I got hung up on this for 15 minutes in the last one and I'm going to edit all that out it was really hard to listen to. as you're learning, as I'm learning these concepts, as you learn them with us and you lab it out and you try this stuff.
08:47
You can play with it and see what happens. what I thought was going to happen, happened just now, which is I ran it and hello Python crash course world is what it wrote because the variable that was set in this line got rewritten here. And, but again, the last time there was a print statement in between them. so, okay. Um, so here we are. We in the textbook, we are going from, um, variables to strings. So tonight we're to do strings and whatever else we can get to in about an hour. It's nine PM Eastern time here.
09:15
So Jeff, I don't know what your time looks like, but if we can go for an hour, get as far as we can and call it a night, I think that's reasonable. Variables, variables, where the hell strings? Here we are. I'm also struggling to navigate this PDF. um When I scroll, the next thing just pops up. So give me a second here. You can go to view and continue with scroll is what you'd set. View, continue with scroll. I don't have the option there. Just keep doing what you're doing. Yeah, it's kind of annoying. I'll work it out, OK, oh so.
09:45
I think I actually have to go over to this stupid thing. Yeah, I kept fighting it last time. All right, so what's a string? Because most programs define and gather some sort of data and do something useful with it, which I guess like you were saying is calling it later, it helps to classify different types of data. The first data type we'll look at is a string. Strings are quite simple at first glance, but you can use them in many different ways. What is a string, Jeff? It's a series of characters. Anything inside quotes is considered a string in Python, and you can use single or double quotes around your So what we did...
10:13
earlier when we created a variable that was a string after the equal sign, right? So, right. um So message equals quote, hello Python crash course world. This is the string, right? And the quote, that's what we're saying. Okay. Fair enough. ah I don't understand. It says here that anything inside quotes as a string, you can also use single or double quotes. So I guess it doesn't matter, but this kind of blew my mind when I saw it that a single quote, which I'd call an apostrophe is also a string. So I didn't know that.
10:41
It's not that it's a string. It's that you can put the string is the stuff that's inside of the quotes. You can single or double quote around strings like this. So quote, this is a string or what is that? A uh It's helpful if you understand what the other stuff is, right? So strings are anything within quotation marks. Numbers are typically integers, but if you put a number inside of quotes, then it becomes a string. Then it's a string. So anything inside of quotes is a string. It does. But the second line that says this is also a string and it's in
11:10
Single quotes. Single quotes. That is also a short, correct? Python doesn't care if you do double quotes or single quotes. OK. Cool. So it gives you flexibility. And then they give you a couple of different, I guess, examples here that, for the sake of time, I don't want to get, you know, I don't know if we need to read every single line. So we'll just kind of keep it going. If you want to stop me, Jeff, for anything, go ahead. But I'm going to try to keep it moving. I'll pour the hell out of everyone. Chasing case in a string with methods. I don't even know what that sentence means.
11:36
One of the simplest dash you can do with strings is change the case of the words in a string, look at the following code and try to determine what's happening. So name equals something. So we're setting a variable and the string is Ada Lovelace. And then we're going to print name dot C. I already hate this. My brain are already goes, oh my God, what's happening? This makes no sense. um So it says I could save this file name is named up high and then run it. I'd see this output. Do you think it's worth putting that code and saving it and running it? Or can we just go by the textbook and take the word for it? um
12:05
Let me, so I think there's a couple of things worth doing on there, Andy. So I would even do, I would go in and follow that name and put it in Ada Lovelace and print name.title because what you want to see is what that is going to do because you could also do things like upper and lower and things where you can change text to read a certain way. All right. So we're going to comment out. So I'm just going to stay in the same document, right? I'm just going to comment all this other stuff out. Does that sound, I'm actually going to command forward slash cause Jeff told me I can. All right. Um, is this telling me to create a separate, uh, it doesn't matter.
12:35
Tell me if you were creating a new one, but we're gonna just do it in the same one. Okay So name space equals quote Ada Lovelace. I'm gonna print but I need a space after print I know that this is trying to help me here. You need a space between name and equals I don't think I need a space after print right I can just use print and I guess this Python extension or whatever. It's called in VS code is helping me, right? It would tell me if I needed something and alright, so name dot title open close
13:04
And then, yeah, right. All right. I got to save it. So I think it's command s a little white dot goes away. Yes. And then I'm going to run it. See what happens down here. Ada Lovelace. And there's a capitalize the a and a capitalize capitalize the first and the last. So a title, is that like a function? Let's see what it tells us in this example. The variable name refers to the lowercase string, Ada Lovelace, the method title. So it's a method appears after the variable in the print call.
13:32
A method is an action that Python can perform on a piece of data. Ooh, the dot after name in name.title calls Python to make the title method act on the variable name. So this is a method. Every method is followed by a set of parentheses. Jeff, quick pause here. When you learn this stuff, do you take notes? Cause so far I got a, I got a variable, I got a string, now I got a method. Cause again, what happens to me is
13:59
And I know this isn't layers of abstraction yet, but there's going to be all these terms, all these concepts, all these layers of abstraction. And three weeks from now, I'm not going to remember what the hell the method is or what it was doing or how to call it. Like, you take notes when you study this stuff, or you pretty good at retention when you're learning like new. I'm not good at retention. What I'm, what I'm better at is, is I, I come up with a project and then do it. So you're, think you and I learn differently. You learn by the book. I will never pick up anything that I read or watch.
14:29
or listen to, I have to do it. So I will typically come up with a project that I'm looking to do, and then I will just start to code. I don't care that it's called a method, but I care is what it does. So in the case of putting that method in there, there are a bunch of different places where you want to do that, where let's say I'm looking up data later. I don't want to have to know, oops, did the user put something in capitals or did they get it all lowercase? So with Python, these
14:58
methods. didn't even know they were called that till now. They're really helpful when you're dealing with data later on. how do you remember what each method does? So title will capitalize the first and last names, I guess of the names. like a title, a person's title. Yeah. Personally, now I'm looking down lower. can like name dot upper name dot lower. So now I can see what it's doing down below here is it's actually gonna, I guess there's different methods and they're going to do different things. Um, correct. I guess I'm just amazed that when you do this and you start building stuff,
15:27
You know, a month from now you remember like, Oh no, that was title dot upper open, close, print, enter. Like, I just can't recall those details and maybe the ID helps you. Or do you just like chat GPT it or Google it when you can't remember stuff? Cause I seem to be the way I learn is like, I go through this. I'm labbing in an ID in the IDE. And then I really like to put it in a notepad or something so that I can reference it and start to build out. But then I had somebody when I was going through my CCNA, I had this young kid next to me. He's like, what are you doing? Like I'm taking notes. He's like, you're rewriting the textbook. So.
15:57
I guess another way to learn is just I could reference this book later, right? Like don't have to write it all down, but I thought there was more science that, you know, when the more ways you process things in your brain, the more times you put it in there and it's easy to remember. So I think taking notes helps me remember stuff. I don't know if it's true. And apparently that doesn't help you, right? No, me personally, no, but everybody learns a little differently. Yeah. All right. Fair enough. um So this is cool. I didn't even know that uh methods existed.
16:24
You knew what they did, but you didn't know their called methods. So we're learning cool stuff here. So um the method title capitalizes first and last letters of the names. Then information is provided. Title function doesn't need any additional information. So its parentheses are empty. Title method changes each word to title case where each word begins with a capital letter. This is useful because, so like I immediately want to know if we write it out in caps and do name.title. Like if we do a title method, will it lowercase it? Yep.
16:52
Right. That's the beauty of it is it's, should, right? Correct. And this is something you would use in, example, a form. let's say that I was having the user fill out a form and I wanted to have their put of their name. And then I'm going to put that into a, you know, into a form later on. I don't want to have to care to the user put an uppercase, you know, J and Jaff or do they, you know, put an uppercase J E and then the F and F for lowercase. So I would use something like title to make sure that the output was consistent regardless of how the input went in. Yeah.
17:21
So if we have to create a form and we're using these kind of pieces of logic, it's a way to... But again, I think as the magic of these type of tools, um I would probably create a form and then get a bunch of janky data and then manually go in and try to change it or put it in Excel and see if I could do it that way where you could actually just have it come in clean using this, which is really, really cool.
17:43
uh... several methods are used dealing with case blah blah blah so i mean this isn't super interesting it's just letting us know that we can change the case of letters with this method uh... so is the method name dot method title so the name is just the variable okay so title name so upper and lower i guess there are other methods and there we go this will display name upper it'll have a voice out so it capitalizes everything name lower lower cases everything so that makes a lot of sense lower method is particularly useful for storing data you typically won't
18:13
Want to trust the capitalization users provide, ba ba ba ba ba ba. Okay. And I guess in part, again, I'm not a computer science guy, like data, what's the right term? Like structured data, like having your data in a way that you want it. To your point, if you want everyone's proper names and caps, this is a way to do that. And I don't think this is specifically talking about structured data, but I could see in the very early things that we're learning that this is a way that when we receive data in, we can do things with it, organize it, and get it in a way that we want it, which is.
18:42
kind of structured data in a very oversimplistic way. You're structuring the data in a way you want it. All right, so we're changing case, not too exciting. Let me get to the bottom of this guy here. And please stop me if this gets terribly boring or if you want to do some vibe coding and show me a different way to do what we're doing or whatever. I know that reading a textbook isn't particularly, like I said, this is an experiment. I don't know how great these episodes are going to be. This is something I want to learn and I know most of us need to learn it.
19:07
Lower method is particularly used for storing data. We already did it. Using variables and strings. All right. Some situations you want to use a variables value inside a string. Use a variables value inside of a string. Did you see me just get confused? It's not hard. So we learn what a variable is. We're setting, we're naming something and giving it a value, right? That's a variable. A string is just a string of information with quotes, single or double. And now they're saying you might want to use a variables value inside a string.
19:36
Which seems crazy to me. Why would you do that? For example, you might want to use two variables to represent a first name and last name respectively. So let's see what they're talking about. Combine those two values to display someone's name. So first name Ada, last name Lovelace. Full name F, first name. uh You know what's sad? This hurts my brain. Like just looking at this. I get what they're doing. So we're creating a variable first name, value Ada, variable last name, value Lovelace.
20:05
So this is just another variable, right? Full name equals. So this F is kind of hurting my brain here. Like, F just simply means what F means in that case is that we're going to format that text in a standard formatting, which would be first name, space, last name. Because otherwise you could put that into Python as full name equals and then in the curly brackets first name, then you do space, then a plus, then curly brackets last name. Well, actually, you know,
20:35
plus then open parentheses space close parentheses. You see what I mean? You don't have to add in the spaces. So by doing the F you actually have saved, I don't know, half a dozen characters by telling it, I want to, this is going to be standard format, meaning text space text. right. And that's what it sounds down here in the next paragraph. So to insert a variables value into a string place the letter F immediately before the opening quotation mark, put braces around the name. Python will replace each variable with its value when the string is displayed. These strings are called F strings.
21:05
The F is for format because Python formats the string by replacing the name of any variable embraces with its value. I'm already ready to quit. Stop reading. Just go do. You can do a lot of things with f strings. For example, you can use f strings to compose complete messages using the information associated with the variable as shown here. Well, Jeff, this whole thing is reading the book. You're telling me not to read the book? Like, should we or something else? Right. Well,
21:35
So everything we learn in technology, we lab and I've been advocating for home labs for 17 years and I've labbed everything I've learned. And I'm under the impression that following the book's instructions and doing things in VS code along with it is doing. You have a different view of that. this not, cause you're, you're a wild man. Like you'll just go do stuff and remember it. And like, for me, I'm like, I have to do this slowly. And like, I've been trying to fly through automation for years and I can't automate anything.
22:05
because I can't get these base concepts in my brain. Maybe I spend too much time with it and get hung up around the, you know, like it's hard for me to know what of this is important and what isn't. And if all 500 pages are important and it's all confusing to me, it's gonna take a really long time, right? Like that's kind of the problem I run into with this stuff, but you seem to move much more faster through this type of material. Like it's always seemed to come really natural to you, which is a compliment. It's amazing. But that's only because I'm not afraid to break it. So for example,
22:33
In this one, I see first name, last name, full name. I'm like, oh great. I'm totally ignoring that it's Ada and Lovelace. I'm putting my name, I'm putting my last name. It's like full name is first name, last name, right? All right, so perfect. Oh great. Now I could probably write an email because I now have first name and last name. I'll start playing around with it to make sure I understand the concept. And that's the way that I learn is by literally putting it in there and saying, okay, I think I understand how this variable works. You know, I've got first name, got last name.
23:02
And then I start asking questions like, but what if I had an input where someone gave their first name and their last name? How would I split those things? And that takes me down a whole other rabbit hole where I started learning about Python split things. We're not gonna get into that today, but my point is- You told me you didn't know Python and you're like already showing off. That's because I opened the book earlier and that's exactly what I did. was like, oh, you know what? I'm gonna go ahead and get ahead of the student here. And so I went through this lesson and then-
23:30
I got sidetracked after the first page and just started playing. So even that is fascinating to me. So you're like, Oh, I see this thing and I'm like, Oh, I can write an email. How the hell would you run this Python code in an email? Like, I don't even understand what you're saying. Like, are you an Outlook running Python? I know I'm always overthinking. I'm going to write the email. What I'm saying is I knew that I could, I could put variables into an email. So let's say I was doing a mass email to
24:00
100 people, but I want it to sound personalized. I know that I'm going to have variables. You know, I already do that with Outlook and Microsoft Excel. You can do this, you know, this funky thing where you can write a bunch of emails and you have it put stuff together. uh Um, or I think it's actually a word that I did that. It's been a while since I did it. But anyway, I've seen that fail though, when you get that email and you can see like their variables in the email, dear, you know, variable curly bracket, whatever. I correct? Come on, man. Check your stuff.
24:29
All right, so I'm writing it out just because you're right. I need to lab. And again, if this is boring folks and this sucks, let us know and we'll pivot and I'll just do this on my own. But I love what Lexi Cooper was doing when she was studying ethernet and her networking stuff. And I just found it very helpful for me. It also keeps me accountable because every week I have to get on here and do this where I might not do it otherwise. So I wrote it out, Jeff. I don't know if you can see my ID, but first name is Andy. Last name is LapTuff.
24:58
Another variable full name. We're using the F string and what are these called? Curly braces? Is that what that thing is there? Yeah. I don't even know what that is. That's why people call them. Is that what? Okay. Um, full name and then we use the F string and then we tell it curly bracket, first name, curly bracket, last name, and then print. And what the hell is this going to do? Uh, format string Python placing. See what happens. Printed my name.
25:27
it formatted took these two variables and pulled them together okay so I can kind of see if you have a whole lot of variables and you're trying to put things together so let me ask a critical thinking question oh god what if you wanted your name to be capitalized first and last name mm-hmm what could we probably or possibly do from what we learned before that is currently it's gonna say Andy laptop all lowercase right um I forget what the hell it was and I have to go back and look at it was dot title
25:56
No, I have no idea if this will work, but let's try print full name dot title and see what it does. Okay. Well, it actually shows in the next page. Print full name. Where do I put the title? Right after the full logiscore name. So outside of the brackets dot title? No, inside the brackets. Inside the brackets. Inside the parentheses in this case. Yeah. So, print full name dot title and paren. And now run it. But we didn't break it. I think did we? No, no, but I like, I like your, I like your style here.
26:25
Um, print name dot title open closed. where the hell's mine. Well, I think that's being in curly brackets is why the full name that title has to be in, uh, in, curly brackets. Full name dot title. Oh, there's like an open close paren after. yeah. That's the open close parentheses. Nevermind. That'd have to be the curly bracket. don't know why. I don't know why, but I syntax is important later. Yeah. call. like, what does that stuff mean? Call. Nevermind.
26:54
I get I get hung up on I know pass in as a thing and I know calling is a thing but it alright so it did it there we go yeah we were just so close but see now we tied the thing we learned before with the thing we just learned which is we could tie two variables together to make a new variable and we can use the method the dot title there to make it that's enough for me man I'm ready for ice cream everybody have a good night how many people has everybody left can I go eat ice cream yet how many people we got on here oh good there's only nine and I think two of them are also
27:22
We don't have a hundred people here. And then engineers. Do you have beers? Do you have a beer there? I have a cup of something. We'll see what's in it. I'm drinking water. All right. Um, yes, yes, me too. See, if I look, if I looked at the chat, people were telling us what to do already. How to fix it. You were supposed to watch the chat, but you're babysitting me. All right. So this is helpful for me. Um, and, and honestly,
27:48
I'm just looking back, I'm trying to draw a parallel between me learning the CLI and me learning this because I used to work with a guy, Chris, at another company and he would say, dude, if you can learn a vendor CLI, you can write Python code. it's not, you know, it's, it's just as complicated quote unquote. So I remember how I'm trying to remember how confused I was sitting in netacad trying to learn these arcane commands. ah
28:14
and how weird it was. But then over time, the more you do it. So I guess my point is, I'm just going to keep doing this and keep practicing. And then I think it just becomes muscle memory and this stuff will come more naturally. But right now I'm very uncomfortable, very out of my element. And I'm hating this because it just feels very foreign. um But I guess the more you do things, it'll start to become second nature. So, okay. um F-strings, cool. We're formatting stuff. We're pulling in multiple variables and printing them out together, which is kind of cool.
28:43
um... you did a really cool thing with other dot title so look at that was that your idea you still know from the book was that just now that was my idea and then i thought you you should have wrote the book you and i was face you you and eric i couldn't get the current could you get the uh... you know the close breathes is right they could do a lot of things with f strings you can use f strings to compose complete messages say the lovely spa blah blah so that's what we just did and then a printed out yet
29:08
Caps, great, you can use F strings to compose a message and then assign the entire message to a variable. I'm gonna just say it out loud, Jeff, for my own and for anybody else listening. Learning Python properly, and that's what I would call this, to me is way less interesting and way harder, it seems, than just kind of doing the stuff you do. When I found some code and I figured out, I went down and plugged in a router in my lab,
29:38
and I got access to it and I installed netmico and I just stole some Python code and it used the netmico library. It logged in with the credentials I gave it and it ran commands. Like to me, that was really exciting, way more exciting than like running an F whatever, you know, title. Like it's just, this stuff is so dry to me. And I guess that's the difference, I guess, between developers and maybe network people.
30:00
this might really, really excite someone who's a dev and is like, oh my God, this is amazing. This is crazy. Like I was when I learned what happens when a computer boots up or when a packet gets encapsulated, like, but this just doesn't do it for me, which I think is why I struggle. like, oh my God, the syntax and the awfulness and look at it. And like, this is an English and like, how am going to ever remember this? But to get to a point where you can do cool stuff with this, I think is where I'm trying to get to. and I, and I think I can get there and I don't know how long that'll take, but I can't wait to get to a point where I can like,
30:27
do things to network gear with this. And it doesn't have to be network gear, but like, do you automate stuff at home? I know you have. Yeah. Are you doing it in Python? So anymore? I'm not even bothering to learn code. I've completely- But you've been coding for decades, right? Like, let's not oh gloss over the fact that- a coder, right? So what I'm But you can look at code and understand it, right? Yeah, but I'll give you an example. So yesterday, I spent about an hour in VS code using-
30:55
the codex, which is chat GPTs, open AIs, AI model. did it and I totally vibe coded the whole thing. It was all written in JavaScript because I was trying to build a web application. So a single file web application that I didn't have to, that I could make portable and give to other people. And about an hour, I wrote an entire program that if I had been doing it 10 years ago, when I was first starting to learn the basics of coding and kind of copying and pasting other people's code, it would have been potentially weeks where it worked.
31:25
I did it in less than an hour because I stopped caring what the code looked like and I let the AI do it. Now, here's the To be fair, you weren't coding, right? I wasn't coding. was direct. were prompt engineering and saying, me this. And then you were just copied and pasted. So what happens when you use that code and it doesn't work? Do you just iterate with people? was grabbing screenshots. I was pointing at things saying, this isn't working. This thing here, I was able to have a whole conversation with it about what wasn't working. In the same way,
31:54
that if I was a manager and I was managing somebody that was a coder and they sent something to me that they had put together, I might run it and be like, you know, listen, I know that you sent this to me and you asked me to enter my name in the first one, but I didn't enter my name and it broke the rest of your code. Go back and fix it. That's the kind of thing I'd say if I was managing an individual who wasn't a great coder. And to be fair, AI isn't an amazing coder. It's getting better and better. But my brother who is a coder, he looks at, or he's a programmer, he looks at code.
32:24
that AI puts together and he's like, it's hideous, it's ugly, it's inefficient. I'm like, yeah, but it's fast. It's fast and I'm only coding for me. I'm not coding for a job to get paid. I'm coding to automate some process. And so from that perspective, I don't necessarily care about the language, but doing things like this means that, you know, in studying stuff we're learning here, is really helpful because I know what code is capable of doing. So I can have a better conversation with that AI in the same way
32:54
the more senior I got as a network engineer, the more I could talk to senior architects. And then the more I could talk to a bunch of other engineers who were in other fields because I now kind of understood the language. So understand the language. What you're doing now, I think is really important because you're learning the language. I don't think it's as important though as I think understanding why you're coding and how you can do it. It's good. I think it's less important to know all the syntax. That's why you're like, well, yeah, how do I know if this is, but this is called like I
33:22
I don't care what it's called. I just remember that there was a function that I could capitalize something and now I ask Chad GPT, it gives it to me. I now know to use that variable if I'm programming. It's really easy to know. But no, guess, mean, honestly times have changed, right? Because again, I'm just comparing it to like when I was studying networking, you like you had to know the difference between, you know, a prefix list or an ACL or like there was all these different versions of the same thing that you had to know what they were called and how they worked and how you lab them and what the syntax and
33:50
you you're going to get a sim in the exam. today, like you're right, you learn all this stuff, but then we have all this amazing tooling that kind of abstracts all that awfulness away for you. And you can just get the same result. Like, why would you spend three weeks writing that for work if you could do it in an hour? And, I guess that's where I'm at is. That's why. Yeah, right. But I, but, I've had people say the same thing to me. Like, why are you learning Python? Just, you know, do it in, in chat GPT and be done with it. And
34:18
Maybe that's what I should do. I don't know, but I'd really like to learn. And maybe it's just because I'm old school. I just want to learn the basics of how this stuff works and how the logic works. And I am not going to be a coder. I am not going to be a dev. I don't think I'm going to be helping write code for features that work. That's not my strength. um But I sure as hell would like to. Because automation gets more and more into my life over the years.
34:42
I don't like when somebody throws a YAML or a JSON at me or I see some Python code. don't want to get the yips and be like, Oh, my mom's calling me. got to go. I want to be able to stay in the room and have the conversation and contribute, you know, as opposed to. I'm not advocating. I'm not advocating for having AI do all your coding. I, what I am advocating for people are though, because it's gotten that good, right? Like in reality, think from the long run, that's kind of a direction that things will go once it's, once it's just kind of perfect every time. Uh, but
35:11
I think of it like this. I have a very competent coder in my pocket or on my screen that is at my beck and call whenever I want to ask it questions. So I can start, I could pop this code in here that we're working on. And then I can be like, can you explain this whole title thing to me? And then it explains it. I'm like, can you explain it to me? Like I'm a two year old. And then it breaks it down. Like I'm a two year old, like that kind of thing you can get out of AI. But I think the problem is, is if we're just reading the book.
35:41
It's kind of like when you taught your kids to ride their bikes, I'm sure. And the only way they could learn to ride their bikes was to go out there and ride their bikes. And they started with training wheels, right? And then you took off the training wheels. Then it was dad holding the back of the bike. And then eventually you, they realized, my word. actually already know how to do this. That's why I'm, I'm a big advocate of just going in, write a bunch of code. You know, it's like, if you, if you need to go and write this same message equals F hello thing.
36:08
you in six different ways and make it rightful paragraphs go do that until you really understand what it's doing because i don't think there's any like like you talk about this this book's gonna get a boring of tears i think you should go to the book i think this is a really good class i just eric eric no no no shaded eric that this book will be i'm just catching up on the chat as you're talking and it's really funny like
36:30
Oh my god, we're still in print. Oh my god, what's wrong with this guy? Oh my god, why aren't you using OBS? Oh my god, I can't see this stuff. Max is like, no, don't use AI. There's a whole show within the show happening over here. Yeah, apparently I don't even know how to stream, guys. I mean, I'm an old guy. I don't know what to tell you. um And if I told you how much time I've spent just trying to get this crappy stream working, right? Right, Jeff? Jeff, we need a coming soon video thing. Can you help?
37:00
I would argue that we still don't have it working. close. Right now everyone's seeing our faces and not this in the actual stream. that is kind of the whole premise of the show is it's the art of network engineering. really tech is an art in general. You got to figure it out. And just like an artist has to learn to paint, nobody comes out of the womb. I'm a master artist. No one becomes a good coder or a good engineer. uh
37:26
without getting their hands a little dirty and doing it. And so I think this is really good. You're learning some basic stuff here. Is it? I don't know. In full transparency, I'm just trying to make learning Python more entertaining than to your point, like this book's going to bore you to death, right? But here I am with a screen people can't see, talking about things they may or may not be able to see. And this stuff is pretty boring. So like, I don't know, you know, maybe we just leave it to the, um you know, to the...
37:51
What's the guy's name? Kirk Byers. you know, I mean, there's people out there teaching Python, but for me, every single one of them I try to sit through, I'm just like, oh, and, you know, I thought maybe we could make this somewhat entertaining, but it might not be happening. I'm entertained. I jumped on because I thought the person was entertaining. All right. Well, that's problem is they've only done three pages. Well, so that's part of the problem with me learning this stuff is
38:17
I don't like skipping through things. I'm not a huge fan of what you do, which is just go do stuff. I could go vibe code and in full transparency I have, I started making an app on replet for something, just vibe coding and I got pretty far and that's kind of scary because I don't know what the hell I'm doing. And then we were doing some transcript stuff on the podcast not too long ago and I asked Chad GBT like, can you help me search 185 episodes to see if we're missing any transcripts and it spit out the code. I haven't done it yet.
38:43
and that would probably be more entertaining in this context. Okay, let's run this and see if it works. you know, maybe vibe coding is a better format for the show than watching me read a book. um So I guess, you know, it's, we'll get there. I don't know how long this is gonna, all right, let's, I guess we'll just move on here and the text, maybe, I don't know. Where are we at here, Jeff? The longer I do this, the more it seems like a terrible idea. This code displays the message hello, eat a lovelace as well, but assigning the message variable, blah, blah, blah, blah. All right. um
39:12
Adding white space to strings with tabs or new lines and programming white space refers to any non printing characters such as space tabs and end of line symbols. You can use white space to organize your output so it's easier for others to read. To add a tab to your text. Oh my God. Isn't there like a, isn't there like a religious debate of like tabs and spaces and coding? feel like that's not what this is saying though. This is more about output of text than input. They're talking about white space, right? Isn't that tabs and spaces or no?
39:39
In this, in this instance, it's not what they're showing is they're showing, see how the words Python C and JavaScript are tabbed in under the word, like under languages. That's the output to the user. So backslash N for example, means new line backslash T means tab. So what they're showing is you can do like, you can do like this whole thing, print languages, colon backslash and backslash T you're really saying languages, colon new line tab over Python new line tab over C.
40:09
Does that make sense? It's just saying you don't have to do it in like a string of text. You can do it in one giant thing. So this down here is the same as this. It's the same thing. Yep. Right. Yeah. That's the output you would get from print. Does anybody? There actually, there are times when you were, especially if you're stringing together variables that you would do that. Can also combine tabs and new lines in a single string string and T tells Python to move to a new line. Yeah. Like I feel like this is boring, Jeff. I'm like already bored.
40:39
Which isn't great as a host of a show, telling people that I'm bored. This stuff just doesn't hold my interest. Stripping white space, extra white space can be confusing in your programs. uh I need to talk to Erica the dev. How do I learn this stuff Erica? It's painful. Extra white space can be confusing in programs. I look pretty much the same but they're programmed in different strings. you understand what this is getting at here? Nah, I hate it. So what it's part of the challenge in grabbing, again think about filling out a form.
41:09
for a user. Let's say that the user starts, it asks for first name and they put in, and I start putting in Jeff space, oh wait, it only wanted first name. So I backspace all the way to the word Clark, but I've still got Jeff space, right? That extra space to a computer means that if it's looking for just the word Jeff, it's not going to recognize that Jeff space is always going to treat Jeff space as a different values than the Jeff. are treated as like a space as a thing. Yeah, just, mean, you, you
41:39
That's true of any computer. Like, well, just true in Excel, right? If I'm trying to filter by something and I've got empty spaces at the end of it, it can cause problems in data in Excel. So what this is showing you is that there's ways to strip out the superfluous, the unused spaces or unnecessary spaces. And again, a lot of times that's from a user's input because what you're really a large part of what you're doing when you're coding or programming or scripting is you might be taking input from a user.
42:07
and then try to clean it up so that any mistakes they made when they typed it in there don't impact the way that the code gets put in. I'm so glad you're here. The book should just say that. That makes so much more sense than what I'm reading. And I guess he starts to get to it here. Extra waste space can be confusing to programmers. Python and Python space, to your point, look the same, but to a program, they're two different strings. It detects the extra space and considers it significant unless you tell it otherwise. So is that just part of like everyday?
42:35
I if that's like a housekeeping item. Like when you, do you just remove whitespace from data when you get it before you do things to it? It would seem that way. Like if whitespace is like, there's no value in whitespace and coding, right? Like, do you use spaces for things or is it all just a waste of space and confusing and screws everything up? Like, do you always strip whitespace? I guess it depends. It depends again. You're the goal of stripping the whitespace is right now your input in the strings, but let's say that you were writing a program.
43:04
where you asked me the user to input a string. So again, we'll go back to, you asked me for my first name and I put Jeff space. And then you asked me for my last name and I put Clark. Well, you're accounting for putting in the space when you put Jeff Clark in a sentence. But if I put a space too, then you'd have Jeff space, space Clark. And that wouldn't look, the text output to the user wouldn't be great. So what you're doing is you're making sure that there's no additional spaces that I may have put in there as a user. And you're just cleaning up that text so that
43:33
when you use it later on in your script, it's clean. from a, let's say we're building VLANs in a switch or something like that. If I have a naming convention for my VLANs and, or for my interface descriptions, you I might not want to have, you know, someone put spaces in a description, I might want to use underscores. So I might strip out spaces and replace them with underscores.
44:00
That's not necessarily exactly what this R strip is doing, but it can do that. So I can, if you're wanting to build consistency, that's where you are, want to deal with, you're going to want to deal with that data and you're to want to make sure you clean it up. So again, if I'm asking a user, Hey, what's the description for this interface? They give me the interface description. Yeah. Maybe I don't want it to be capitalized or maybe I want every word that's in that capitalized with an underscore instead of a space. You know what I mean? So that's where Python can come in and clean that stuff up.
44:28
from my user's input. even if I have a sloppy engineer who puts that in a well written program can clean up after that engineer and then give a really good output. And then it's calling out here, I guess the R strip method. So I had to look on the left and the right of strings and remove any white space.
44:48
space. Have you ever had to use this? Like if you ever had data and been like, no, there's white space. got to remove it. Yeah. Yeah. When I used to, so when I worked at SunGuard, um, we used to script out essentially changes that could be done over and over and over. And this is exactly the kind of stuff I would put in the, in the scripts that I would write because you know, we would have more junior engineers in putting the data and all of all we were really doing was generating a change plan. We weren't having this script log in.
45:18
and do the changes, but we were generating a change plan, but they were going to copy that change plan and they were going to paste that into the CLI. And I needed to make sure that what they copied and pasted was going to go in, in a format that wasn't going to shoot out an error. So if people had extra spaces or if someone used the wrong character in popping in a config, your config breaks and someone's just dropped a thousand lines of code, but you know, line 17, there was an error and no one was paying attention. So.
45:46
When you're writing scripts for you to automate processes like that, you really want to make sure that you're taking into account the possibility for someone to fat-finger something or to, you know, if you're again, going back to that naming convention, there's stuff that'll be unsure later in the book here where I'm setting character limits. And I'm saying, you know, you can input tech, but it can't be more than five characters. Yes. So things like that, again, for, data governance and for data cleaning it up, those become really important. So these things absolutely you'll use when you're doing real programming and real scripting.
46:15
Yeah, Max has some good comments in the chat. does input sanitation, validation for any input. White space normalization is a daily driver all the time. It's a constant. As you put an IP or host name into the system, that extra space will break your script. So that's actually an interesting, um, this is why if you use notepad plus plus, and you just do one line at a time, copy and paste, you'll see the error and you can fix it in real time. Jeff. Good. That's what I did. And I wasn't slow. I was a little slow.
46:44
No, this is actually, um so yeah, you can go fast with automation, but then if you have something that's about speed, it's about consistency. Consistency is more important than speed. And with scripting, you can get both. You can consistently do things faster. know what I mean? Yep. So do you, don't know, were you working at Comcast before we started using the um ticket tool? For those of you listening to this, we used to have to create tickets and they were all by hand and it was a 10 minute process to
47:14
create a ticket. You had to write these long paragraphs about, we had this cell tower go down and here's why it went down and, you know, this was a T-Mobile tower and whatever. I came in and was able to automate a lot of that process. And what used to happen is when people would write these emails, you know, let's say that, you know, a T-Mobile tower goes down. Some people would put T-Mobile all as one word. Some people would put T-Mobile. Some people would put capital T, capital M in there. And you just had a lot of inconsistency. When I scripted it,
47:43
It always came out the same because essentially we knew this is a T-Mobile tower. We're going to now market capital T dash capital M. So it's about consistency, not just speed. And that's really, think why scripting is important in networking and scripting is important in a lot of different jobs where they're trying to automate things is it's not just about speed. It's also about consistency and about it being accurate. It can then spit back and say, Hey, we're not going to let you copy. We're not going to let you put this in because it's bad code or it's bad.
48:12
Yeah, bad output. Aren't there, I don't know what it's called, but aren't there oh pauses that you can put in your code so that, uh your point, if there's white space and it breaks something and somebody threw a thousand lines of code at the device. I thought I remember at one point, there's little either pauses or checks where you can do like, I don't think it's called error checking, but do you know I'm talking about? Yeah, there's error checking, but there's also sometimes, I would often put it like an enter to continue type of scenario.
48:40
where would give somebody the output and be like, look at this over. Does this look right to you? Enter to continue or press whatever key to go and retry to enter your information. So the engineer doesn't just press enter and he's out of the loop. It kind of does codes and blocks pauses, check checks. Like did this thing happen? Did that neighbor come up? It looks right. Continue like that kind of stuff. Right? Yeah. You're out a form on a webpage. If it's multiple pages, it'll often ask you to verify the information before you move on to the next one. You build that stuff into your code. That's just code. Max talking about our handling.
49:09
Something goes bad, the script's able to work to some degree. All right, so we're coming up on numbers here. So I think we probably end this when we get to the end of this. I'm really struggling with determining if this is interesting to anybody. So I don't know. I'm feeling super confident about this. Again, this is an experiment, Jeff, and I don't know if anybody wants to listen to it. Like, I'm trying to teach Python, but I don't understand Python. And now I'm second guessing.
49:39
that philosophy. I'm not trying to teach it as much as watch, have people watch me learn it, but if you weren't here, this would be much more painful. So thank you for teaching me. Um, Max says it's a real struggle. The part no one shows you. All right. So stripping whitespace. I understand why that's important. Whitespaces are bad. It can break your scripts. Um, there's a, what is it called? Not a function. What do they call it? Was it a function? That's the, uh, strip, uh, ba ba ba ba ba method. So there's an R strip method. And where do you put that? So variable favorite language equals Python.
50:08
Favorite language, Python space, favorite language dot R strip, open, close, paren. So the R strip will just take it out of there, which is. So when would you use that? Like, let's say we're running it, we're creating a script to, I don't know, do something in a router. How do know when to use these things, right? Like, is that just part of your, we wrote a script, we went through it. Now let's strip all white space. Like, do you always use? Sometimes. R strip? Yeah, it depends, I guess, huh?
50:36
Sometimes it depends. It depends on if that extra space is going to be, it's going to be problematic. If I'm just looking to get the text that's in there, I might strip out those spaces in the beginning with the R strip or beginning or end R strip. Right? Sometimes I'm doing a dot split, which is another one I talked about before, which is someone puts in, you know, they put Jeff Clark and I want to now split Jeff Clark, which is their full name into first name, last name. can split by the space.
51:05
So I might want to strip out extra spaces or whatever. There's different times you're going to want to use that R strip. Again, it's just about keeping data clean. It doesn't do any, there's another, don't overthink it. It's really just, I want to keep this clean. Tell me not to overthink it, dear God. Are there ever, this is me not overthinking it, but I am. Are there ever situations where you would want white space? Like where you wouldn't want to strip it? Or do you always strip white space?
51:33
Like there's not any constant across the board. Like white space is bad. It's going to break stuff. There isn't a function where white space does a thing that you need. And if you do an R strip, it's going to break it. Probably not. mean, if I was using it in a split, for example, and I was trying to use the space as a way to identify, but there are other better ways to do that. Um, so just for all intents and purposes now, we want to get rid of the nonsense space. If we're just doing a single word input, especially on single word inputs, that's where you want to strip that out.
52:00
Remove white space blah blah blah R strip great Then removing prefixes when working with strings another common task is to remove a prefix consider URL with the common prefix HTTPS colon Ford says Ford slash you want to remove this prefix we can focus on just the part of the URL that users need to enter so no starch underscore URL variable HTTPS and then we do a no starch and screw URL dot remove prefix brand HTTPS
52:28
So we're telling it to remove that. And then I guess it'll remove that anywhere it sees it, or maybe just in that line. Who the hell knows? And variable followed by dot, ba ba ba. Methods are moving away space. What was the first language you learned, Jeff? Do you remember? Uh, the first language I learned was not to, it was basic. GW basic. Yeah. I think I took basic in high school, but I don't remember it at all. I GW basic, then Pascal, then C plus plus. Did, basic make sense to you right away? Did, were you like, oh.
52:57
I like this stuff. This is cool. think basic made sense to me in the same way that algebra made sense to me. Right. Algebra was just one of those things that just completely my brain, it works with my brain. Right. But that's just programming in general for me. I don't, I don't, different languages are like Python is a really nice, easy language to use, but personally my favorite language to write in is bash because it's super forgiving and it just works in every Linux thing out there. It's ugly and it's, but it's quick. It's quick and dirty.
53:26
You know, so I'll have to write Python scripts that I launch using a bash script and I'll string together Python strips of the bash script. So, but there's a bunch of different languages. Once you learn one, the other ones, it's the concepts of these languages that you're learning right now. You know, it's the variables, it's the straights. across them, It's right. Fairly common. Python is super, super robust and has a bunch of extra things that other languages don't do as well. And that's why Python is just, it's kind of the language that everyone learns. And I keep saying this out loud for anyone like me.
53:56
As soon as you said basic was easy, algebra was easy. It's just how your brain works. uh I had a hell of a time in both of those and math was always a struggle for me. And I immediately connect those dots in my head and go, well, see, I'm not good at math. I can't program, blah, run away, which, which is what's happened so many times over the years. It's not true. It's an old story. And I know if I spend enough time in this stuff, I mean, it makes more sense today than it did five years ago, but I continue to still fight that. Like it gets hard. I'm uncomfortable.
54:26
Jeff's better at it. Maybe it's for me. Let me run away. again, I'm just, I'm exposing the silly little loop that my mind runs in when this stuff feels hard. Cause when you see it's easy for somebody else, like, well, team, the hell's, why can't I get this? But, um, yeah, I'm not saying that it's like a, that's not a sort of a brag or even a humble brag. My brain is able to, it definitely picks up on this stuff. But again, I also can't sit and read a book. You won't, you'll never see me sitting, reading a book.
54:54
Like like this I would never you have gotten farther in this book than I would I'm sorry, invited you in to watch me read a book and you're like I hate books. I don't want to read a book This is terrible. I actually love reading books. I never read tech books. Here's what I see on this page I see message equals I see what I only see the stuff that's code blocks That's all I do I throw those in and I figure out what they do I'm also someone that if you ask me how deep the water is how to Mike I don't know. Let me dive in
55:24
I'm glad you're here, Jeff. All right, I think we're almost at the end of this pain of this particular section. avoiding syntax errors with strings. One kind of error that you might see with some regularities is a syntax error. It occurs when Python doesn't recognize a section of your program as valid Python code. For example, if you use an apostrophe within single quotes, you'll produce an error. This happens because Python interprets everything between the first single quote and the apostrophe as a string, right?
55:52
It then tries to interpret the rest of the text as Python code, which causes errors. You just have to use single and double quotes correctly. Save this program, blah, blah. So variable message equals one of Python's strengths is its diverse community print. The apostrophe appears. I don't even notice the apostrophe. The apostrophe appears inside double quotes, so Python interpreter has no trouble reading the string. However, if you use single quotes right now, it's all screwed up. Python can't identify.
56:19
Yeah, which makes sense to me actually. Yeah, I get that. That's pretty intuitive. Um, and that's kind of what I like about the IDEs. It'll tell you that, right? I'll actually highlight it and tell you where it broke. And I also saw something in the last thing I did. What's it called? The trace back, I guess, where it'll give you the arrow. Like, Hey, line eight character 14. This is what I don't like. And then it's really nice to go. Okay, great. I see where it's broken. And then the IDE tells me. nice until it doesn't work quite right. And then it's really annoying. uh
56:48
Cause it'll you 24. It's really line 22. I see the following output. This makes sense to me. Figures out the beginning and end of a string with the quotes. And if you do single quotes and then put a third single quote in there, of course it's going to be like, what the hell's happening? I don't understand. So I get that. Um, these probably might be a string, the buyers can validate for variety of sources.
57:11
went to syntax errors often as you learn a proper code yes syntax errors are also the least specific kind of errors so can be difficult for us to identify if you get stuck see suggestions in an appendix alright so then they just give you different things you can try and that's probably the end of this section i think it's going to get into integers next which i don't have the stomach for right now yeah it's going to get into numbers um... i don't know jeff that's about an hour i don't know if we'll release this off to go back and take a look uh... i kind of feel like i got
57:40
kind of lost the, I lost the love at some point in there. It got complicated and hard for me. And I think you're right, reading a textbook and this stuff's kind of boring and it's dry and like, okay, I can write some stuff in the IDE, but it's still not all that exciting, right? Like I'm not really making anything, building anything. I think if I was doing things in a router or a switch, it'd probably be more engaging for me. If I was doing things in code with the router, which I guess there's programs like that out there. I don't know if Kirk Byers, like Python for network engineers is one of those, but.
58:08
I'd almost rather have this in the context of networking the whole time. But again, I don't know if you have to learn the basics of all the structure stuff so that you can then understand what the hell you're doing later in the device, right? Like, I don't know. Let's unpack that for a second here. eh What we learned today is actually stuff that you could use to configure a switch right now. It may not log in and do the scripting for you, but let's say that you wanted to write a script where it was, I want to build the base configuration.
58:38
for this device. The first thing I need to know is a host name. Then I need to know the IP address. Then I need to know the subnet mask. Then I need to know the default gateway. Then I need to know, know, whatever. So that's four things there. Now, what we've done so far is we've just done variables. We haven't done any inputs, but I think that's pretty soon where you're gonna start asking the user for an input. But it's the exact same thing, because all that that does is it's asking for someone to fill in that variable.
59:07
So what that means is you could have that and then you could have it split or spit out a basic configuration for you. know, config T. I'm sorry. My brain doesn't go to Cisco anymore. I used to work in our stuff that I can only, I can only write in my own code and give me your syntax, man. It's fine. I want to learn how to syntax. Go ahead. My point is like, know, you could, you could absolutely write out all the bits of that code and then say, okay, insert variable here, you know,
59:33
In my case, it be config system interface, edit. And then what's the port that I said is going to be my, my WAN interface. Yeah. WAN one. Okay. Perfect. I use the variable WAN one and then set IP. What's the IP I gave? Great. so hold on. Cause my brain just lost you. think I know where you're going. So when one equals, and then would it be an IP address? Like what's that variable that you're calling? I'm saying I would, I would prompt the user for a variable and then, but I would normally do is I'd spit out a bunch of code that they can literally copy and paste. So if you want on the next one, I could actually.
01:00:01
I don't mind guiding and we could go log into a box. I would just need to know which thing we're logging into. And I can show you how we could write a base configuration with really what we've learned now. The problem is that's going to take us way away from following the book. I think there's some benefit to you learning this. yeah. And I can, I'm totally open it and I think we should, mean, a, so listen, I'm going to learn this stuff either way. I don't know if I'm to get through all 500 pages, but I've made it my mission in life that I'm going to eventually look at a Python script and at least be able to describe what it's doing. And I know I can.
01:00:31
And I'm going come over, you I'm going to get over all this. I know I need to. And I know that 65 to 70 % of, of network engineers, if you look at any of the data, like out of the network automation form as an example, like there is so little programmatic stuff happening in networking and we're the last holdout and we're doing ourselves at this service. And I know I've told you before, and I said it publicly a bunch of times, but when I lost my job and re-entered the job market and realized, Oh crap.
01:01:00
I don't, I'm not cloud native and I don't know, you know, all this stuff and I haven't learned automation like, Oh no. So I'm trying to continue to get that message out there. Like don't have the experience I had and wind up back in the market and realize, Oh crap. I mean, I know that everybody knows route and switches isn't enough anymore yet. If you look at the data, seems like the majority of network engineers are like route and switches enough. And I'm not learning that Python stuff. I don't care.
01:01:29
So um anyway, I hope these struggles can kind of help not only me, um but the rest of us who are holdouts. And you're a shining light. mean, you were, like I said, 15 years ago when we met, were automating all the things. And it was amazing. So when I got there, the ticket tool was new, but I was doing Tickets the Old Fashioned Way and Remedy. So I don't know if I got hired right around when you started, but I did the Old Fashioned Way 25 minutes of awfulness. then Jeff's ticket tool was like, you filled out four fields and hit a button.
01:01:59
and in like 30 seconds, 25 minutes of work happened. I mean, if you're listening to this and you can't see the value of taking 30 minutes of work and doing it in 30 seconds, like, I don't know what to tell you, right? Like, you know, this stuff isn't that hard, it's not that terrible, and there's really smart people like Max in the chat and Jeff who are gonna help us. And Max has had some really good one-liners in here.
01:02:24
You know don't give up it's you know that tonight was way better than you're giving yourself credit for think about the first time you heard ethernet headers. um You know this stuff is hard and it takes a while and I don't know I'm just going to try to be patient and get through this but let's do I really like your idea I would love to put this more in a network context so I'll keep hammering away at this.
01:02:46
And if I just have a half an hour one night and do it, I might just jump on and stream it. And if anybody wants to, great. And we'll at least have that documented. But I think for the actual episodes that are interesting to network engineers and how to learn some of this stuff, think doing it in the context of a base config is brilliant. I think that that is way more interesting to me and probably interesting to everybody out there than like watching me just read lines of a very boring textbook. No shade on Eric. He's brilliant.
01:03:14
To me, this is like algebra and I was banging my head into the wall when in high school and I was learning algebra. All right. I also want to see some of your vibe coding. So maybe next time let's do what you're suggesting. I'd like to see some of your vibe coding stuff. I mean, honestly, I'm still not sure if I'm... So I'm not wasting my time learning Python, right? Let's just get that out of the way because in my head I'm like, I should just let chat GPT do all this for me. And this is ridiculous. What am I doing?
01:03:42
There's value in learning how this stuff works, right? It's the same as, let's say that you got out of network engineering and you got into something else. There's never a, just understanding how the internet works makes me a, makes me when I'm working on a computer and something stops working, I immediately, all right, let me go try pinging the IP address. Okay, I can ping the IP address. All let me go ping the FQDN. Okay, I can ping that. So DNS is working. All right, I've got some other problems.
01:04:09
Now that is not even me doing my job. That is my wife telling me that the internet's down. Yeah. And I got to go in there and figure it out. Oh, okay. Come to find out. It's just the webpage she's going to or whatever. You know, I don't think there's anything wrong with starting at the basics of Python either, because those individual pieces add up to you understanding what's possible and what's not possible. The worst experience I ever had was being, I had a boss that wanted me to write some scripts for him, but he had never done any scripting.
01:04:38
So all of the things he was asking for were either impossible or something that he, that I was certainly not being paid enough to do. Yeah. He was, he was wanting it to, he was wanting essentially this thing to be AI and, know, and to solve the world's problems. When I'm like, that's not how it works. If you get garbage goes in, you're going to get garbage out. And I'm like, this script is not going to know what this switch is that the person isn't even logged into.
01:05:07
If they're putting in a TE interface and it only has gigi interfaces, it's going to try to drop that into the config. yeah, stuff like that is you need to understand it. Even if you are not going to be the coder, there's something beneficial and understanding under the covers, at least the basics of it. Like I don't know anything about cars and I have suffered as a result. Can't change my own oil. I barely change my own tire. Any of that stuff. Yeah, I'm not a mechanic, but I can tell you if I knew a little something about cars, it would probably save me time and it would save me money.
01:05:35
This is why friends make the world go around. I'll teach you about cars. You teach me about programming and we'll become better people as a result of our of our friendship. Jeff, thank you so much for being here. Folks who uh joined in in the chat. Thank you very much. um I know I keep saying it. I hope that there's some value in this. I am learning little by little and it's a slow. It's weary progress. It's really a slow slog for me. um
01:06:01
So, you know, whether we keep doing these as episodes or whether we just spin this off as a separate YouTube channel and people can pop in as needed. I will do my best to edit these so that they are more interesting and less of me whining and trying to understand what the hell this sentence means. But, you know, as always, we're here. We're trying to learn the thing. We're trying to improve our skills. We're trying to stay skilled up so that we can remain employed in this ever changing technical landscape that we find ourselves in. So. um
01:06:31
For all things network engineering, can find us on our Linktree, linktree forward slash art of NetEng. All the cool stuff is in there. uh Jeff, guess what? I updated some merch. Woo! We've been talking about it for a while. ah So we have a merch store um that you can find in our Linktree. It's also embedded in this YouTube somewhere. I've been trying to figure it out. But I added a mug. What else did I add? There was a mug. I tried to add a bunch of things and had nothing but problems in this store. I'm. um
01:06:59
I'm going to get more stuff in the merch store. added a coffee mug and something else that escapes me right now. But it's shot glass. I think this could, this Python episodes could be a drinking game. Every time Andy says, hate this, but the end of it, everyone sloshed. day. That would be, you know, I tried to do a pint glass and I was having a problem. But anyway, um, what would I really like to call out?
01:07:22
in our um... link tree is the discord service all about the journey thousands of people in there are all helping each other uh... we don't have a python channel i think there's an automation channel uh... but anyway there's every vendor every cert every technology stack and everybody's in there helping each other and honestly just the general chat just folks checking in how you doing what's going on how are things it's a really nice check in uh... louise uh... you know uh... netsec wheezy in there he's always checking in on me he's done that for years and
01:07:50
I've told him this, that there have been some days I really needed to hear from a friend and just the fact that somebody in our Discord server reached out and said, you doing, meant the world to me that day. um if you don't have a community, it's one that you can check out. Linktree forward slash art of net eng, all kinds of cool stuff in there. Jeff, where can folks find you, sir? I mean, I'm not a big social media person. So if you just go to, I think it's fortagef.com or Fort, yeah, I think that just takes you to my LinkedIn page. Just go to LinkedIn. Look for me, Jeff Clark.
01:08:17
It's why you're so smart because you're not wasting all your time on social media. You're like Cal Newport, the deep work guy. Like, social media is a waste. I'm not on it. I'm just learning cool stuff and I'm a coding genius. You've unlocked a secret, I need to get better at that. mean, at least if I'm down here, I need to be able to, when you ask me that, be able to give you some kind of a link that people can go to. You're on LinkedIn. You're on Fortig... What is it? Fortigf.com? That sounds right. All right.
01:08:42
Jeff as always thanks for being here thanks so much for listening and watching and hanging out and we'll catch you next time on the art of network engineering podcast sugar honey iced tea guys thanks for hanging in there max and las and rob and i'm trying to go through the names here i was looking in the chat as as we were going through i got about halfway through and got sad with the book and then decided to look at the chat and i'm i love the input max you get the you get the prize for being the engaged and positive and um
01:09:11
You know, like all things, feel like I should understand it more than I do. And then I get frustrated with myself. It's like golf. Jeff, you golf. I do. I don't golf well, but I golf. Well, right. But every time I golf and it's not often, but when I do, I'm infuriated with myself because I'm not good. And then people are like, well, how often do you golf? I'm like, I don't know. Once every five years. I don't have clubs. I never golf. But when I go, I think I'm athletic enough and coordinated enough. I should be able to hit this stupid ball straight. And I almost never go straight.
01:09:38
and I try to kill the ball and then it slices everywhere. So when I'm not good at something, I get into this like, oh, I get mad, which is silly. And that's kind of how I feel with coding. It's not a natural strength. just read about golf, you definitely would get mad. I really need a 500 page textbook of golf. Yeah, but see, if I don't know what I'm doing, right? Like you, if I just go in there and start writing Python code, I don't even know what to write. Like, right? That's what saying. Look through the book and like they give you, if it gives you variables.
01:10:06
put those variables into something and write something silly. Like I said, know, yeah, I have scripts that are literally just for turning up devices in my lab because I got really tired of going first off, I to go find the IP address. And so I was like, all right, well, I can go ahead and vibe code some kind of a bash script that will go and find the next available IP address that doesn't ping. And it'll spit that out to me.
01:10:29
Perfect. Now I've got that one because I'm not using any kind of IP address management in my lab. That's what you would have. You'd have a little script and it would just ping stuff to a found one and then give it to you or assign it or whatever. Yeah. It's silly and stupid, but it means I can send it off on that task. works. Or I do everything else. Right. Right. Yeah. I love it. I think the more, uh, networking context we can wrap around this stuff, the better for me and probably the better for people listening to a podcast like network engineering. So, um, I liked your idea. Um, let's do that. Let me know what I can do to help. I have some gear here.
01:10:58
if you want me to set it up or. I would say for the next one, but I would like to have you do is if you can have a, if you have like a Cisco switch or Cisco router, I want you to just look at what the base configuration you would ever put on that thing. So give it a host name, set up a management IP address, um, and set up a default route and then try pinging the internet. Right. If you can, can outline the steps for that, what we will do, what we can do with the next video is we'll write a script.
01:11:25
that automates all those. And what it'll do is it'll prompt you. It'll say, what's the IP address? What's your default gateway? What's your man? What's the interface is going to be your outgoing interface? Because that is a real world thing that could be used if someone had to do, you know, a hundred routers or a hundred firewalls or a hundred switches and they had to deploy them out in the field. That's absolutely something that you can script and be done with in no time because all I'm doing is inputting a couple of variables and it puts the rest of the lines of code.
01:11:54
So here's an interesting follow up to that. Why would you use Python and bash or something like coding language as opposed to like an Ansible? I know you could use any of them, but to me Ansible is simpler and it might not be, but when I see it and I've tried it, I'm like, ah, I can write a playbook and like it calls a config file and like, just seems simpler to me. But again, there's folks like you and Max like, Oh dude, you know, Python and bash all day. Like that's what you should do. And in my brain, I'm like, well, why aren't we just doing Ansible?
01:12:20
I know you could do either, but I guess Python's more powerful, right? You could do more with it. Python is just super versatile. So Python is really versatile and it can be used in a bunch of places. I don't know that I'd say it's more powerful because it's like saying a hammer is the best tool, right? I mean, maybe, depends on the jump. If I had to put a screw in, no, it's not the best tool for that. uh So Python is the same way. I actually rarely write in Python, but...
01:12:48
Python is the one language that just has a ton of documentation. Like that's the real advantage is AI is great at writing Python and there's a ton of documentation out there on it that you can find. So writing in Python, you'll always be able to find some of that. And it's a, you know, solve that problem. I've heard people complain about Ansible that every time they change, I don't know if it's the core, like every time they update it, it like breaks playbooks. And I don't know a how true that is anymore. And B
01:13:15
if there's a corollary or a similar thing in Python, like if they upgrade from three seven to three nine, does it break your scripts? Like, is that just a coding thing or, cause I've only heard people complain about it in Ansible. Like, oh, every time they update it, breaks all my playbooks. That seems kind of awful. Like to me, that's a reason to use Python. But if the same thing happens in Python, then it's just a coding. So Python's mostly backwards compatible, but there's a lot of stuff in like Python three, for example, you couldn't run in Python two or Python. You end up with some compatibility.
01:13:43
compatibility issues if you're grabbing somebody else's script and they wrote it in Python 3 and you don't have Python 3 installed then you got to go install that and all that but it's really not usually that big of a deal and again yeah for most network engineers you're writing a script to automate a process that you have to do over and over and over again right right and that's why I'm like use whatever the fastest tool is for the job unless you're being hired to be a programmer and if you're being hired to be a programmer then you're not currently learning programming because you should have already known that
01:14:12
before you got high. You know what mean? Yeah. I think the more use cases that we can find, like I just reminded me, because I know you automate stuff around your house. You had a script you would run to like kick the kids off the Internet, which I love. Every time I come home, and I know I've mentioned this to you before, but every time I come home, I have to go on my phone and turn the home alarm off. I have to another button to open the garage door and I have to hit another button to go into the thermostat and change the temperature and like and every time I leave, it's the same kind of thing.
01:14:41
turn the thermostat back down, close the garage door with my phone and set the alarm. there's, I'm guessing there's some type of automation I could do. you could run a free program called Home Assistant. could use Life 360, which is a free program that has a Home Assistant tie in. So when you arrive home, see, so Andy's a block away. Let me open the garage door. Let me turn on the front porch light. Let me turn off the alarm. And then Andy left and let me go ahead and turn on the alarm.
01:15:09
Make sure the garage door is closed, turn off all the lights. And you can even set it up so it looks and says, Andy's not home, Andy's wife's not home. that's what I was going to say. You just, you just read my mind. If I leave and my wife's home and it says the alarm, we're going to have a problem. But I guess they've thought that you can figure all that out. And that's simple. You're building in logic, right? You're building a logic into your home automation. So I'm doing a check. I'm saying, you know, it's so Andy leaves is a trigger. And then it says, okay, Andy leaves is Andy's wife home.
01:15:39
So he just doesn't check. Is Andy's wife home? Nope, Andy's wife's gone. All right. Is Andy's kids home? Nope, Andy's kids are gone. Okay. With Andy gone and the kids gone, I can go ahead and set the alarm. Cause you always hear that all the time. yeah. Or like a babysitter. The guest isn't on the, on the list. Well if that was at my buddy's house and he went and took his dog for a walk and I set off his house alarm cause it's his smart home set up. But I think the more things that we can automate whose context
01:16:07
matters in our lives, whether it's a router, a switch, some home systems. I think that that would really, and everybody says that, but I still haven't done it. Like to automate something, to make something in my life easier or less friction. Having used automation, it's like, oh wow, my life is better. This is great. So I like your ideas. I think we're still live on YouTube, aren't we? It's okay. Yeah. These were some good comments.
01:16:31
I left it up just because we are live on YouTube. haven't said anything bad. Um, left it up. Steal some of this though. Cause it's good content, Andy. Well, that's why I'm still recording. So the textbook stuff got a little dry. think we had some good conversations at the end. So I'll probably pull some of it in. I mean, a good episode is more of this kind of conversation and banging it around and having ideas and, know, and thought experiments and things. Reading a textbook again, it's, it's experimental in my eyes. It's not particularly compelling. I don't know if I would tune into a.
01:17:01
tune into something and listen to somebody read a textbook. But if it's something you're also struggling with, you know, maybe, you know, some of this land, um, before we hop off, I see, mean, max max is killing it in here. I love max. He's my buddy in discord. Um, he's saying that Ansible is Python. And I remember like it's running Python under the hood. So it's Python, but it's slow. And that's what he put in there. Um, so Python's going to be faster. Ansible is running Python anywhere. Um, what else does he say? Uh, talks about, uh, Ansible is very rigid, which is super true.
01:17:31
because it is, it's meant to do eight tasks in this task in this order, which is also why it's not especially fast. I mean, you want fast, you're writing in Perl and God forbid I ever look at Perl. I hate Perl, but with Perl you can do things. mean, you can technically you're threading in, in Python as well, which is where you're writing things at once. just say idempotency. I don't know what that means. I had impotency.
01:17:56
I see people say that all the time. Erica, the dev just did a video on it. Do know what idempotency means in programming? It's a word that every time I see it, I'm like, what? I bet I can Google it though. He's probably going to write in there what it is, getting fed. Well, they're all just going to laugh at us behind our backs. That's fine. Um, what else do they want to say to you before we hop off here? We getting tired, jumped right out of my head. Perform the same action multiple times has the same effect as performing at once. If you run an operation once, it changes the system to certain state. I still don't understand why it's called that.
01:18:24
why you shouldn't use Ansible because no one knows what the hell it is. So I have a question. If we use, so base config, I love it. And then my next iteration would be, okay, I got my base config down. Let me build some routing. Cause what, you know, when I'm usually standing up a lab, right? I might have two routers. So to your point, I got a host name, I got a management address, whatever the hell else I want in there. And then I might want to get, I don't know, BGP up between them. So like, let me get some peers up. So can I write a Python script? I'm sure I can, but could I write a Python script where I get
01:18:53
you routing up between two routers and then I can check that the adjacency comes up as an example. Like, can I see the BGP established? Like are there checks in, cause like, I don't know if Ansible does it, but like if you're going to push config, you're going to need validation. And is the validation done by a guy in the CLI after the, after the script pushes or can you put validation in That's not the most real world is the problem. I mean, it's depending on the company. Most companies pushing a config changes in real world. that what you mean?
01:19:20
Pushing a config change and relying on the script to do it and do the checks is, isn't often, I shouldn't say it isn't real world. It's you're not typically doing that in Python. There's other tools you're doing that in that are just basic network automation tools that are built in. know, Cisco has got their tools and everybody's got their own tool platform. What I'm saying is where I used to use it a lot was, we had, depending on the company you work for, I use it. We have a really strict change governance. I know you guys used to as well when you were working in FinServe.
01:19:48
strict change governance. I don't know if you had to do it quite, were, we had a change plan, a back out plan and a validation plan. Right. And if I was, did a lot of life cycle stuff. So I would be taking old 29 sixties and I would be upgrading them to 9,600. Right. It was a very similar process over and over and over. And I often had to take the base stuff here and put it into the new one. You know, all the SNMP stuff and all the, you know,
01:20:16
basic management IPs and all that stuff. So I would have to automate those. So what I wrote a script to do wasn't to log into the box and make the change. I wrote a script that created a change plan. It created a back out plan and it created a validation plan. It then emailed those to me because there's email tie-ins. I could type Python in with email. It emailed those as attachments to me so that I then had my change plans written. writing the change plan.
01:20:42
used to be the thing that took longer than doing the change because the change plan had all the commands I was going to enter. So that meant on the night of the change, it was copy and paste. And then I could look for errors and do the engineer thing, which is you adjust on the fly as engineers do. So I would say for what you should start with isn't even the logging into the, into a router or a switch with Python. It's writing your base configuration for it so that you can copy and paste that. Cause copying and paste is easy. Right. And then you can look for errors.
01:21:11
And then you move to, right, I'm confident enough that this script has written enough, enough of these that I've run it 10 times or a hundred times and it works. Now I'm ready to have the script go into it, but I used to always encourage people not to run the script and have it go make the change until you know for certain that that script. A lot of labing, right? Which I guess is what most people are like the, the DIY automation folks, same kind of thing, right? A script tested a million times, try it once in production, try a toys, keep rolling it out.
01:21:39
That seems like it takes a long time, right? Like I know it's more expensive to buy into like a vendor management platform. It seems like you can do more and do it quicker than to your point. Like, okay, we got to test and validate the hell out of this before we can push it to production. And we're only going to do it to one box first. And where if you buy, you know, vendor X's fabric management platform and they're like, well, it's integrated and it works and you press a button and it's magic. Like that just seems faster, I guess, than everything you just.
01:22:07
described. It's just somebody else's scripts. have a buddy of mine, Gil, that he basically talks about a GUI is just somebody else's, you know, scripts, right? m But scripts that the vendor validated on their equipment a bajillion times in testing, you would hope some guy wrestling with Python, trying to figure out if it's going to melt, you know, the world or not, I guess, not to not to undersell people doing it themselves. I know plenty of people are. You've heard me use the term that I'm a selfish scripter.
01:22:32
You've heard me say that before. basically what I'm saying is I don't write scripts that are going to be used at the company. I write scripts because someone gave me a task that by the fifth time I did it, I'm like, I've been here for a month. You've given me this same task five times. I bet you're going to give me this same task 500 times. So I'm going to automate that. So I used to have to do at SunGuard, used to have to do, we would have to log in to, we first have to go into MPLS. We have to look at all the LSPs and we would have to follow each of those.
01:23:01
to figure out if we had enough bandwidth capacity or if we were gonna need to increase bandwidth. So if a customer would say, hey, I wanna go from a one gig to a 10 gig on this switch, we would have to look across an entire LSP and say, do I have enough bandwidth to put this customer on there? Because SunGuard was, they were counting their pennies at the end. it basically meant I had to run this, I had to go in, log in and I'd find all the next hops I had to go to. And then I'd have to go hop by hop. Well, I wrote a, I,
01:23:28
wrote a script that basically gave me the first command to figure out all the hops. I could then copy and paste the results into the next or into the next part of the script that would then tell me the commands I needed to run to get everything else. And so I would then copy and paste that in. So I went from having this process that was the initial how I started this process that used to take me, I don't know, 15, 20 minutes. I was standing about three or four, right? And then I ran that so many times that I knew I could trust the script.
01:23:56
So I started automating the script so it would log into the box. It would run that first command. It would take the output from that router and put it in. Cause all I was doing at that point was really show commands. wasn't making config changes. I was doing show commands. So stuff like that, that was a script written for me. And all I did was save myself a crap load of time. And at the time I was a smoker. So what I really had was the option to just kick off a script and go smoke a cigarette. That's what I essentially bought.
01:24:25
but that I was a selfish scriptor. scripted for me. didn't, and then don't get me wrong. I gave it to other people and they used a script later on. It also meant that we were able to give this task that used to require a more senior engineer to junior engineers and have them do it so that the more senior engineers weren't doing the redundant stuff that was just time consuming. But again, I did that because I had a task I had to automate. Your home automation is a perfect example of something you do every single day over and over. You do the same thing.
01:24:54
If you can automate it, do it. You'll learn something. I like what you've done too, over your career that I've always struggled with. And again, if the data points that the low levels of network automation across our industry points to, it's a similar cognitive kind of trick we play on ourselves. You'll spend the time to automate, to create the automation for something and save yourself an enormous amount of time. What I've always struggled with mentally is
01:25:22
and I don't think it's true, but it's a lie I would tell myself, but Jeff, I am so drowning in work. I gotta keep my head down and keep doing it the old-fashioned way, just to, like, I'm just trying to keep the lights on, And I've had different leaders at different companies tell me, like, you gotta shift that mindset. You have to, I mean, basically you have to think like, Jeff, if you can put the work in up front. And for me, it was really hard, the amount of...
01:25:49
the firehose of work coming my way and on all my team's way didn't seem to afford what I perceived to be the amount of time it would take for me to figure out how to automate this thing. I mean, you've seen me, you know, take 15 minutes to get through two and a half pages of very simple text, right? Like this stuff takes me a long time. So when I would see the time investment to figure that out, I would always just go, you know, unless you're going to give me two weeks off of work and, you know, give me the next seven maintenance windows off so I can learn this stuff.
01:26:17
I could never make that turn, but you, it either came easy to you, or you're faster at it, or you just made the decision. I'm gonna automate this, and I don't know where you found the time, like, because I know we were super busy at Comcast. I mean, how did you find the bandwidth? That phone never stopped ringing during the day. Everything was always breaking. There was a ton of meetings. So, and maybe this is a conversation for another time, but when you're drowning in work and production, and you wanna automate things.
01:26:43
and your leadership isn't backing off the gas pedal with the amount of work they're giving you, which I think is common in networking. How did you find time, automate things, because it takes time, correct? It's going to take more time upfront. You're going to save in the longterm. You've said that a million times and I believe that, but how long is it going to take me to figure the hell, like I'd still be working on a ticket tool if that was my job. Well, was the thing though is a ticket tool wasn't something I created in one fell swoop, right? The way it actually started was we used to have,
01:27:12
a list of email addresses and phone numbers for uh T-Mobile, AT &T, Verizon, and Sprint. And then we would have AT &T East, AT &T West, AT &T Central, T-Mobile East, T-Mobile West, T-Mobile Central, different email distros. We had a whole database of that stuff. So the way that the ticket tool started was an Excel spreadsheet where I went in and said, what kind of tower is this? It's T-Mobile. Which region is it? East. And then it would look up the phone numbers and email addresses.
01:27:41
That's how it started. so the most, the biggest thing I say when it comes to any automation is don't think about the big end result. Think about the little pieces along the way that you can automate. Perfect example of an automation I run. I use a program on my Mac called uh Keyboard Maestro. And one of the processes I have is my lab, because it's not a production environment, has the same static username and password for all my devices. So I can log in quickly and do that. I have a keyboard shortcut that does
01:28:11
username and then it hits the tab key and then it puts in password. Now that saves me whatever amount of time the typing in admin and then P at five five W. Now that's not really my password, but you know, like there's some, some crazy password in there. Whatever amount of time that saves me, let's call it five seconds, you know, two minutes to figure out how to write that script. Right. And now I save five seconds, 20 times a day. Right. So it's not about, it's not about creating the end product. It's about talk about the journey, right? It's about.
01:28:41
It's about the little pieces that you could automate along the way, which is why I said I never wrote scripts initially that would log in and make a change. I wrote scripts that would give me the, give me the thing I could copy and paste in so that I, you know, I could do that. That was what the actual next iteration of the ticket tool was, was it would copy that initial notification, which is, you know, the BNOC has noticed a T-Mobile tower in the East region. uh We're investigating, SAMS will be sent out, whatever. Remember we just have to write those long emails.
01:29:11
I automated that process and all I did was I inserted the variables T-Mobile, East, and then investigating and the rest of that email was the same. And that was just iteration and iteration over time. And that's why I say even with the stuff you're looking at in the book, just a little bit that you learned today in what you were doing can absolutely be used to write very basic scripts, but it can automate things like log into something and put your password in or build a base configuration for a switch or a router. uh
01:29:41
It's, it's not going to change the world. It's not, that's what I need job, but it's little bits and pieces. I can write a base config, cause I've written a million base configs right over my career. So if I could write a base config using Python, a very simple base config, a host, like you said, a host name, the management, whatever. think that would really be, that would be my second win. My first win was logging into in the show of our with netmico. And I'm like, Oh my God, this is amazing. It worked. Holy crap. It's not super hard. I think if I can write a base config.
01:30:10
So it's probably studying, supplementing it with some networking context, maybe a little bit of home automation stuff. And you like, so Max just put in the chat and it reminds me of what you always done. You say you make the time, like you have to make the time because you have to. My reason, my excuse has always been an honor the time. And then I think of things I've accomplished in my life and I made the time and that's discipline. I made a decision that I'm going to do something no matter what, because I can't...
01:30:38
Running is an example. started running a couple years ago. I hadn't run in a decade for a million different reasons, but I started to run and now I've made the decision almost every day. I'm going to get up and I'm going to run because it helps me. I feel better and blah, blah, blah, blah, blah. But that takes an amount of discipline. There was me for 10 years that said I can't run for 17 different reasons, including I don't want to get up earlier. I'm tired or I was up too late or whatever. But the day I made a decision to make a change in my life and then apply that will like
01:31:08
I'm gonna do it no matter what, which I guess is discipline, and you can apply that same thing, I guess, to this context. Like, I could continue to do it manually and artisanally forever because I think it's easier. Or I can make a decision, which is what I'm trying to do with this study live streaming. I'm gonna make a decision to work on this until I get it because I've given up so many times. So even though it's boring to watch and I freak out every time I do it, and I don't know if I'm ever gonna get it.
01:31:36
Just like everything else I've learned or everything else I've decided to do that is hard and impossible. I almost quit my networking studies over, I think there were two things. Subnetting was one of them. I almost quit. spent thousands of dollars and went to Netacad and that was the only way I was going to get out of climbing cable guy poles and getting beat up and chased by dogs. And I hit subnetting and freaked. I'm like, I can't do this. It's beyond me. It's math. I don't get it. And the irony is you don't do a ton of it in your real job. And honestly, I still suck at it. Like, I mean, I can.
01:32:06
explain it at a high level, but like I was a Wang guy, so we use slash thirties everywhere. can, if it's a 24, it's easy. I can see it. But once you get into like, well, what does a 17 have and how many things to them? Like, man, I don't know. And you're right. You don't use it. But I guess my point is there's like a, if you make a decision, it's anything in life, but I'm just, I see how successful you've been in automating things and I see how much I've struggled with it. And I think I've made the decision historically to not do whatever I got to do to be able to automate.
01:32:35
and make my life easier and buy more time where you've just made the decision like I'm to do this a million times that's going to make me crazy pardon me so I'm going to automate it where me I've always gone to but Jeff there's 13 calls in queue and I got four tickets from last night and I'm on to fiber cut bridges like when am I going to learn automation but you just did I was full of excuses of like why I couldn't you didn't even think that that even crossed your mind you just did it and I can see other contexts in my life where I've done that
01:33:03
I'm making a decision and I'm doing it and I don't care and you succeed at it. So I think you have to make a decision to learn this stuff. And this is probably obvious to people, but for me, I don't think I ever made that decision until recently. And here we are. And I think, I think I'm, I think I might be the opposite of what you think. You think I'm disciplined and, and want to spend a bunch of time learning it, but it is, I'm incredibly lazy and refuse to do the same thing over and over again. So I think you're efficient. I don't mean lazy. What I mean is I get.
01:33:32
bored really easily. had the worst job I ever had. I was in a boarding high school and the job and I wasn't into wasn't in trouble. was just you're in a boarding high school. Yeah. I started to at homes to 16. No, it wasn't that kind of school was like a blazer and you were like little almost strict Christian school. did that. one of the things we did is it wasn't child labor, but we were children who were doing labor. What we would do is we would do things like
01:34:01
You know the shirts that would get folded and they'd be put into plastic and then stand out to like Sears or whatever We would be the ones that would fold those shirts or we would take those little there's little things that go on the back of a coat hanger that says XL and we'd clip them on there and it was basically factory work and I hated it I could never do the job I could never meet my numbers and there was no way to automate that because it was like someone was joking Why don't you write a script to change your oil?
01:34:28
God, I can't. If I could write a transcript that would change my oil. Someday with a robot. Someday with a robot, I will do it. m Tech isn't there yet, but that was the worst job for me. so the same thing has been true of me even in networking is there are times when you just have the same stuff that you end up doing and they're just these redundant tasks. And I just refuse to do a redundant task that can be automated. We have the tech.
01:34:58
And so I think what's happened is over time by just automating everything in my life like that, I've just learned a bunch of different automating tools. Like I rattled off languages that I forgot that I knew, cause I ended up still writing uh in using visual basic a ton. I write VB scripts constantly cause I automating some stuff in Excel. Cause everybody's constantly giving me tables that I have to look at. like, I don't know what tables have to do with networking and with engineering.
01:35:27
But somehow I spend half my life in Excel. So I write visual basic scripts to take these same things they give me and give me the data that I want. So it's stuff like that that I've always done because I just can't stand the redundancy. Whereas my wife, if you give her a task that is just the same task over and over, she loves that. She's in her zen place. I've often joked that if she could just go back to high school and do what I used to do, she would kill it.
01:35:56
It was just never me. So I automate the stuff you can. But again, you don't have to write the end all be all program. You write it in little chunks. And that's how you learn to program anyway, is every program starts the little bit that you do a little bit of automation. And so when we do an episode on vibe coding, I'll show you how I write a program off to kind of come up with a task that I can do. But it's never the full program that I'm writing. It's always a little pieces. And it's the argument of how to eat an elephant one bite at a time.
01:36:26
Programming is the same way. honestly, now that Chad's GBT's got so good, you know, which has been a relatively recent event in our lives for my entire production career, I didn't have a tool like that. Now I can ask, right? Like I could just go in and be like, how do I automate this? It'll probably give me, you know, what do you want to do? What language do you want? Or do you just want to vibe it? And like, here you go. And so really there's no excuse anymore other than not making that decision. And I've only recently made that decision. I have a job where I'm
01:36:55
I'm in network automation. Again, my experience being out of work, I'm like, I need to upscale. This is ridiculous. How long am going to complain about this? So for me, it was the pain, you know, not keeping my skills sharp and the industry started to move and I, and I kind of, you know, got left behind, so to speak. So here I am catching up and I'm enjoying it, but I appreciate you. Thank you for being here. It's been great. I think we did two shows tonight, which I really appreciate because the reading out of the textbook, I wasn't sure how it was going, but I think we actually got.
01:37:24
A good show. Afterwards. Welcome everybody. Yeah. I don't know how I'm to edit this all together to make it one good show, but I think we have to do this second show first so people don't listen to me reading a textbook and tune out and go, Oh my God, this is terrible. I'm out of here. So thanks for hanging in here for two hours. It's, been a pleasure for me. Um, for sure. We already signed off. So I guess I don't have to do the sign off. Um, are we out of here? Is that it? Is it time to go eat ice cream? it's been two hours. High price.
01:37:53
All right, thanks, man. Thanks everybody for joining. Appreciate it. for taking the with us. Yeah, thanks, man. I'll talk to you soon. Talk to you soon, everybody. Hey folks, if you like what you heard today, please subscribe to our podcast and your favorite podcatcher. You can find us on socials at Art of NetEng, and you can visit linktree.com for links to all of our content, including the A1 Merch Store and our virtual community on Discord called It's All About the Journey. You can see our pretty faces on our YouTube channel named the Art of Network Engineering.
01:38:23
That's youtube.com forward slash art of net edge. Thanks for listening.