Hour 24. The Future of Programming

What’s in store for you as a programmer? One thing is certain and that’s change. Change occurs rapidly in computing. The face of programming has dramatically changed since computers were first invented, and the rate of change is increasing. Today’s programming tools were not even dreamed of 10 years ago, and now it seems that every day a new programming language, framework, database system, or utility pops up to help us innovate even more.

This final hour in Part V, “The Business of Programming,” introduces you to some tools available to help you become a better programmer. More important than the tools, however, is understanding and maintaining a proper coding that is easily maintained by you and your future colleagues.

The highlights of this hour include

Image Improving your programs with the proper tools

Image Profiling for improving your program’s efficiency

Image Keeping efficiency and retaining maintainability

Image Finding other resources available to improve your programming skills

Some Helpful Tools

As you develop more programming skills and work with more programming language environments, you will run across tools that you will want to add to your bag of coding tricks. The following sections briefly describe tools that you might run across as a programmer that you’ll want to look into.

Profilers

Available for many different programming languages, a profiler analyzes parts of your program and determines exactly which parts are sluggish. It is thought that 90% of a program’s execution time is spent in less than 10% of the code. Of course, this rule of thumb is probably not scientifically provable but its concept is understandable.

Perhaps a sorting algorithm is inefficient and needs looking into to speed it up. Perhaps you are performing a sequential search when a binary search might be faster. Perhaps a calculation is inefficient and you can combine operations to make the program compute results more quickly. A profiler can analyze the execution of your program and tell you where the time is being spent during the execution.


Caution

Speed and efficiency are great factors, but don’t forsake proper programming techniques if doing so means eeking out a microsecond or two of machine time. Clear code should be paramount in your coding. Computers are getting faster, not slower, so you know that your program will never run slower than it runs today. Some scientific and financial calculations, for example, get extremely complex. To clarify your code, you could break such calculations into several statements, storing intermediate calculation results along the way. Although it might be more efficient and execute a few microseconds faster, if you combined all the calculations into one long expression, this expression would later be difficult to debug or change if a problem arises. Therefore, unless a system’s speed is critical (as might be the case in some medical or space exploration programs), don’t make your code too tricky to be maintained later.


Many of the major programming languages used both in large corporations and by smaller programming shops and web application development agencies have profilers available for them—Java, .NET, Python, and Ruby programs are all able to be profiled and improved through computerized review. With these tools, a balance can be met between efficient code and clear, maintainable code.

Resource Editors

A Windows programming language brings its own requirements to the table. Tools exist to help the Windows programmer that were not needed in the DOS environment and make no sense in the mainframe world.

One such tool is called a resource editor. A Windows resource is just about anything used in Windows. A resource might be an icon, a text string, a bitmap image, a menu, or a dialog box. As you work with programming languages, you will manipulate such resources.

Several ways exist for you to use resources in your Windows applications. You can, for example, designate an icon to use for the end user’s installation of your application. The user can click that icon to start the application. You might want to create your own icon. A resource editor can help you create and edit icons and other Windows resources. Microsoft Visual Studio contains a resource editor, and there are several free and commercial programs that help you achieve the same goals (such as ResEdit, at www.resedit.net/).

Integrated Development Environments

You can think of Integrated Development Environments, or IDEs, as souped-up text editors that try to automate many common programming tasks. Within a unified graphical user interface (GUI), an IDE may offer a programmer a source code editor plus connections to a version control system, plus a build automation tools, plus debugging and code inspection tools. While a programmer may operate all of these types of tools independently, having installed several different applications to do so, one benefit of an IDE is that it simply allows the programmer to stay “in the flow” and not switch between applications to complete their tasks. Additionally, many IDEs have secondary features that are specific to the programmer’s development language of choice. For example, if you are a PHP developer using an IDE that has been finely tuned for use with PHP, you may be able to take advantage of autocomplete functionality such that the IDE reduces your need to memorize specific built-in function names or even complete syntax.

IDEs are not new technology, and as such, have been refined over many years of use. A common design paradigm for IDEs is to have a strong base feature set but allow for developers to add custom functionality through the use of add-ons or plugins. Eclipse (www.eclipse.org/) is one such popular IDE that provides the programmer with hundreds of plugins that enhance functionality, from changing the GUI theme to integrating automated diagramming functionality, and a lot in between. Eclipse is a free and open-source IDE, as are many others; Microsoft Visual Studio is an example of a feature-rich commercial IDE. You can find a good list of IDEs and their feature sets at http://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments.

Automated Testing

While software quality assurance (QA) testing is not a new concept, the handling of many types of tests through automated means has been on the rise in the last several years. This shift is due in some part to the availability of better tools for the programmer, and in another part to a shift in attitude toward a development process known as test-driven development. In test-driven development, the developer examines the use cases and requirements for a feature, and then writes the tests before actually writing any code. Code is then written until the automated tests pass, and the tests and the code both go through continual refinement throughout the development process.

Even if your programming group does not practice test-driven development, automated testing has a place in your work. There are automated testing frameworks and tools for many programming languages, such as Cucumber (http://cucumber.info) for Ruby and Selenium (http://seleniumhq.org/) for front-end testing of web applications, among many others. Once you begin to automate tests, you will likely find that your programs become more reliable and your process more efficient overall—after all, it is easier to fix something that is constantly being monitored than to have to continually (and manually) search through incrementally larger applications to find needle-in-a-haystack bugs.

Automated testing is not a replacement for a manual QA process or user acceptance testing—it is always important to have actual human eyes on programs and interfaces especially when the target user of these programs and interfaces is a human and not a machine. I have personally experienced web applications in which code has significant test coverage and all of these automated tests pass, but the application itself is completely unusable. Don’t be that developer!

Continuous Integration and Deployment

Automated testing often goes hand in hand with the continuous integration and deployment of applications. Continuous integration (CI) is a process by which work by multiple developers is merged together as it is completed—or checked in to the code repository—and the automated tests are run at that time to detect any errors in the merged code. The idea here is that if multiple developers are working on different parts of an application at the same time, these different parts have dependencies on each other or are in some way affected by each other such that if changes in one part break functionality in another part, it’s much more efficient to detect these issues and fix them sooner rather than later. When using CI, a little up-front effort in writing tests and often checking code into the repository saves development teams a lot of effort later in the process as there is less code to weed through to look for errors.

There are many CI systems available to developers, again ranging from free and open-source to proprietary and commercial. Some popular free and open-source CI software includes Jenkins (http://jenkins-ci.org/) and Travis (https://travis-ci.org/), while Microsoft Team Foundation Server is an example of a proprietary solution.

A natural extension of CI is continuous deployment (or continuous delivery), in which tools assist developers in performing the next logical steps after a codebase has been verified and all tests pass: the packaging and release of the software into a staging environment for manual testing, or into a final production environment for all to use.

Will Programming Go Away?

In the mid-1970s, Management Information Systems (MIS) were going to be the answer to all computing needs. Each company would have MIS in place and all data needed by the company would be at each computer user’s fingertips. That kind of data filtering was to be so vast and efficient that ordinary and more specific programs would not be needed. Obviously, the promise of MIS was not only over-predicted, but also never materialized.

For some time in the last few decades, people have predicted the demise of programmers. However, as those predictions get older and more numerous, the demand for programmers has grown tremendously. The need for programming is increasing at a rapid pace, and at last count in North America, there were four job openings for every developer—the need is still there, and programmers haven’t yet developed the tools that will replace their own jobs.

CASE Tools

In the late 1980s, CASE (Computer-Aided Software Engineering) was going to replace programmers. Instead of having coders who knew one or more programming languages, programming teams would master CASE tools. CASE is like a program generator, only instead of helping programmers write programs, CASE tools help the DP staff create programs starting at the initial design level. A Systems Analyst can use CASE from the inception of a program request to the program’s movement into production.

CASE is a massive program on the computer that the Systems Analyst can use for the initial output design, data definitions, logic definition (some CASE programs even draw flowcharts from a flowchart description entered by the Systems Analyst), and program generation. CASE often produces code based on the Analyst’s logic definition, but heavy programmer intervention is needed to implement any but the most general of programs and to ensure the project’s overall success.

CASE’s proponents promised that it would revolutionize the programming environment and decrease the time and resources needed to produce a finished program. (Most of the newer programming advances promote quicker development time and easier maintenance as their primary goals.) The promise of CASE, however, never materialized. Although CASE has achieved some success, it has yet to produce the advances in software development that were originally hoped.


Note

The CASE products of the 1980s were not bad tools. The problems that resulted from them were due to the fact that CASE helped Systems Analysts and programmers do faster what the Systems Analysts and programmers already did incorrectly. Pre–object-oriented programming (OOP) methods suffer from difficult maintenance and documentation problems that OOP does not introduce. CASE could not eliminate the inherent problems that non-OOP programming contains. (OOP has its own set of problems as well, however, but it is viewed as an improvement over other traditional methods.)



Tip

Think of CASE as a program that helps you and others design and write programs. CASE is good for handling the minute details throughout the system’s development, so you and the other programmers and Systems Analysts can work on implementing all the user’s requests.


In recent years, programmer’s tools have certainly become sophisticated, as you’ve seen throughout this entire 24-hour tutorial. The reason that programmers are needed more than ever is that computer technology keeps changing along with the programming tools. The early PCs brought new challenges to programs because of their lack of speed and their high demand. As PCs got faster, people networked them together and to mainframes, so distributed client/server programs were needed. Windows required much more effort to program than the simpler, text-based DOS mode. The Internet brought a new set of requirements for programmers that was not dreamed of before.

As you can see, programming demand keeps increasing because the nature of computing keeps changing and becoming more complex. That’s the trend that will probably continue for years to come. Programming language developers are recognizing that new tools are needed not to replace programmers but to help them perform their ever-complex jobs.

UML: Data Modeling

UML, or the Unified Modeling Language, provides a uniform definition of modeling a program. Therefore, a company that models one program can share that model with companies that are writing similar programs. The models are not code but are definitions of the applications.

The UML is extremely useful, initially, for database designers and database application writers to share the components of each database and to transfer those components between computers. The concepts in the UML, however, are also being applied to program designs.

UML benefits the following five areas of computing:

1. Reuse—After a company completes a design, that design can be reused.

2. Tool interoperability—The UML design uses different programming and database systems. Therefore, a UNIX-based Java programmer will be able to use the same UML model as a Microsoft Visual Basic programmer.

3. Team development—The UML tools are usable in a team-programming environment.

4. Data resource management—Resources that appear along with the required data in the UML design are tracked along with the UML’s objects.

5. Dependency tracking—If files are required by other files in the design, the UML keeps track of those dependents.

As with the other design tools of the past, the UML will not replace programming, but should enhance programming and enable the design of a system to be used with other systems to improve programmer productivity.

Your Ongoing Training Needs

Only if you keep up with industry changes can you help ensure that computer problems do not occur in the future. Programmers continually hone their skills to keep up with the changing technology in languages, operating systems, software, and hardware. As you learn more about programming, you should consider sharing your knowledge with others through training, consulting, writing, mentoring, or contributing to open-source projects. You will likely find that your own programming skills improve the more you practice and collaborate.

The need for training is never as apparent as it is in virtually every programming department in the world. Programmers are often called to offer a training class for others who do not possess some needed skills. In-house training enables a company to keep a cap on its training costs and control the material being covered.

Your own computer training does not stop. The computer industry changes rapidly. The skills you have today can be obsolete in five years, so part of your job is to continue your own training. It is incumbent upon you to stay up with current trends if you want to secure your computer position in the future.


Industry Standards

Not every new breakthrough in computer hardware and software becomes an industry standard. You do not have to be on the bleeding edge of technology (a pun describing very new and unproved technology), learning everything there is to learn. You do not even have to be on the leading edge of computer programming innovations. For instance, OOP is considered by most to be the best way to program, yet many computer programmers haven’t learned how to program with objects. They might or might not have to master OOP depending on where their jobs take them and the language they must master in their companies. While it is a good idea to stay on top of the latest trends, it isn’t necessary to learn them all because today’s breakthrough might be tomorrow’s flop (OOP is not a flop).

You will find your own niche in the computer field, and specialization is often the way to go, since it is so very difficult to master everything. However, there are plenty of developers who are quite successful as generalists—people who know quite a bit, if not at an expert level, about many different aspects of development. As you learn more about programming, you will find the area that best fits your own interests and you will master that area.


Try to read one good computer book or online tutorial every month or two. Every few months, research a new topic of computer programming to improve your skill levels. Most computer people find that self-study is not a job they balk at; the field of programming is exciting. It never gets old. The new innovations everywhere you look are always exciting and hold the promise of powerful computing power in the future.

Now that you have a more solid foundation than almost any other beginning programmer has ever had, you are ready to direct your education toward more specific goals. You should now begin tackling a programming language in depth. Mastering a programming language takes a while, and people learn at different rates. Nevertheless, the biggest problem budding programmers face is that they jump in too fast. After reading Sams Teach Yourself Beginning Programming in 24 Hours, you will not have that problem; you will be surprised at how well this book’s concepts prepare you for your programming future, whether that future is just for fun or for a career.


Note

Computer books are known for their series approach. As you already know, the Sams Teach Yourself in 24 Hours series is designed to teach you the basics of a subject in as little time as possible. In addition to the highly successful Sams Teach Yourself series, you’ll want to use the Unleashed books to master the advanced aspects of a programming language.


The following Sams Publishing titles are a sampling of some books that you might want to look at to improve your skills as a programmer. These books were specifically chosen to get you up to speed in a specific area of programming:

Image Sams Teach Yourself HTML and CSS in 24 Hours; Sams Teach Yourself Visual Basic .NET in 24 Hours; Sams Teach Yourself Java in 24 Hours; Sams Teach Yourself JavaScript in 24 Hours; and Sams Teach Yourself C++ in 24 Hours—These books are the perfect next step from this book to take you more deeply into the language of your choice.

Image Sams Teach Yourself Java in 21 Days; Sams Teach Yourself Web Publishing with HTML and CSS in One Hour a Day; and Sams Teach Yourself C++ in One Hour a Day—These books take you far into the languages to prepare you for your career or hobby.


Tip

To keep up with the latest in programming titles, regularly check out Sams Publishing’s website at www.informit.com/sams.


Summary

Programming tools go far beyond just the languages themselves. Throughout this 24-hour tutorial, you’ve seen examples of languages and programming tools that help you be a better programmer. This hour showed you additional tools that programmers can use to become more efficient and productive programmers. The most important part of programming is writing clear and concise code so that others can maintain your programs when needed.

After you’ve mastered programming, what’s next? Keep mastering! Continuing education is almost as vital in the field of computers as it is in the medical profession. The rapidly changing computer technologies require that programmers stay on top of current trends by reading books and magazines and taking courses when possible. Share your knowledge with others to help improve the programming community and reduce the backlog that the computer industry faces. Knowledge shared is knowledge improved.

Q&A

Q. Is it important to know multiple programming languages?

A. Depending on your job or the company you work for (or want to work for), knowledge of several different programming languages might be overkill—if you work for a large corporation that develops software products, everyone in the company might use the same programming language for all time. But if you want to move to a different company, you’ve already pigeonholed yourself as a developer only in that language. If that language falls out of popularity, you will find yourself competing for only a handful of available jobs. Therefore, it’s important to stay familiar with the concepts within different programming languages—many of these concepts are the same, if not the specific syntax of the languages—so you can ramp up your knowledge as needed.

Workshop

The quiz questions are provided for your further understanding.

Quiz

1. How can a profiler improve program efficiency?

2. What is an IDE?

3. True or false: Automated testing goes hand in hand with CI and delivery processes.

4. Should programmers and other computer professionals continually update their skillsets to keep up with changes in the industry?

5. True or false: Automated tools are a good replacement for manual testing and review.

6. What does a resource editor do?

7. Are you a bad computer professional if you don’t learn about every single bleeding edge technology that is invented?

8. True or false: The computer industry changes often so you must continually hone your skills to maintain your competence and stay in demand.

9. What is CASE?

10. What is UML?

Answers

1. A profiler locates inefficiencies in code.

2. An Integrated Development Environment brings together tools for completing common programming tasks into a unified GUI.

3. True

4. Absolutely.

5. False

6. A resource editor is a program that helps you create and keep track of Windows resources.

7. No. Many technologies have come and gone; focus on knowing concepts and general information and be selective about what you learn (unless you have infinite time and brainpower).

8. True

9. CASE is a complex design technology to help organizations design, build, test, and implement complete computer systems.

10. Unified Modeling Language provides a uniform definition of modeling a program.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.34.62