1. PROGRAMMER PLUS
This lesson begins with a short but important discussion of where programming might fit into your future. Many programming discussion group postings read something similar to: "Okay, I have gotten pretty good at programming in (C, C++, C#, Java, Python, whatever); now where can I get a job?" Knowing only a single programming language may get you a position as a trainee, but the most interesting jobs require competence in additional fields.
Computing is such an integral part of society that there are many people who program daily but don't consider themselves programmers. Being able to write a program to assist them in their real work is simply part of their total professional competence. You should regard programming ability in some language or languages as just part of your total package.
Now, onward to your future with programming. Because this is the last lesson, it will offer many links for you to get more information. Please feel free to jump out to those links anytime.
2. PROGRAMMERS AND THE DIGITAL REVOLUTION
The explosion of digital technology in the last few years is sufficiently dramatic and important to be called a revolution, or possibly the start of a new era in human evolution. In any case, this explosion creates many employment opportunities for programmers.
Programming Really Small Things
It may not be obvious, but all of those digital gadgets in your life -- from thermostats to microwave ovens -- are running programs written by somebody. You may see this field referred to as embedded computing because the computers are an inseparable part of these gadgets.
The smallest computers, called microcontrollers , are widely used in modern electronics. With all that activity, naturally there are highly specialized Web sites where you can learn more about jobs, tools, and manufacturers that use microcontrollers.
There used to be program microcontrollers in assembler or C; in fact, these are still used in some instances. But as it becomes less expensive to put more computing power on a chip, it's becoming more feasible to program microcontrollers in higher-level languages. When you have a microcontroller that can be programmed in Java, can connect to the Internet, and can also run a Web site, shouldn't it get a more grandiose name?
One of the smallest computers capable of running a Web site is about the size of a kitchen match head. You might not believe it, but here it is .
Highly Portable Computing Power
Computer users are having a convergence of computing and communicating power in the form of portable devices that combines Web browser, text messaging, e-mail handler, desktop utility, and telephone capabilities.
Because of general standardization on Java as a widely supported language on such devices, an astonishingly large market for cell phone games has arisen in the last few years. If you like to program games but don't relish working on the monsters that PC games have become, maybe this field is for you.
We Are the Robots
Robotics is currently another field that might interest you. Programming robots can involve anything from electrical engineering to artificial intelligence. You don't need to spend big bucks to get started, either. Lego makes a low-priced but highly capable robot kit that can be programmed in Java . On the serious side, robot programming can even get you involved in space exploration .
Scientific Computing
Practically all scientific fields involve moderate to heavy use of computer power -- from computerized lab instruments using embedded computing power to the largest supercomputer complexes doing climate modeling. Computing power is essential to genome sequencing, earthquake prediction, and climate modeling, just to name a few.
A wide variety of languages are used in scientific computing, but you can't go wrong by studying the C family of languages back in Lesson 4.
Dynamic Web Pages and the Arts
Programming and the arts! Incompatible? Not at all. Human interface design, especially in the commercial world, is all about perception and emotional impact. If poorly designed Web pages and ghastly interfaces make your artist's soul cringe, maybe Web design, which combines both programming and artistic sensibility, is for you.
The hot technologies in this area are JavaScript, which you have looked at several times in these lesson, and Macromedia Flash and related technologies. In some cases, Java applets can create a dynamic effect on a Web page that simply can't be approached by any other technology.
Internet Services
All Web sites that use dynamically created Web pages, such as portals, auctions, or shopping carts, have to be programmed by somebody -- so, why not you? As more commerce and information retrieval moves to the Web, more job opportunities are created.
3. YOU DON'T HAVE TO REINVENT THE WHEEL
No matter which language you're using, there are a tremendous number of resources available to make your job easier. You may find that someone has already written the exact subroutines or class libraries that you need.
A common nomenclature for referring to libraries is API (Application Programming Interface). You often see the word interface used when talking about language libraries. Just as the phrase air-water interface means the boundary surface between air and a body of water, and graphic user interface represents the boundary between the user and a computer, a programming interface represents the boundary between your program and library functions.
Standard Libraries
Many modern languages come with extensive libraries of their own. During the initial explosion of interest in Java, Sun created so many different APIs that most people became confused as to what is a standard part of the language and what is an add-on library. Sun finally got wise and created three editions of Java.
- J2ME ( Java 2 Micro Edition ) : A set of libraries suitable for people working with small systems such as cell phones.
- J2SE ( Java 2 Standard Edition ): A set of libraries suitable for most programming.
- J2EE ( Java 2 Enterprise Edition ): A set of libraries suitable for those working on the largest scale of commercial Web sites and other applications. (Really complicated -- don't try to start here!)
Many other commercial language vendors follow a similar approach and have editions at various levels. For example, the starting version of Liberty Basic is limited in certain areas and doesn't permit the creation of stand-alone programs.
The C++ language has recently seen the STL ( Standard Template Library ) become a standard part of the language. The STL contains a wide assortment of mathematical and functional tools, as well as a full-featured string class. Having these tools available for use can save incredible amounts of time.
Object-Oriented Language Libraries
One big advantage of OOP (Object-Oriented Programming) is the ease with which you can make use of library functionality. You have basically two ways to make use of an OOP library: You can create instances of a library class, or you can extend a library class.
In Lesson 4, you created a new Java class MyFrame by extending a
library class named Frame . Frame is an example of
a library class designed to be easily extended. As discussed in earlier
lessons, by extending Frame , you inherit the variables and functions that make it easy to
create a new user interface.
Other libraries are designed with self-contained functionality that you can
plug into programs where needed. In the MyFrame example, the
following line created an instance of the Label class,
customized with the text message and positioning instruction.
add( new Label("Hello World", Label.CENTER ));
Online Information
Having a connection to the Internet is similar to having a nearly infinite library at your command. Unfortunately, you have to act as your own librarian to locate the resources you need, but you'll find that search engines are a big help.
Many vendors of programming languages have extensive online reference material for their programming libraries. For example, one starting point to navigate Microsoft's huge supply of technical information is the MSDN Library site . Here you can find both general articles on programming techniques as well as specific details on the libraries available for the .NET family of languages.
Open Source Libraries
The Internet has made it possible for people from all over the world to involve themselves in creating programs and programming libraries in astonishing profusion. The products of these projects are typically freely available to anybody who wants to use them, which is why they're called open source. Probably the most famous open source product is Linux. Its development is discussed in the thought-provoking " The Cathedral and the Bazaar " essay by Eric S. Raymond.
There are many Web sites where these projects are coordinated. If you did the assignment for Lesson 4, you've already discovered some of these sites. Two good examples are Sourceforge (y'gotta love the name) and the Apache Software Foundation , home of the widely used Apache Web server and many other projects in many languages. Sourceforge now hosts over 60 thousand open source projects.
4. THE PROGRAMMING ENVIRONMENT
Every programmer creates a programming environment to suit the needs of particular projects. In some cases, such as Liberty Basic, the programming language comes complete with a built-in editor and the capability to save program files. In the C family of languages, programmers can use their favorite editing environment with a separate compiler and debugger, or use an IDE (Integrated Development Environment).
You'll learn more about IDEs in a minute, but first consider editing programs with a separate application. Although it's certainly possible to edit a Web page (including JavaScript) with the Notepad application that comes with Windows, editors designed specifically for programming can provide some helpful functionality and are cheaper than an IDE. Some features to look for include:
- Syntax color-coding: The editor is aware of key words used in the programming language you are writing and can color code the various elements.
- Project organization: The editor enables you to define a project file that remembers all of the files you're using as well as your custom settings. Opening the project file puts you back at the point you were working on when you closed the project.
- Tool running capability: The editor enables you to define jobs that can be run without leaving the editing environment. Typical jobs might include compiling the program or copying files.
You might find a programmer's editor called UltraEdit32 to be exceptionally useful because has all of these features.
Put It All Together with IDEs
IDEs are very popular tools for writing programs. These environments usually, at a minimum, combine a customized text editor for entering code and tools for debugging. In most IDEs, for example, you can run a program line by line, walking through the instructions as they're processed (called tracing or stepping through a program). The debugger can display the value of variables as they change when statements are executed. This is a useful feature when you're trying to figure out which statement draws an incorrect line in a complicated graphic, or has an error in a long mathematical function or method.
Many IDEs do more than just this. Many programming tasks, such as programming graphical interfaces (windows, toolbars, buttons, and so on) or writing C code to interface with a SQL database, for example, are complex but tend to be written in standard ways. Some modern IDEs provide tools to help write this code for you.
Some of the most popular examples of modern, powerful IDEs include:
- Visual Studio .NET : This widely respected IDE from Microsoft provides the same working environment for C#, Visual Basic, and a number of other Microsoft languages in the .NET family. The main disadvantage is that it's rather expensive.
- Borland IDEs : Borland makes IDEs for Java, C++, C#, and Delphi programming plus many design tools. Special personal versions of these tools that run on both Windows and Linux are available for free downloading, and are ideal for students.
- WebSphere Studio: The latest IDE for Java and JavaScript programming from IBM emphasizes development of Web services.
- CodeWarrior: This line of IDEs from Metrowerks is for C, C++, and Java programming on all desktop environments. Versions for embedded devices such as cell phones are especially popular. Free or low-cost student versions of some products are available.
Many of the modern IDEs provide tools for generating graphics instructions. For example, you can actually drag and drop graphical components from a palette onto a drawing board that represents what becomes the finished user interface. After you've drawn your graphical components, you can then see the instructions the IDE has written that causes those graphical components to be drawn.
As you can imagine, it's often easier to have an IDE write hundreds of lines of code to draw an application's window than it is to do it yourself. The catch is that to have your interface actually do anything other than trivial tasks (such as just being displayed), you usually have to customize the code later.
When you have the IDE write a lot of the code, you also lose some control over how you can rearrange the program later, particularly if you want to use the IDE's tools to generate more instructions after you've modified what it's created. Nonetheless, using IDEs in this way has become common in recent years, as the graphics used in most programs have grown more complex and programming projects try to get more accomplished in less time.
Specialized Programming Utilities
There are many other utilities that the programmer can call on for assistance in accomplishing various chores. For example, when dealing with the HTML markup language, you can use the HTML TIDY program to check for correct usage of markup tags. You might be surprised at the number of mistakes TIDY can find in Web pages.
If you're programming applications for desktop use, it's easy to try the program on your development system; however, if you're programming for an environment such as a cell phone, things get tricky because a cell phone doesn't offer much debugging help.
The emulator is the savior of countless hours of cell phone developer time. A cell phone emulator creates a virtual cell phone on your desktop where your program can be run under more control. A good example is the Java J2ME Wireless Toolkit . It provides a desktop interface, as shown in Figure 8-1, that lets you control a development project that targets a cell phone environment.
View a larger version of this image.
When the program has compiled without error, you can load it into the cell phone emulator and run it, as shown in Figure 8-2. All of the emulated cell phone buttons work as expected to control the program.
5. LEARN MORE
Being a programmer means you never stop learning. Today's most popular languages are being enhanced and improved at a rapid rate, and new technologies are appearing everyday. New computer hardware and faster processors make things possible that wouldn't have even been considered a few years before.
Since the mid-1990s, Internet-related technologies have been developing at a furious pace. It's safe to say that the field of computer programming will keep growing, meaning there'll be more languages, computers, hardware, and operating systems to learn. Fortunately, the Internet also provides Web sites and user groups you can use to keep up with all the current technology.
Programming is a field that continues to grow. New languages, changes in hardware and software, and the growth of the Internet all make programming a challenging field.
Moving On
You've been introduced to a lot of material in this course. Inevitably, there's far more to talk about than could possibly have fit into this course. Hopefully, you now have a feeling for what programming is and the areas in which you want to learn more. If something you saw particularly interested you -- interactive Web pages with JavaScript, or mathematical programming in C -- that's a great place to start learning more. The best way to learn is by pursuing something that interests you. In a field as diverse as programming, that's especially true.
Before you move on, be sure to complete the assignment and quiz for this lesson. Don't forget to drop by the Message Board to see what your fellow students have to say.
