Classic MIT Lecture: Introduction to Programming

This video is one of the best introductory lectures on programming I’ve ever seen. Presented in 2008 at MIT by Professors Eric Grimson and John Guttag, this course has become something as a staple for anyone trying to learn programming online.

The entire course is offered for free at MIT Open Courseware. The course is taught in Python, but even if your goal isn’t to learn Python, the principles explained apply to any programming language, and thy are an excellent and concise reduction of the problems computer scientists face, and how you need to think in order to become a good programmer.

If you’re even remotely thinking about learning to program, watch this video!

How To Choose a Backend Programming Language

backend languagesOne of the most important decisions you’ll have to make early on in your path as a new programmer is deciding which language you want to pursue.

Your choice of first language may very well determine how you go about learning to code, which areas you focus on, and ultimately influence your decisions later on. That said, if you’re serious about becoming a good programmer, your first programming language will not be your last, and after you get through some of the early hurdles of learning to code you can always reevaluate your language choice.

In this post I’ll cover some of the basic things you might consider when choosing a back end programming language. If you’re trying to choose between front end and back end, or aren’t sure of the difference between the two terms, I recommend you read this post first.

Not A Question Of Ability

Before I get into the specifics of each language, however, I want to stress that fundamentally, every programming language could accomplish the same things as any other language.

Your choice, then, shouldn’t be based on a language’s fundamental capabilities, but what you choose to use the language for.

You can read more about this concept here.

Ruby

Firstly, let’s consider Ruby, which is often coupled with it’s partner framework, Ruby on Rails.

Ruby is a great language for new developers, and definitely my top choice for most rookie coders. That’s because the basics of Ruby are easier to learn than some of the other choices in this list.

Ruby is a relatively “young” programming language. It was developed in the late-90s and became popular only in the last decade or so. The focus of Ruby (and Rails) is on streamlining many of the nitty-gritty processes that other languages force you to customize and code at every step.

This means that for beginners, you can get farther, faster. If you follow along with some common tutorials, like Michael Hartl’s Ruby on Rails Tutorial, or the One Month Rails program, you’ll be able to get up and running with full-service web apps in just a few weeks.

Many popular web applications, include mega-giants like Twitter, built their sites using Ruby on Rails.

Python

Python is another popular scripting language. Like Ruby, the basics of Python are fairly easy to learn, but the disadvantage is that the integration with building a live web-application is not as seamless as the connection between Ruby and Rails.

Python is a great choice for a beginner if you’re interested with playing around with a programming language, but aren’t trying to put up a web application immediately.

For this reason, Python is often taught by universities in an introduction to programming course, where the focus is on learning the fundamentals of programming through command-line applications, not putting together websites.

Java

Java is one of the most widely used programming languages. It’s use grew exponentially throughout the 90s, and because of this, many of today’s software systems are still based around the Java language.

If you’re going to be a professional developer, you’ll probably want to learn either Java or C eventually, but I can’t say it’s the best choice for beginners.

That’s because the learning curve with Java is fairly steep, and there’s a lot of configuration and semantic details that could easily throw a beginner off track.

C, C+, C++, and Objective-C

Like Java, the C languages are extremely popular, and underpin many software systems, but they’re not the easiest route to learning to program.

C languages continue to be extremely popular, and if you have a desire to build native iPhone apps, Objective-C is a must-know.

R, Matlab, and Octave

Last but certainly not least, this group of languages is used primarily for programmers and systems that rely on intense and complicated mathematical calculations.

Generally not used as a first language, these are matrix-based systems that are good for programmers interested in artificial intelligence, probabilistic analysis, and other Big Data, NP-Hard or NP-Complex algorithms, where small differences in processing speed and algorithmic intricacy can make a huge difference in the program’s efficiency.

The same tasks, language choice often comes down to programmer preference, and/or ease of use/appropriateness of a language to complete a given task more efficiently than another.

When you talk to developers, many can be dogmatic about their own preferences, and argue that language or framework X is better than language Y for a thousand reasons.

A good friend and technical project manager once put this most succinctly:

“Language choice is like religion. Everyone’s evangelical about their own choice, and no one can definitively prove that any one is better than the other.”

Why All Programming Languages are Created Equal…Sort of

The first and most important thing to know about choosing a language is that it’s not a question of what any one language can do that another can’t.

That means that all languages fundamentally have the same limits and abilities. That said, every language has it’s tradeoffs, and some languages are better suited for certain types of calculations and processing than others.

Turing Completeness

turing completeI’ll spare you the mathematical details, but this is a concept that was proved by Alan Turing early on in the life of computer science.

Basically, there 6 primary operations that underly every single calculation performed by programming languages.

All modern day programming languages can complete each of these 6 actions. While this may seem like a small number of actions, it represents what all complex mathematical tasks can broken down into.

To give a simple example, think of the concept of adding. At first glance, you might think of addition as distinct from subtraction or multiplication. But, subtraction is just the addition of a negative number, and multiplication is simply repeated addition of the same number. (3×2 = 3 + 3; 3×4 = 3+3+3+3, etc).

When you start to think about how these tasks can be broken down, you can realize more complex relationships. Exponents, for example, can be broken down into multiplication, and multiplication is just repeated addition.

The point is: given the 6 basic mathematical tasks, any coding language can accomplish all of the same functions as any other.

Languages Are Like Religion

lisp religionBecause languages can fundamentally achieve the same tasks, language choice often comes down to programmer preference, and/or ease of use/appropriateness of a language to complete a given task more efficiently than another.

When you talk to developers, many can be dogmatic about their own preferences, and argue that language or framework X is better than language Y for a thousand reasons.

A good friend and technical project manager once put this most succinctly:

“Language choice is like religion. Everyone’s evangelical about their own choice, and no one can definitively prove that any one is better than the other.”

How To Choose

The result, then, is that you should choose a language based on your own preferences and aspects you want to learn.

You can read more details about which languages are best suited for which tasks in this post.

Choosing a Front End Programming Language

If you’ve decided to focus on becoming a front end, as opposed to a back end developer, your choice of languages to work with narrows significantly.

Related Post: Understanding The Difference Between Front End and Back End Programming

Your First Step: HTML and CSS

html and cssAs a front end developer, it is absolutely essential that you have a firm grasp of both HTML and CSS.

Many newbies confuse the two, so it’s important to understand what each is used for.

HTML, which stands for HyperText Markup Language, is a universal language used across the web, and is used to give structure to web pages. The basics are incredibly simple to learn, and you can probably master it in just a few days.

The confusion comes because HTML, by itself, is not used to determine the appearance of a web page. For this, most websites use CSS.

CSS is a styling language, and allows you to define elements of a page’s look and feel. This is integrated closely with the use of HTML tags, so it’s important to first understand how HTML functions, and then work on incorporating CSS into your page design.

Academically, you can understand the basics of CSS fairly quickly, but incorporating good design into your pages is something that takes a lot of practice and experience.

The Second Step: Choosing a Javascript Framework

javascript frameworksOnce you have a firm command of both HTML and CSS, you’ll want to move on to learning javascript, using one of the popular frameworks.

Javascript is a scripting language that operates on the client side, as opposed to backend languages, which operate on the server side. This means that when a user loads a webpage, the website loads any necessary javascript components into the user’s browser, so they’re available to execute on command, without loading the page.

Because of this, the use of javascript frameworks has become increasingly popular over the last few years, since they provide for a fast and seamless user experience.

To be frank, it doesn’t really matter which javascript framework you choose. Like so many issues surrounding language choice, there are tradeoffs to each, but most can accomplish all of the same functionality.

As a beginner, you don’t need to worry about why one framework is better than another. Once you learn one, you’ll be able to more quickly expand to others should you decide to change.

I recommend you begin your work with jQuery, which is a simpler, slimmed-down version of javascript. This will help you accomplish more faster, and build the confidence and knowledge that will allow you to expand to the more complex frameworks.

Some of your other options you might then consider are:

  • Angular.js
  • Backbone.js
  • Ember.js
  • Node.js

To learn more about any of these Javascript frameworks, consider using a program like Code School or Thinkful. You can check out my Code School review and Thinkful reviews for more details.

Don’t Feel Overwhelmed

I know that this post seems like it’s throwing a ton of information about how many languages and frameworks you need to learn.

I really want to encourage you not to feel overwhelmed and just take things step by step. Start with HTML and CSS, and then worry about Javascript. Each step you take will make the next step easier, and after a few months you’ll be able to switch seamlessly back and forth between different options.

Front End vs. Back End Programming Languages

One concept that confuses many beginners interested in learning to code is the distinction between front end and back end programming.

In this post I’ll outline the main differences between the two, and how to decide which is right for you.

Understanding the Difference between Front End and Back End Programming Languages

Front End Languages

front end programming languagesThe term front end refers to languages and frameworks that deal with client-side applications.

Basically, you might think of these languages as the languages that represent the user experience side of the equation.

While recent years have seen increasingly complex programming logic going into javascript applications, in general front end languages do not carry a lot of “heavy lifting.”

They’re not concerned with how data is stored or results calculated, and instead focus on how that information is delivered and presented to a user.

Because of this, front end languages, as a whole, tend to involve less complex math and focus more on incorporating design elements into web-applications.

Back End Languages

backend programming languagesBack end languages, on the other hand, form the backbone of the more complex programming processes.

This includes everything from data encryption and storage to detailed mathematical calculations and analysis.

In general, back end languages will get a request from the front end language, perform the task, and then return the solution or other deliverable back to the front end language.

Which Is Right For You

Choosing which side to focus on is an important decision, since it will largely determine the direction you take with your programming career or hobby.

Back end languages tend to have a higher barrier to entry, and require more time to learn and master. They focus more on mathematics and algorithms to accomplish their purpose, and require a desire to focus on algorithmic problem solving.

Front end languages, on the other hand, tend not to require complex math. While you can (and will) implement algorithms using Javascript, in general the front end programmer focuses more on the implementation of design and user experience. You need a detailed eye regarding how graphics and information are presented.

There is no one right answer, and the overwhelming majority of development teams have individuals that specialize in each field, since there’s an inevitable need for a seamless integration between the two.

3 Reasons Why Beginning Programmers Should Start Using GitHub ASAP

githubIn case your unfamiliar with the system, GitHub is a cloud storage tool designed specifically for programmers.

It’s one of the most widely used tools in the industry, and is an essential platform for anyone serious about learning to program.

Despite it’s nearly universal use, however, many beginners don’t start working with GitHub until they begin looking for a job, which in most cases is far too late.

In this post I’ll go over the top 3 reasons why beginning programmers should start using GitHub more quickly.

Gain Familiarity

The first reason is simply to gain familiarity with the system. Like any technical skill, programming is an art that must be practiced consistently in order to do well.

You need to build fluency not only with your chosen programming language, but also with the tools and techniques that are commonplace throughout the industry. Practicing using these tools with your own projects gives you plenty of runway to make mistakes, and have the tool start to feel like second nature before the time comes when you absolutely need it.

Build Good Habits

Secondly, using GitHub encourages you to build good programming habits.

As a developer, you’ll need to practice checking your code into and out of GitHub, and learning how to use different branches to control different types of changes you make.

This serves several purposes. Most importantly, it gets you in the habit of backing up your data consistently. It also encourages you to be hyper-organized about how and when you alter or expand pieces of code, and teaches you how to merge distinct changes back into your main branch.

Great Learning Resource

Finally, GitHub provides a tremendous, and often underutilized resource for new developers.

There are thousands of projects that you can freely download, load into your own system, and play with. You’ll be able to read and edit code written by expert developers, and can learn from their techniques.

Once you reach a certain level of skill, you’ll also be able to commit changes to existing open source projects. This will help you build your resume and gain valuable experience.

Since GitHub is free for public-projects (and as a beginner you don’t need to maintain private servers for your practice projects) there’s really no good reason not to use it, and the benefits you’ll get will help you improve your coding talents more rapidly than you would otherwise be able to.

Why New Programmers Need To Find a Good Mentor

coding mentorIn my opinion, having a good mentor is absolutely essential to setting yourself up for success with programming.

Mentors provide a one on one relationship that you can’t find in other online communities, classrooms, or forums, and provide dedicated, detailed advice that’s catered to your individual needs.

While there are some free options for finding a mentor, many are paid. Some courses, like Thinkful, also incorporate a one-on-one mentorship approach into their programming tracks as a whole.

This investment is well worth it, since it will help you get you through any obstacles you might face, focus your path and learning style, and improve your understanding of key concepts.

The Secret Questions

To me, the most valuable part of having a mentor is that they help you formulate your thinking in a way that’s consistent with the rest of the programming world.

As a beginner, the unfortunate fact is that many times, you don’t even know enough about coding to know which questions to ask. Uncovering these secret questions, and translating layman terms into technical jargon, is one of the mentor’s main roles.

Getting through this barrier is integral to being able to learn to program, and inability to overcome it leads to frustration and, unfortunately, burnout among many new programmers.

Focused Learning

Like asking questions, many new programmers find it difficult to focus their learning.

One of the most frustrating aspects of coding is that when you’re first starting out, every single paragraph you read or concept you learn just opens the door to a new multitude of questions.

Some of those new questions are important to learn quickly, while others aren’t. As a beginner, however, you don’t know how to separate the essential from the accessory.

A good mentor will be able to help guide you through this process and find the learning path that’s right for you.

Is Your Code Good?

spaghetti codeFinally, mentors will be able to help walk you through a fundamental challenge of all novice coders: understanding whether or not code is good.

While as a beginner you might be focused simply on getting your first programs to do what you intend, software development is about way more than having a program that “works.”

There’s good coding habits and bad coding habits, messy, long, verbose code and short, concise code. Unless you’re a rare genius, you’re first pieces of working code will be fairly messy.

A mentor will help you clean up that code (a process known as “refactoring”) and make it better. With each pass (and each exercise) you’ll gradually learn what it means to write good, clear code.

How To Find A Good Coding Community

programming communityWhile programming may often feel like a solitary undertaking, many of the top developers are experts at working in groups, with other programmers of varying skillets, experience, and abilities.

As a beginner, this provides a tremendous opportunity to join in on trending discussions within your area and learn from more advanced programmers.

When To Use Coding Communities

Coding communities can be great resources for the budding programmer, but unfortunately they’re of little use to someone who is in the first stages of development.

That’s because programmers tend to follow certain practices in their method of thought and the language they use to describe their programs.

The result is that communities are best used for novice programmers who already understand the basics of their language. If you don’t know how to write a simple program, you’re better off taking an introductory course or walking through a few more practice exercises before you dive into the community.

The Best Online Programming Communities

There are dozens of great communities out there. One of the best resources to use is Meetup. Many programmers use this website to post local events and hack nights.

Getting out into your city and meeting other developers face to face is a good way to make friends in the industry. Most developers go to hack nights with some project to work on, and then mix and mingle helping each other out with different problems.

Another great community to use is GitHub. GitHub is a nearly universal code management tool, and is home to thousands of open source projects.

Joining in on an open source project or topic within your area of interest is a great way to work alongside more experienced developers and see how you can apply your knowledge in real-world scenarios.

Finally, StackExchange is another great opportunity to interact with other programmers and get help on your code. This is a forum-style community in which programmers can paste in specific problems and questions they encounter. Many of the replies not simply fix the bug in the code, but explain multiple options for achieving the desired result, and why one programmer might choose a specific solution over another.

Where To Find The Top Developer Forums

In addition to communities and mentorship programs, online forums round out the trio fo best places to look for coding help.

In this post I’ll go over where to find the top developer forums for your skill-set.

StackOverflow

stackoverflow logoStackOverflow is hands down the most robust developer forum online.

The site consists of thousands of active developers, and hundreds of thousands, if not millions, of answered questions.

Sooner or later, you’re going to become very familiar with this system. While you can browse and view questions and answers without a membership, I recommend registering for a free account.

This will allow you to ask and answer questions, and will give you an opportunity to “build rank” within the community. Basically, you get points for providing cohesive responses, and having those responses voted up within the community.

One of the aspects of StackOverflow that makes it so popular is the community-knowledge approach. It’s common for questions to receive multiple answers, and subsequent discussions about which solution is best. Viewers can vote answers up and down, which provides a self-managed monitoring system helping you figure out what information you can trust.

Google Developer’s Forum

google developers forum logoThough not as popular as StackOverflow, Google also has a developer’s forum focused on a similar question and answer approach.

Unfortunately, I feel like this platform has grown slightly out of favor, leaving many of the answers dated and (at times) inapplicable to newer software versions.

Open Source Projects

Finally, if you’re using a piece of open source software, many of the projects have built in forums and/or wikis for developers to access.

If you have a question that is specific to the project, you can post it on the site. Many of these are monitored not just by the community, but by the leading developers on the project, meaning you’ll often be able to get a response directly from one of the contributors to the project.

GitHub and Sourceforge are two great places to start, but there are tons of open source clubs for different languages scattered across the web.

The Life of a Programmer: What Do Computer Programmers Do All Day?

Before you get too far into your exploration of computer science, it’s important to step back and look at the reality of what programmer’s do on a day to day basis.

Many people have an unrealistic picture of what coders actually do on a day to day basis, and I hope to dispel some of those myths in this post.

The “Idea” of Coding

what a computer programmer doesThe idea of coding is easy to fall in love with. Thanks in part to media-hype, we tend to have a mental picture of programmers who are all young, hip, slightly dorky 25 year olds who stumble out of college and land a six figure job.

They go to work at 10am and stay until 8pm, but at work there’s a gym, a massage room, a gourmet cafeteria, a personal concierge to take care of annoying errands, and even happy hour beer-breaks with ping pong and air hockey.

If they ever get bored with their cushy job, or decide they simply aren’t earning enough money, they can just start a company, which their previous employer will happily buy from them for several million (or even several hundred million) dollars.

Sounds appealing, right?

The Day to Day: What Does a Programmer Do?

Unfortunately, the reality is a little different than the hype.

code bugWhile there certainly are stories of programmers who start a company only to sell it 3 months later for $30 million, or of amazing perks for working at one of the top tech titans, the day to day life of a programmer is a grind.

Constant Learning

One of the biggest challenges of any professional coder is to keep up to date with everything that’s going on in his field. You hear people refer to programming systems as “languages” and “frameworks” for a reason.

While different systems might share common threads, beginning work on any project requires an intense process of learning the system. Add to that the constant updates to the popular languages, each with different advantages and tradeoffs, and you can see how making any sound decision requires intimate knowledge with a wide range of topics.

Looking For Commas

Not only that, but the actual act of writing a piece of software can be extremely time intensive.

Be prepared to have your eyes glued to the computer for hours on end. On big systems, it can take an hour or two just to get up to speed with where you left off the day before.

Code rarely works the first time it’s written, which means that a lot of time is spent editing and re-editing to find small errors, or account for different possible contingency scenarios.

When “bugs,” or errors in the code, crop up, it’s not uncommon to spend several hours trying to find their real source, only to realize it was a simple misplaced comma, semicolon, or parentheses!

This takes a certain type of personality, and a great attention to detail in order to enjoy.

Problem Solving Is Fun

I don’t mean to imply that programming is just a dull, “heads down and get to work,” type of profession.

I just want to be straightforward about the type of mindset you need in order to code successfully.

At the end of the day, software engineering is just problem solving. Each day you’ll face different  small problems, and as you solve each small problem, you’ll gradually be able to piece together the bigger picture, until you’ve solved the large problem.

This can be a very fun process, and the satisfaction and reward for solving interesting, complex problems is hard to beat.

You can click here to learn more about how to get started learning to program.