Programming in the Real World

Software Careers Fall 1997 Dr. Dobb's Journal

by Allen Holub


Allen, a contributing editor to Dr. Dobb's Sourcebook, can be contacted at http:// www.holub.com/.
When you have little real-world programming experience, a computer-science degree is your ticket to an job interview. But the fact is that many of the classes you sweated over have little relevance outside academe. As a working application-development programmer, for instance, you probably will never see an integral sign, compute a determinant, or formulate a mathematical proof. The same goes for the theoretical computer-science classes-more than likely, you will never have to prove NP completeness or use O(n) notation. While there are some (though not many) parallels between the problem-solving process in math and programming, once you get beyond programs of a trivial size, the parallels in process are essentially nonexistent. Writing high-quality programs is a form of writing, not a form of mathematics. If math had anything to do with programming, all the best programmers would be mathematicians (which is not true), and people trained in the liberal arts would make lousy programmers (which is also not true). In fact, some of the best programmers I know have degrees in sociology, Russian literature, or English.

Furthermore, many of the skills you desperately need to be productive in most programming shops are often not taught in universities. Do you have experience working on a program of, say, 100,000 lines of code? Have you worked as a team with other programmers for extended periods of time? Have you ever designed a program that will take five programmers a year to write? Have you ever done a "complete" design-requirements documents, problem and goal descriptions, user interfaces, manuals, documentation, static-model and scenario diagrams, data structures, and the like-of even a small program?

Have you ever had to find a bug in code written by someone 20 years ago in Cobol and then translated by someone else to C? Have you had to integrate existing, poorly designed code into a new program? What do you know about human-factors engineering and user-interface design? Have you done any formal testing? Have you ever productized a program, written the user manual, written installation and configuration programs, and the like? Do you document your code adequately, choose variable names that form complete words in English (so that they can be understood by non-native speakers), and format for readability? Do you know SQL, or how to design and normalize a database properly?

What nearly 20 years as a design educator, author, consultant, and programmer on projects ranging from operating systems to embedded robotics have taught me is that there's a huge gap between what you learn in school and the work that goes on in the software-development trenches. The real world of computer programming is more like what I've just described than what you learned in Computer Science 101. Luckily, most employers are prepared to train you.

How Did We Get into this Mess?

The dichotomy between academe and the computing profession is not unnoticed; see, for example, "Revisiting the Industry/ Academe Communication Chasm," by Robert Glass (Communications of the ACM, June 1997). The core problem is that computer science, as taught at most universities, concerns itself with the analysis of computer programs, not the creation of them. (I'm making a distinction here between "computer science" and "software engineering," which, to me, are different disciplines.)

For instance, many, though not all, computer-science professors have little experience in putting together high-quality production code. Consequently, many of them don't really understand the real-world software-development process at all.

I ran into this phenomenon when working on Compiler Design in C, a book that teaches how to put together a C compiler and the tools that you need to build a compiler by actually implementing them. In the book, I included and discussed full source code for lex, yacc, and a C compiler. One of the peer reviewers, a full professor at an well-respected school, didn't like the book because it contained code, and he couldn't understand why the code was important. His comment was that code "has no place in a book of this sort." Compilers, in his view, should be taught by "presenting the underlying mathematics." "The implementation," he said, "is trivial." Clearly, the reviewer had never implemented a compiler. The point here is that the attitude that the coding is a trivial matter not worth real study is widely held in the academic world. The end result is that many people get out of school knowing a lot about computers, but almost nothing about the process of programming.

So Now What?

The $64,000 question is, given that you'll be competing with thousands of other new graduates, what's the best way to stand out of the crowd when entering the real world of computer programming? How do you best prepare yourself for work as a programmer in the real world? For what it's worth, here's my advice:

While I'd like to say that understanding formal-design methodologies and software engineering is essential, it remains that many companies don't use even the most basic practices that would improve the quality of their code and time to market. Many companies just work their employees until they burn out, then hire a new batch to replace them. It turns out that this is probably the worst way to put together a product-it takes longer and costs more-but there it is.

On the other hand, many (not all) large corporations take quality seriously, and a solid grasp of software engineering is a plus. Some industries (like defense, medical, and aviation) stand out. Companies such as Boeing, IBM, Motorola, Schlumberger, Bull, and Siemens all take software engineering seriously. Most of these are multinational companies; excellent smaller American companies exist, but are less conspicuous. No matter where you work, though, you'll be able to write more code in less time than your coworkers if you design and construct your own code carefully.

Conclusion

I don't want to give the impression that you learn nothing of value in school. For example, the ability to live on Jolt cola working 20-hour days, week after week, is a definite plus. And of course, following my advice won't guarantee you a job or elevate you to programming guruhood, granting infinite bliss and complete fulfillment. You will have a step up when moving from the cloister to the outside world, though, and every little bit helps.

DDJ