<img height="1" width="1" src="https://www.facebook.com/tr?id=1101141206686180&amp;ev=PageView &amp;noscript=1">

How to Quickly Learn a New Programming Language

 

 

John's Quick Tips to Learning Software Cross- Training

 

 EM-Programming-Language-Cloud

Have you ever been re-assigned to a new project? Did that new project require learning a new programming language? The process of moving to a new project and learning a new programming language is “Cross-Training”.

In my time at Erdos Miller, I’ve now had to cross-train twice. Both times, the time-constraints on projects and fast-paced nature of technology have forced me to develop a method of learning a new language fast. The faster I learn, the faster I can contribute to a project and drive it forward.

Most of my career has been spent developing applications in the LabVIEW programming language. The first time I was required to cross-train was when a React/JavaScript application fell into my lap. More recently, I’ve now been assigned to projects that work primarily in the Qt/C++ and have worked quickly to make the jump again.

The steps I discuss here will not make you a master in the language overnight. Instead, they will serve to quickly jump-start your learning and get you moving forward on a project. It takes me about a week to start integrating new features with ease, and about a month to reach the point where I can design and architect entire applications.

Don’t Learn the Language; Learn the Framework

 

Your first instinct may be to pull open your search engine, type out “<insert language here> tutorials”, and go from there. This is not effective! Introductory tutorials will teach you syntax, flow-control, and other rudimentary operations. You already know how to program! Don’t waste your time with the basic tutorials! You’re not going to memorize syntax in a read-through. In fact, you’re going to end up on StackOverflow constantly (and you’re still going to be looking up syntax on StackOverflow a year from now). So why waste time trying to learn the syntax?

The reality is, you’re not going to be working in just C++ or just JavaScript or just *insert language here*. You’re most likely going to be working with a framework. In my case, the C++ framework is Qt and the JavaScript framework is React.

If your project is just getting started and a framework hasn’t been selected, then your first search should instead be “*insert language here* frameworks”. Spend a half hour going through StackOverflow and various forums to get a feel for the more popular frameworks. Select one. Remember, your goal is to get up and running in your new language fast. A framework will provide you a more structured architecture and spare you from having to learn application design on top of the language itself.

 

How Do I Learn my Framework?

 

Find the official website for your chosen framework. Using the website, your goal is to answer the following questions:

  1. What is the design philosophy behind the framework?
  2. What are the biggest concepts to learn?
  3. How does the framework manage data storage?
  4. How does the framework manage inter-process communication?

In my React example, the design philosophy of the language is to provide a declarative, component-based UI architecture. The biggest concepts to learn in React are state management, Component design, and property transfer. React Components maintain “State” and they communicate with other Components through properties.

With that simple paragraph, I’ve now identified how the language is supposed to work and the key points that I need to study.

Your next step is to read the tutorials for the framework and learn the major concepts you’ve identified. After doing so, you’re ready to start programming. But, wait! Don’t start by trying to create a brand-new application by yourself! Either immediately jump in to an existing project and work on features or find a project on Github and attempt to implement feature requests or bug-fixes.

Starting with existing projects is a good way to clear your mind and allow you to focus on one thing. The worst thing you can do is get overwhelmed by all the necessary work you have to do to get a basic program working. Implementing small features allows you to both witness another programmer’s design and style, but also lets you focus on tiny pieces of the project at a time and introduces you to smaller concepts of the framework.

 

Becoming Comfortable with the Framework

 

By now, you’ve hit the point where you’re implementing features and fixing bugs in existing projects. The framework’s concepts are setting in and you’re not having to pause often to look up answers to syntax questions.

The next step is to go back and look at what you’ve done so far. Does anything look sloppy (hint: yes)? Does anything you did feel wrong (hint: yes)? This is the point where you jump from beginner to intermediate. Write down what you think is wrong with your code. Perhaps you think there should be a much better way to perform a task or implement a feature? Or maybe you feel like you’re going to run into huge technical debt down the road? Once you have your questions written down, now is the time to find the answers.

When I began working in React, the first features I implemented had me creating components that required upwards of 50 properties to be passed to child components. This felt very cumbersome to me and I couldn’t imagine that I was adhering to React’s design philosophy (creating reusable UI components). My next step was to search for a better solution to State Management in React. Lo and behold, I discovered an API for state management known as React Redux.

This research phase is, in my opinion, the most important part of learning a new language. This is where a developer goes from a simple programmer, to a software architect and application designer.

 

Becoming a Master of Your New Language

 

You’re comfortable with the language and you’re beginning to understand how to design applications in your new framework. At this point, you can say, with confidence, you’ve learned a new programming language.

However, I live by the idea that if you’re going to do something, do it well. Why stop here? Let’s master the language.

Your first step is to take an existing project you’ve worked on and implement the project in your new language and framework. Re-writing an existing project from scratch prevents you from having to worry about the unknown. You know exactly what the application requirements are, what tasks were difficult, and what solutions worked. You don’t have to worry about changing requirements. All you need to focus on are how to architect your application, how to manage application state, and to shuttle data between the different processes.

While you’re doing this, repeat the process of examining your work. Identify code you don’t like and look up solutions and designs that address it.

Easier said than done, but that’s it. Once you’re using your architect skills and designing new languages, you’re a master of the framework and you’re so familiar with the language itself that you can hop to other frameworks or even framework-less projects with ease.

 

Other Things to Learn in Your Language

 

While the answer to these questions are not as important, being able to answer them will always be beneficial:

  1. How does my language/framework manage dependencies?
  2. What build/deployment tools exist?
  3. How does my application compile or how is my code interpreted?
  4. How does the call-stack for my application work?
  5. How is the event-loop maintained and how does it execute events?
  6. What is the version history of my language? When were features implemented and why were they implemented?