Unix Development Environment

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

Introduction

Unix was, originally, a timeshare system. But it also evolved into a development environment. Bash, make, ViM, and all the other tools work together to provide an experience that no other development environment (eclipse and Visual Studio included) can approach.

The problem is that the system is so open, so advanced, and so intricate, that it takes a lifetime to fully master all of its features.

That's okay, because the learning curve isn't as steep as some suggest.

The File-Based Environment

In the file-based environment, everything is a file. Files are organized hierarchically into directories. You put files that are closely related to each other in a directory of their own.

This model is extremely powerful. You'll note that none of the advanced development environments stray far from this. The Unix Development Environment is geared towards this method of organization.

Language Neutrality

The Unix Development Environment doesn't favor one language over another, as long as the programs are organized into files.

You have to study the language specifics for how they organize their programs into files. For instance, Python expects a __init__.py file in each module directory.

Parsing Facilities

Languages come with tools to parse the files. When you get an error, it is usually output in a common format that describes the file, the line number, and the error. Advanced IDE will jump to the file with the error. Your editor should be able to do the same (ViM certainly does.)

In addition to the language parsing facilities, there is also a tool called ctypes. This will run through your code and find identifiers, declarations, and definitions. Using ViM, you can jump to the various declarations, or even use auto-complete.

Putting it Altogether

Make is the tool to use when it comes to assembling your code. It is versatile and easy to learn. Writing a good makefile is not as painful as you think at first, and it will be used over and over again.

Examples

Examples abound of a good Unix development environment. Check out a copy of any good unix program such as ViM. Follow the instructions for building it. Then start trying to modify some of it and see what happens when you run make again. Plugin your development to your editor and start learning how to put all the tools together.