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 that are available to help you become a better programmer. More important than the tools, however, is understanding and maintaining proper code that is easily maintained by you and your future colleagues.

The highlights of this hour include the following:

Image Improving your programs with the proper tools

Image Using profilers to improve 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

Profilers, which are available for many different programming languages, analyze parts of a program and determine 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 the concept is understandable.

Perhaps a sorting algorithm is inefficient, and you want to look into how 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 just to eke 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 more slowly 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 and store intermediate calculation results along the way. If you combined all the calculations into one long expression, although it might be more efficient and execute a few microseconds faster, it would later be difficult to debug or change if a problem arose. 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 can all be profiled and improved through computerized review. With these tools, you can find a balance between efficient code and clear, maintainable code.

Resource Editors

A Windows programming language brings its own requirements to the table. Many of the tools available to a Windows programmer 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—such as 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

One of the ways coding has vastly improved in recent years is through the use of integrated development environments (IDEs). You have already seen IDEs used in the early parts of this book, particularly in the hours featuring Python and Visual Studio. As a reminder, you can think of 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 build automation tools, plus debugging and code inspection tools. While a programmer might operate all 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. In addition, 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 but have been refined over many years of use. A common design paradigm for IDEs is to have a strong base feature set and allow developers to add custom functionality through the use of add-ons or plugins. Eclipse (www.eclipse.org) is an example of a 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 https://www.g2.com/categories/integrated-development-environment-ide. (As an added bonus, the programming languages you can use with each IDE is covered at that site. We’ve covered quite a few options in this book, but there’s much more out there!)

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 past several years. This shift is due in part to the availability of better tools for programmers, and it is also due 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. The developer then writes code 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 (https://cucumber.io) for Ruby and Selenium (http://seleniumhq.org) for front-end testing of web applications, among many others. When 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 the automated tests pass, but the application itself is completely unusable. Don’t create that kind of code!

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 in 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 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, ranging from free and open source to proprietary and commercial. Popular free and open-source CI options include Jenkins (http://jenkins-ci.org) and Travis (https://travis-ci.org); Microsoft Team Foundation Server (https://docs.microsoft.com/en-us/visualstudio/releasenotes/tfs2018-update3) is an example of a proprietary solution.

A natural extension of CI is continuous deployment (or continuous delivery). With continuous deployment, tools assist developers in performing the next logical steps after a codebase has been verified and all tests pass: packaging and releasing 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 overpredicted but also never materialized.

For some time in the past few decades, people have predicted the demise of programmers. However, 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 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 a computer that a systems analyst can use for the initial output design, data definitions, logic definition, and program generation. (Some CASE programs even draw flowcharts from a flowchart description entered by the systems analyst.) 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 overall success of a project.

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 envisioned.

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 more quickly 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 of non-OOP programming. (OOP has its own set of problems, 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 minute details throughout a system’s development, so you and other programmers and systems analysts can work on implementing all the users’ requests.

In recent years, programmers’ tools have certainly become sophisticated, as you’ve seen throughout this 24-hour tutorial. Programmers are needed more now than ever before because computer technology keeps changing, along with the programming tools. Early PCs brought new challenges to programs because of their lack of speed and high demand. As PCs got faster, people networked them together and connected them 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 had not been imagined before. With people relying on their mobile devices for much of their day-to-day computing needs, programmers have a whole new platform on which to apply their trade.

As you can see, programming demand keeps increasing because the nature of computing keeps changing and becoming more complex. This trend 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-more-complex jobs.

UML: Data Modeling

UML, or Unified Modeling Language, provides a uniform definition of modeling a program. 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.

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 UML, however, are also being applied to program design.

UML benefits the following five areas of computing:

Image Reuse: After a company completes a design, that design can be reused.

Image 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.

Image Team development: The UML tools work well in a team-programming environment.

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

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

Like other design tools, UML will not replace programming, but it 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 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 may 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.

Try to read one good computer book or online tutorial every month or two. Every few months, research a new computer programming topic to improve your skill levels. Most computer people do not balk at self-study; the field of programming is exciting and 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 might 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 specific areas 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. 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 all the time. But in case you want to move to a different company, you don’t want to pigeonhole yourself as a developer in only one 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 in different programming languages; many of these concepts are the same, even if the languages differ in their specific syntax, 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 comes along?

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 IDE is an integrated development environment, which 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.191.157.186