 Okay, I'm again visiting my friend James and in the last talk that I did with you. We were finishing up talking about the how the Unix philosophy of do one thing do it well and I commented on how I've mentioned people always say oh programming is so hard Which being creative with programming I would say is the most difficult part But most time I'll give you example I was talking to someone in my IRC channel once and I was giving the argument of Programming is not that hard. Any program you write should only take a couple minutes I don't think I said that but basically that and he's like well, I want to create a to-do list I'm like that's simple enough. He goes. I want to start in the categories That's simple to do too. He goes. I want to have different users do this You know I'm just like right his problem is he's looking at that I want to create this big project and my point to him was What you want to do is not hard. It's going to take a while because you want to do a lot of things But each of those things is actually pretty easy Especially if you think ahead of what you want to do and you see program with that ahead of time and I Definitely when I writes programs for the most part, it's like it does this It's like on my phone like I'll write shell scripts So I don't have to take out long commands It's like I run this command and it figures out everything I want to do based on system information There are sometimes though where I think that obviously a What do you call it like? Microsoft Office a suite where there's like a suite of software something like that like like you're editing a video Yeah, it's great that we have a command that can cut the video or this or that but you have To have a suite or like Photoshop or GIMP. It's like yeah I can have one command that converts the video black and white, but it's nice to have that suite with all the different functions and and a lot of that can be done with plugins Which is kind of like writing individual things, but at the same time you still have the full source. Oh, yeah. I mean, yeah, yeah so Not really sure really hard to edit a photo if you were just piping around an image from one right think to another now It would be great if you want to do the same thing to every photo so you can be like Black and white adjust contrast this that but when you're sitting there and you try to tweak it Yes, so so there are cases where you do want a bigger project, but for the most part I personally think that almost all software should start from the command line and then a GUI interface should come later on Even with video editing. That's the case with like Kaden live which uses MLT as the back Well, yeah MLT is the background and there's melt M E L T which kind of makes Using melt into a scripting language story now I've done tutorials on that but really everything almost everything that can be done in Kaden live Which is a full video editing software can be done in a script using MLT So now I'm doing a lot of talking and it's for me to talk to you. I know and I love it. So comments No, no, no, yeah, I definitely think well, okay. Well, I can yeah, you want me to ask a question. No Okay, well, I was gonna say I think I think that is That's a sign of you know Yeah, obviously you could take that idea to the extreme where like everything does something one thing well And that's it But I mean if you take that to far enough extreme well, then sort shouldn't even be able to reverse order You should have a right to reverse sort and that's well, you're reversing and it's sort of yeah, so so so But what I think what I think really is a testament to is when you have when you have command line abilities to run To run a function to run a a software and it has GUI interface Um, I think it says something about that the way that they wrote that Was that they wrote components that could do one thing really well, right? They didn't just focus on well There's a GUI and there's a button and that button's gonna do something they really literally thought well We need the ability to make something black now we just attach to the GUI the ability to run that right and a very simple example of that I'm sure you've probably used nmap. Yeah, and then there's Zendman. Have you ever used Zendman? It's just a GUI interface. Yeah. Yeah. It's a very very basic. Yes, right? Basically you choose some drop-downs and checkbox and it puts the command right there and then runs it and gives you GUI output and I think it does some sort of visualization visualization of your may jumps it did Yeah, other than that, you know, it's very very basic some some Backgrounds like like I'm saying MLT Kaden live is came live is pretty much a program itself that uses MLT as a back end And I'm not saying everything needs a GUI interface and you might disagree and honestly You don't need to disagree with me because I feel like it's it's a testament when you're when something you're writing is running on Terminal as well, but everything doesn't need a Terminal interface, but I think when you're writing the software You'll know when you're writing it well Because when when when your requirements change or when when what you thought it needed to do changes Or you need to optimize it and you need to change something. How long does it take you to change it? Right, and so I think when you find when you when you write the functions correctly when you make the rate abstractions when you When you modularize your your programming correctly, it's very easy to make a change and it not cascade across your whole project Yeah, so that's that's kind of going back to the like do one thing Well is you want everything you write in your project do one thing well Even if your whole project ends up doing a lot of things at the same time Sometimes I go the reverse way where I think too much ahead of I might want to do this I might want to do that and I take forever ever to write it to just in case I do something that I will never do Yeah, no, I definitely feel the exact same way So there's a balance there and I and I usually feel less is more because I usually find as I go I quickly find where I should have Pulled something out and it's actually really quickly if you identify it early and you start pulling It's actually pretty easy and then there there's like a lot of I think a lot of rules That are that are guidelines are not rules They're guidelines that say things like you shouldn't write a function that's bigger than a page Like you should be able to see the entire function on your screen right or or each line shouldn't go off the side of your screen You know because that really says something like if you really have a block of code that that's that's that big It might be saying that part of that function should be modularized and you can kind of be pulled out Right should be another function that's called by that function it needs Yeah, because it's obviously doing something other than that one function right and again Like obviously everyone's gonna comment to you that like oh well That that's a horrible idea because of this and that and there's always exceptions to rules and I would hope it's working Fine, I don't care if it works for you great But and I would hope my viewers realized that we're talking generally Yeah, sure a lot of times when you're talking about software talking general ideas Obviously there are going to be some exceptions to almost everything that we say Right and and but what you find is that in every paradigm every programming language has Kind of the way to abstract those ideas The most classic one I think is an object-oriented programming language Where you're creating an idea of an object and that object encapsulates You know the functionality for that object and the data for that object And and that just becomes a way that even if you're you know Even if you're not an experienced programmer when you start thinking in terms of that encapsulation You're almost kind of forced to modularize things very well you know So if if you were going to write a program that involved playing cards And and maybe you write an object that is a card object or maybe you write an object that's a that's a hand a poker hand You know you write a card object and the poker hand object can interact with a card object and say something about what your hand is And then later on if you decide well, I don't want to play poker. I want to play blackjack Well, if you wrote that card interface well enough It's it's easily changed from one to the other because you have your deck with each of the cards and you can use that without um Yeah, the uh going back to the Not getting too complicated I find a lot of my viewers and I did this in the beginning too You want to make it fancy looking gooey and it does all this stuff And I just find a lot of people try to jump ahead and try to Not necessarily advance things, but they don't have the basics down yet But I also don't understand at the same time if you sit there trying to learn the basics You might get bored and never continue, you know, it's like and everyone learns differently um But like uh, you and I were talking once it's just like Almost everything you want to do someone's already done. Yeah, uh, and your new idea is basically putting those different things together So if you want to and well, I have people ask me I think a few times a while a long time ago I did python and gtk user interfaces gooey interfaces. Yeah And I showed people how to Use a text input type in that text input click a button and it takes that text and puts it in a label Yeah, people ask me how do I write to a file and I would give them only to my python how to write files And it would confuse them because like well, how do I get from the gooey to that? It's like it's the same exact process. Yeah, sure instead of taking this variable You take the variable that I showed you how to grab here And put it into the file. Yeah, so it's like people the hardest part I think for a lot of people with programming. It's not doing these individual tasks It's being the um the creative and how to put those things together And it's one of those things is it's just going to click one day I tell you my first 10 years of programming which was in windows using mostly batch files not batch files, but batch files And visual basic which most of my visual basic was making gooey interface that called batch commands um First 10 years I could do all these different things I could do network connections to where I can send a signal to a computer that makes a cd rom drive pop out And then play some music I did not understand any of it and really it wasn't until I got to linux and I started Um since there's more people working at like with I found at the time at least I'd go I type in how to do this and there's the code for visual basic. Did I understand it? No Yeah, I didn't even do what uh, I did what a lot of people I still see do where I would take a Text input in my gooey right and use that as the variable instead of creating variables because I didn't know how to use variables properly. Yeah I'm gonna end on that note sure about how bad of a programmer. I was And how I probably still I'm not well, and then there's there's a difference between Knowing how to call function and knowing how to write a program right like that I think that's a another big takeaway and and not to say like The first step to learning how to write programs is just figuring out the primitives figuring out how to call the functions So I don't mean to discourage anyone to be like well, you're not a programmer But it's just that they're that you know When you use them long enough you start to get a better process of using it. So anyways, I'm sorry Anyway, thank you for watching. Please visit films by chris.com. That's chris of the k There should be a link in the description and thank you james for joining us And I hope that you all have a great day with the great bass music in the background It's gonna get flagged for copyrights with the music in the background on this video Have a great day Right If you enjoy my tutorials and would like to see more Please think about contributing to my patreon account at patreon.com forward slash metal x 1000 You didn't flip the screen. Yes, that's gonna bother me