It seems like a lot of people that I talk to are at least mildly interested in programming for a variety of reasons. I assume, if you’re reading this, that you’re either a programmer who’s curious what I have to say about the learning process, or you’re a noob (I mean that in a friendly way) that doesn’t know where to start. In this age, programming is incredibly important given the amount of technology we are surrounded with. It’s a valuable and useful skill whether you use it for fun or profit. The best part is…you can learn to be a good programmer for free. All you really need is a computer and an internet connection.

First of all, you will not learn to be a programmer from this blog, your local university, a book, other programmers or Google. You might learn to be a better programmer from these sources but ultimately you will learn to be a programmer by writing code. You will learn to be a good programmer by writing a lot of code.

Second, I am a PC programmer. If you want to learn to write software for Macs or iOS this blog may not entirely apply. That being said, many of the points here are general and apply to any platform.

 

What language should I learn?

A better question is “what do you want to do?” There are loads of programming languages and all of them have strengths and weaknesses. Under the hood all higher-level programming languages are the same. Yes, you read that correctly. While syntax varies and each language has its own personality, the core concepts of programming are basically universal.

One thing I would strongly recommend is that you do not learn JavaScript first. JavaScript is hard to debug, there are tons of really bad examples online and it will frustrate you and teach you bad habits before you start learning anything useful.

You will get different answers depending on who you ask but here are my opinions about some good starting languages based on what you want to do. For each programming goal I will describe some of the challenges you can expect, a good starting language (remember that this is my opinion) and some of the other tools you will need. All of the tools that I recommend below are FREE and I am not affiliated with any of them.

 

I Want to Build Websites

You may be disappointed to learn that most websites are not built with a single programming language. The absolute first building block is HyperText Markup Language or HTML. HTML is not a programming language it is a way of formatting or “marking up” text so that a browser can display it in an organized format. A companion to HTML are Cascading Style Sheets or CSS. A CSS document is a series of styles that tell the browser how the HTML should look.

Programming websites involves writing code that generates HTML and potentially CSS dynamically. For instance, lets say you have a site with 1,000 products. You could create 1,000 static pages in plain HTML but every time you had to change a common element on the page you’d have to do it 1,000 times. Instead of doing this, you could create a program that has a page template and fills in the product information on the fly. If you need to make a change that’s common to all pages you just change the template once.

Programming websites usually involves working with databases. To extend the example above, you might store the information for the 1,000 products in a database (like a spreadsheet of data). When a user requests a page for product 123, the programming language fetches the product information from the database, fills the page template with the product data and then spits out the resulting, dynamically-generated HTML.

If you want to learn to build websites you need to learn HTML and CSS.

Then I recommend learning PHP. PHP is a powerful enough language that it powers the biggest website in the world. There are tons of resources including PHP.net which has excellent language documentation. There are some really good free code editors for PHP. I like Komodo Edit and NetBeans.

Building websites is challenging because you’re usually working with more than just a programming language. That being said…how many people do you know that want websites? There is a good demand for this skill and you can make good money as a web developer.

 

I Want to Manipulate Data

I used to work in marketing. We got a lot of data from a lot of different sources. Being able to quickly parse large CSVs of data, combine different information and create a new CSV of data was a mundane task to do by hand. I used Perl back in those days but Perl is a fairly old and quirky language. Now I write quick-and-dirty console apps in C# but if I had time I might explore Python more for data manipulation.

If you want to learn how to take complex chunks of data and make it usable, the first step is learning a sort of sub-language called Regular Expression or RegEx. Regular Expression is a way of matching patterns within data. RegEx is not a programming language, but rather a common-subset of language found in almost every language I’ve worked with. For actual data manipulation I would probably suggest C# simply because C# can do lots, lots more than just data-parsing console apps and Visual Studio Express is the most powerful, free coding environment in the world.

 

I Want to Make Desktop Applications

Use C# and Visual Studio Express to build Windows Forms or Windows Presentation Foundation apps.

 

I Want to Make Games

Game programming a big studios tends to be highly specialized. Development is divided into tons of facets such as Graphics Programming, Physics Programming, User Interface Programming, etc. In my opinion, game programming for a big studio is nowhere near as glorious as it might sound. The awesome thing happening right now is in the Indie Game world. Platforms like Steam, and the mobile phone markets have made Indie Game Development a viable business.

Gamedev is complex. Do you want to make browser games, phone games, console games, pc games or something else? Each one of those has different requirements and different languages. To keep this blogpost reasonably short I’m going to divide games into two categories: Browser Games and Native Games.

If you want to make Native Games (meaning anything not played in a web browser) you should check out XNA which allows you to write games in C# using Visual Studio Express for the Xbox, PC and Windows Phones. You could also check out Java but, in my opinion, the XNA platform is easier to get started in.

If you want to make browser games you could check out Silverlight or Flash. Developing for Flash used to require purchasing Adobe Flash, which is an expensive program for an aspiring programmer. However, now you can use FlashDevelop and haXe to create Flash files for free!

 

I Know What I Want to Do, Now What?

You have an idea what you want to accomplish. You know what language you want to work in. You have downloaded and installed whatever you need to start programming in that language (don’t ask me, do your research)! Now what?

Finding a “Hello World” tutorial should be fairly easy but that’s not going to teach you much. Regardless which language you picked, you’ll want to start understanding common programming concepts. If you’re lucky, there will be a nice introduction for the language you picked. At some point you could pick up a book, join a forum or ask someone some questions but if you’re a true programmer at heart, you’ll just dive in and start tinkering and breaking things. And you will enjoy doing that for the rest of your programming career.

 

Other Tips

  • If you ask questions on a forum, do your research first and post an intelligent question with proper spelling
  • Join StackOverflow
  • Master debugging. You will be doing a lot of it. If your IDE has a debugger, learn to use it well.
  • Google is your friend
  • Read lots of other people’s code, good and bad
  • Stop reading this and go make something cool
  • Don’t be arrogant. The more you learn the more you will realize you don’t know
  • Use your powers for good