Skip to main content
  • 1816 Accesses

Abstract

Well, finally we’re getting to the real heart of software development — writing the code. The assumption here is that you already do know how to write code in at least one programming language; this chapter presents examples in a few languages, each chosen for the appropriate point being made. The purpose of this chapter is to provide some tips for writing better code. Because we can all write better code.

Mostly, when you see programmers, they aren’t doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they’re sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. —Charles M. Strauss

Great software, likewise, requires a fanatical devotion to beauty. If you look inside good software, you find that parts no one is ever supposed to see are beautiful too. I’m not claiming I write great software, but I know that when it comes to code I behave in a way that would make me eligible for prescription drugs if I approached everyday life the same way. It drives me crazy to see code that’s badly indented, or that uses ugly variable names. —Paul Graham, “Hackers and Painters,” 2003

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  • Hunt, A. and D. Thomas. The Pragmatic Programmer: From Journeyman to Master. (Boston, MA: Addison-Wesley, 2000).

    Google Scholar 

  • Knuth, D. “Structured Programming with goto Statements.” ACM Computing Surveys 6(4): 261–301. 1974.

    Article  MathSciNet  MATH  Google Scholar 

  • Krasner, G. E. and S. T. Pope. “A cookbook for using the Model-View-Controller user interface paradigm in Smalltalk-80.” Journal of Object-Oriented Programming 1(3): 26–49.1988.

    Google Scholar 

  • Lieberherr, K., I. Holland, et al. Object-Oriented Programming: An Objective Sense of Style. OOPSLA’ 88, Association for Computing Machinery, 1988.

    Google Scholar 

  • Martin, R. C. Agile Software Development: Principles, Patterns, and Practices. (Upper Saddle River, NJ: Prentice Hall, 2003).

    Google Scholar 

  • McConnell, S. Code Complete 2: A Practical Handbook of Software Construction. Redmond, WA, Microsoft Press, (2004).

    Google Scholar 

  • Pike, Rob, Notes on Programming in C, retrieved from http://www.literateprogramming.com/pikestyle.pdf on 29 September 2010.1999.

Download references

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2011 John Dooley

About this chapter

Cite this chapter

Dooley, J. (2011). Code Construction. In: Software Development and Professional Practice. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-3802-7_12

Download citation

Publish with us

Policies and ethics