How to Learn Your First Programming Language

in programming •  2 months ago 

Introduction

Programming could be a terribly helpful and appreciated hobby. There are few higher feelings than once somebody sees you employing a program you lashed along to create your life easier and says that it's very useful. the majority have, at some purpose in their lives, really wished to be able to do one thing on their pc or phone and been unable to. If you recognize a programming language, then there's typically a good likelihood that you simply will write a program to accomplish that task yourself. whereas there are an enormous range of programming languages, several of them have tons of similarities; this suggests that when you learn one language quite well, in most cases you may be able to develop a brand new one way quicker
Limits

One factor that every one new programmers must come to term with is that the quantity of your time learning a programing language takes. though once you became associate skilled you'll be ready to write many programs quickly, you need to keep in mind that {a lot of|that many} programs have taken whole groups of expert developers years to create. therefore it's necessary to grasp that knowing a programming language or perhaps several isn't enough to write down a number of the a lot of advanced programs you have got seen. Don't take to be this new hobby as how to avoid wasting yourself a lot of money, as writing your own version of most of the programs that you just ought to obtain currently are out of your reach
The most necessary factor that a replacement engineer must recognize is that the "Learn Programming in twenty four hours" kind of books are merely not true. A a lot of correct title would be "Learn Programming in ten,000 hours". If you set 24 hours or every week into learning a language you'll not be making successive Windows or a new, state of the art game. it's doable to find out to put in writing a program in 10 minutes, associate degreed very all you wish to learn a new language is your favorite search engine, however you will not be an expert. The only thanks to become associate degree knowledgeable is way like learning the violin; the solution is observe, practice and practice some a lot of
Selecting Your natural language

currently that we've got examined the restrictions and handled a number of the additional unreasonable expectations, those of you continue to desperate to learn to code are happy to understand that programming isn't a tough issue to start out learning and can not need you to disburse large sums of money. If you're reading this text on-line, you have already got the resources to start with thusme languages, so allow us to contemplate what your first language got to be.

historically the primary language a programming newcomer learns is either Visual Basic or Python. the primary issue to know is that these 2 languages are terribly different. the best distinction is one amongst price. Python is completely free; you'll begin writing python now with simply a text editor on your computer, although if you're on Windows, you may most likely got to install it first. but Visual Basic, often abbreviated to VB, is each free and not free. On the upside, VB may be less complicated for newcomers to be told as a result of it permits you to create the interfaces (the a part of the program the user will see) by dragging and dropping the different elements very like coming up with it in some basic art application. The version of VB newcomers learn is sometimes Visual Basic 6, however this can be rather out-of-date and has been discontinued. thus lately the version learned is often VB.NET which may be significantly less easy for newcomers
VB.NET should be developed within what we have a tendency to decision an IDE (Integrated Development Environment); this is often primarily a special program you employ to jot down different programs. They conjointly exist for Python, however their use is completely optional. The free VB.NET IDE is termed Visual Studio specific. At the time of writing, the newest version is Visual Studio Express 2010. Unfortunately, by victimization the free version of the IDE you're restricted with what you'll be able to do, and any programs you produce can't be commercially oversubscribed on. Regretfully, the total paid version of the IDE isn't cheap, and possibly not applicable for a hobbyist, however as luck would have it to be told VB the free version is enough. In practice, only a few industrial programs are developed in VB these days, but the Visual Studio IDE permits you to use several different languages. The familiarity you'll develop by victimization it'll conjointly enable you to use the ability of the IDE for development in many other languages. Some will argue that nearly each language may be developed in an exceedingly text editor which they're far and away the foremost versatile way during which to code. whereas this is often technically true (and I do recommend making an attempt development in an exceedingly text editor to match once you get a bit better), i might powerfully advise learning your tongue with a correct IDE.

whereas traditionally, individuals learn Python or VB initial and these are typically what's schooled at schools, i might not recommend either of these. i'm of the opinion that your first language ought to still be helpful to you one it's served the aim of serving to you learn the basics of programming. If I had to recommend one in every of these for newcomers, it'd be VB.NET as typically the foremost complex a part of programming is that the graphical facet of things and in VB.NET this is often terribly easy because of the drag and drop interface. These 2 languages are often used as introductions as they're very tolerant of mistakes, and permit you to become assured in programming principles without concern a few ton of the additional complicated matters
For those brave souls among you, i'd truly counsel Java as your first language, albeit it may be complex, and is so not a typical alternative for a primary language. Java programs are totally different to most others in this they are doing not run on your laptop. The user downloads Java, then your code runs on what's known as a VM (Virtual Machine). this suggests that your code runs in a very special place Java sets up for it - a pretend copy of your computer - and handles the interpretation of this to the important machine for you. This means that Java programs are "cross-platform", which means that they're going to for the foremost half run on Windows, Mac, UNIX {operating system} associate degreed most alternative operating systems.

Java could be a smart language to learn, because it is extremely widespread and useful. Furthermore, it's very powerful, and is obtainable free for each hobbyists and business uses. However, in distinction to VB and Python, it doesn't tolerate mistakes and needs you to be very specific concerning everything. it's additionally an object-oriented programming language, that is a very advanced issue which i'll in brief try and summarise. Languages like Python associate degreed VB are what's referred to as procedural languages, which means that the lines of code are run one once another, whereas Java could be an object-oriented language. object-oriented development is a term thrown around tons recently within the programming world, and whereas not perpetually applicable it's typically thought of a decent idea. At the foremost basic level, an object-oriented program is all about objects. associate degree object is an "instantiation" of a "class". a category is a blueprint wont to describe one thing sort of a cat. the category contains each the information about the cat adore its name, age and owner likewise as "methods" that are basically actions the cat will perform, adore miaow. associate degree instance of the category "cat" would offer you a selected cat. However, this can be not a Java tutorial, so if you're brave enough to experiment with Java you may stumble upon this yourself in additional detail. it's value noting that VB.NET and Python each have support for object-oriented development, and Java has the potential to be used procedurally, however these don't seem to be the languages' primary supposed uses and are not often used. If you probably did not perceive that comparison, don't worry concerning it too much. Object orientation is tough to urge your head around, however any basic Java or alternative object-oriented language tutorial can have you ever perceiveing everything in this paragraph.

A final reason Java could be a smart natural language is that it's similar in some ways to Javascript, that is a wholly different category of language. Javascript is a scripting language (as is Python), and learning Java will mean you understand Javascript moderately well. The distinction is between scripting languages and traditional programming languages is outside the scope of this article, but as an oversized generalisation scripts are typically used for machine-driven tasks whereas programs are used interactively by users. this can be not completely true, as each styles of language are used for both tasks and most net programs are in-built Javascript.

As for the particular language you pick, it's entirely up to you. Some may opt for the standard beginner languages or be brave and experiment with Java. a number of you'll have already got your eye on a language or fancy one in all the additional specialist languages like theme or Prolog. no matter your choice, the manner you may find out how to program is that the same
IDEs, affirmative or No?

several of the purists say that day are a nasty idea, Associate in Nursingd are full of redundant tools and menus that take up space and time to learn. whereas this can be true, I feel that an IDE is certainly worthwhile. many folks supply free IDEs, resembling Eclipse and Netbeans, for the additional fashionable languages. there's conjointly Visual Studio, that i discussed previously; it's terribly intuitive, very powerful and it supports many languages (much as Netbeans and Eclipse do). If you selected to use Java i'd counsel Netbeans, as there is a prepacked version of Netbeans with the JDK (Java Development Kit). Most languages would like an SDK (Software Development Kit) to figure with them, and obtaining it put in properly and coupled to the IDE is commonly onerousest|the toughest} a part of the procedure. Visual Studio already comes with the event kits created, that makes life easier, however alternative languages like Java and Python is quite hard to line up properly. this can be why I recommended the Netbeans + JDK bundle for those experimenting with Java, because it handles the complicated set up for you, which is able to prevent hours of suffering.

There are, in my opinion, 3 major blessings to employing a totally featured IDE. Firstly, they're typically extensible, which means that there are several free plug-ins that would build your life tons easier after you get a bit additional advanced. Secondly, and most importantly, is that the ease with that an IDE permits you to right your code. Most day allow you to set breakpoints within the code, which is able to make the program stop once it gets thereto purpose and let you step through it line by line, thus you'll examine the contents of all the variables at any time. (For those of you who don't recognize what a variable is, i will be able to in short explain. A variable could be a bit sort of a railroad station locker. You provoke one sufficiently big to carry what you wish to store, and if what you want to store is that the right shape, it is hold on there. after you write a program, any knowledge you want to store briefly will be control in one in all these till you're finished it.) because the old programming speech communication goes, if you have got not found any bugs, you are not trying laborious enough. virtually no non-trivial program will work 1st time, and attempting to figure out wherever the matter lies while not the utilization of a computer programme could be a pain i'd not would like on anyone. Finally, an IDE will usually offer you recommendation on a way to fix problems within the code. this will be terribly helpful for fixing bugs, and saves you having to resort to Google each alternative minute
Learning the Language

currently that you simply have a language ANd an IDE, it's finally time to find out the language. This, as you will or might not be shocked to learn, isn't complicated the least bit - it is simply time consuming. to find out programming for the primary time, there's no higher method than exploration. shopping for a book that walks you thru steps won't teach you anything, as you may not perceive the reasoning behind what they're doing, and other people typically get pessimistic by the tedium.

The key to learning programming is to own a goal. think about a task, resembling a system to stay track of wherever you're altogether the varied TV shows you watch, or a system to allow you to verify all the books you own in a very specific category, or, if you're feeling brave, attempt to replicate a part of one thing that you simply use on a daily basis. My recommendation would be to begin small, maybe by creating a sequence of message boxes that insults the user or a extremely straightforward calculator. it's necessary after you initial start that your goals are interesting, difficult and entertaining. If you are trying to create very boring programs you may quickly get disheartened, thus attempt to inject some comedy into your program. The calculator could be a superb introductory program, however once you get the overall plan it's necessary to line quite bold goals, as if you retain doing straightforward stuff you will ne'er learn something new. it's important to do to include a number of the information you have got gained from previous work. one amongst the explanations most books fail to show programming well is that they use tiny examples for every thing they introduce, whereas what you actually have to be compelled to do is set up the task while not considering what you may need to accomplish it. this suggests you will be ready to code a number of it exploitation what you already know, however most importantly, you will not savvy to code some of it. the most effective thanks to learn is to find out by doing. choose a full program that will a task you needed to try and do on a pc within the past, work on it, and after you are finished you will have learned loads and you will have a helpful (or a minimum of entertaining) program that is way higher than some toy program demonstrating lists.

I even have aforementioned that you simply learn by selecting to try and do comes wherever you're unable to do bound sections, therefore requiring you to learn, however however does one move checking out a way to do them? It' simple, and possibly the way you found this article. attend your favorite programme (like Google) and seek for what you wish to do - for example, search "drop down list Java" to seek out some samples of exploitation change posture lists in Java. as a result of you may need it for one more task, and not simply to re-do a similar issue the examples did, you may ought to play with the examples you discover and take a look at to urge them to try and do what you want. simply search every bit you would like, and presently you will find that the majority of the fundamentals are as natural as rousing within the morning, and you probably did it all while not defrayment atiny low fortune on books, without losing interest and hopefully whereas being entertained. to the present day, if i'm bored, I typically get away one amongst my terribly initial programs that is just an inventory of boxes and a random number generator. it's your task belowtake|to do} to fill all the boxes such the numbers the random number generator provides you're in a veryscending order - if you don't leave area and can't work variety in a hole then you lose and should begin again. It' an easy program, however it took loads of labor after I initial created it and that i learned a lot from the experience.

Once you have got a couple of tight sized programs under your belt, you may notice that you simply know the language well. you may conjointly notice that it's rare, irrespective of however well you recognize a language, to be ready to write a program while not resorting to Google a minimum of once simply to see something. thus therewith in mind, it may be argued that you simply learned the language without ever really attempting to find out it. Clearly there are standards and smart practices that you might not obtain on your own, however as you see additional examples and browse the comments you will find you adopt your own standards rather quickly.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
Loading...