Page 429 -
P. 429
heavy lifting
Scary
#9: Advanced programming topics
There are a bunch of advanced programming topics that were never likely to
make it into a book like this. Here is a list of six such topics (all supported by
Python 3).
Threads are a programming technology that allows you to break your
program into discrete coded chunks that can then be executed in parallel or
concurrently. Each chunk is known as a thread. Using threads can result in
some beautiful coding designs, which can make the solving of a certain class
of problem almost trivial. Under certain circumstances and restrictions, it is
possible to have threads communicate with each other and share data, which,
although possible, is hard to get right and can lead to some rather tricky
and hard-to-track-down bugs. If you think you need threads, approach with
extreme caution and be prepared to have your brain expanded in ways that you
never thought possible.
Recursion is a programming technique that allows you to create a function
that is capable of calling itself in order to get its work done. There are certain
types of mathematical problems that are well-suited to a recursive solution, You mean I won‛t
but not much else. have to read all
these right now?
Metaprogramming refers to writing programs that can write other
programs or manipulate themselves (sounds icky, and it can be). It is not for
the faint of heart.
Functional programming (typified by languages such as Lisp) is a
technique that treats computation as a series of function calls that specify
what is required of the program, as opposed to a procedural program, which
details the steps that are required in order to solve a problem.
Regular expressions are a technology that allows you to specify
concisely what it is you are looking for in your data. Having written a
regular expression (or regex), Python can then go and get it for you. Every
programmer should know how to take advantage of regexes. The trouble is,
they look so very strange at first that most coders recoil in disgust. This is a
pity, as we think regexes are super cool and well-worth learning.
Unicode is an industry standard that allows you to consistently represent
and work with text written in most of the world’s languages or “writing
systems.” If you are working with text originating from somewhere other
than the place where they speak your language, then you’ll want to know a
bit about the Unicode character encoding system.
If you find yourself needing any of this stuff, best to start on the Internet and
do some background reading on the topic before buying a book with your
hard-earned cash. The Wikipedia entries for each of these six topics are
good starting points.
394 appendix i

