background preloader

PROBLEM SOLVING

Facebook Twitter

Don't Prevent Students' Mistakes, Prepare for Them - Coach G's Teaching Tips. Teaching Students Better Online Research Skills. IDESiGN_Applying I DESiGN. Manager.it - Metodo per il problem solving. Manager.it - Tool per il Problem Solving. Six ways to write more comprehensible code. I learned to write, clear, maintainable code the hard way. For the last twelve years, I've made my living writing computer games and selling them over the Net using the marketing technique that was once charmingly known as shareware. What this means is that I start with a blank screen, start coding, and, a few tens of thousands of lines of code later, I have something to sell. This means that, if I make a stinky mess, I'm doing it in my own nest. When I'm chasing down a bug at 3 a.m., staring at a nightmare cloud of spaghetti code, and I say, "Dear God, what idiot child of married cousins wrote this garbage? ", the answer to that question is "Me. " So I have been well rewarded by learning about good, sane programming techniques.

But there are many who, like me, stumbled into programming in an unexpected or unusual way and never had anyone drill this stuff into them. The example case Figure 1. The game will take place in periods of time called Waves. Killing an alien gives you some points. Solving Every Sudoku Puzzle. By Peter Norvig In this essay I tackle the problem of solving every Sudoku puzzle. It turns out to be quite easy (about one page of code for the main idea and two pages for embellishments) using two ideas: constraint propagation and search. Sudoku Notation and Preliminary Notions First we have to agree on some notation. A Sudoku puzzle is a grid of 81 squares; the majority of enthusiasts label the columns 1-9, the rows A-I, and call a collection of nine squares (column, row, or box) a unit and the squares that share a unit the peers.

A puzzle is solved if the squares in each unit are filled with a permutation of the digits 1 to 9. That is, no digit can appear twice in a unit, and every digit must appear once. Every square has exactly 3 units and 20 peers. We can implement the notions of units, peers, and squares in the programming language Python (2.5 or later) as follows: def cross(A, B): "Cross product of elements in A and elements in B. " return [a+b for a in A for b in B] Search Results 翻訳.

WorkFlowy - Organize your brain.