'''Learn to Program''' is a '''Contents''' page for topics that are related to the art of programming in general. ** See Also ** [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]: [What non-Tcl specific books do developers find they reference or recommend]: [http://www.t3x.org/reload/index.html%|%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 [http://www.t3x.org/index.html%|%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! [http://www.amazon.com/How-Design-Programs-Introduction-Programming/dp/0262062186%|%How to Design Programs: An Introduction to Programming and Computing] ([http://www.ccs.neu.edu/home/matthias/HtDP2e/index.html%|%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. ** Description ** 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 ''[BOOK Structure and Interpretation of Computer Programs%|%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 ** 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] ====== Therefore, `[puts]` 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] ====== Therefore, `[set]` 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! ** Working Environment ** [SCM%|%source code management]: [Bug Tracking System%|%Bug Tracking]: ** [Computer Architecture] ** [byte]: : ** Fundamental Concepts ** [Automaton]: [Binary representation of numbers%|%binary representation]: [Halting Problem]: [homoiconic%|%homoiconicity]: [scope]: [syntax]: ** Data Types ** [Abstract Data Types]: [Reference%|%References]: ** [data structure%|%Data Structures] ** [data structure%|%Data Structures]: ** Logic ** [Combinatory Logic]: [predicate logic]: ** Functions ** [curry]: [lambda]: [Function mapping]: [Functional composition%|%composition]: ** Program Structure ** [control structure%|%Control Structures]: [proc%|%Procedures]: [Closures]: [continuation%|%Continuations]: [coroutine%|%Coroutines]: [Concurrency concepts%|%Concurrency]: [Generator%|%Generators]: [iterators%|%Iterators]: [recursion]: ** State ** [Static Variables]: [Constants]: ** [Persistence] ** ** Calculation ** ** Processing ** [parsing]: [serializing%|%serialization]: [Data analysis with Tcl%|%data analysis]: [signal processing]: ** [program architecture%|%Design] ** See [Program Architecture]: ** Paradigm ** [Functional Programming]: [Object Orientation]: ** Communication ** [ipc]: [network programming]: ** Memory Management ** [Garbage collection]: ** Technique ** [Code Generation]: [data is code]: [declarative programming]: [Event Processing%|%events]: [debugging]: [domain-specific language]: [imperative programming]: [Literate programming]: [Logic programming]: [Profiling Tcl%|%profiling]: [testing]: [event-oriented programming]: [Genetic Programming]: ** Methodology ** [Extreme Programming]: [programming by exception]: [test-driven development]: ** Security ** [Injection Attack]: [Secure by design]: [Tcl is immune to many "format string vulnerabilities"]: [http://web.archive.org/web/20050410143900/http://m.bacarella.com/papers/secsoft/html/index.html%|%The Peon's Guide To Secure System Development]: ** The Role of Scripting Languages ** [Why adding Tcl calls to a C/C++ application is a bad idea]: ** Topical Guide ** [artificial intelligence]: [algorithm%|%algorithms]: [encryption]: [Graphics with Tcl%|%graphics]: ** More Theory ** 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]: [http://cstheory.stackexchange.com/%|%theoretical computer science]: a forum ** The Art ** [Tips for writing quality software]: [http://www.linusakesson.net/programming/gcr-decoding/index.php%|%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 <> Tutorial