Development Environments

Development Environments, sometimes called a Software Development Environment (SDE) or Integrated Development Environment (IDE 1) are a key feature for most development groups. All hardware manufacturers have either developed their proprietary environment or developed a relationship with an SDE or IDE vendor. Even Microsoft, mainly a software creator, has developed Microsoft Visual Studios for developing software in multiple software languages. Many Development Environments (DEs) have templates that make developing code for certain platforms and languages easier. Code in DEs can be developed in either to-be-compiled languages or in scripted languages usually executed from command prompts (If you are familiar with UNIX (LINUX) commands, then this is fairly easy).

Table of Contents

The development environments covered here are:

  1. Shell Scripts Environments
  2. Software Development Environment
  3. Integrated Development Environment
    1. Microsoft Visual Studio
      1. Debugging
      2. Include Files
    2. Eclipse
    3. IntelliJ Idea
      1. Template Command Line
      2. Template “Hello World!”
      3. No Template
    4. Single Language IDEs’s

Shell Scripts Environments

Appearance of Cygwin shell for running LINUX commands on a Windows 10 system

Appearance of Cygwin shell for running LINUX commands on a Windows 10 system

For most of my shell script development on my Windows 10 system, I use Cygwin. Cygwin is an environment that uses the Borne Again Shell (BASH) to execute UNIX/LINUX shell commands. It is a mostly complete environment, but does lack some of the task scheduling characteristics of a full LINUX system or Windows 10.

Software Development Environment

The SDE term was usually used for Development Environments developed for UNIX

Using UNIX Motif windowed environment to have integrated tools in the SoftBench Environment

Using UNIX Motif windowed environment to have integrated tools in the SoftBench Environment

systems. For example, at Hewlett-Packard we developed SoftBench to help developers on HP-UX. We did port it to Solaris so that developers could use SoftBench as their development environment on both systems. An excellent paper describing SoftBench was written by Deborah A. Lienhart. SofBench used Motif on HP-UX to created wrappers for command line tools, as well as creating tools that used the full features of Motif, to integrate into the X Window system.

These tools communicated by the Broadcast Message Server (BMS) by sending out standard commands to a specified tool class. Integration was done through the Encapsulator, which allowed developers to substitute other tools for the standard SoftBench tools or add new tools to the environment. For substituting a tool for an existing tool, it just required the new tool to understand the TOOL/COMMAND/data format of each message and respond to it correctly. New tools could be added to the environment by defining the acceptable TOOL/COMMAND/data commands and publicizing those commands so that others could use the added tools. We worked with several venders to provide their tools instead of the standard SoftBench tools for code development. Some of the first integrations were from Configuration Management companies. these were tightly integrated with the BUILD tool so that the developer could specify which version of the project/too/executable could be built and the BUILD tool would gather the proper files from the CM tool to build the desired version. Stephen A. Williams wrote a paper about Using SoftBench to Integrate Heterogeneous Software Development Environments

I did go to Sweden to train engineers on how to use the Encapsulator to build an integrated tool set. The most interesting project that came from this was the Zurich Air Traffic control system. They used the BMS to track planes and other objects (like buses and trucks on the taxi-ways and near the runways). They used very few of the original tools, but loved the way they could exchange information about each object. The group wanted to port the project to the Stockholm airport, but the coding had been done so specifically for the Zurich airport that it would not be easy to port. By this time I had been moved to the Ignite-UX project or I would have loved to work with them to make their code more generic so that it could be ported to other airports. However, because of politics HP was downplaying this environment by 2002 so the porting did not happen. The last I heard was the airport finally had to go to a different system for lack of maintenance of this product. Too bad.

Integrated Development Environment

This is the more accepted term for development environments on a Microsoft Windows system. All my examples are currently created on downloads on a Windows 10 system. The two most common IDEs are Eclipse and Microsoft Visual Studio (MVS). Because of some changes in Eclipse that make it a bit harder to use, I have been experimenting with IntelliJ Idea by JetBrains.  It has some quirks of its own, but at least it puts its executable package in the Program Files directory unlike the current (2018) version of Eclipse. All IDE’s can generate code for multiple languages, including C/C++, PHP, Python, Java, and JavaScript. In addition, MVS also includes various environments for C#. I will be exploring both the environment and a language at the same time. Microsoft VS for C# can start with slightly different environments, depending on what executable you would like to develop. My first is for simple programs developed for the Command Prompt input and output. This has the least amount of overhead. Additional examples will be added.

Microsoft Visual Studio

Visual C++ is the IDE I use in my C++ class. It is a versatile environment that allows easy development of small projects and reasonable development of large projects. This description is for VS 20179, but the interface has been fairly consistent from 2010. An example of the interface is:

VS C++ General Interface

Visual C++ Interface

First a Project and new files must be created. To create a Project, go to the File menu and select Project. We are using the empty C++ Applications in our class. The menu appears as:

Create New Items

Create New Project and Files

Starting

Starting Visual Studio is straight forward. There are two main versions available to students, VS Community on Windows 10 and VS Code on Apple iOS and Linux systems. For a visual description see the Starting Visual Studio Community and Code for C++.

Debugging

Debugging is a critical part of code development. It is done through the Debug tab. To use, make sure you have the “Autos” Window up by selecting

 Debug-?Windows->Autos

The menu would look like:

Show variables and Values

Show variables and values

When you have selected the Autos menu item, you will see a frame on the bottom left that displays your variable names and their values. Click on the grey column to the left of the line numbers and then start debugging (under the Debug tab). The program will stop where the break point is set.

breakpoint

Breakpoint

Then carefully step one line at a time and carefully look at the values of the listed variables and the output, for example in your console, one line at a time.

Include Files

The files to create are the Header and Code files. You need a matching set, a code file with the implementation and an header file to define the interface to the functions within the code so that other source code modules that need to use the functions can have a “prototype” to link with to access the actual code. The file choices follow:

File Creation

Create Code and Header Files

A header file looks like:

/* Input.h
 * Author: Wayne Cook
 * Date: 28 November 2018
 * Purpose:
 *  This header file allows the main program to access the functionality associated with Room 1.
 */

#include <iostream>
using namespace std;
string input(string message);

Please note the prototype in the header file matches the entry point in the following code file:

/* Input.cpp
 * Author: Wayne Cook
 * Date: 29 November 2018
 *Purpose:
 *  Have one standard input for all keyport entries.
 */

#include "Input.h"

/* Emulate Python input() command. If you use this method, you must use it
 * for all input and convert the string to the desired input. Otherwise you
 * will have some unread newlines, which will mess with your future input.
 * You can get rid of the extra newlines with cin.ignore(), but if you have
 * typed in anything, it will wait for you to type in something and hang.
 */
string input(string message)
{
    string retVal;
    bool check;
    cout << message;
    do {
        cin.clear();
        getline(cin, retVal); // Now read the line up to the newline.
        check = cin.fail();
        cout << "The value of check is: " << check << endl;
    } while (check);
    return(retVal);
}

Then [add] Existing Files to your Source List and Header List to guarantee that the code will be included in all future builds.

Adding Source and Header Files

Add Existing Source and Header Files

Once the Existing Files are added, you are ready to Build and Debug.

Eclipse

Used to be my favorite for developing JAVA, but they have changed it enough that I now prefer Idea.

IntelliJ Idea

IntelliJ Idea is a Development Environment created by JetBrains. It can be downloaded from the IntelliJ Idea home page. The Interface is divided into four parts:

  1. Menu Bar along top
  2. Project Directory in the middle on the left
  3. Code Pane on the right>/li>
  4. Compilation and output pane across the bottom

Creating a New Project

New Projects can be created from either existing source or from a template. We will use a default emplate in this example.

    1. On the Menu Bar select File:New > Project…New Program
    2. A New Project… dialog box will appear.
    3. Make sure Java is selected in the left column.
    4. For the Project SDK: select the Java Development Kit (1.8 or 1.10) which is found under the Java Program Application directory. For Windows: c:\Program Files\JavaProject SDK
    5. No library needs to be selected for basic Java programs.
    6. Click the button. At this point, there are three options that are available. You can check the check-box for “Template” and then choose either the Command Line or “Hello World!” options.  Choose wisely, once you have made this choice, click 

Select Wrok Directory

Template Command Line

    1. If you choose the Command Line option, you must include the line:
           System.out.printlin("Hello Worlds!");
      

      in the main() method of your main class.

    2. Please specify where you want to bring up the new project.

Template “Hello World!”

  1. If you choose the “Hello World” option, everything is done for you, so there is no more coding to do.
  2. Please specify where you want to bring up the new project.

No Template

For the NoTemplate option, you must do the following steps:

  1. On the Create from Template window, use the defaults and click the button.
  2. Choose your Program name: wisely. For this example, I chose NoTemplate
  3. The default Project directory is on the following line. Make sure it points to the desired location
  4. Click the button.
  5. If you are working on a Project already, a new dialog box opens with the choices . Choose wisely.
  6. After this choice, the dialog box goes away and leaves the main window. The center section has not loaded any code and has other information which we will cover later.
  7. Click on Project▼ in the left pane, it will display your project name (Methods).
  8. Click ►????methods to change to ▼????methods to show ????src directory.
  9. Click on the ????src directory and press to bring up a new list.
  10. Select ©Java Class from the list.
  11. In the dialog box, type in your class name. It is best if it is the same as the file name. In this example it is NoTemplate.
  12. Keep the Kind: as ©Class and click
  13. To run this code, it does need to be tied to a Template. On the Run menu, choose Edit Configurations….
  14. Then choose the Application Configuration. It brings up a template to fill in. Most of the selections can be entered through the or a down arrow. My configuration looks like:
    Create Template
  15. You now have a Java file with the public class NoTemplate. To add the required main() method within the new class, type “psvm” to create a “public static void main(String[] args) method.
  16. Insert the following line in your main() method:
         System.out.printlin("Hello Worlds!");
    

    You are now almost ready to compile.

  17. Compile the code with Build:Build Project.
  18. The first time you can run is to use the green arrow to the left of the main function.Start Pointers.png

Single Language IDEs’s

There are also some single language environments that are available.  Sun Microsystems developed NetBeans for their Java environment, while IDLE was developed for Python. Both are single language development environments and are fairly well documented by their developers. I will only be covering multi-language IDS’s in this article.

Footnotes

1 Unfortunately, like most TLAs, IDE can also represent the International Development Enterprises. This is a great organization that helps small business owners in developing countrie