There has never been a better time to learn to code and never so many reasons for doing so. Being able to program or code at any level is useful and has a wide range of practical applications. Everyone is aware by now of the potential financial rewards from coding a killer app or website. But less advertised are the non-monetary benefits of learning to code. Below is a coding guide for all interested in coding.
Once you’ve decided that you want to learn to code however, you will suddenly find yourself faced with choosing between the myriad of coding languages that exist. The best one to start learning will depend on exactly what it is that you want to achieve. Some programming languages are better for web development (PHP, HTML) others are better for simple tasks that require either no output or a text-only output (Perl, Python), while others are better for complex programs requiring 3D graphics (C, C#, C++).
How Do I Know Which Language to Learn?
If you want to learn to code, then there really aren’t many languages you can choose that will be detrimental to the effort. However, for your very first coding language both Perl and Python will allow you to get a grasp of the fundamentals without over complicating things and these languages make an excellent start point.
If you are looking to code for web development then HTML, PHP, and CSS are all good choices but are designed to accomplish very different things than either Perl or Python. The reality of web design is that to be at the top of your game you will need to know a few different languages. This is because websites consist of many different elements. The webpage itself will be in HTML5 but it may well make use of web apps that use Java or Perl.
Where to Learn
Check out http://www.codeacademy.com for tutorials in the different languages; trying out the basics of different languages will give you an idea of what they’re all about. There are numerous books dedicated to teaching how to code but these are often quite expensive.
Variables
A ‘variable’ is anything which you assign a value to. So, we might make a variable that we refer to as X with a value of 5. If we were to then write X + 1 we would get 5 + 1 = 6. Variables can be integers (whole numbers), flops (floating point numbers which contain a decimal), or strings (words and letters).
Different languages handle these in different ways but for all languages those three types of variable will exist. So why are these so important? Well whatever program you hope to ultimately write, it will be manipulating different variables and where you source these from will affect which language you should learn.
If you want to write a program that can take input variables and apply specific formulae to them (a physics calculator for example) then you will want to use the most basic language available as number manipulation is incredibly simple to program.
If, on the other hand, you want something that can create and read from a database, then you will want to use something like PHP. You can, use PHP find in string and search for specific elements from a dataset.
Once you have decided what you want to ultimately accomplish with your programming, the best thing to do is to look on either Google or Stack Overflow for advice on which language would be best suited to your needs.
You must be logged in to post a comment.