=Basics=<span style="font-size: 13px; font-weight: normal; line-height: 19px;">Basics of Programming=Programming</span>= //[[user:lbjoseph]]// ---- =Introduction= [[toc]] I remember having the desire to learn programming when I was 12 - I just wanted to make my own games. Sound familiar? Thinking it would be educational, my mom bought me a copy of [[@http://www.libertybasic.com|Liberty BASIC]]. It was educational, mind you, but it was so engaging to me that she had a hard time getting me to do anything else for the next few years. Yes, I was a normal teenager and did things with friends, but most of my spare time alone was spent programming or reading about programming. Learning and experimenting pays off, however. As you can see, I am now writing this article to help //**you**// learn the basics of programming. ==The Problem With Programming Tutorials== If you try to find a good beginner's programming tutorial online, you'll usually run into one of the following problems: * They're not youth friendly. * They expect you to already know a different programming language. * They start by teaching very difficult and often boring programming languages. Instead, this tutorial tries to dotutorials should have the following:following characteristics: * Aims toProgramming tutorials should be easily understood by youth and adults alike. * Doesn'tProgramming tutorials shouldn't expect you to have the slightest clue about programming. * Teaches theProgramming tutorials should teach a fun and easy to learn Liberty BASIC programming language. ==Free Version== Yes, you don't actually haveThe end of this article links to purchase Liberty BASIC to follow this tutorial. You will probably want to, though, once you see what all it can do.a series which does just that. There is a free version of Liberty BASIC known as [[@http://justbasic.com|Just BASIC]]. It's missing a few features, but it's great fun nonetheless. All the code examples in//**However**//, you should finish reading this article will work in Just BASIC - I promise.introduction so you know how to go about learning and finding help. ==Where to Find Help== Liberty BASIC and Just BASIC have greathas an //**awesome**// online communitiescommunity with dedicated supporters who are very helpful. You can find them here: [[@http://www.libertybasic.conforums.com|Liberty BASIC Forums]] [[@http://www.justbasic.conforums.com|Just BASIC Forums]] Also, Liberty BASIC has an online version of the help file. This is //**the**// reference to have. [[@http://www.libertybasicuniversity.com/lb4help/|Liberty BASIC Online Help]] If you do nothing else, at least join one of the communities. They are great funLiberty BASIC Forum and you can find lots of neat programs, games, hints, and interesting conversations.check it every week or so. ==Before WeYou Start== Liberty BASIC will beis referred to as LB in this article. If you're using Justarticle, as well as many others on the LBPE (Liberty BASIC (JB), the stepsProgrammer's Encyclopedia - where you are the same as they are in LB. So just follow along and pretend to know what you're doing, and everything will be good.right now). Experimenting is a great wayIt's easier to learn how to program.read and type that way. A lot can be learned by experimenting. If you have an idea of your own,to try something, go ahead and try it. That's pretty much the only way to find certain things out, anyways. Programming requires //**you**// to take the initiative and be willing to learn. Part of that is experimenting. Also, none of the provided code in this article will hurt your system.Do you //**hate**// math? You're going to like programming. =MainWin= Interestingly enough, LB has a default terminal/console style window called the MainWin. As it's name implies, it is the "main window". It's quite versatile, andDo you can easily decide not**//love//** math? You're still going to use it when you learn how to make your own windows later.like programming. However, this window is just what we wantProgramming allows you to start with. It's really easyapply the science of math to use. And ifsolve problems in an organized fashion, but doesn't require you spend all your time working with odd symbols and weird patterns of thinking. Programming is pretty natural, once you ask me, it enjoys its job.get the "hang" of it. Try copying and pastingHowever, if you're writing a program that requires a lot of mathematical computations, you would have to be able to figure out the equations you need before you program them. You can't program anything you don't understand. The only way around that is to use someone else's code below into the LB editor.who did understand what they were doing. In which case, you only need to understand how to use their code - which is often simpler. (If you haven't copied and pasted something yet, you're going=No Brains Required= You don't have to love it. Just select the text with the mouse below [drag the blue stuff over it],be super smart to learn programming. You just need to be **//willing//** to learn. The online forums and press Ctrl+C. That puts it on the clipboard. Then click inside the LB editortutorials available for Liberty BASIC are very supportive and press Ctrl+V. That pastes the text inside there.) [[code format="lb"]] Print "I'm a noob." End [[code]] Click the blue play button, or press Shift+F5easy to run the program.follow. All you have to do is spend a little time reading and practicing. A window should pop up saying "I'm=Jumpstart= There is a noob."series of lessons (with pictures!) that teach programming from the ground-up on the LBPE. This series is called "Jumpstart." If you have problems gettingThis author highly recommends following the code to run, make sure it'sshort lessons until you've taught yourself the only thing inbasics. Also, there is a wealth of information available here on the LB editor window.LBPE as programming reference and how-to's. Not entirely unexpected. That window is the mainwin,Be sure to read everything. Skimming and speed reading does //**not**// work with programming. You have the PRINT command tells Liberty BASICability to put a new line of text in the mainwin. Simple enough? Let's try it again. [[code format="lb"]] Print "Hello, world!" Print "Whoa. Thisfocus and pay attention for as long as you like. Your attention span is on the next line!" [[code]]entirely up to you and how much you'd like to learn at a time. Don't overwork yourself, either. Be sure to get up off your computer every so often and take a break. That's usually when this author figures most of his problems out. =Third Part Title= Text here. [[code format="lb"]] 'code here [[code]][[jumpstart|Begin Jumpstart]] ---- [[toc|flat]]