Skip to content
Image with logo, providing a link to the home page
  • United Stated of America flag, representing the option for the English language.
  • Bandeira do Brasil, simbolizando a opção pelo idioma Português do Brasil.

Development Environments: Preparing Your Computer For Software Creation

Some programs that can be used to develop software using a computer: the GCC compiler, the Emacs text editor, the Firefox web browser and the integragrated editor from Godot Engine.

Image credits: Image created by the author using the program Spectacle.

The Beginning of Every Software Development Journey

Although it is possible to create computer programs in mobile devices, a keyboard still is virtually essential to write complex programs. Yet last generation hardware is not necessary to start programming activities, on the contrary. Any computer with Internet access are enough to start, learn and practice programming.

Although even Internet access is optional, depending on your choice of programming language. Many programming languages and programs can be installed on the hard disk of a computer; after installed, they can be used whenever needed.

Are you using a computer? Otherwise, do you have access to a computer? Excellent. It is time to start your journey: the Journey of the Developer.

The Minimum Requirements to Start Programming Activities

The minimum knowledge required to start learning to program is know how to install programs (or know someone how can and ask her/him a favor).

Perhaps that you can even start right now. A text editor and an internet browser are enough for JavaScript. Browsers such as Mozilla Firefox, Google Chrome and Microsoft Edge have embedded JavaScript interpreters.

The interpreter may not be available on mobile devices, though it can be accessed on computers by pressing, usually, the F12 hotkey in a keyboard.

If you are using a computer, you can ignore a text editor for the time being. Press F12 and a new region will appear on your browsers, probably at the bottom part of the window. Search for Console (if needed) and be prepared to become a programmer.

In the console, search for a symbol resembling > or >>, type the following line of code (you can write your own name instead of Franco, as long as the entire message is surrounded by double quotes) and, next, press Enter:

console.log("Olá, meu nome é Franco")

Congratulations! You have just written your first computer program (or another one, if that was not your first). console.log() is a function that can write a string, that is, text written between quotes, in the standard output of the console (the command line interpreter).

The embedded terminal of the Mozilla Firefox web browser. The image displays the resulting output of the line of code `console.log(\"Olá, meu nome é Franco\")`, that says: \"Olá, meu nome é Franco\".

The message means "Hello, my name is Franco" in Portuguese. I am from Brazil; some examples of text (especially in code and images) will be in Portuguese. Usually they can be swapped for other text of translated to other language; however, for a change, I will leave some in Portuguese for a more exotic experience to foreign people.

You can swap Franco by your name. You can also change the message. Use your creativity. Traditionally, the first programs in a program language use the phrase Hello, world! (Olá, mundo! in Portuguese) to output a message. This tradition is decades long; it was started in a book by the creator of the C programming language.

If you try to copy and paste the previous message instead of typing it, you may have received a warning on the browser.

Mozilla Firefox warns the user about risks and cares of pasting code.

You can remove the message by following the steps provided (for instance, typing allow pasting in Firefox). We should say, though, that it is a very relevant warning, and it serves a reminder that you should never trust in code that you do not understand. There are risks on typing and running unknown code (or copy, paste and run it) without understanding what it does because it can steal your data or cause data loss, if someone with bad intentions writes a code aimed for those purposes.

As in academic research or school work, you should carefully choose reliable sources for your programming information. You should distrust everyone and everything. This is particularly good advice nowadays, in times of fake news.

Therefore, you may have two questions at this time:

  1. How can I only trust code that I understand if I have never programmed before?
  2. Why should I trust this material?

For the first, everyone starts from somewhere. It is often promising to start with a function to output a readable string.

For the second question, my recommendation is the same as for all material. Distrust! You should look for more sources and, above all, check the official documentation of any project and software that you use. If you want to program correctly, it is fundamental to learn documentation (such as manuals) -- especially if it is not free (libre) software with open source.

It is time to wear your new programming hat. For instance, what does console.log() do in JavaScript? To find out, we can check the Mozilla Developer Network (MDN). For JavaScript, MDN is my to go recommendation for documentation.

The console.log() manual entry on MDN is https://developer.mozilla.org/en-US/docs/Web/API/console/log. According to the manual, "The console.log() method outputs a message to the web console. The message may be a single string (with optional substitution values), or it may be one or more JavaScript objects". Perhaps that you do now yet know what a method is, but you do know what console.log() computes.

Unfortunately, software documentation may not be available on your mother tongue. As you are reading this page in English, this may be a minor concern for you. Still, it is an accessibility issue for billions of people in the world, who cannot read, write and/or speak English. Furthermore, even when documentation is available in other languages, it is often not as complete as its English version. For instance, this is the MDN documentation page for console.log in Portuguese: https://developer.mozilla.org/pt-BR/docs/Web/API/console/log.

Therefore, one of the goals of this material is to provide another resource to learning programming in Portuguese. The pages will be translated to English whenever I can, though my English is far from perfect and there will be errors. My intention is introducing programming concepts over time, by building knowledge step by step. To achieve this, I aim to use my previous experience in programming and the end-user programming research I have done in my doctorate (if you want to know more about me, check this page).

What Do I Need to Start Programming?

The first step to perform when you start using a programming language or create a new project is configuring the development environment. The complexity of the configuration depends on the complexity of the project, as well of the chosen programming language(s) and tools. Sometimes, it also depends on the operating system -- it is often faster to set up programming systems on Linux systems (however, there are containers nowadays).

At the bare minimum, you will need a text editor, a compiler (or interpreter, depending on the chosen programming language), a file manager (if you do not know what is one, check an introduction and also how to perform basic operations) and a command line interpreter.

Most computers have two out of the four requirements installed by default: a file manager and a command line interpreter. Well, to be honest, three: virtually every operating system provide a text editor, though Windows' Notepad is tolerable (at best) as a last resort. If you use Windows, it can be complex to set up a development environment. If you use Linux, it is usually simpler (in some cases, almost trivial).

Fortunately, there are alternatives. A system, known as integrated development environment (IDE), combines the four items into a single program.

For beginners, IDEs greatly reduce the initial efforts to set up the development environment. In many cases, it is enough to install the IDE to start learning how to create systems.

However, it should be noted that IDEs are tools designed for professionals. They are complete solutions to assist software development and, thus, they can be a bit overwhelming for the very first use. In general, it can be a good idea to start with simpler IDEs instead of more complex ones. This can be a good idea because the essential features of IDEs to start programming are:

  1. An embedded text editor to write the source code;
  2. A pre-installed compiler or interpreter to run the source code;
  3. An abstraction for the file system to minimize (or avoid) the need to use an external file manager;
  4. A simple way to run the project (preferably with a single key press or click).

Virtually every modern IDE provide the previous four features. Many also provide an embedded debugger, a tool to inspect running processes (programs under execution or running programs) that help to identify errors in source code.

So Many Programming Languages: What is the Best?

Sometimes people decide to learn a specific language, either because it is popular, it is famous at the time (the latest fashion) or because it is on demand with promising wages. From Ada to Zig, there are many options: Ada, Assembly, B, Basic, C, C#, C++, Cobol, Dart, D, Emacs Lisp, Erlang, F#, Fortran, GDScript, Go, Haskell, Idris, Java, JavaScript, Julia, Kotlin, Lisp, Lua, ML, Nim, Objective-C, Pascal, Perl, PHP, PL/SQL, Prolog, Python, Q, R, Ruby, Rust, S, Scala, Scheme, Scratch, SQL, Swift, Smalltalk, T, Tcl, Unicorn, Verilog, Visual Basic, VHDL, WebAssembly, X++, Yorick, Zig...

Some languages are used than others. At this moment, it is more important to consider that some of the previous languages are simpler to use than others. C and C++ are fast, traditional, efficient and complex languages. Python, Lua and JavaScript are traditional, slower, yet simpler. Python and Lua, in particular, are elegant and have simple syntax.

Why should we choose a simpler programming language instead of a more complex one? Wouldn't it be better to learn the fastest language? What is the best programming language?

There is not a best language for all and any scenario.

From computability theory, it can be shown that, if a programming language satisfy some properties, it can describe all programs that can be written in any other language that satisfy the same properties.

As a corollary (an immediate interpretation), we could say that most modern (serious) programming languages can write any possible computer program.

In other words,

  1. You can choose virtually any programming language to learn how to program;
  2. It is better to start learning with a language that is simpler to understand and easy to use than a more complex one. Common sense is important in programming; simplicity is desirable, and, many times, it leads to better results at the long term.

My opinion is that programming languages are tools; choose the best one (the most suitable) for your problem at hand.

If you want to learn, your problem is learning. Thus, you should choose a language that contributes toward the goal.

It is not easy nor trivial to learn to program. When you are starting, mistakes are extremely common and, many times, they seem to be inexplicable. One of the hardest part of starting is not learning a language or the concepts; rather, it is to learn to persist and accept errors as part of the process. Therefore, there are few good reasons to make the process harder.

Python, Lua and JavaScript are some languages I would recommend for starters. Yet, before, perhaps starting with a visual programming language such as Scratch (unfortunately, this is not always an option for people with vision disabilities). This is the approach that will be followed in this website (for instance, in console (terminal) output).

Python is a language with high quality libraries (third party implementations to aid software development) for multiple areas of human knowledge. Em particular, the GDScript language from Godot Engine is very similar to Python; Godot is an interesting option to develop digital games.

Lua is a Brazilian language (created and maintained by PUC-Rio), commonly used as scripting language in computer and video games (for instance, with LuaJIT) and other multimedia applications. Many digital games allow people to create modifications (mods) to modify games using Lua (some use Python).

JavaScript is the third option for the single reason that is the most dominant language for the Internet. In my opinion, JavaScript is not simple nor elegant as Lua and Python, though it does show that the best technology is not always the most used one. Fortunately, the modern parts of JavaScript improve every year. While WebAssembly does not become a viable alternative, JavaScript will (probably) keep dominating the Internet.

Hello, World!

Before proceeding on how to configure development environment for some programming languages, let us register the tradition here.

  1. In Lua:

    print("Hello, world!")
  2. In Python:

    print("Hello, world!")
  3. In JavaScript:

    console.log("Hello, world!")
  4. In C:

    #include <stdio.h>
    
    int main()
    {
        printf("Hello, world!");
    
        return 0;
    }
  5. In C++:

    #include <iostream>
    
    int main()
    {
        std::cout << "Hello, world!";
    
        return 0;
    }
  6. In Java:

    public class OlaMundo
    {
        public static void main(String[] args)
        {
            System.out.print("Hello, world!");
        }
    }
  7. In LISP:

    (princ "Hello, world!")
  8. In Prolog:

    main :- write("Hello, world!").
  9. In SQL (SQLite):

    SELECT "Hello, world!";
  10. In GDScript (Godot):

    extends SceneTree
    
    func _init():
        print("Hello, world!")

After we configure development environments for each language, we will be able to transform each source code block into its respective program.

Something to notice in the previous snippets is that, despite the slightly differences in syntax and words for every language, the structure is similar. All snippets define the same algorithm (a finite sequence of steps defined to solve a problem), that can be summarized as:

begin
    print("Hello, world!")
end

This is worth of notice; when you learn to program in a language, a large part of the knowledge transfers for other programming languages as well. In fact, learning to think computationally (something called computational thinking) is more important than learning how to program. Once one masters computational thinking, languages become tools -- in a few hours, you can learn a new one. Maybe you can even consider creating your own.

For the curious reader, the next section describes some of the most important systems used to create programs.

Beyond the Minimum: The Steps to Follow the Basics

The first IDE does not have to be the single one. With experience, you can start exploring other IDEs, projects, technologies and tools to create software.

Although my recommendation is starting with an IDE, it is appropriate to know the systems involved in programming. If for nothing else, at least to know what an IDE simplifies and combines for you into a single program.

File Managers

Alguns dos tópicos anteriores mencionaram gerenciadores de arquivos (first: an introduction to files, directories (folders) and paths; second: basic file manipulation Operations).

Although a basic file manager should suffice for most tasks, a file manager that better suit your needs can reduce time and efforts of performing secondary file management tasks.

In particular, as mentioned in the previous entries, the command line is an alternative for automation.

Text Editors

There are people that use the text editor provided by their IDE and are satisfied by it. Other people may like using an external text editor.

A significant part of the time spent developing software involves writing text. Source code, documentation, messages for communication, reports. A good text editor is an essential tool for software development.

There are several high quality options, including, for instance:

For those of who want the most modern and attractive in text editors, the last entries are the most modern looking ones. Many people like Sublime Text, though it is a commercial software (although it can be used for free as an evaluation).

People with visual disabilities may be interested in the Emacspeak project.

Although I would not personally recommend to a beginner to learn programming with Vim or Emacs (especially not both at once using Emacs), it may be worth trying them at some point. At least, for historical reasons: Emacs and Vim are text editors that have survived for decades (and remain current). Emacs was released in 1976. Vim in 1991. Emacs is older than the author of this page; both are, possibly, much older than the reader. Both are still excellent and current, although perhaps rudimentary and spartan to the modern taste. In particular, I use Emacs with a Vim emulation mode (Evil mode). The best of two worlds -- to this day.

Command Line Interpreters

For those who do not want to use an IDE, many program languages only a compiler and interpreter to generate or run the program, a text editor and a command line interpreter.

A command interpreter (shell) is responsible for running programs and managing the life cycle of processes. Graphical environments abstract the use of the interpreter; for instance, when someone clicks twice on the icon of a executable file to run it, the graphical environment start the process using a shell behind the scenes.

Programmers may wish to remove the middle man (system, in this case) and use the shell themselves.

bash, zsh and fish are good command line interpreters for Unix-like systems. Windows has cmd which is serviceable though rustic.

There are tools such as make and cmake that allows creating custom configurations to compile, run, test and even deploy projects.

Advanced text editors often provide features to enable the editor itself to start compilation (or interpretation) processes, as well as run it.

Compilers and Interpreters

Compilers and interpreters are essential tools for software development, for they are responsible to translate the source code into code that the machine (computers, mobile devices, Internet browsers, video game consoles, etc.) can use.

If you do not use an IDE (or if the chosen IDE does not install the required compiler or interpreter for a language), you must install the compiler or interpreter yourself.

Without interpretation or compilation, a source code file is only a text file. Compilation transforms the source code of a program into machine code that the computer can run. After compiling the source code once, you can use the resulting program as many times as you want on machines with compatible architectures. In particular, the machine running the program is not required to have the compiled installed to use the program (it is enough to have the required libraries installed, if they are embedded on the executable file). Every time the source code changes, the source code has to be recompiled to generate a new executable file. C and C++ are classical examples of compiled languages. For instance, on Windows, executable programs usually have the .exe extension.

Interpretation translates the source code of a program into instructions to the machine on use time. In other words, to use a program written in an interpreted program, the machine must have the interpreter. JavaScript, Lua and Python are interpreted languages. This is why browsers allow writing JavaScript when you can access the console: the interpreter is embedded into the program. Provided that the interpreter is accessible to users, they can run arbitrary code using it.

Compiled programs are usually faster than interpreted ones. Nowadays, interpreted languages employ techniques to reduce the difference (such as just-in-time -- JIT), though the difference still exists for high performance systems. This is one of the reasons that, for systems on which performance is a main requirement (such as digital games from AAA studios), programs are usually written in compiled languages such as C++.

Interpreted programs may require fewer efforts from developers to become portable. If an interpreter is compatible if a platform (as well as all project dependencies), the program will work (provided it does not have impeding bugs) on the platform. Compiled programs, on the other hand, require the generation of executable files for every target platform and architecture.

It is often easier to write code in interpreted languages than in compiled languages. A interpreter can infer context data during use and development to aid the programmers, something that is more complex and less common on compiled languages.

Debuggers

In the previous section, there was a mention to the word bug, a generic and popular term to name problems in computer programs. The term has its origins in the past: insects in mainframes could hinder the operation of the machines, causing some problems.

More technically, bugs can be defects, errors or failures. The three categories are related; the differences are the level or place where they happen. Defects occur at the algorithm level (that is, the conceived solution). A defect that is implemented in the code of a program results into an error. Finally, a failure results from running a defect, when it becomes observable.

In practice, many programmers are practical people and say bug as everyone else. Regardless of chosen term, debuggers are tools that help developers to find problems in their projects.

Many IDEs incorporate debuggers visually, something that makes it easier to use debuggers. However, it is also possible to use command line ones, if you prefer.

Debuggers embedded into IDEs are very convenient. Particularly, I recommend choosing the IDE that provides the best support and integration with debuggers. Once you are trying to find a non-trivial bug that requires careful inspection, a good integration can significantly reduce time and efforts require to find the root causes and solve the problem.

Source-Control Management Systems and Source Code Versioning

These days, source-control management (SCM) systems and source code versioning are almost synonym of Git (git) for many programmers.

git is the system. Popular services hosting code managed by git include:

The three previous services are excellent, although GitHub is the most popular one. My personal choice is GitLab. Until a couple of years ago, GitLab was less restrictive regarding the private source code repositories. Private repositories for the free account were available, without limits for contributors. BitBucket allowed the creation of private repositories on the free tiers, though it had some limitations. However, the free tier of GitHub only allowed the creation of public repositories. Nowadays, GitHub also allows users on the free tier to create private projects. Still, it is not necessary to choose; if you prefer, you can use them all. git allows to host a same project in multiple services, should you wish to do so, or only on your local machine. You can even self-host your own cloud instance with some options (including GitLab itself, Gitea and Cogs).

There are other alternatives for source code management other than git, among which we can cite Subversion (svn) and Mercurial (hg).

Thus, there are options, and you can choose the one that you prefer. My recommendation is choosing one SCM and using it. In case of problems, an SCM makes it easy to compare changes and revert the files to previous versions, besides making it easier to develop new features in parallel to the main version of a project.

IDEs and advanced text editors even can provide options for integration with SCM. It can be worth to check the documentation of your favorite tools to discover if they provide options for integration.

Tests

Bugs are inevitable and part of the process of software development. To identify bugs, you test your project.

You can test all steps of project: from before writing the first line of code to after releasing the system to the public.

The goal of test processes is to find problems, that is, to show that there is something wrong with the design, implementation or any other artefact related to the project. In other words, a project on which tests do not show problems it not necessarily correct. Rather, the reality is that there currently are not tests making the problems explicit.

When you are learning to program, you use one of the most primitive manual test techniques: print commands (such as print() and console.log()). Perhaps surprisingly, the primitive technique can be efficient in complex systems. In particular, it can even be the only option in some cases and some kids of systems (such as real time interaction systems, like digital games).

Still, there are techniques for diverse purposes and ends. Examples include function, unity, regression, system, usability and accessibility tests.

Continuous Integration

If, at this point, it may appear to be a challenge to make systems work correctly, the truth is that it really can be. Complex systems inevitably have problems. Again, although tests can show that a system has problems, they hardly ever are sufficiently in depth to show that a system is correct.

One can automate tests and deploy with continuous integration systems, that can combine compilation, test and distribution of generated artefacts when tests are successful. A pipeline to generate systems.

Errors Are an Intrinsic Part of Programming

Finally, errors are part of programming. Every programmer makes mistakes, regardless of experience. The only person who does not make mistakes is the one who never tries something new and always do the very same things.

An important skill is learning to accept that errors are part of the process. Many experienced software developers question whenever a first implementation seems to be correct. It is like that there exists problems; they were just not yet identified.

Furthermore, it may seem that there is much to learn and that is impossible to learn everything. It is, in fact. It is important to begin; you will incrementally acquire the knowledge as you practice.

In programming, the learning is continuous and never ends.

Next Steps

The next entries describe development environment for some programming languages. Next, the topics start basic concepts for learning programming.

  • Informatics
  • Programming
  • Beginner
  • Dev Env
  • Windows
  • Linux
  • Computational Thinking