Learn to Program
is a Contents
page for topics that are related to the art of programming in general.
See Also edit
- Beginning Tcl
- The specifics of Tcl
- Casual Programming - Amateurs, beginners et al
- BOOK Structure and Interpretation of Computer Programs
- formerly used as the textbook of the MIT introductory programming class; widely considered a classic text in computer science
- BOOK Concepts, Techniques, and Models of Computer Programming
- How to be a Programmer: A Short, Comprehensive, and Personal Summary, Robert L. Read, 2002
- How one learns to write better code
- Notes on the Errors ofTeX, by Donald E. Knuth
- "I decided that the presentation of a true-to-life list of errors might be the best way to help other people learn the lessons that my experiences with TeX have taught me."
- What non-Tcl specific books do developers find they reference or recommend
- Practical Compiler Construction: A Non-nonsense Tour Through a C Compiler
- an advanced programming textbook and a compiler-writing primer. Some programming skills are required, but no prior knowledge in the field of compiler construction is necessary
- Sketchy Scheme, 4.5th Edition
- A beginner-friendly introduction to functional programming in Scheme. This is a step-by-step guide to problem-solving in the functional way. The book contains lots of example, from trivial to advanced, as well as Scheme definitions of many standard procedures, an informal explanation of continuations, and a digression dealing with lambda calculus. Got stuck with SICP? Try this one!
- How to Design Programs: An Introduction to Programming and Computing (second edition draft), by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, Shriram Krishnamurthi
- The goal of our book is to introduce readers of all ages and backgrounds to the craft of designing programs systematically. We assume few prerequisites: arithmetic, a tiny bit of middle school algebra, and the willingness to think through issues. We promise that the travails will pay off not just for future programmers but for anyone who has to follow a process or create one for others.
Writing programs is about knowing what you want to do, and finding a way to do it. Reading programs is about understanding what it does, and figuring out what the author wanted it to do. Any author worth their salt is almost certainly also a voracious reader. Make sure to take time to read programs written by others. Lots of them.
There are, of course, many resources out there in the world that teach beginners the art of computer programming. One of the more well-known is The Structure and Interpretation of Computer Programs
, but it uses LISP
rather than Tcl. Tcl is a fantastic first language for someone interested in getting into computer programming, and this page introduces Tcl obliquely by introducing the general art of programming, using Tcl as a resource to illustrate the concepts.
Values and side effects edit
Some commands return useful values, some have side effects, and some do both.
The value of puts
is invariant. It always returns the empty string, so it's never useful:
set a [puts hello]
has a side effect, but no useful value.set
has a side effect. It creates a new variable and assigns a value to it. set
also returns the value that it assigned to the variable, which can be useful sometimes. To set two variables to the same value, one could write:
set b [set a hello]
has a side effect and also has a useful value.string length
is an example of a command that doesn't have any side effects but does have a useful value. It changes nothing in the world of a Tcl script. It doesn't create or delete any commands or variables, and it doesn't write any data to any channels. However, it returns a value that tells us something we might want to know:
string length hello
The last category is commands that have no side effect and no value. There are none of these!
- A real problem
- Why real numbers may not work the way you expect them to in a computer program. See also Computers and real numbers.
Fundamental Concepts edit
- binary representation
- Halting Problem
Data Types edit
- Abstract Data Types
- Data Structures
- Combinatory Logic
- predicate logic
- Function mapping
Program Structure edit
- Control Structures
- Static Variables
- distributed computation
- data analysis
- signal processing
See Program Architecture
- dataflow programming
- the next step in a program is determined by the output of the previous step
- flow-based programming
- like dataflow programming, but articulates the connections as channels and the inputs/outputs as messages
- functional Programming
- program behavior is described as a mathematical function
- little language
- purpose-built languages for specific problem domains
- object orientation
- encapsulation of data and functionality into a discrete operational entity with a defined interface
- relation orientation
- Related terms includeand subject-oriented programming and Aspect Oriented Programming.
- network programming
Memory Management edit
- Garbage collection
- Code Generation
- data is code
- declarative programming
- Getting multiple things done at once.
- domain-specific language
- imperative programming
- Literate programming
- Logic programming
- Genetic Programming
- Extreme Programming
- programming by exception
- test-driven development
- Zero-Defect Software Development
- Not to be taken as meaning "bug-free," Zero-Defect Software Development (ZDSD) is a practice of developing software that is maintained in the highest quality state throughout the entire development process
- Injection Attack
- Secure by design
- Tcl is immune to many "format string vulnerabilities"
- The Peon's Guide To Secure System Development
The Role of Scripting Languages edit
- Why adding Tcl calls to a C/C++ application is a bad idea
Topical Guide edit
- artificial intelligence
More Theory edit
The following pages introduce various computer science topics, but don't yet have any other place to live in this table of contents
- Scripted Compiler
- theoretical computer science
- a forum
- The Strange World of Programming
- A foray into ideas, wisdom, and general principles of developing programs and the programmer.
- Tips for writing quality software
- GCR decoding on the fly, Linus Åkesson, 2013-03-31
- in which Linus solves a longstanding problem by looking at it from a novel angle, and employing trickter and clever code in a very concise manner
- Project Euler
- A series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve.
Bookshelf: Freely-Available edit
- The Architecture of Open Source Applications
- Some great essays on designing programs. The essay on The essay on Berkeley DB is one good one.
- 97 Things Every Programmer Should Know
- A collection of short essays by experienced programmers. Light on code examples, and usually not explanatory enough, but serves well as an index of concepts to read up on.