How-to Take the Plunge and Replace the "I'm not a programmer" Mantra

For the past few years, the bulk of my consulting work has been in corporate training. Many of the participants in my courses are people who have been developing software for years already and simply want to learn new languages and techniques. But, there are also those who are new to programming; they realize the potential that programming skills can have for their careers and are excited to learn, but they aren't necessarily sure where to start.

Moreover, given how pervasive websites (not to mention mobile apps) are in the modern world, people don't merely want to program. They want to build web applications. They want to build mobile apps. They want to start to control their computers and not just be passive users.

And, although Linux Journal readers tend to be people in technical careers and positions, many of you are likely similar to the network engineers, system administrators, sales engineers and data scientists who use Linux and open-source software all the time, but haven't ever considered themselves programmers.

So in this article, I'm encouraging you to try to learn to program, to get started and to build some simple web applications. I'm not going to say that it's something you can do in a few minutes; you definitely will need to learn a number of different skills. But, you know what? Everyone, including those who have been programming for years, constantly needs to learn new things and improve skills to keep up with ever-changing technology.

So if you're ready for a lifetime of excitement, and also for never-ending learning and improvement, I definitely encourage you to take the plunge and replace the "I'm not a programmer" mantra with a sense that yes, you can indeed do it.

Language

Perhaps the biggest question that newcomers (and potential newcomers) to programming ask me is this: "What language should I learn?"

They ask this for a few different reasons. First, they want a language that will be practical for their work. Second, they want a language that is fairly easy to use. Third, they want a language that has the capabilities that are of interest to them.

So, let me get a few things out of the way. You almost inevitably will need to learn a few different programming languages during the course of your career. All of them are equally capable. However, some languages have steeper learning curves than others, expecting you to come in with more knowledge than others.

I also should add that many newcomers to programming aren't coming in with zero background. They're arriving with some programming skills, such as bash scripting. Bash is a language, and I've seen all sorts of amazing things done with it, but as a general rule, I'm talking about higher-level and more sophisticated languages that can do more with less code.

My suggested first language has long been Python. It's a real language, but it's also relatively easy to learn, with a huge number of resources available for those first working with it. The fact that a language is relatively easy to learn doesn't mean that there is zero learning curve, of course, and you should prepare yourself for that.

If Python isn't your thing, or if you want to try something else, I actually think that JavaScript isn't a bad choice. I do think that the syntax and behavior of JavaScript, although improved greatly in the last few years, still can be a bit confusing for people. The advantage of JavaScript is that everyone has easy access to it from within their web browsers. Moreover, JavaScript has a coolness factor that cannot be denied; you get immediate feedback and immediately can recognize that you've joined the world of web developers.

In addition, anyone who is doing web development must learn JavaScript, given that it's the only serious possibility for client-side programming. (I know other languages exist, but they either require plugins or compile to JavaScript.) If you learn JavaScript, you can use the same language on the server and in the client.

If you're on the fence though, I'd suggest going with Python. Although it can be complex to install, the Jupyter notebook provides an easy-to-use and friendly environment for interactive experiments and programming.

I would not suggest a compiled language, such as Java or C#, mostly because they have much steeper learning curves. Object-oriented programming is great, but you shouldn't have to learn it just to write "Hello, world." Also, I'm a strong believer in dynamic languages like Python, JavaScript and Ruby that don't require you to declare variables before you use them, which can be daunting for new programmers (as well as experienced ones).

I cannot state strongly enough that learning a programming language is like learning a human language. It's a lifelong endeavor, one in which you'll constantly discover new things and also often realize that you could have expressed yourself better.

And once you learn one language, you'll find yourself learning others. Fortunately, you'll see patterns and similarities, and you'll be able to carry over your understanding from one language into another.

Tools and Environment

You'll also need to find an editor with which to edit your code. I'm a longtime fan of Emacs, but even I recognize that the learning curve associated with traditional UNIX tools, such as Emacs and Vim, are likely to confuse and frustrate many newcomers. I suggest starting off with an interactive shell, such as the Jupyter Notebook, perhaps not even on your own computer, but on a system maintained by someone else.

Over time though, you're going to want to develop applications that are useful outside a development environment, so you'll want to choose an editor. Although I don't use them myself, I've been quite impressed by the various editors produced by JetBrains. In the case of Python, JetBrains' PyCharm IDE has a free "community edition" that is more than adequate for many people's needs. Others have been happy with Sublime Text, which handles a large number of programming languages.

It was only after developing software for years that I got into the habit of using version control to keep older copies of my code around. This was a mistake; today, I use Git to store old versions of just about everything I write and do. It gives me a level of confidence in my code that I didn't have during my first few years as a professional developer.

Given that Git is powerful and ubiquitous in the open-source world, I encourage you to learn Git. Moreover, you should aim to understand what Git is doing and how it works. The ideas are surprisingly simple, and the number of people who use Git without a full understanding, and then get into trouble, is surprisingly large.

Also, although GitHub is just one company offering hosting services, it has managed to become the leading system used by open-source developers to write, collaborate on and distribute code. If you want to participate in the open-source ecosystem, you'll need to learn Git, preferably via the command line, but if it makes things easier at first, you might want to use a GUI tool, such as SourceTree.

Web Development

I've been doing web development for a long time (since 1993). I never cease to be amazed by the power and simplicity of modern web application frameworks. They make it easy and straightforward to create and deploy web applications. But, that assumes you know how to program as well as the underlying technologies of the web: HTML, CSS and JavaScript.

Indeed, if you want to create web applications, there's basically no getting around learning the basics of that trio. (And again, you can see the advantage of learning to program in JavaScript, in that it reduces the number of things you need to learn by one.) You don't need to become a huge expert in all three of those things, but going through a few basic tutorials will go a long way toward making everything clearer for you.

Rather than try to master any or all of them, I strongly suggest learning as little as possible before just jumping in. Choose a framework that uses your favorite programming language, and try to choose a minimalist web framework, one that doesn't try to do too much, but that is well documented and thus likely to help you to learn, rather than just frustrate you. For example, if you decide to program in Python, I'd suggest using Flask.

Part of the magic of programming in general, and of web development in particular, is the instant feedback (and gratification) that you can get from your work. I believe it's more important to start building things, make mistakes, learn the technologies you need to move forward and then make all new mistakes the following day.

So, once you have a basic grounding in Python, you can read a Flask tutorial. Then start to build a small Flask application. Add a bit of pizazz with CSS and JavaScript. Learn how these different parts work together.

Then, once you've started to get your bearings, you'll have to make a difficult choice: front end or back end? That is, would you prefer to work on the back end, configuring servers, making database queries (more on that in a bit), handling back-end tasks and producing some combination of HTML and JSON? Or, would you rather work on the front end, mostly creating interfaces via JavaScript and CSS that users see?

In theory, you don't have to choose. Certainly many "full-stack developers" exist who know how to work on both front- and back-end projects, but it's rare to find someone who is equally adept at both. More typically, people spend 70% or 80% of their time doing one and are acceptably good at the other as well.

Which should you choose? It's impossible to say; each has advantages and disadvantages.

Database

If you're interested in doing web development, you'll need to think about a database. You'll need something in which you can store information and then retrieve it down the line.

I'm a big fan of relational databases. The good news is that they have been around for a while, and they are stable, efficient and flexible. The bad news is that everything you do with a relational database, you do via a language called SQL.

This means if you want to do web development, and you're going to use a relational database, you'll likely need to learn yet another language, namely SQL.

I think SQL has a lot of things going for it. But, the learning curve can be steep, and if you're trying to get going quickly, it might be just a bit too overwhelming.

For this reason, I would suggest that you use an ORM—an "object-relational mapper", which lets you work from within your programming language and translates function calls into SQL for you. Modern web frameworks either come with ORMs or easily can be configured to work with them. This seriously can reduce the learning curve, making it far easier to use a relational database.

Another option is to use a so-called NoSQL database, such as MongoDB. Such databases have their own query languages, but access usually is made via a library from the programming language you're using. For many simple tasks, a NoSQL database involves far less work and overhead, making it a good possible solution for those who are still at the beginning of their careers.

Conclusion

During the past few years, I've met (and taught!) many people who were convinced that they couldn't program, but who were able to do so. It can take some time and effort, but if you put your mind to it, you definitely can write web applications. If you aren't already a software developer, I hope this guide will help you take at least the first steps toward starting to write some software. And remember, my suggestions are just that, suggestions—there are many different paths to success.

______________________