Programming for Non-Programmers

Categories:

Recommended

You’ll need to read this book when you have the following three things happening at the same time:

  • You have a problem to solve that involves data and processing.
  • You’ve found that the common desktop tools (word processors, spreadsheets, databases, organizers, graphics) won’t really help. You’ve found that they require too much manual pointing and clicking, or they don’t do the right kinds of processing on your data.
  • You’re ready to invest some of your own time to learn how to write customized software that will solve your problem.

You’ll want to read this book if you are a tinkerer who likes to know how things really work. For many people, a computer is just an appliance. You may not find this satisfactory, and you want to know more. People who tinker with computers are called hackers, and you are about to join their ranks.

Python is what you’ve been looking for. It is an easy-to-use tool that can do any kind of processing on any kind of data. Seriously: any processing, any data. Programming is the term for setting up a computer to do the processing you define on your data. Once you learn the Python language, you can solve your data processing problem.

Our objective is to get you, a non-programming newbie, up and running. When you’re done with this book, you’ll be ready to move on to a more advanced Python book. For example, a book about Python libraries. You can use these libraries can help you build high-quality software with a minimum of work.

1.2 What Is This Book About?

This book is about many things. The important topics include Python, programming, languages, data, processing, and some of the skills that make up the craft of programming. We’ll talk about the core intellectual tools of abstraction, algorithms and the formality of computer languages. We’ll also touch on math and logic, statistics, and casino games.

Python. Python is a powerful, flexible toolbox and workbench that can help solve your data processing problem. If you need to write customized software that does precisely what you want, and you want that software to be readable, maintainable, adaptable, inexpensive and make best use of your computer, you need Python.

Programming. When we’ve written a sequence of statements in the Python language, we can then use that sequence over and over again. We can process different sets of data in a standard, automatic fashion. We’ve created a program that can automate data processing tasks, replacing tedious or error-prone pointing and clicking in other software tools. Also, we can create programs that do things that other desktop tools can’t do at all.

The big picture is this: the combination of the Python program plus a unique sequence of Python language statements that we create can have the effect of creating a new application for our computer. This means that our application uses the existing Python program as its foundation. The Python program, in turn, depends on many other libraries and programs on your computer. The whole structure forms a kind of technology stack, with our program on top, controlling the whole assembly.

Languages. We’ll look at three facets of a programming language: how you write it, what it means, and the additional practical considerations that make a program useful. We’ll use these three concepts to organize our presentation of the language. We need to separate these concepts to assure that there isn’t a lot of confusion between the real meaning and the ways we express that meaning.

The sentences “Xander wrote a tone poem for chamber orchestra” and “The chamber orchestra’s tone poem was written by Xander” have the same meaning, but express it in different ways. They have the same semantics, but different syntax. For example, in one sentence the verb is “wrote”, in the other sentence it is “was written by”: different forms of the verb to write. The first form is written in active voice, and the second form is called the passive voice. Pragmatically, the first form is slightly clearer and more easily understood.

The syntax of the Python language is covered here and in the Python Reference Manual. Python syntax is simple, and very much like English. We’ll provide many examples of language syntax. We’ll also provide additional tips and hints focused on the newbies and non-programmers. Also, when you install Python, you will also install a Python Tutorial [PythonTut] that presents some aspects of the language, so you’ll have at least three places to learn syntax.

The semantics of the language specifies what a statement really means. We’ll define the semantics of each statement by showing what it makes the Python program do to your data. We’ll also be able to show where there are alternative syntax choices that have the same meaning. In addition to semantics being covered in this book, you’ll be able to read about the meaning of Python statements in the Python Reference Manual, the Python Tutorial, and chapter two of the Python Library Reference.

In this book, we’ll try to provide you with plenty of practical advice. In addition to breaking the topic into bite-sized pieces, we’ll also present lots of patterns for using Python that you can apply to real-world problems.

Extensions. Part of the Python technology stack are the extension libraries. These libraries are added onto Python, which has the advantage of keeping the language trim and fit. Software components that you might need for specialized processing are kept separate from the core language. Plus, you can safely ignore the components you don’t need.

This means that we actually have two things to learn. First, we’ll learn the language. After that, we’ll look at a few of the essential libraries. Once we’ve seen that, we can see how to make our own libraries, and our own application programs.

 

Category:

Attribution

Steven F. Lott. Programming for Non-Programmers, Release 2.6.2. https://web.archive.org/web/20180921063136/http://buildingskills.itmaybeahack.com/book/programming-2.6/latex/ProgrammingforNon-Programmers.pdf

VP Flipbook Maker

Convert your work to digital flipbook with VP Online Flipbook Maker! You can also create a new one with the tool. Try it now!