background preloader

Programming

Facebook Twitter

Dijkstra Archive: A Short Introduction to the Art of Programming (EWD 316), Chapter 9. 9.

Dijkstra Archive: A Short Introduction to the Art of Programming (EWD 316), Chapter 9

The problem of eight queens The problem is to make a program generating all configurations of eight queens on a chess board of 8 * 8 squares, such that no queen can take any of the others. This means that in the configurations sought no two queens may be on the same row, on the same column or on the same diagonal. We don't have an operator generating all these configurations: this operator is exactly what we have to make. Now a (very general!) With the aid of the generator (3) for the elements of set B, the elements of set B can then be generated in turn; they will be subjected to the decision criterion (2) which decides whether they have to be skipped or handed over, thus generating elements of set A.

Three remarks are in order. 1) If the whole approach makes sense, set B is not identical to set A and as it must contain set A as a (true) subset, it must be larger. In a moment of optimism one could think that this is an easy matter, thinking of the following technique. Note. How? Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns. Sphere Online Judge (SPOJ) Free Computer, Programming, Mathematics, Technical Books, Lecture Notes and Tutorials. Tutorial - Learn Python in 10 minutes.

NOTE: If you would like some Python development done, my company, Stochastic Technologies, is available for consulting.

Tutorial - Learn Python in 10 minutes

This tutorial is available as a short ebook. The e-book features extra content from follow-up posts on various Python best practices, all in a convenient, self-contained format. All future updates are free for people who purchase it. Preliminary fluff So, you want to learn the Python programming language but can't find a concise and yet full-featured tutorial. Properties Python is strongly typed (i.e. types are enforced), dynamically, implicitly typed (i.e. you don't have to declare variables), case sensitive (i.e. var and VAR are two different variables) and object-oriented (i.e. everything is an object). Getting help Help in Python is always available right in the interpreter. >>> help(5)Help on int object:(etc etc) >>> dir(5)['__abs__', '__add__', ...]

>>> abs. Syntax Python has no mandatory statement termination characters and blocks are specified by indentation. Strings. Free Programming Books. Here is an uncategorized list of online programming books available for free download.

Free Programming Books

The books cover all major programming languages: Ada, Assembly, Basic, C, C#, C++, CGI, JavaScript, Perl, Delphi, Pascal, Haskell, Java, Lisp, PHP, Prolog, Python, Ruby, as well as some other languages, game programming, and software engineering. The books are in various formats for online reading or downloading. This list will be updated daily. Scroll downn, or use the shortcuts below. Codepad. Codecademy Labs. Game From Scratch C++ and SFML Edition! Want to create a game using C++ and SFML?

Game From Scratch C++ and SFML Edition!

This is the perfect place to start! This tutorial series will follow the creation of a simple game in C++ from the very beginning till the end, a micro-version of the overall purpose of this site. C++ is an evolving language standard and a great many tutorials out there are horrifically outdated or just plain bad. Similarly, most tutorials in books or on sites are by their very nature required to be very short and concise.

This site fortunately does not have that restriction, so I can babble on and on and on… This series is meant to be a living document, so if you have any questions on specific section, let me know and I will update accordingly! Finally, I don’t pretend to be an expert on C++ nor SFML, so if you see a mistake or you disagree with something I have said, let me know. Alright, lets get this started. EDIT: This tutorial was written a couple years ago and targets Visual Studio 2010. The Introduction Part 1 Part 2 Part 3 Part 4. Become a Programmer, Motherfucker.

If you don't know how to code, then you can learn even if you think you can't.

Become a Programmer, Motherfucker

Thousands of people have learned programming from these fine books: Learn Python The Hard Way Learn Ruby The Hard Way Learn Code The Hard Way I'm also working on a whole series of programming education books at learncodethehardway.org. Learn C The Hard Way Learn SQL The Hard Way Learn Regex The Hard Way Graphics Programming Language Agnostic NerdDinner Walkthrough Assembly Language Bash Clojure Clojure Programming ColdFusion CFML In 100 Minutes Delphi / Pascal. 30 free programming eBooks - citizen428.blog() Since this post got quite popular I decided to incorporate some of the excellent suggestions posted in the comments, so this list now has more than 50 books in it.

30 free programming eBooks - citizen428.blog()

BTW: I’m not very strict on the definition of “ebook”, some of them are really just HTML versions of books. [UPDATED: 2012-01-18] Learning a new programming language always is fun and there are many great books legally available for free online. Here’s a selection of 30 of them: Lisp/Scheme:Common Lisp: A Gentle Introduction to Symbolic ComputationHow to Design ProgramsInterpreting Lisp (PDF, suggested by Gary Knott)Let Over LambdaOn LispPractical Common LispProgramming in Emacs LispProgramming Languages. The Language Guide. Free Programming Resources.